Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 5576) +++ trunk/src/board.h (revision 5577) @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 5576) +++ trunk/src/change_act.c (revision 5577) @@ -661,7 +661,7 @@ pcb_gui->get_coords(_("Select an Object"), &x, &y); if ((type = pcb_search_screen(x, y, PCB_CHANGENAME_TYPES, &ptr1, &ptr2, &ptr3)) != PCB_TYPE_NONE) { pcb_undo_save_serial(); - if ((pinnums != NULL) && (strcasecmp(pinnums, "Number") == 0)) + if ((pinnums != NULL) && (pcb_strcasecmp(pinnums, "Number") == 0)) pinnum = 1; else pinnum = 0; @@ -1371,9 +1371,9 @@ int type = PCB_TYPE_NONE, which; void *ptr1, *ptr2, *ptr3; - if (strcasecmp(prim, "start") == 0) which = 0; - else if (strcasecmp(prim, "delta") == 0) which = 1; - else if (strcasecmp(prim, "both") == 0) which = 2; + if (pcb_strcasecmp(prim, "start") == 0) which = 0; + else if (pcb_strcasecmp(prim, "delta") == 0) which = 1; + else if (pcb_strcasecmp(prim, "both") == 0) which = 2; else { pcb_message(PCB_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); return -1; @@ -1443,9 +1443,9 @@ int type = PCB_TYPE_NONE, which; void *ptr1, *ptr2, *ptr3; - if ((strcasecmp(prim, "width") == 0) || (strcasecmp(prim, "x") == 0)) which = 0; - else if ((strcasecmp(prim, "height") == 0) || (strcasecmp(prim, "y") == 0)) which = 1; - else if (strcasecmp(prim, "both") == 0) which = 2; + if ((pcb_strcasecmp(prim, "width") == 0) || (pcb_strcasecmp(prim, "x") == 0)) which = 0; + else if ((pcb_strcasecmp(prim, "height") == 0) || (pcb_strcasecmp(prim, "y") == 0)) which = 1; + else if (pcb_strcasecmp(prim, "both") == 0) which = 2; else { pcb_message(PCB_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); return -1; Index: trunk/src/compat_misc.c =================================================================== --- trunk/src/compat_misc.c (revision 5576) +++ trunk/src/compat_misc.c (revision 5577) @@ -24,6 +24,7 @@ #include #include +#include #include #include #include "compat_misc.h" @@ -133,3 +134,28 @@ return -t; } #endif + +int pcb_strcasecmp(const char *s1, const char *s2) +{ + while(tolower(*s1) == tolower(*s2)) { + if (*s1 == '\0') + return 0; + s1++; + s2++; + } + return tolower(*s1) - tolower(*s2); +} + +int pcb_strncasecmp(const char *s1, const char *s2, size_t n) +{ + do { + if (n == 0) + return 0; + if (*s1 == '\0') + return 0; + s1++; + s2++; + n--; + } while(tolower(*s1) == tolower(*s2)); + return tolower(*s1) - tolower(*s2); +} Index: trunk/src/compat_misc.h =================================================================== --- trunk/src/compat_misc.h (revision 5576) +++ trunk/src/compat_misc.h (revision 5577) @@ -25,6 +25,7 @@ #include "config.h" +#include #include long pcb_rand(void); @@ -39,4 +40,7 @@ double pcb_round(double x); +int pcb_strcasecmp(const char *s1, const char *s2); +int pcb_strncasecmp(const char *s1, const char *s2, size_t n); + #endif /* PCB_COMPAT_MISC_H */ Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 5576) +++ trunk/src/conf.c (revision 5577) @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -135,10 +134,10 @@ conf_policy_t conf_policy_parse(const char *s) { - if (strcasecmp(s, "overwrite") == 0) return POL_OVERWRITE; - if (strcasecmp(s, "prepend") == 0) return POL_PREPEND; - if (strcasecmp(s, "append") == 0) return POL_APPEND; - if (strcasecmp(s, "disable") == 0) return POL_DISABLE; + if (pcb_strcasecmp(s, "overwrite") == 0) return POL_OVERWRITE; + if (pcb_strcasecmp(s, "prepend") == 0) return POL_PREPEND; + if (pcb_strcasecmp(s, "append") == 0) return POL_APPEND; + if (pcb_strcasecmp(s, "disable") == 0) return POL_DISABLE; return POL_invalid; } @@ -156,14 +155,14 @@ conf_role_t conf_role_parse(const char *s) { - if (strcasecmp(s, "internal") == 0) return CFR_INTERNAL; - if (strcasecmp(s, "system") == 0) return CFR_SYSTEM; - if (strcasecmp(s, "defaultpcb") == 0) return CFR_DEFAULTPCB; - if (strcasecmp(s, "user") == 0) return CFR_USER; - if (strcasecmp(s, "env") == 0) return CFR_ENV; - if (strcasecmp(s, "project") == 0) return CFR_PROJECT; - if (strcasecmp(s, "design") == 0) return CFR_DESIGN; - if (strcasecmp(s, "cli") == 0) return CFR_CLI; + if (pcb_strcasecmp(s, "internal") == 0) return CFR_INTERNAL; + if (pcb_strcasecmp(s, "system") == 0) return CFR_SYSTEM; + if (pcb_strcasecmp(s, "defaultpcb") == 0) return CFR_DEFAULTPCB; + if (pcb_strcasecmp(s, "user") == 0) return CFR_USER; + if (pcb_strcasecmp(s, "env") == 0) return CFR_ENV; + if (pcb_strcasecmp(s, "project") == 0) return CFR_PROJECT; + if (pcb_strcasecmp(s, "design") == 0) return CFR_DESIGN; + if (pcb_strcasecmp(s, "cli") == 0) return CFR_CLI; return CFR_invalid; } @@ -342,12 +341,12 @@ case CFN_BOOLEAN: while(isspace(*text)) text++; for(s = strue; *s != NULL; s++) - if (strncasecmp(*s, text, strlen(*s)) == 0) { + if (pcb_strncasecmp(*s, text, strlen(*s)) == 0) { dst->boolean[idx] = 1; return 0; } for(s = sfalse; *s != NULL; s++) - if (strncasecmp(*s, text, strlen(*s)) == 0) { + if (pcb_strncasecmp(*s, text, strlen(*s)) == 0) { dst->boolean[idx] = 0; return 0; } Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 5576) +++ trunk/src/file_act.c (revision 5577) @@ -118,7 +118,7 @@ if (argc > 2) format = argv[2]; - if (strcasecmp(function, "ElementToBuffer") == 0) { + if (pcb_strcasecmp(function, "ElementToBuffer") == 0) { pcb_notify_crosshair_change(pcb_false); if (pcb_element_load_to_buffer(PCB_PASTEBUFFER, name)) pcb_crosshair_set_mode(PCB_MODE_PASTE_BUFFER); @@ -125,7 +125,7 @@ pcb_notify_crosshair_change(pcb_true); } - else if (strcasecmp(function, "LayoutToBuffer") == 0) { + else if (pcb_strcasecmp(function, "LayoutToBuffer") == 0) { pcb_notify_crosshair_change(pcb_false); if (pcb_buffer_load_layout(PCB_PASTEBUFFER, name, format)) pcb_crosshair_set_mode(PCB_MODE_PASTE_BUFFER); @@ -132,12 +132,12 @@ pcb_notify_crosshair_change(pcb_true); } - else if (strcasecmp(function, "Layout") == 0) { + else if (pcb_strcasecmp(function, "Layout") == 0) { if (!PCB->Changed || pcb_gui->confirm_dialog(_("OK to override layout data?"), 0)) pcb_load_pcb(name, format, pcb_true, 0); } - else if (strcasecmp(function, "Netlist") == 0) { + else if (pcb_strcasecmp(function, "Netlist") == 0) { if (PCB->Netlistname) free(PCB->Netlistname); PCB->Netlistname = pcb_strdup_strip_wspace(name); @@ -149,7 +149,7 @@ if (!pcb_import_netlist(PCB->Netlistname)) pcb_netlist_changed(1); } - else if (strcasecmp(function, "Revert") == 0 && PCB->Filename + else if (pcb_strcasecmp(function, "Revert") == 0 && PCB->Filename && (!PCB->Changed || pcb_gui->confirm_dialog(_("OK to override changes?"), 0))) { pcb_revert_pcb(); } @@ -251,7 +251,7 @@ function = argv[0]; name = argv[1]; - if (strcasecmp(function, "Layout") == 0) { + if (pcb_strcasecmp(function, "Layout") == 0) { if (pcb_save_pcb(PCB->Filename, NULL) == 0) pcb_board_set_changed_flag(pcb_false); if (pcb_gui->notify_filename_changed != NULL) @@ -265,7 +265,7 @@ if (argc >= 3) fmt = argv[2]; - if (strcasecmp(function, "LayoutAs") == 0) { + if (pcb_strcasecmp(function, "LayoutAs") == 0) { if (pcb_save_pcb(name, fmt) == 0) { pcb_board_set_changed_flag(pcb_false); free(PCB->Filename); @@ -276,7 +276,7 @@ return 0; } - if (strcasecmp(function, "AllConnections") == 0) { + if (pcb_strcasecmp(function, "AllConnections") == 0) { FILE *fp; pcb_bool result; if ((fp = pcb_check_and_open_file(name, pcb_true, pcb_false, &result, NULL)) != NULL) { @@ -287,7 +287,7 @@ return 0; } - if (strcasecmp(function, "AllUnusedPins") == 0) { + if (pcb_strcasecmp(function, "AllUnusedPins") == 0) { FILE *fp; pcb_bool result; if ((fp = pcb_check_and_open_file(name, pcb_true, pcb_false, &result, NULL)) != NULL) { @@ -298,7 +298,7 @@ return 0; } - if (strcasecmp(function, "ElementConnections") == 0) { + if (pcb_strcasecmp(function, "ElementConnections") == 0) { pcb_element_t *element; void *ptrtmp; FILE *fp; @@ -315,7 +315,7 @@ return 0; } - if (strcasecmp(function, "PasteBuffer") == 0) { + if (pcb_strcasecmp(function, "PasteBuffer") == 0) { return pcb_save_buffer_elements(name, fmt); } @@ -338,7 +338,7 @@ static int pcb_act_Quit(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { const char *force = PCB_ACTION_ARG(0); - if (force && strcasecmp(force, "force") == 0) { + if (force && pcb_strcasecmp(force, "force") == 0) { PCB->Changed = 0; exit(0); } Index: trunk/src/funchash.c =================================================================== --- trunk/src/funchash.c (revision 5576) +++ trunk/src/funchash.c (revision 5577) @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -29,6 +28,7 @@ #include "funchash_core.h" #include "config.h" #include "macro.h" +#include "compat_misc.h" #define action_entry(x) { #x, F_ ## x}, static pcb_funchash_table_t Functions[] = { @@ -49,7 +49,7 @@ const fh_key_t *a = a_, *b = b_; if (a->cookie != b->cookie) return 1; - return !strcasecmp(a->key, b->key); + return !pcb_strcasecmp(a->key, b->key); } static unsigned fh_hash(const void *key) Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 5576) +++ trunk/src/gui_act.c (revision 5577) @@ -41,6 +41,7 @@ #include "hid_actions.h" #include "hid_init.h" #include "compat_nls.h" +#include "compat_misc.h" #include "event.h" #include "layer_vis.h" @@ -1050,7 +1051,7 @@ number = -1; for(n = 0; n < vtroutestyle_len(&PCB->RouteStyle); n++) { rts = &PCB->RouteStyle.array[n]; - if (strcasecmp(rts->name, str) == 0) { + if (pcb_strcasecmp(rts->name, str) == 0) { number = n + 1; break; } @@ -1267,7 +1268,7 @@ static int pcb_act_PCBChanged(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { const char *rv = argv == NULL ? NULL : argv[0]; - pcb_board_changed((rv != NULL) && (strcasecmp(rv, "revert") == 0)); + pcb_board_changed((rv != NULL) && (pcb_strcasecmp(rv, "revert") == 0)); return 0; } Index: trunk/src/hid_cfg_input.c =================================================================== --- trunk/src/hid_cfg_input.c (revision 5576) +++ trunk/src/hid_cfg_input.c (revision 5577) @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -34,6 +33,7 @@ #include "hid_cfg_input.h" #include "hid_cfg_action.h" #include "error.h" +#include "compat_misc.h" /* split value into a list of '-' separated words; examine each word and set the bitmask of modifiers */ @@ -80,14 +80,14 @@ mouse button number. */ if (!name) return 0; - else if (strcasecmp(name, "left") == 0) return PCB_MB_LEFT; - else if (strcasecmp(name, "middle") == 0) return PCB_MB_MIDDLE; - else if (strcasecmp(name, "right") == 0) return PCB_MB_RIGHT; + else if (pcb_strcasecmp(name, "left") == 0) return PCB_MB_LEFT; + else if (pcb_strcasecmp(name, "middle") == 0) return PCB_MB_MIDDLE; + else if (pcb_strcasecmp(name, "right") == 0) return PCB_MB_RIGHT; - else if (strcasecmp(name, "scroll-up") == 0) return PCB_MB_SCROLL_UP; - else if (strcasecmp(name, "scroll-down") == 0) return PCB_MB_SCROLL_DOWN; - else if (strcasecmp(name, "scroll-left") == 0) return PCB_MB_SCROLL_UP; - else if (strcasecmp(name, "scroll-right") == 0) return PCB_MB_SCROLL_DOWN; + else if (pcb_strcasecmp(name, "scroll-up") == 0) return PCB_MB_SCROLL_UP; + else if (pcb_strcasecmp(name, "scroll-down") == 0) return PCB_MB_SCROLL_DOWN; + else if (pcb_strcasecmp(name, "scroll-left") == 0) return PCB_MB_SCROLL_UP; + else if (pcb_strcasecmp(name, "scroll-right") == 0) return PCB_MB_SCROLL_DOWN; else { pcb_message(PCB_MSG_DEFAULT, "Error: unknown mouse button: %s\n", name); return 0; @@ -232,7 +232,7 @@ if (km->auto_tr != NULL) { const pcb_hid_cfg_keytrans_t *t; for(t = km->auto_tr; t->name != NULL; t++) { - if (strcasecmp(tmp, t->name) == 0) { + if (pcb_strcasecmp(tmp, t->name) == 0) { tmp[0] = t->sym; tmp[1] = '\0'; len = 1; Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 5576) +++ trunk/src/hid_init.c (revision 5577) @@ -1,5 +1,4 @@ #include "config.h" -#include #include "hid.h" #include "hid_nogui.h" @@ -45,9 +44,9 @@ struct stat st; basename = pcb_strdup(de->d_name); - if (strlen(basename) > 3 && strcasecmp(basename + strlen(basename) - 3, ".so") == 0) + if (strlen(basename) > 3 && pcb_strcasecmp(basename + strlen(basename) - 3, ".so") == 0) basename[strlen(basename) - 3] = 0; - else if (strlen(basename) > 4 && strcasecmp(basename + strlen(basename) - 4, ".dll") == 0) + else if (strlen(basename) > 4 && pcb_strcasecmp(basename + strlen(basename) - 4, ".dll") == 0) basename[strlen(basename) - 4] = 0; path = pcb_concat(dirname, PCB_DIR_SEPARATOR_S, de->d_name, NULL); Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 5576) +++ trunk/src/layer_vis.c (revision 5577) @@ -99,19 +99,19 @@ conf_set_editor(show_solder_side, 0); for (i = argn - 1; i >= 0; i--) { - if (strcasecmp(args[i], "rats") == 0) + if (pcb_strcasecmp(args[i], "rats") == 0) PCB->RatOn = pcb_true; - else if (strcasecmp(args[i], "invisible") == 0) + else if (pcb_strcasecmp(args[i], "invisible") == 0) PCB->InvisibleObjectsOn = pcb_true; - else if (strcasecmp(args[i], "pins") == 0) + else if (pcb_strcasecmp(args[i], "pins") == 0) PCB->PinOn = pcb_true; - else if (strcasecmp(args[i], "vias") == 0) + else if (pcb_strcasecmp(args[i], "vias") == 0) PCB->ViaOn = pcb_true; - else if (strcasecmp(args[i], "elements") == 0 || strcasecmp(args[i], "silk") == 0) + else if (pcb_strcasecmp(args[i], "elements") == 0 || pcb_strcasecmp(args[i], "silk") == 0) PCB->ElementOn = pcb_true; - else if (strcasecmp(args[i], "mask") == 0) + else if (pcb_strcasecmp(args[i], "mask") == 0) conf_set_editor(show_mask, 1); - else if (strcasecmp(args[i], "solderside") == 0) + else if (pcb_strcasecmp(args[i], "solderside") == 0) conf_set_editor(show_solder_side, 1); else if (isdigit((int) args[i][0])) { lno = atoi(args[i]); @@ -120,7 +120,7 @@ else { int found = 0; for (lno = 0; lno < pcb_max_copper_layer; lno++) - if (strcasecmp(args[i], PCB->Data->Layer[lno].Name) == 0) { + if (pcb_strcasecmp(args[i], PCB->Data->Layer[lno].Name) == 0) { pcb_layervis_change_group_vis(lno, pcb_true, pcb_true); found = 1; break; Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 5576) +++ trunk/src/netlist_act.c (revision 5577) @@ -41,6 +41,7 @@ #include "plug_io.h" #include "hid_actions.h" #include "compat_nls.h" +#include "compat_misc.h" #include "netlist.h" static int pcb_netlist_swap() @@ -219,15 +220,15 @@ pcb_message(PCB_MSG_DEFAULT, pcb_acts_Netlist); return 1; } - if (strcasecmp(argv[0], "find") == 0) + if (pcb_strcasecmp(argv[0], "find") == 0) func = pcb_netlist_find; - else if (strcasecmp(argv[0], "select") == 0) + else if (pcb_strcasecmp(argv[0], "select") == 0) func = pcb_netlist_select; - else if (strcasecmp(argv[0], "rats") == 0) + else if (pcb_strcasecmp(argv[0], "rats") == 0) func = pcb_netlist_rats; - else if (strcasecmp(argv[0], "norats") == 0) + else if (pcb_strcasecmp(argv[0], "norats") == 0) func = pcb_netlist_norats; - else if (strcasecmp(argv[0], "clear") == 0) { + else if (pcb_strcasecmp(argv[0], "clear") == 0) { func = pcb_netlist_clear; if (argc == 1) { pcb_netlist_clear(NULL, NULL); @@ -234,23 +235,23 @@ return 0; } } - else if (strcasecmp(argv[0], "style") == 0) + else if (pcb_strcasecmp(argv[0], "style") == 0) func = (NFunc) pcb_netlist_style; - else if (strcasecmp(argv[0], "swap") == 0) + else if (pcb_strcasecmp(argv[0], "swap") == 0) return pcb_netlist_swap(); - else if (strcasecmp(argv[0], "add") == 0) { + else if (pcb_strcasecmp(argv[0], "add") == 0) { /* Add is different, because the net/pin won't already exist. */ return pcb_netlist_add(PCB_ACTION_ARG(1), PCB_ACTION_ARG(2)); } - else if (strcasecmp(argv[0], "sort") == 0) { + else if (pcb_strcasecmp(argv[0], "sort") == 0) { pcb_sort_netlist(); return 0; } - else if (strcasecmp(argv[0], "freeze") == 0) { + else if (pcb_strcasecmp(argv[0], "freeze") == 0) { PCB->netlist_frozen++; return 0; } - else if (strcasecmp(argv[0], "thaw") == 0) { + else if (pcb_strcasecmp(argv[0], "thaw") == 0) { if (PCB->netlist_frozen > 0) { PCB->netlist_frozen--; if (PCB->netlist_needs_update) @@ -258,7 +259,7 @@ } return 0; } - else if (strcasecmp(argv[0], "forcethaw") == 0) { + else if (pcb_strcasecmp(argv[0], "forcethaw") == 0) { PCB->netlist_frozen = 0; if (PCB->netlist_needs_update) pcb_netlist_changed(0); @@ -273,7 +274,7 @@ use_re = 1; for (i = 0; i < PCB->NetlistLib[PCB_NETLIST_EDITED].MenuN; i++) { net = PCB->NetlistLib[PCB_NETLIST_EDITED].Menu + i; - if (strcasecmp(argv[1], net->Name + 2) == 0) + if (pcb_strcasecmp(argv[1], net->Name + 2) == 0) use_re = 0; } if (use_re) { @@ -295,7 +296,7 @@ continue; } else { - if (strcasecmp(net->Name + 2, argv[1])) + if (pcb_strcasecmp(net->Name + 2, argv[1])) continue; } } @@ -308,8 +309,8 @@ else if (argc > 2) { int l = strlen(argv[2]); for (j = net->EntryN - 1; j >= 0; j--) - if (strcasecmp(net->Entry[j].ListEntry, argv[2]) == 0 - || (strncasecmp(net->Entry[j].ListEntry, argv[2], l) == 0 && net->Entry[j].ListEntry[l] == '-')) { + if (pcb_strcasecmp(net->Entry[j].ListEntry, argv[2]) == 0 + || (pcb_strncasecmp(net->Entry[j].ListEntry, argv[2], l) == 0 && net->Entry[j].ListEntry[l] == '-')) { pin = net->Entry + j; pin_found = 1; func(net, pin); Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 5576) +++ trunk/src/object_act.c (revision 5577) @@ -491,7 +491,7 @@ printf("Entered pcb_act_ElementList, executing function %s\n", function); #endif - if (strcasecmp(function, "start") == 0) { + if (pcb_strcasecmp(function, "start") == 0) { PCB_ELEMENT_LOOP(PCB->Data); { PCB_FLAG_CLEAR(PCB_FLAG_FOUND, element); @@ -502,7 +502,7 @@ return 0; } - if (strcasecmp(function, "done") == 0) { + if (pcb_strcasecmp(function, "done") == 0) { PCB_ELEMENT_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, element)) { @@ -519,7 +519,7 @@ return 0; } - if (strcasecmp(function, "need") != 0) + if (pcb_strcasecmp(function, "need") != 0) PCB_ACT_FAIL(ElementList); if (argc != 4) @@ -839,7 +839,7 @@ if (!function) return 1; - if (strcasecmp(function, "Selected") == 0) + if (pcb_strcasecmp(function, "Selected") == 0) flags = PCB_FLAG_SELECTED; else { units = delta; @@ -913,7 +913,7 @@ if (!function) return 1; - if (strcasecmp(function, "Selected") == 0) + if (pcb_strcasecmp(function, "Selected") == 0) flags = PCB_FLAG_SELECTED; else { units = delta; Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 5576) +++ trunk/src/rats_patch.c (revision 5577) @@ -462,7 +462,7 @@ default_file = malloc(len + 8); memcpy(default_file, PCB->Filename, len + 1); end = strrchr(default_file, '.'); - if ((end == NULL) || (strcasecmp(end, ".pcb") != 0)) + if ((end == NULL) || (pcb_strcasecmp(end, ".pcb") != 0)) end = default_file + len; strcpy(end, ".bap"); } Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 5576) +++ trunk/src/select.c (revision 5577) @@ -831,7 +831,7 @@ static int strlst_match(const char **pat, const char *name) { for (; *pat != NULL; pat++) - if (strcasecmp(*pat, name) == 0) + if (pcb_strcasecmp(*pat, name) == 0) return 1; return 0; } Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 5576) +++ trunk/src_plugins/boardflip/boardflip.c (revision 5577) @@ -38,6 +38,7 @@ #include "plugins.h" #include "obj_all.h" #include "hid_actions.h" +#include "compat_misc.h" /* Things that need to be flipped: @@ -63,7 +64,7 @@ int h = PCB->MaxHeight; int sides = 0; - if (argc > 0 && strcasecmp(argv[0], "sides") == 0) + if (argc > 0 && pcb_strcasecmp(argv[0], "sides") == 0) sides = 1; printf("argc %d argv %s sides %d\n", argc, argc > 0 ? argv[0] : "", sides); LAYER_LOOP(PCB->Data, pcb_max_copper_layer + 2); Index: trunk/src_plugins/distalign/distalign.c =================================================================== --- trunk/src_plugins/distalign/distalign.c (revision 5576) +++ trunk/src_plugins/distalign/distalign.c (revision 5577) @@ -113,6 +113,7 @@ #include "plugins.h" #include "action_helper.h" #include "hid_actions.h" +#include "compat_misc.h" #define ARG(n) (argc > (n) ? argv[n] : 0) @@ -167,7 +168,7 @@ return K_none; } for (i = 0; i < PCB_ENTRIES(keywords); ++i) { - if (keywords[i] && strcasecmp(s, keywords[i]) == 0) + if (keywords[i] && pcb_strcasecmp(s, keywords[i]) == 0) return i; } return -1; Index: trunk/src_plugins/distaligntext/distaligntext.c =================================================================== --- trunk/src_plugins/distaligntext/distaligntext.c (revision 5576) +++ trunk/src_plugins/distaligntext/distaligntext.c (revision 5577) @@ -37,6 +37,7 @@ #include "hid_actions.h" #include "conf_core.h" #include "box.h" +#include "compat_misc.h" #define ARG(n) (argc > (n) ? argv[n] : 0) @@ -89,7 +90,7 @@ return K_none; } for (i = 0; i < PCB_ENTRIES(keywords); ++i) { - if (keywords[i] && strcasecmp(s, keywords[i]) == 0) + if (keywords[i] && pcb_strcasecmp(s, keywords[i]) == 0) return i; } return -1; Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 5576) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 5577) @@ -277,7 +277,7 @@ if ((strncmp(ctx->target, name, ctx->target_len) == 0) && ((! !ctx->parametric) == (type == PCB_FP_PARAMETRIC))) { const char *suffix = name + ctx->target_len; /* ugly heuristics: footprint names may end in .fp or .ele */ - if ((*suffix == '\0') || (strcasecmp(suffix, ".fp") == 0) || (strcasecmp(suffix, ".ele") == 0)) { + if ((*suffix == '\0') || (pcb_strcasecmp(suffix, ".fp") == 0) || (pcb_strcasecmp(suffix, ".ele") == 0)) { ctx->path = pcb_strdup(subdir); ctx->real_name = pcb_strdup(name); return 1; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 5576) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 5577) @@ -148,7 +148,7 @@ memset(&v, 0, sizeof(v)); switch(type) { case HIDA_Boolean: - if ((strcasecmp(str, "true") == 0) || (strcasecmp(str, "yes") == 0) || (strcasecmp(str, "1") == 0)) + if ((pcb_strcasecmp(str, "true") == 0) || (pcb_strcasecmp(str, "yes") == 0) || (pcb_strcasecmp(str, "1") == 0)) v.int_value = 1; else v.int_value = 0; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 5576) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 5577) @@ -5,6 +5,7 @@ #include #include "src/global_typedefs.h" #include "src/misc_util.h" +#include "src/compat_misc.h" #include "src/conf_core.h" #include "src/event.h" #include "src/paths.h" @@ -64,13 +65,13 @@ gpmi_hid_manage_scripts(); return 0; } - if (strcasecmp(argv[0], "reload") == 0) { + if (pcb_strcasecmp(argv[0], "reload") == 0) { if (argc > 1) cmd_reload(argv[1]); else cmd_reload(NULL); } - else if (strcasecmp(argv[0], "load") == 0) { + else if (pcb_strcasecmp(argv[0], "load") == 0) { if (argc == 3) { if (hid_gpmi_load_module(NULL, argv[1], argv[2], NULL) == NULL) pcb_message(PCB_MSG_DEFAULT, "Failed to load %s %s\n", argv[1], argv[2]); @@ -78,7 +79,7 @@ else pcb_message(PCB_MSG_DEFAULT, "Invalid number of arguments for load\n"); } - else if (strcasecmp(argv[0], "unload") == 0) { + else if (pcb_strcasecmp(argv[0], "unload") == 0) { if (argc == 2) { hid_gpmi_script_info_t *i = hid_gpmi_lookup(argv[1]); if (i != NULL) { Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 5576) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 5577) @@ -1151,17 +1151,17 @@ function = argc ? argv[0] : "Layout"; - if (strcasecmp(function, "Netlist") == 0) { + if (pcb_strcasecmp(function, "Netlist") == 0) { name = ghid_dialog_file_select_open(_("Load netlist file"), ¤t_netlist_dir, conf_core.rc.file_path); } - else if (strcasecmp(function, "ElementToBuffer") == 0) { + else if (pcb_strcasecmp(function, "ElementToBuffer") == 0) { gchar *path = (gchar *)pcb_fp_default_search_path(); name = ghid_dialog_file_select_open(_("Load element to buffer"), ¤t_element_dir, path); } - else if (strcasecmp(function, "LayoutToBuffer") == 0) { + else if (pcb_strcasecmp(function, "LayoutToBuffer") == 0) { name = ghid_dialog_file_select_open(_("Load layout file to buffer"), ¤t_layout_dir, conf_core.rc.file_path); } - else if (strcasecmp(function, "Layout") == 0) { + else if (pcb_strcasecmp(function, "Layout") == 0) { name = ghid_dialog_file_select_open(_("Load layout file"), ¤t_layout_dir, conf_core.rc.file_path); } @@ -1211,11 +1211,11 @@ function = argc ? argv[0] : "Layout"; - if (strcasecmp(function, "Layout") == 0) + if (pcb_strcasecmp(function, "Layout") == 0) if (PCB->Filename) return pcb_hid_actionl("SaveTo", "Layout", PCB->Filename, NULL); - if (strcasecmp(function, "PasteBuffer") == 0) { + if (pcb_strcasecmp(function, "PasteBuffer") == 0) { prompt = _("Save element as"); if (pcb_io_list(&avail, PCB_IOT_BUFFER, 1, 1, PCB_IOL_EXT_FP) > 0) { formats_param = (const char **)avail.digest; @@ -1266,7 +1266,7 @@ if (conf_core.rc.verbose) fprintf(stderr, "Save: Calling SaveTo(%s, %s)\n", function, name); - if (strcasecmp(function, "PasteBuffer") == 0) { + if (pcb_strcasecmp(function, "PasteBuffer") == 0) { pcb_hid_actionl("PasteBuffer", "Save", name, avail.plug[fmt]->description, "1", NULL); } @@ -1280,7 +1280,7 @@ */ if (fmt_param != NULL) sfmt = avail.plug[fmt]->description; - if (strcasecmp(function, "Layout") == 0) + if (pcb_strcasecmp(function, "Layout") == 0) pcb_hid_actionl("SaveTo", "LayoutAs", name, sfmt, NULL); else pcb_hid_actionl("SaveTo", function, name, sfmt, NULL); @@ -1602,9 +1602,9 @@ if (argc != 4) PCB_AFAIL(cursor); - if (strcasecmp(argv[0], "pan") == 0) + if (pcb_strcasecmp(argv[0], "pan") == 0) pan_warp = HID_SC_PAN_VIEWPORT; - else if (strcasecmp(argv[0], "warp") == 0) + else if (pcb_strcasecmp(argv[0], "warp") == 0) pan_warp = HID_SC_WARP_POINTER; else PCB_AFAIL(cursor); @@ -1676,24 +1676,24 @@ raise = FALSE; } - if (strcmp(a, "1") == 0 || strcasecmp(a, "Layout") == 0) { + if (strcmp(a, "1") == 0 || pcb_strcasecmp(a, "Layout") == 0) { } - else if (strcmp(a, "2") == 0 || strcasecmp(a, "Library") == 0) { + else if (strcmp(a, "2") == 0 || pcb_strcasecmp(a, "Library") == 0) { ghid_library_window_show(gport, raise); } - else if (strcmp(a, "3") == 0 || strcasecmp(a, "Log") == 0) { + else if (strcmp(a, "3") == 0 || pcb_strcasecmp(a, "Log") == 0) { ghid_log_window_show(raise); } - else if (strcmp(a, "4") == 0 || strcasecmp(a, "Netlist") == 0) { + else if (strcmp(a, "4") == 0 || pcb_strcasecmp(a, "Netlist") == 0) { ghid_netlist_window_show(gport, raise); } - else if (strcmp(a, "5") == 0 || strcasecmp(a, "Preferences") == 0) { + else if (strcmp(a, "5") == 0 || pcb_strcasecmp(a, "Preferences") == 0) { ghid_config_window_show(); } - else if (strcmp(a, "6") == 0 || strcasecmp(a, "DRC") == 0) { + else if (strcmp(a, "6") == 0 || pcb_strcasecmp(a, "DRC") == 0) { ghid_drc_window_show(raise); } - else if (strcmp(a, "7") == 0 || strcasecmp(a, "search") == 0) { + else if (strcmp(a, "7") == 0 || pcb_strcasecmp(a, "search") == 0) { ghid_search_window_show(raise); } else { @@ -1776,13 +1776,13 @@ if (argc == 2) div = atoi(argv[1]); - if (strcasecmp(argv[0], "up") == 0) + if (pcb_strcasecmp(argv[0], "up") == 0) dy = -gport->view.height / div; - else if (strcasecmp(argv[0], "down") == 0) + else if (pcb_strcasecmp(argv[0], "down") == 0) dy = gport->view.height / div; - else if (strcasecmp(argv[0], "right") == 0) + else if (pcb_strcasecmp(argv[0], "right") == 0) dx = gport->view.width / div; - else if (strcasecmp(argv[0], "left") == 0) + else if (pcb_strcasecmp(argv[0], "left") == 0) dx = -gport->view.width / div; else PCB_AFAIL(scroll); Index: trunk/src_plugins/hid_gtk/gui-library-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-library-window.c (revision 5576) +++ trunk/src_plugins/hid_gtk/gui-library-window.c (revision 5577) @@ -204,7 +204,7 @@ g_assert(GHID_IS_LIBRARY_WINDOW(data)); text_ = gtk_entry_get_text(library_window->entry_filter); - if (g_ascii_strcasecmp(text_, "") == 0) { + if (strcmp(text_, "") == 0) { return TRUE; } @@ -518,7 +518,7 @@ /* turns button off if filter entry is empty */ /* turns it on otherwise */ button = GTK_WIDGET(library_window->button_clear); - sensitive = (g_ascii_strcasecmp(gtk_entry_get_text(library_window->entry_filter), "") != 0); + sensitive = (strcmp(gtk_entry_get_text(library_window->entry_filter), "") != 0); gtk_widget_set_sensitive(button, sensitive); /* Cancel any pending update of the footprint list filter */ Index: trunk/src_plugins/hid_gtk/gui-log-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-log-window.c (revision 5576) +++ trunk/src_plugins/hid_gtk/gui-log-window.c (revision 5577) @@ -27,6 +27,7 @@ /* This file written by Bill Wilson for the PCB Gtk port */ +#include #include "config.h" #include "conf_core.h" #include "conf_hid.h" @@ -184,10 +185,10 @@ { const char *a = argc == 1 ? argv[0] : ""; - if (strncasecmp(a, "t", 1) == 0) { + if (tolower(*a) == 't') { log_show_on_append = TRUE; } - else if (strncasecmp(a, "f", 1) == 0) { + else if (tolower(*a) == 'f') { log_show_on_append = FALSE; } return 0; Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 5576) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 5577) @@ -92,6 +92,7 @@ #include "hid_flags.h" #include "route_style.h" #include "compat_nls.h" +#include "compat_misc.h" #include "obj_line.h" #include "layer_vis.h" @@ -1455,7 +1456,7 @@ { guint key; - if (strcasecmp(desc, "enter") == 0) desc = "Return"; + if (pcb_strcasecmp(desc, "enter") == 0) desc = "Return"; key = gdk_keyval_from_name(desc); if (key > 0xffff) { @@ -1632,9 +1633,9 @@ if (argc == 0) PCB_AFAIL(selectlayer); - if (strcasecmp(argv[0], "silk") == 0) + if (pcb_strcasecmp(argv[0], "silk") == 0) newl = LAYER_BUTTON_SILK; - else if (strcasecmp(argv[0], "rats") == 0) + else if (pcb_strcasecmp(argv[0], "rats") == 0) newl = LAYER_BUTTON_RATS; else newl = atoi(argv[0]) - 1; Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 5576) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 5577) @@ -24,6 +24,7 @@ #include "stdarg.h" #include "misc_util.h" #include "compat_nls.h" +#include "compat_misc.h" static int ok; @@ -103,9 +104,9 @@ setup_fsb_dialog(); - if (strcasecmp(function, "Netlist") == 0) + if (pcb_strcasecmp(function, "Netlist") == 0) pattern = xms_net; - else if (strcasecmp(function, "ElementToBuffer") == 0) + else if (pcb_strcasecmp(function, "ElementToBuffer") == 0) pattern = xms_fp; else pattern = xms_pcb; @@ -212,7 +213,7 @@ function = argc ? argv[0] : "Layout"; - if (strcasecmp(function, "Layout") == 0) + if (pcb_strcasecmp(function, "Layout") == 0) if (PCB->Filename) return pcb_hid_actionl("SaveTo", "Layout", PCB->Filename, NULL); @@ -241,7 +242,7 @@ XmStringGetLtoR(xmname, XmFONTLIST_DEFAULT_TAG, &name); - if (strcasecmp(function, "PasteBuffer") == 0) + if (pcb_strcasecmp(function, "PasteBuffer") == 0) pcb_hid_actionl("PasteBuffer", "Save", name, NULL); else { /* @@ -250,7 +251,7 @@ * ActionSaveTo() will ignore the new file name we * just obtained. */ - if (strcasecmp(function, "Layout") == 0) + if (pcb_strcasecmp(function, "Layout") == 0) pcb_hid_actionl("SaveTo", "LayoutAs", name, NULL); else pcb_hid_actionl("SaveTo", function, name, NULL); @@ -824,17 +825,17 @@ static int DoWindows(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { const char *a = argc == 1 ? argv[0] : ""; - if (strcmp(a, "1") == 0 || strcasecmp(a, "Layout") == 0) { + if (strcmp(a, "1") == 0 || pcb_strcasecmp(a, "Layout") == 0) { } - else if (strcmp(a, "2") == 0 || strcasecmp(a, "Library") == 0) { + else if (strcmp(a, "2") == 0 || pcb_strcasecmp(a, "Library") == 0) { lesstif_show_library(); } - else if (strcmp(a, "3") == 0 || strcasecmp(a, "Log") == 0) { + else if (strcmp(a, "3") == 0 || pcb_strcasecmp(a, "Log") == 0) { if (log_form == 0) lesstif_log(""); XtManageChild(log_form); } - else if (strcmp(a, "4") == 0 || strcasecmp(a, "Netlist") == 0) { + else if (strcmp(a, "4") == 0 || pcb_strcasecmp(a, "Netlist") == 0) { lesstif_show_netlist(); } else { Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 5576) +++ trunk/src_plugins/hid_lesstif/main.c (revision 5577) @@ -471,7 +471,7 @@ return 0; } vp = argv[0]; - if (strcasecmp(vp, "toggle") == 0) { + if (pcb_strcasecmp(vp, "toggle") == 0) { zoom_toggle(x, y); return 0; } @@ -504,7 +504,7 @@ int mode; if (argc == 2) { - pan_thumb_mode = (strcasecmp(argv[0], "thumb") == 0) ? 1 : 0; + pan_thumb_mode = (pcb_strcasecmp(argv[0], "thumb") == 0) ? 1 : 0; mode = atoi(argv[1]); } else { @@ -855,9 +855,9 @@ if (argc != 4) PCB_AFAIL(cursor); - if (strcasecmp(argv[0], "pan") == 0) + if (pcb_strcasecmp(argv[0], "pan") == 0) pan_warp = HID_SC_PAN_VIEWPORT; - else if (strcasecmp(argv[0], "warp") == 0) + else if (pcb_strcasecmp(argv[0], "warp") == 0) pan_warp = HID_SC_WARP_POINTER; else PCB_AFAIL(cursor); @@ -1674,7 +1674,7 @@ { KeySym key; - if (strcasecmp(desc, "enter") == 0) desc = "Return"; + if (pcb_strcasecmp(desc, "enter") == 0) desc = "Return"; key = XStringToKeysym(desc); if (key == NoSymbol && len > 1) { Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 5576) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 5577) @@ -316,9 +316,9 @@ int newl; if (argc == 0) return 1; - if (strcasecmp(argv[0], "silk") == 0) + if (pcb_strcasecmp(argv[0], "silk") == 0) newl = LB_SILK; - else if (strcasecmp(argv[0], "rats") == 0) + else if (pcb_strcasecmp(argv[0], "rats") == 0) newl = LB_RATS; else newl = atoi(argv[0]) - 1; Index: trunk/src_plugins/import_sch/import_sch.c =================================================================== --- trunk/src_plugins/import_sch/import_sch.c (revision 5576) +++ trunk/src_plugins/import_sch/import_sch.c (revision 5577) @@ -43,6 +43,7 @@ #include "import_sch_conf.h" #include "misc_util.h" #include "compat_nls.h" +#include "compat_misc.h" #include "obj_rat.h" #ifdef HAVE_UNISTD_H @@ -181,7 +182,7 @@ mode = PCB_ACTION_ARG(0); - if (mode && strcasecmp(mode, "setdisperse") == 0) { + if (mode && pcb_strcasecmp(mode, "setdisperse") == 0) { const char *ds, *units; char buf[50]; @@ -202,7 +203,7 @@ return 0; } - if (mode && strcasecmp(mode, "setnewpoint") == 0) { + if (mode && pcb_strcasecmp(mode, "setnewpoint") == 0) { const char *xs, *ys, *units; pcb_coord_t x, y; char buf[50]; @@ -214,12 +215,12 @@ if (!xs) { pcb_gui->get_coords(_("Click on a location"), &x, &y); } - else if (strcasecmp(xs, "center") == 0) { + else if (pcb_strcasecmp(xs, "center") == 0) { pcb_attrib_remove(PCB, "import::newX"); pcb_attrib_remove(PCB, "import::newY"); return 0; } - else if (strcasecmp(xs, "mark") == 0) { + else if (pcb_strcasecmp(xs, "mark") == 0) { if (pcb_marked.status) { x = pcb_marked.X; y = pcb_marked.Y; @@ -305,7 +306,7 @@ nsources = 1; } - if (strcasecmp(mode, "gnetlist") == 0) { + if (pcb_strcasecmp(mode, "gnetlist") == 0) { char *tmpfile = pcb_tempfile_name_new("gnetlist_output"); const char **cmd; int i; @@ -352,7 +353,7 @@ free(cmd); pcb_tempfile_unlink(tmpfile); } - else if (strcasecmp(mode, "make") == 0) { + else if (pcb_strcasecmp(mode, "make") == 0) { int must_free_tmpfile = 0; char *tmpfile; const char *cmd[10]; Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 5576) +++ trunk/src_plugins/io_lihata/read.c (revision 5577) @@ -203,14 +203,14 @@ if (nd == NULL) return -1; - if ((strcmp(nd->data.text.value, "1") == 0) || (strcasecmp(nd->data.text.value, "on") == 0) || - (strcasecmp(nd->data.text.value, "true") == 0) || (strcasecmp(nd->data.text.value, "yes") == 0)) { + if ((strcmp(nd->data.text.value, "1") == 0) || (pcb_strcasecmp(nd->data.text.value, "on") == 0) || + (pcb_strcasecmp(nd->data.text.value, "true") == 0) || (pcb_strcasecmp(nd->data.text.value, "yes") == 0)) { *res = 1; return 0; } - if ((strcmp(nd->data.text.value, "0") == 0) || (strcasecmp(nd->data.text.value, "off") == 0) || - (strcasecmp(nd->data.text.value, "false") == 0) || (strcasecmp(nd->data.text.value, "no") == 0)) { + if ((strcmp(nd->data.text.value, "0") == 0) || (pcb_strcasecmp(nd->data.text.value, "off") == 0) || + (pcb_strcasecmp(nd->data.text.value, "false") == 0) || (pcb_strcasecmp(nd->data.text.value, "no") == 0)) { *res = 0; return 0; } Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 5576) +++ trunk/src_plugins/puller/puller.c (revision 5577) @@ -67,6 +67,7 @@ #include "hid_actions.h" #include "misc_util.h" #include "obj_all.h" +#include "compat_misc.h" #define abort1() fprintf(stderr, "abort at line %d\n", __LINE__), abort() @@ -2273,9 +2274,9 @@ npulled = 0; printf("puller! %s\n", argc > 0 ? argv[0] : ""); - if (argc > 0 && strcasecmp(argv[0], "selected") == 0) + if (argc > 0 && pcb_strcasecmp(argv[0], "selected") == 0) select_flags = PCB_FLAG_SELECTED; - if (argc > 0 && strcasecmp(argv[0], "found") == 0) + if (argc > 0 && pcb_strcasecmp(argv[0], "found") == 0) select_flags = PCB_FLAG_FOUND; printf("optimizing...\n"); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 5576) +++ trunk/src_plugins/report/report.c (revision 5577) @@ -741,7 +741,7 @@ use_re = 1; for (i = 0; i < PCB->NetlistLib[PCB_NETLIST_EDITED].MenuN; i++) { net = PCB->NetlistLib[PCB_NETLIST_EDITED].Menu + i; - if (strcasecmp(tofind, net->Name + 2) == 0) + if (pcb_strcasecmp(tofind, net->Name + 2) == 0) use_re = 0; } if (use_re) { @@ -761,7 +761,7 @@ continue; } else { - if (strcasecmp(net->Name + 2, tofind)) + if (pcb_strcasecmp(net->Name + 2, tofind)) continue; } @@ -871,19 +871,19 @@ { if ((argc < 1) || (argc > 2)) AUSAGE(report); - else if (strcasecmp(argv[0], "Object") == 0) { + else if (pcb_strcasecmp(argv[0], "Object") == 0) { pcb_gui->get_coords("Click on an object", &x, &y); return ReportDialog(argc - 1, argv + 1, x, y); } - else if (strcasecmp(argv[0], "DrillReport") == 0) + else if (pcb_strcasecmp(argv[0], "DrillReport") == 0) return ReportDrills(argc - 1, argv + 1, x, y); - else if (strcasecmp(argv[0], "FoundPins") == 0) + else if (pcb_strcasecmp(argv[0], "FoundPins") == 0) return ReportFoundPins(argc - 1, argv + 1, x, y); - else if ((strcasecmp(argv[0], "NetLength") == 0) && (argc == 1)) + else if ((pcb_strcasecmp(argv[0], "NetLength") == 0) && (argc == 1)) return ReportNetLength(argc - 1, argv + 1, x, y); - else if (strcasecmp(argv[0], "AllNetLengths") == 0) + else if (pcb_strcasecmp(argv[0], "AllNetLengths") == 0) return ReportAllNetLengths(argc - 1, argv + 1, x, y); - else if ((strcasecmp(argv[0], "NetLength") == 0) && (argc == 2)) + else if ((pcb_strcasecmp(argv[0], "NetLength") == 0) && (argc == 2)) return ReportNetLengthByName(argv[1], x, y); else if (argc == 2) AUSAGE(report);