[gq-commit] gq/src input.c,1.89,1.90 tinput.c,1.46,1.47
Status: Beta
Brought to you by:
sur5r
From: <he...@us...> - 2006-04-09 20:34:38
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3479/src Modified Files: input.c tinput.c Log Message: 2006-04-09 Sven Herzberg <he...@gn...> * configure.in: minor tweaks before the release candidate * src/input.c, * src/tinput.c: replace some while loops with for loops (which they basically were before Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** input.c 5 Apr 2006 00:53:55 -0000 1.89 --- input.c 9 Apr 2006 20:34:32 -0000 1.90 *************** *** 950,954 **** char *decode_buf = NULL; int decode_buf_allocated = 0; ! GByteArray *gb; gdk_colormap_alloc_color(gdk_colormap_get_system(), ¬col, FALSE, TRUE); --- 950,954 ---- char *decode_buf = NULL; int decode_buf_allocated = 0; ! GByteArray *gb; gdk_colormap_alloc_color(gdk_colormap_get_system(), ¬col, FALSE, TRUE); *************** *** 1018,1022 **** row = 1; ! while(formlist) { ff = (struct formfill *) formlist->data; --- 1018,1022 ---- row = 1; ! for(; formlist; formlist = formlist->next) { ff = (struct formfill *) formlist->data; *************** *** 1157,1169 **** row_arrow = row++; ! if ((build || ff->morebutton == NULL) && ((ff->flags & FLAG_SINGLE_VALUE) == 0)) { align = gtk_alignment_new(0.5, 1, 0, 0); gtk_widget_show(align); ! ff->morebutton = arrowbutton = gq_new_arrowbutton(iform); gtk_object_set_data(GTK_OBJECT(arrowbutton), "formfill", ff); gtk_container_add(GTK_CONTAINER(align), arrowbutton); ! gtk_table_attach(GTK_TABLE(iform->table), align, 2, 3, row_arrow, row_arrow + 1, --- 1157,1169 ---- row_arrow = row++; ! if ((build || ff->morebutton == NULL) && ((ff->flags & FLAG_SINGLE_VALUE) == 0)) { align = gtk_alignment_new(0.5, 1, 0, 0); gtk_widget_show(align); ! ff->morebutton = arrowbutton = gq_new_arrowbutton(iform); gtk_object_set_data(GTK_OBJECT(arrowbutton), "formfill", ff); gtk_container_add(GTK_CONTAINER(align), arrowbutton); ! gtk_table_attach(GTK_TABLE(iform->table), align, 2, 3, row_arrow, row_arrow + 1, *************** *** 1174,1178 **** } } - formlist = formlist->next; } g_free(decode_buf); --- 1174,1177 ---- Index: tinput.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/tinput.c,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** tinput.c 5 Apr 2006 00:53:55 -0000 1.46 --- tinput.c 9 Apr 2006 20:34:32 -0000 1.47 *************** *** 273,278 **** /* required attributes */ ! i = 0; ! while(oc->oc_at_oids_must && oc->oc_at_oids_must[i]) { /* if (strcasecmp(oc->oc_at_oids_must[i], "objectClass")) { */ if (lookup_attribute_using_schema(formlist, --- 273,277 ---- /* required attributes */ ! for(i=0; oc->oc_at_oids_must && oc->oc_at_oids_must[i]; i++) { /* if (strcasecmp(oc->oc_at_oids_must[i], "objectClass")) { */ if (lookup_attribute_using_schema(formlist, *************** *** 296,300 **** formlist = formlist_append(formlist, form); } - i++; } --- 295,298 ---- *************** *** 303,307 **** while(oc->oc_at_oids_may && oc->oc_at_oids_may[i]) { /* if (strcasecmp(oc->oc_at_oids_may[i], "objectClass")) { */ ! if (lookup_attribute_using_schema(formlist, oc->oc_at_oids_may[i], ss, &at) == NULL) { --- 301,305 ---- while(oc->oc_at_oids_may && oc->oc_at_oids_may[i]) { /* if (strcasecmp(oc->oc_at_oids_may[i], "objectClass")) { */ ! if (lookup_attribute_using_schema(formlist, oc->oc_at_oids_may[i], ss, &at) == NULL) { *************** *** 326,331 **** } - - /* oclist = oclist->next; */ } --- 324,327 ---- *************** *** 352,356 **** /* build temporary list of object classes from formfill list */ ! oclist = NULL; tmplist = form->values; --- 348,352 ---- /* build temporary list of object classes from formfill list */ ! oclist = NULL; tmplist = form->values; *************** *** 394,399 **** but not allowed according to the schema (schema_list) */ addendum = NULL; ! tmplist = value_list; ! while(tmplist) { form = (struct formfill *) tmplist->data; newform = lookup_attribute_using_schema(schema_list, form->attrname, --- 390,394 ---- but not allowed according to the schema (schema_list) */ addendum = NULL; ! for(tmplist=value_list; tmplist; tmplist = tmplist->next) { form = (struct formfill *) tmplist->data; newform = lookup_attribute_using_schema(schema_list, form->attrname, *************** *** 405,409 **** ldapserver_ref(server); ! strncpy(newform->attrname, form->attrname, sizeof(newform->attrname)); newform->num_inputfields = form->num_inputfields; --- 400,404 ---- ldapserver_ref(server); ! strncpy(newform->attrname, form->attrname, sizeof(newform->attrname)); newform->num_inputfields = form->num_inputfields; *************** *** 422,431 **** addendum = g_list_append(addendum, newform); } - tmplist = tmplist->next; } if(addendum) { ! while(addendum) { schema_list = g_list_append(schema_list, addendum->data); - addendum = addendum->next; } g_list_free(addendum); --- 417,424 ---- addendum = g_list_append(addendum, newform); } } if(addendum) { ! for(;addendum; addendum = addendum->next) { schema_list = g_list_append(schema_list, addendum->data); } g_list_free(addendum); |