/*
* Dolda Connect - Modular multiuser Direct Connect-style client
- * Copyright (C) 2007 Fredrik Tolf (fredrik@dolda2000.com)
+ * Copyright (C) 2007 Fredrik Tolf <fredrik@dolda2000.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int pubhubxmlhandler(int op, char *buf, size_t len)
{
static xmlParserCtxtPtr ctxt = NULL;
- int i;
+ int i, o;
xmlNodePtr dr, r, cr, c, n;
int numcols, *cols, sortcol;
GType type, *types;
type = G_TYPE_STRING;
else if(!strcmp(stype, "int"))
type = G_TYPE_INT;
+ else if(!strcmp(stype, "percent"))
+ type = G_TYPE_INT;
else if(!strcmp(stype, "bytes"))
type = G_TYPE_INT64;
}
}
for(i = 0; i < numcols; i++)
{
- if(!strcmp(names[i], "Address"))
+ if(!strcasecmp(names[i], "Address"))
{
- name = names[0];
- names[0] = names[i];
- names[i] = name;
- type = types[0];
- types[0] = types[i];
- types[i] = type;
+ for(o = i; o > 0; o--) {
+ name = names[o];
+ type = types[o];
+ names[o] = names[o - 1];
+ types[o] = types[o - 1];
+ names[o - 1] = name;
+ types[o - 1] = type;
+ }
break;
}
}