[gq-commit] gq/src input.c,1.59,1.60
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2003-10-05 13:43:44
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv5520 Modified Files: input.c Log Message: * now error_push allows for printf-style variable argument lists, very convenient: no more dealing with an extra message buffer for variable messages. Got rid of many such buffers * cosmetic changes and gtk1/2 conditionals Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** input.c 4 Oct 2003 09:56:54 -0000 1.59 --- input.c 5 Oct 2003 13:43:39 -0000 1.60 *************** *** 1234,1238 **** --- 1234,1240 ---- int mod_context, res; char *olddn, *dn; + #if GTK_MAJOR < 2 char *c; + #endif GtkCTreeNode *node = NULL; GtkCTree *ctreeroot = NULL; *************** *** 1254,1259 **** c = decoded_string(iform->olddn); g_string_sprintfa(message, _("modified %s"), c); ! if(c) ! free(c); #endif --- 1256,1260 ---- c = decoded_string(iform->olddn); g_string_sprintfa(message, _("modified %s"), c); ! if(c) free(c); #endif *************** *** 1355,1359 **** --- 1356,1362 ---- char *olddn, *dn; char **oldrdn, **rdn; + #if GTK_MAJOR < 2 char *c; + #endif char *noattrs[] = { LDAP_NO_ATTRS, NULL }; LDAPMessage *res; *************** *** 1386,1393 **** if(oldrdn[i] == NULL || rdn[i] == NULL || (strcasecmp(oldrdn[i], rdn[i]) != 0)) { ! g_string_sprintf(message, ! _("You can only change the RDN of the DN (%s)"), ! oldrdn[0]); ! error_push(context, message->str); error = 1; break; --- 1389,1395 ---- if(oldrdn[i] == NULL || rdn[i] == NULL || (strcasecmp(oldrdn[i], rdn[i]) != 0)) { ! error_push(context, ! _("You can only change the RDN of the DN (%s)"), ! oldrdn[0]); error = 1; break; *************** *** 1438,1448 **** } #if defined(HAVE_LDAP_RENAME) ! g_string_sprintf(message, "ldap_rename_s: %s", ! ldap_err2string(rc)); #else ! g_string_sprintf(message, "ldap_modrdn2_s: %s", ! ldap_err2string(rc)); #endif - error_push(context, message->str); push_ldap_addl_error(ld, context); error = 2; --- 1440,1449 ---- } #if defined(HAVE_LDAP_RENAME) ! error_push(context, "ldap_rename_s: %s", ! ldap_err2string(rc)); #else ! error_push(context, "ldap_modrdn2_s: %s", ! ldap_err2string(rc)); #endif push_ldap_addl_error(ld, context); error = 2; |