Dolda2000 GitWeb
/
doldaconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8efceeb
)
Rotate, rather than swap, the address field in place in XML hublists.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 2 Sep 2007 02:32:19 +0000
(
04:32
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 2 Sep 2007 02:32:19 +0000
(
04:32
+0200)
clients/gtk2/hublist-xml.c
patch
|
blob
|
blame
|
history
diff --git
a/clients/gtk2/hublist-xml.c
b/clients/gtk2/hublist-xml.c
index
dd2c1cb
..
d72291d
100644
(file)
--- a/
clients/gtk2/hublist-xml.c
+++ b/
clients/gtk2/hublist-xml.c
@@
-61,7
+61,7
@@
static int checkvalid(xmlNodePtr n)
int pubhubxmlhandler(int op, char *buf, size_t len)
{
static xmlParserCtxtPtr ctxt = NULL;
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;
xmlNodePtr dr, r, cr, c, n;
int numcols, *cols, sortcol;
GType type, *types;
@@
-142,14
+142,16
@@
int pubhubxmlhandler(int op, char *buf, size_t len)
}
for(i = 0; i < numcols; i++)
{
}
for(i = 0; i < numcols; i++)
{
- if(!strcmp(names[i], "Address"))
+ if(!strc
asec
mp(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;
}
}
break;
}
}