? diff ? capstr1.diff ? special_and1.diff Index: client/clinet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v retrieving revision 1.59 diff -u -r1.59 clinet.c --- client/clinet.c 2002/02/11 10:37:39 1.59 +++ client/clinet.c 2002/02/11 19:14:26 @@ -459,7 +459,7 @@ #endif if ((proxy_url = getenv("http_proxy"))) { - if (strncmp(proxy_url,"http://",strlen("http://"))) { + if (strncmp(proxy_url,"http://",strlen("http://")) != 0) { mystrlcpy(errbuf, _("Invalid $http_proxy value, must start with 'http://'"), n_errbuf); @@ -467,7 +467,7 @@ } sz_strlcpy(urlbuf, proxy_url); } else { - if (strncmp(metaserver,"http://",strlen("http://"))) { + if (strncmp(metaserver,"http://",strlen("http://")) != 0) { mystrlcpy(errbuf, _("Invalid metaserver URL, must start with 'http://'"), n_errbuf); return NULL; Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.214 diff -u -r1.214 packhand.c --- client/packhand.c 2002/02/11 10:37:42 1.214 +++ client/packhand.c 2002/02/11 19:14:28 @@ -354,7 +354,7 @@ city_is_new=0; /* Check if city desciptions should be updated */ - if (draw_city_names && strcmp(pcity->name,packet->name)) { + if (draw_city_names && strcmp(pcity->name,packet->name) != 0) { update_descriptions = 1; } if (draw_city_productions && @@ -587,7 +587,7 @@ city_is_new=0; /* Check if city desciptions should be updated */ - if (draw_city_names && strcmp(pcity->name,packet->name)) { + if (draw_city_names && strcmp(pcity->name,packet->name) != 0) { update_descriptions = 1; } Index: client/gui-gtk/citydlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/citydlg.c,v retrieving revision 1.117 diff -u -r1.117 citydlg.c --- client/gui-gtk/citydlg.c 2002/02/11 10:37:47 1.117 +++ client/gui-gtk/citydlg.c 2002/02/11 19:14:32 @@ -1615,7 +1615,7 @@ } now = GTK_WINDOW(pdialog->shell)->title; - if (strcmp(now, buf)) { + if (strcmp(now, buf) != 0) { gtk_frame_set_label(GTK_FRAME(pdialog->title_frame), buf); gtk_window_set_title(GTK_WINDOW(pdialog->shell), buf); } Index: client/gui-gtk/gamedlgs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gamedlgs.c,v retrieving revision 1.20 diff -u -r1.20 gamedlgs.c --- client/gui-gtk/gamedlgs.c 2002/02/11 10:37:50 1.20 +++ client/gui-gtk/gamedlgs.c 2002/02/11 19:14:33 @@ -121,7 +121,7 @@ if(tax!=rates_tax_value) { my_snprintf(buf, sizeof(buf), "%3d%%", tax); - if ( strcmp( buf, GTK_LABEL(rates_tax_label)->label) ) + if (strcmp(buf, GTK_LABEL(rates_tax_label)->label) != 0) gtk_set_label(rates_tax_label,buf); if(!no_tax_scroll) { @@ -134,7 +134,7 @@ if(lux!=rates_lux_value) { my_snprintf(buf, sizeof(buf), "%3d%%", lux); - if ( strcmp( buf, GTK_LABEL(rates_lux_label)->label) ) + if (strcmp(buf, GTK_LABEL(rates_lux_label)->label) != 0) gtk_set_label(rates_lux_label,buf); if(!no_lux_scroll) { @@ -147,7 +147,7 @@ if(sci!=rates_sci_value) { my_snprintf(buf, sizeof(buf), "%3d%%", sci); - if ( strcmp( buf, GTK_LABEL(rates_sci_label)->label) ) + if (strcmp(buf, GTK_LABEL(rates_sci_label)->label) != 0) gtk_set_label(rates_sci_label,buf); if(!no_sci_scroll) { Index: client/gui-gtk/gui_main.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_main.c,v retrieving revision 1.102 diff -u -r1.102 gui_main.c --- client/gui-gtk/gui_main.c 2002/02/11 10:37:52 1.102 +++ client/gui-gtk/gui_main.c 2002/02/11 19:14:33 @@ -731,7 +731,7 @@ This is a workaround until we can fix the problem properly in the next release. */ # ifdef HAVE_PUTENV - if(!strcmp(setlocale(LC_CTYPE, (const char *)NULL), "C")) + if(strcmp(setlocale(LC_CTYPE, (const char *)NULL), "C") == 0) putenv("LC_CTYPE=en_US.ISO8859-1"); # endif #endif Index: client/gui-gtk/gui_stuff.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_stuff.c,v retrieving revision 1.18 diff -u -r1.18 gui_stuff.c --- client/gui-gtk/gui_stuff.c 2002/02/11 10:37:52 1.18 +++ client/gui-gtk/gui_stuff.c 2002/02/11 19:14:34 @@ -80,7 +80,7 @@ if (!GTK_IS_LABEL(w)) return; gtk_label_get(GTK_LABEL(w), &str); - if(strcmp(str, text)) { + if(strcmp(str, text) != 0) { gtk_label_set_text(GTK_LABEL(w), text); gtk_expose_now(w); } Index: client/gui-gtk/helpdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/helpdlg.c,v retrieving revision 1.51 diff -u -r1.51 helpdlg.c --- client/gui-gtk/helpdlg.c 2002/02/11 10:37:53 1.51 +++ client/gui-gtk/helpdlg.c 2002/02/11 19:14:34 @@ -118,9 +118,9 @@ *****************************************************************/ static void set_title_topic(char *topic) { - if(!strcmp(topic, "Freeciv") - || !strcmp(topic, "About") - || !strcmp(topic, _("About"))) { + if(strcmp(topic, "Freeciv") == 0 + || strcmp(topic, "About") == 0 + || strcmp(topic, _("About")) == 0) { gtk_frame_set_label(GTK_FRAME(help_frame), freeciv_name_version()); } else { gtk_frame_set_label(GTK_FRAME(help_frame), topic); @@ -378,8 +378,8 @@ /* May be able to skip, or may need to modify, advances[A_NONE].name below, depending on which i18n is done elsewhere. */ - if (strcmp(s, _("(Never)")) && strcmp(s, _("None")) - && strcmp(s, advances[A_NONE].name)) + if (strcmp(s, _("(Never)")) != 0 && strcmp(s, _("None")) != 0 + && strcmp(s, advances[A_NONE].name) != 0) select_help_item_string(s, type); } Index: client/gui-gtk/messagewin.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/messagewin.c,v retrieving revision 1.25 diff -u -r1.25 messagewin.c --- client/gui-gtk/messagewin.c 2002/02/11 10:37:55 1.25 +++ client/gui-gtk/messagewin.c 2002/02/11 19:14:36 @@ -276,9 +276,9 @@ meswin_allocate(); s = fc_malloc(strlen(packet->message) + 50); - if (!strncmp(packet->message, game_prefix1, gp_len1)) { + if (strncmp(packet->message, game_prefix1, gp_len1) == 0) { strcpy(s, packet->message + gp_len1); - } else if(!strncmp(packet->message, game_prefix2, gp_len2)) { + } else if(strncmp(packet->message, game_prefix2, gp_len2) == 0) { strcpy(s, packet->message + gp_len2); } else { strcpy(s, packet->message); Index: client/gui-mui/helpdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/helpdlg.c,v retrieving revision 1.25 diff -u -r1.25 helpdlg.c --- client/gui-mui/helpdlg.c 2002/01/21 10:16:19 1.25 +++ client/gui-mui/helpdlg.c 2002/02/11 19:14:38 @@ -112,9 +112,9 @@ { char *text; - if (!strcmp(topic, "Freeciv") - || !strcmp(topic, "About") - || !strcmp(topic, _("About"))) + if (strcmp(topic, "Freeciv") == 0 + || strcmp(topic, "About") == 0 + || strcmp(topic, _("About")) == 0) { text = freeciv_name_version(); } @@ -159,8 +159,8 @@ char *s = (char *) xget(*text_obj, MUIA_Text_Contents); /* works also for ColorButtons */ enum help_page_type type = (enum help_page_type) xget(*text_obj, MUIA_UserData); - if (strcmp(s, _("(Never)")) && strcmp(s, _("None")) - && strcmp(s, advances[A_NONE].name)) + if (strcmp(s, _("(Never)")) != 0 && strcmp(s, _("None")) != 0 + && strcmp(s, advances[A_NONE].name) != 0) { int idx; Index: client/gui-mui/messagewin.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/messagewin.c,v retrieving revision 1.10 diff -u -r1.10 messagewin.c --- client/gui-mui/messagewin.c 2001/02/28 08:17:52 1.10 +++ client/gui-mui/messagewin.c 2002/02/11 19:14:40 @@ -294,7 +294,7 @@ return; } - if (!strncmp(packet->message, _("Game: "), 6)) + if (strncmp(packet->message, _("Game: "), 6) == 0) entry.message = packet->message + 6; else entry.message = packet->message; Index: client/gui-mui/muistuff.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/muistuff.c,v retrieving revision 1.8 diff -u -r1.8 muistuff.c --- client/gui-mui/muistuff.c 2001/12/11 16:16:33 1.8 +++ client/gui-mui/muistuff.c 2002/02/11 19:14:40 @@ -158,7 +158,7 @@ STRPTR oldtext = (STRPTR) xget(obj, MUIA_Text_Contents); if (oldtext && text) { - if (!strcmp(oldtext, text)) + if (strcmp(oldtext, text) == 0) return; } Index: client/gui-win32/citydlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/citydlg.c,v retrieving revision 1.9 diff -u -r1.9 citydlg.c --- client/gui-win32/citydlg.c 2002/01/14 17:17:13 1.9 +++ client/gui-win32/citydlg.c 2002/02/11 19:14:41 @@ -200,7 +200,7 @@ if(pdialog->pcity->improvements[i]) { if(!pdialog->improvlist_names_ptrs[n] || strcmp(pdialog->improvlist_names_ptrs[n], - get_impr_name_ex(pdialog->pcity, i))) + get_impr_name_ex(pdialog->pcity, i)) != 0) flag=1; sz_strlcpy(pdialog->improvlist_names[n], get_impr_name_ex(pdialog->pcity, i)); Index: client/gui-win32/helpdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/helpdlg.c,v retrieving revision 1.4 diff -u -r1.4 helpdlg.c --- client/gui-win32/helpdlg.c 2002/02/11 10:37:57 1.4 +++ client/gui-win32/helpdlg.c 2002/02/11 19:14:42 @@ -160,8 +160,8 @@ { char s[128]; GetWindowText((HWND)lParam,s,sizeof(s)); - if (strcmp(s, _("(Never)")) && strcmp(s, _("None")) - && strcmp(s, advances[A_NONE].name)) + if (strcmp(s, _("(Never)")) != 0 && strcmp(s, _("None")) != 0 + && strcmp(s, advances[A_NONE].name) != 0) select_help_item_string(s,page_type_from_id(LOWORD(wParam))); } Index: client/gui-win32/messagewin.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/messagewin.c,v retrieving revision 1.1 diff -u -r1.1 messagewin.c --- client/gui-win32/messagewin.c 2001/09/04 19:09:37 1.1 +++ client/gui-win32/messagewin.c 2002/02/11 19:14:44 @@ -299,9 +299,9 @@ meswin_allocate(); s = fc_malloc(strlen(packet->message) + 50); - if (!strncmp(packet->message, game_prefix1, gp_len1)) { + if (strncmp(packet->message, game_prefix1, gp_len1) == 0) { strcpy(s, packet->message + gp_len1); - } else if(!strncmp(packet->message, game_prefix2, gp_len2)) { + } else if(strncmp(packet->message, game_prefix2, gp_len2) == 0) { strcpy(s, packet->message + gp_len2); } else { strcpy(s, packet->message); Index: client/gui-xaw/citydlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/citydlg.c,v retrieving revision 1.62 diff -u -r1.62 citydlg.c --- client/gui-xaw/citydlg.c 2002/01/14 17:17:15 1.62 +++ client/gui-xaw/citydlg.c 2002/02/11 19:14:45 @@ -1902,7 +1902,7 @@ population_to_text(city_population(pdialog->pcity))); XtVaGetValues(pdialog->cityname_label, XtNlabel, &now, NULL); - if(strcmp(now, buf)) { + if(strcmp(now, buf) != 0) { XtVaSetValues(pdialog->cityname_label, XtNlabel, (XtArgVal)buf, NULL); xaw_horiz_center(pdialog->cityname_label); XtVaSetValues(pdialog->shell, XtNtitle, (XtArgVal)pdialog->pcity->name, NULL); @@ -1919,7 +1919,7 @@ for(i=0, n=0, flag=0; ipcity->improvements[i]) { if(!pdialog->improvlist_names_ptrs[n] || - strcmp(pdialog->improvlist_names_ptrs[n], get_impr_name_ex(pdialog->pcity, i))) + strcmp(pdialog->improvlist_names_ptrs[n], get_impr_name_ex(pdialog->pcity, i)) != 0) flag=1; sz_strlcpy(pdialog->improvlist_names[n], get_impr_name_ex(pdialog->pcity, i)); Index: client/gui-xaw/cityrep.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/cityrep.c,v retrieving revision 1.33 diff -u -r1.33 cityrep.c --- client/gui-xaw/cityrep.c 2002/01/09 02:45:48 1.33 +++ client/gui-xaw/cityrep.c 2002/02/11 19:14:46 @@ -621,8 +621,8 @@ char new_city_line[MAX_LEN_CITY_TEXT]; XtVaGetValues(city_list, XtNnumberStrings, &n, XtNlist, &list, NULL); - if(strncmp(pcity->name,list[i], - MIN(strlen(pcity->name),REPORT_CITYNAME_ABBREV-1))) { + if (0 != strncmp(pcity->name, list[i], + MIN(strlen(pcity->name), REPORT_CITYNAME_ABBREV - 1))) { break; } get_city_text(pcity, new_city_line, sizeof(new_city_line)); Index: client/gui-xaw/gui_main.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/gui_main.c,v retrieving revision 1.61 diff -u -r1.61 gui_main.c --- client/gui-xaw/gui_main.c 2002/02/07 08:37:22 1.61 +++ client/gui-xaw/gui_main.c 2002/02/11 19:14:46 @@ -299,8 +299,8 @@ } /* TODO: Use capabilities here instead of version numbers */ - if(strncmp(appResources.version, VERSION_STRING, - strlen(appResources.version))) { + if (0 != strncmp(appResources.version, VERSION_STRING, + strlen(appResources.version))) { freelog(LOG_FATAL, _("Game version does not match Resource version.")); freelog(LOG_FATAL, _("Game version: %s - Resource version: %s"), VERSION_STRING, appResources.version); Index: client/gui-xaw/gui_stuff.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/gui_stuff.c,v retrieving revision 1.9 diff -u -r1.9 gui_stuff.c --- client/gui-xaw/gui_stuff.c 2001/01/30 23:38:53 1.9 +++ client/gui-xaw/gui_stuff.c 2002/02/11 19:14:47 @@ -81,7 +81,7 @@ String str; XtVaGetValues(w, XtNlabel, &str, NULL); - if(strcmp(str, text)) { + if(strcmp(str, text) != 0) { XtVaSetValues(w, XtNlabel, (XtArgVal)text, NULL); xaw_expose_now(w); } Index: client/gui-xaw/helpdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/helpdlg.c,v retrieving revision 1.38 diff -u -r1.38 helpdlg.c --- client/gui-xaw/helpdlg.c 2002/01/21 10:16:21 1.38 +++ client/gui-xaw/helpdlg.c 2002/02/11 19:14:47 @@ -119,9 +119,9 @@ *****************************************************************/ static void set_title_topic(const struct help_item *pitem) { - if(!strcmp(pitem->topic, "Freeciv") - || !strcmp(pitem->topic, "About") - || !strcmp(pitem->topic, _("About"))) { + if(strcmp(pitem->topic, "Freeciv") == 0 + || strcmp(pitem->topic, "About") == 0 + || strcmp(pitem->topic, _("About")) == 0) { xaw_set_label(help_title, freeciv_name_version()); } else { xaw_set_label(help_title, pitem->topic); Index: client/gui-xaw/messagewin.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/messagewin.c,v retrieving revision 1.17 diff -u -r1.17 messagewin.c --- client/gui-xaw/messagewin.c 2001/12/11 16:16:37 1.17 +++ client/gui-xaw/messagewin.c 2002/02/11 19:14:48 @@ -255,9 +255,9 @@ meswin_allocate(); s = fc_malloc(strlen(packet->message) + 50); - if (!strncmp(packet->message, game_prefix1, gp_len1)) { + if (strncmp(packet->message, game_prefix1, gp_len1) == 0) { strcpy(s, packet->message + gp_len1); - } else if(!strncmp(packet->message, game_prefix2, gp_len2)) { + } else if(strncmp(packet->message, game_prefix2, gp_len2) == 0) { strcpy(s, packet->message + gp_len2); } else { strcpy(s, packet->message); Index: common/city.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/city.c,v retrieving revision 1.137 diff -u -r1.137 city.c --- common/city.c 2002/02/11 13:55:49 1.137 +++ common/city.c 2002/02/11 19:14:50 @@ -1054,7 +1054,7 @@ genlist_iterator_init(&myiter, &This->list, 0); for(; ITERATOR_PTR(myiter); ITERATOR_NEXT(myiter)) - if(!mystrcasecmp(name, ((struct city *)ITERATOR_PTR(myiter))->name)) + if(mystrcasecmp(name, ((struct city *)ITERATOR_PTR(myiter))->name) == 0) return ITERATOR_PTR(myiter); return NULL; @@ -1153,7 +1153,7 @@ int i; for( i=0; iterrain_name_orig, tthis->terrain_name); name_strlcpy(tthis->terrain_name, - strcmp(tthis->terrain_name_orig, "") ? + (strcmp(tthis->terrain_name_orig, "") != 0) ? Q_(tthis->terrain_name_orig) : ""); sz_strlcpy(tthis->special_1_name_orig, tthis->special_1_name); name_strlcpy(tthis->special_1_name, - strcmp(tthis->special_1_name_orig, "") ? + (strcmp(tthis->special_1_name_orig, "") != 0) ? Q_(tthis->special_1_name_orig) : ""); sz_strlcpy(tthis->special_2_name_orig, tthis->special_2_name); name_strlcpy(tthis->special_2_name, - strcmp(tthis->special_2_name_orig, "") ? + (strcmp(tthis->special_2_name_orig, "") != 0) ? Q_(tthis->special_2_name_orig) : ""); } for (i=0; i