Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 4049) +++ trunk/src/file_act.c (revision 4050) @@ -149,7 +149,7 @@ FreeLibraryMemory(&(PCB->NetlistLib[i])); } if (!ImportNetlist(PCB->Netlistname)) - NetlistChanged(1); + pcb_netlist_changed(1); } else if (strcasecmp(function, "Revert") == 0 && PCB->Filename && (!PCB->Changed || gui->confirm_dialog(_("OK to override changes?"), 0))) { Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 4049) +++ trunk/src/netlist.c (revision 4050) @@ -61,7 +61,7 @@ int netlist_frozen = 0; int netlist_needs_update = 0; -void NetlistChanged(int force_unfreeze) +void pcb_netlist_changed(int force_unfreeze) { if (force_unfreeze) netlist_frozen = 0; @@ -73,7 +73,7 @@ } } -LibraryMenuTypePtr netnode_to_netname(const char *nodename) +LibraryMenuTypePtr pcb_netnode_to_netname(const char *nodename) { int i, j; /*printf("nodename [%s]\n", nodename); */ @@ -88,7 +88,7 @@ return 0; } -LibraryMenuTypePtr netname_to_netname(const char *netname) +LibraryMenuTypePtr pcb_netname_to_netname(const char *netname) { int i; @@ -105,7 +105,7 @@ } #warning do not use int here -int pin_name_to_xy(LibraryEntryType * pin, int *x, int *y) +int pcb_pin_name_to_xy(LibraryEntryType * pin, int *x, int *y) { ConnectionType conn; if (!SeekPad(pin, &conn, pcb_false)) @@ -123,40 +123,40 @@ return 1; } -void netlist_find(LibraryMenuType * net, LibraryEntryType * pin) +void pcb_netlist_find(LibraryMenuType * net, LibraryEntryType * pin) { int x, y; - if (pin_name_to_xy(net->Entry, &x, &y)) + if (pcb_pin_name_to_xy(net->Entry, &x, &y)) return; LookupConnection(x, y, 1, 1, PCB_FLAG_FOUND); } -void netlist_select(LibraryMenuType * net, LibraryEntryType * pin) +void pcb_netlist_select(LibraryMenuType * net, LibraryEntryType * pin) { int x, y; - if (pin_name_to_xy(net->Entry, &x, &y)) + if (pcb_pin_name_to_xy(net->Entry, &x, &y)) return; LookupConnection(x, y, 1, 1, PCB_FLAG_SELECTED); } -void netlist_rats(LibraryMenuType * net, LibraryEntryType * pin) +void pcb_netlist_rats(LibraryMenuType * net, LibraryEntryType * pin) { net->Name[0] = ' '; net->flag = 1; - NetlistChanged(0); + pcb_netlist_changed(0); } -void netlist_norats(LibraryMenuType * net, LibraryEntryType * pin) +void pcb_netlist_norats(LibraryMenuType * net, LibraryEntryType * pin) { net->Name[0] = '*'; net->flag = 0; - NetlistChanged(0); + pcb_netlist_changed(0); } /* The primary purpose of this action is to remove the netlist completely so that a new one can be loaded, usually via a gsch2pcb style script. */ -void netlist_clear(LibraryMenuType * net, LibraryEntryType * pin) +void pcb_netlist_clear(LibraryMenuType * net, LibraryEntryType * pin) { LibraryType *netlist = (LibraryType *) & PCB->NetlistLib; int ni, pi; @@ -188,10 +188,10 @@ net->EntryN--; } } - NetlistChanged(0); + pcb_netlist_changed(0); } -void netlist_style(LibraryMenuType * net, const char *style) +void pcb_netlist_style(LibraryMenuType * net, const char *style) { free(net->Style); net->Style = pcb_strdup_null((char *) style); Index: trunk/src/netlist.h =================================================================== --- trunk/src/netlist.h (revision 4049) +++ trunk/src/netlist.h (revision 4050) @@ -27,14 +27,14 @@ /* generic netlist operations */ #include "global.h" -void NetlistChanged(int force_unfreeze); -LibraryMenuTypePtr netnode_to_netname(const char *nodename); -LibraryMenuTypePtr netname_to_netname(const char *netname); +void pcb_netlist_changed(int force_unfreeze); +LibraryMenuTypePtr pcb_netnode_to_netname(const char *nodename); +LibraryMenuTypePtr pcb_netname_to_netname(const char *netname); -int pin_name_to_xy(LibraryEntryType *pin, int *x, int *y); -void netlist_find(LibraryMenuType *net, LibraryEntryType *pin); -void netlist_select(LibraryMenuType *net, LibraryEntryType *pin); -void netlist_rats(LibraryMenuType *net, LibraryEntryType *pin); -void netlist_norats(LibraryMenuType *net, LibraryEntryType *pin); -void netlist_clear(LibraryMenuType *net, LibraryEntryType *pin); -void netlist_style(LibraryMenuType *net, const char *style); +int pcb_pin_name_to_xy(LibraryEntryType *pin, int *x, int *y); +void pcb_netlist_find(LibraryMenuType *net, LibraryEntryType *pin); +void pcb_netlist_select(LibraryMenuType *net, LibraryEntryType *pin); +void pcb_netlist_rats(LibraryMenuType *net, LibraryEntryType *pin); +void pcb_netlist_norats(LibraryMenuType *net, LibraryEntryType *pin); +void pcb_netlist_clear(LibraryMenuType *net, LibraryEntryType *pin); +void pcb_netlist_style(LibraryMenuType *net, const char *style); Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 4049) +++ trunk/src/netlist_act.c (revision 4050) @@ -49,7 +49,7 @@ extern int netlist_needs_update; -static int netlist_swap() +static int pcb_netlist_swap() { char *pins[3] = { NULL, NULL, NULL }; int next = 0, n; @@ -116,7 +116,7 @@ /* The primary purpose of this action is to rebuild a netlist from a script, in conjunction with the clear action above. */ -static int netlist_add(const char *netname, const char *pinname) +static int pcb_netlist_add(const char *netname, const char *pinname) { int ni, pi; LibraryType *netlist = &PCB->NetlistLib[NETLIST_EDITED]; @@ -142,7 +142,7 @@ rats_patch_append_optimize(PCB, RATP_ADD_CONN, pin->ListEntry, net->Name + 2, NULL); } - NetlistChanged(0); + pcb_netlist_changed(0); return 0; } @@ -226,30 +226,30 @@ return 1; } if (strcasecmp(argv[0], "find") == 0) - func = netlist_find; + func = pcb_netlist_find; else if (strcasecmp(argv[0], "select") == 0) - func = netlist_select; + func = pcb_netlist_select; else if (strcasecmp(argv[0], "rats") == 0) - func = netlist_rats; + func = pcb_netlist_rats; else if (strcasecmp(argv[0], "norats") == 0) - func = netlist_norats; + func = pcb_netlist_norats; else if (strcasecmp(argv[0], "clear") == 0) { - func = netlist_clear; + func = pcb_netlist_clear; if (argc == 1) { - netlist_clear(NULL, NULL); + pcb_netlist_clear(NULL, NULL); return 0; } } else if (strcasecmp(argv[0], "style") == 0) - func = (NFunc) netlist_style; + func = (NFunc) pcb_netlist_style; else if (strcasecmp(argv[0], "swap") == 0) - return netlist_swap(); + return pcb_netlist_swap(); else if (strcasecmp(argv[0], "add") == 0) { /* Add is different, because the net/pin won't already exist. */ - return netlist_add(ACTION_ARG(1), ACTION_ARG(2)); + return pcb_netlist_add(ACTION_ARG(1), ACTION_ARG(2)); } else if (strcasecmp(argv[0], "sort") == 0) { - sort_netlist(); + pcb_sort_netlist(); return 0; } else if (strcasecmp(argv[0], "freeze") == 0) { @@ -260,7 +260,7 @@ if (netlist_frozen > 0) { netlist_frozen--; if (netlist_needs_update) - NetlistChanged(0); + pcb_netlist_changed(0); } return 0; } @@ -267,7 +267,7 @@ else if (strcasecmp(argv[0], "forcethaw") == 0) { netlist_frozen = 0; if (netlist_needs_update) - NetlistChanged(0); + pcb_netlist_changed(0); return 0; } else { @@ -308,8 +308,8 @@ net_found = 1; pin = 0; - if (func == (void *) netlist_style) { - netlist_style(net, ACTION_ARG(2)); + if (func == (void *) pcb_netlist_style) { + pcb_netlist_style(net, ACTION_ARG(2)); } else if (argc > 2) { int l = strlen(argv[2]); Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 4049) +++ trunk/src/plug_io.c (revision 4050) @@ -334,7 +334,7 @@ } AttributePut(PCB, "PCB::grid::unit", conf_core.editor.grid_unit->suffix); - sort_netlist(); + pcb_sort_netlist(); rats_patch_make_edited(PCB); /* set route style to the first one, if the current one doesn't @@ -448,7 +448,7 @@ qsort(lib->Menu[i].Entry, lib->Menu[i].EntryN, sizeof(lib->Menu[i].Entry[0]), netnode_sort); } -void sort_netlist() +void pcb_sort_netlist() { netlist_sort_offset = 2; sort_library(&(PCB->NetlistLib[NETLIST_INPUT])); Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 4049) +++ trunk/src/plug_io.h (revision 4050) @@ -105,7 +105,7 @@ void DisableEmergencySave(void); int RevertPCB(void); int SaveBufferElements(const char *, const char *fmt); -void sort_netlist(void); +void pcb_sort_netlist(void); void PrintQuotedString(FILE *, const char *); void sort_library(LibraryTypePtr lib); void set_some_route_style(); Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 4049) +++ trunk/src/rats.c (revision 4050) @@ -845,9 +845,9 @@ GetLayerGroupNumberByNumber(solder_silk_layer) : GetLayerGroupNumberByNumber(component_silk_layer)); name2 = ConnectionName(found, ptr1, ptr2); - menu = netnode_to_netname(name1); + menu = pcb_netnode_to_netname(name1); if (menu) { - if (netnode_to_netname(name2)) { + if (pcb_netnode_to_netname(name2)) { Message(PCB_MSG_DEFAULT, _("Both connections already in netlist - cannot merge nets\n")); return (NULL); } @@ -854,16 +854,16 @@ entry = GetLibraryEntryMemory(menu); entry->ListEntry = pcb_strdup(name2); entry->ListEntry_dontfree = 0; - netnode_to_netname(name2); + pcb_netnode_to_netname(name2); goto ratIt; } /* ok, the first name did not belong to a net */ - menu = netnode_to_netname(name2); + menu = pcb_netnode_to_netname(name2); if (menu) { entry = GetLibraryEntryMemory(menu); entry->ListEntry = pcb_strdup(name1); entry->ListEntry_dontfree = 0; - netnode_to_netname(name1); + pcb_netnode_to_netname(name1); goto ratIt; } @@ -890,7 +890,7 @@ menu->flag = 1; ratIt: - NetlistChanged(0); + pcb_netlist_changed(0); return (CreateNewRat(PCB->Data, Crosshair.AttachedLine.Point1.X, Crosshair.AttachedLine.Point1.Y, Crosshair.AttachedLine.Point2.X, Index: trunk/src/rats.h =================================================================== --- trunk/src/rats.h (revision 4049) +++ trunk/src/rats.h (revision 4050) @@ -33,10 +33,6 @@ #include "global.h" -/* This one is actually in netlist.cc, but it's used by rats.c */ -LibraryMenuTypePtr netnode_to_netname(const char *nodename); -LibraryMenuTypePtr netname_to_netname(const char *netname); - RatTypePtr AddNet(void); char *ConnectionName(int, void *, void *); Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4049) +++ trunk/src/undo.c (revision 4050) @@ -858,7 +858,7 @@ *lib = *saved; - NetlistChanged(0); + pcb_netlist_changed(0); return pcb_true; } Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4049) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4050) @@ -380,7 +380,7 @@ if (argc == 1) { LibraryMenuTypePtr net; - net = netnode_to_netname(argv[0]); + net = pcb_netnode_to_netname(argv[0]); if (net) { XmString item; int vis = 0; @@ -411,7 +411,7 @@ } else { /* Try the argument as a netname */ - net = netname_to_netname(argv[0]); + net = pcb_netname_to_netname(argv[0]); if (net) { XmString item; Index: trunk/src_plugins/import_edif/import_edif.c =================================================================== --- trunk/src_plugins/import_edif/import_edif.c (revision 4049) +++ trunk/src_plugins/import_edif/import_edif.c (revision 4050) @@ -62,7 +62,7 @@ { int ret = ReadEdifNetlist((char *)fn); if (ret == 0) { - sort_netlist(); + pcb_sort_netlist(); rats_patch_make_edited(PCB); } return ret; Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 4049) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 4050) @@ -148,7 +148,7 @@ pclose(fp); else fclose(fp); - sort_netlist(); + pcb_sort_netlist(); rats_patch_make_edited(PCB); return (0); } Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 4049) +++ trunk/src_plugins/renumber/renumber.c (revision 4050) @@ -341,7 +341,7 @@ free(is[k]); } - NetlistChanged(0); + pcb_netlist_changed(0); IncrementUndoSerialNumber(); SetChangedFlag(pcb_true); }