[gq-commit] gq/src browse-export.c,1.5,1.6 gq-xml.c,1.13,1.14 ldif.c,1.18,1.19 ldif.h,1.7,1.8 util.c
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2003-11-03 22:28:27
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv20106 Modified Files: browse-export.c gq-xml.c ldif.c ldif.h util.c util.h Log Message: * signed/unsigned stuff to avoid warnings with gcc 2.96 and 3.2.2 Index: browse-export.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** browse-export.c 2 Nov 2003 17:08:28 -0000 1.5 --- browse-export.c 3 Nov 2003 22:28:24 -0000 1.6 *************** *** 88,92 **** GString *gmessage = NULL; /* GString *bigmessage = NULL; */ ! int written; int ctx; struct ldapserver *last = NULL; --- 88,92 ---- GString *gmessage = NULL; /* GString *bigmessage = NULL; */ ! size_t written; int ctx; struct ldapserver *last = NULL; *************** *** 129,133 **** written = fwrite(out->str, 1, out->len, outfile); ! if(written != out->len) { error_push(ctx, _("Save to '%3$s' failed: Only %1$d of %2$d bytes written"), --- 129,133 ---- written = fwrite(out->str, 1, out->len, outfile); ! if(written != (size_t) out->len) { error_push(ctx, _("Save to '%3$s' failed: Only %1$d of %2$d bytes written"), *************** *** 194,198 **** written = fwrite(out->str, 1, out->len, outfile); ! if(written != out->len) { g_string_sprintf(gmessage, _("%1$d of %2$d bytes written"), --- 194,198 ---- written = fwrite(out->str, 1, out->len, outfile); ! if(written != (size_t) out->len) { g_string_sprintf(gmessage, _("%1$d of %2$d bytes written"), Index: gq-xml.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/gq-xml.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gq-xml.c 3 Nov 2003 21:28:37 -0000 1.13 --- gq-xml.c 3 Nov 2003 22:28:24 -0000 1.14 *************** *** 1126,1129 **** --- 1126,1130 ---- int fd; int rc; + int wrote; int l = strlen(filename) + 20; *************** *** 1143,1148 **** } ! rc = write(fd, newbuf->str, newbuf->len); ! if (rc == newbuf->len) { close(fd); rename(tmp, filename); --- 1144,1149 ---- } ! wrote = write(fd, newbuf->str, newbuf->len); ! if (wrote == (int) newbuf->len) { close(fd); rename(tmp, filename); Index: ldif.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ldif.c 28 Oct 2003 19:16:01 -0000 1.18 --- ldif.c 3 Nov 2003 22:28:24 -0000 1.19 *************** *** 142,150 **** ! gboolean ldif_line_out(GString *out, char *attr, char *value, int vlen, int error_context) { GString *tmp; ! int i, w, do_base64; /* char message[256]; */ --- 142,152 ---- ! gboolean ldif_line_out(GString *out, char *attr, char *value, ! unsigned int vlen, int error_context) { GString *tmp; ! int i; ! int w, do_base64; /* char message[256]; */ *************** *** 175,179 **** do_base64 = 0; ! for(i = 0; i < vlen && !do_base64; i++) { if(!isascii( (int) value[i]) || !isprint( (int) value[i])) do_base64 = 1; --- 177,181 ---- do_base64 = 0; ! for(i = 0; i < (int) vlen && !do_base64; i++) { if(!isascii( (int) value[i]) || !isprint( (int) value[i])) do_base64 = 1; *************** *** 191,195 **** w = strlen(attr) + do_base64 + 2; ! for(i = 0; i < tmp->len; i++, w++) { if(w > 76) { g_string_append(out, "\n "); --- 193,197 ---- w = strlen(attr) + do_base64 + 2; ! for(i = 0; i < (int) tmp->len; i++, w++) { if(w > 76) { g_string_append(out, "\n "); *************** *** 206,212 **** static const char ch[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ! void b64_encode(GString *out, char *value, int vlen) { ! int i,j; char chin[4], chout[5]; --- 208,214 ---- static const char ch[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ! void b64_encode(GString *out, char *value, unsigned int vlen) { ! unsigned int i, j; char chin[4], chout[5]; *************** *** 264,268 **** ! void b64_decode(GByteArray *out, const char *value, int vlen) { /* int cnt = 0; */ int eq = 0; --- 266,270 ---- ! void b64_decode(GByteArray *out, const char *value, unsigned int vlen) { /* int cnt = 0; */ int eq = 0; *************** *** 286,290 **** char tmp[] = { 0, 0, 0}; ! int i, j = 0, d; char c; --- 288,293 ---- char tmp[] = { 0, 0, 0}; ! unsigned int i, j = 0; ! signed int d; char c; Index: ldif.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ldif.h 28 Oct 2003 19:16:01 -0000 1.7 --- ldif.h 3 Nov 2003 22:28:24 -0000 1.8 *************** *** 1,5 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 33,40 **** gboolean ldif_entry_out(GString *out, LDAP *ld, LDAPMessage *msg, int error_context); ! gboolean ldif_line_out(GString *out, char *attr, char *value, int vlen, int error_context); ! void b64_encode(GString *out, char *value, int vlen); ! void b64_decode(GByteArray *out, const char *value, int vlen); #endif --- 34,42 ---- gboolean ldif_entry_out(GString *out, LDAP *ld, LDAPMessage *msg, int error_context); ! gboolean ldif_line_out(GString *out, char *attr, char *value, ! unsigned int vlen, int error_context); ! void b64_encode(GString *out, char *value, unsigned int vlen); ! void b64_decode(GByteArray *out, const char *value, unsigned int vlen); #endif Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** util.c 3 Nov 2003 21:34:53 -0000 1.88 --- util.c 3 Nov 2003 22:28:24 -0000 1.89 *************** *** 863,867 **** ! const gpointer detokenize_data(const struct tokenlist *list, int token) { int i; --- 863,867 ---- ! const void *detokenize_data(const struct tokenlist *list, int token) { int i; Index: util.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** util.h 3 Nov 2003 21:07:58 -0000 1.30 --- util.h 3 Nov 2003 22:28:24 -0000 1.31 *************** *** 69,73 **** const int token; const char keyword[32]; ! const gpointer data; }; --- 69,73 ---- const int token; const char keyword[32]; ! const void *data; }; *************** *** 75,79 **** int tokenize(const struct tokenlist *list, const char *keyword); const char *detokenize(const struct tokenlist *list, int token); ! const gpointer detokenize_data(const struct tokenlist *list, int token); char *get_username(void); --- 75,79 ---- int tokenize(const struct tokenlist *list, const char *keyword); const char *detokenize(const struct tokenlist *list, int token); ! const void *detokenize_data(const struct tokenlist *list, int token); char *get_username(void); |