Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 2527) +++ trunk/src/action_helper.c (revision 2528) @@ -59,6 +59,7 @@ #include "stub_stroke.h" #include "funchash_core.h" #include "hid_actions.h" +#include "compat_misc.h" /* --------------------------------------------------------------------------- */ @@ -989,7 +990,7 @@ memcpy(estr, e->Name, MAX_ELEMENTNAMES * sizeof(TextType)); for (i = 0; i < MAX_ELEMENTNAMES; ++i) - estr[i].TextString = estr[i].TextString ? strdup(estr[i].TextString) : NULL; + estr[i].TextString = estr[i].TextString ? pcb_strdup(estr[i].TextString) : NULL; RemoveElement(e); } } Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 2527) +++ trunk/src/buffer.c (revision 2528) @@ -51,6 +51,7 @@ #include "select.h" #include "set.h" #include "funchash_core.h" +#include "compat_misc.h" /* --------------------------------------------------------------------------- * some local prototypes @@ -127,7 +128,7 @@ Line->Point2.X, Line->Point2.Y, Line->Thickness, Line->Clearance, MaskFlags(Line->Flags, PCB_FLAG_FOUND | ExtraFlag)); if (line && Line->Number) - line->Number = strdup(Line->Number); + line->Number = pcb_strdup(Line->Number); return (line); } @@ -507,15 +508,15 @@ if (e->Name[0].TextString) free(e->Name[0].TextString); - e->Name[0].TextString = strdup(name); + e->Name[0].TextString = pcb_strdup(name); if (e->Name[1].TextString) free(e->Name[1].TextString); - e->Name[1].TextString = refdes ? strdup(refdes) : 0; + e->Name[1].TextString = refdes ? pcb_strdup(refdes) : 0; if (e->Name[2].TextString) free(e->Name[2].TextString); - e->Name[2].TextString = value ? strdup(value) : 0; + e->Name[2].TextString = value ? pcb_strdup(value) : 0; return 0; } @@ -551,7 +552,7 @@ CreateNewLineOnLayer(&Buffer->Data->SILKLAYER, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness, 0, NoFlags()); if (line) - line->Number = STRDUP(NAMEONPCB_NAME(element)); + line->Number = pcb_strdup_null(NAMEONPCB_NAME(element)); } END_LOOP; ARC_LOOP(element); @@ -581,7 +582,7 @@ pad->Point1.X, pad->Point1.Y, pad->Point2.X, pad->Point2.Y, pad->Thickness, pad->Clearance, NoFlags()); if (line) - line->Number = STRDUP(pad->Number); + line->Number = pcb_strdup_null(pad->Number); } END_LOOP; FreeElementMemory(element); @@ -735,7 +736,7 @@ LINE_LOOP(&Buffer->Data->SILKLAYER); { if (line->Number && !NAMEONPCB_NAME(Element)) - NAMEONPCB_NAME(Element) = strdup(line->Number); + NAMEONPCB_NAME(Element) = pcb_strdup(line->Number); CreateNewLineInElement(Element, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness); hasParts = true; } @@ -1358,7 +1359,7 @@ default_file = NULL; } if (name && *name) { - default_file = strdup(name); + default_file = pcb_strdup(name); } free_name = 1; } Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 2527) +++ trunk/src/change_act.c (revision 2528) @@ -47,6 +47,7 @@ #include "undo.h" #include "rubberband.h" #include "misc_util.h" +#include "compat_misc.h" static void ChangeFlag(char *, char *, int, char *); static int ActionChangeSize(int argc, char **argv, Coord x, Coord y); @@ -581,7 +582,7 @@ * Note: we can't free() pin->Name first because * it is used in the undo list */ - pin->Name = strdup(pinname); + pin->Name = pcb_strdup(pinname); SetChangedFlag(true); changed = 1; } @@ -596,7 +597,7 @@ * Note: we can't free() pad->Name first because * it is used in the undo list */ - pad->Name = strdup(pinname); + pad->Name = pcb_strdup(pinname); SetChangedFlag(true); changed = 1; } Index: trunk/src/compat_fs.c =================================================================== --- trunk/src/compat_fs.c (revision 2527) +++ trunk/src/compat_fs.c (revision 2528) @@ -41,6 +41,7 @@ #include #include #include "compat_fs.h" +#include "compat_misc.h" #ifdef HAVE_SYS_WAIT_H #include @@ -182,10 +183,10 @@ #undef TEMPLATE #else /* - * tmpnam() uses a static buffer so strdup() the result right away + * tmpnam() uses a static buffer so pcb_strdup() the result right away * in case someone decides to create multiple temp names. */ - tmpfile = strdup(tmpnam(NULL)); + tmpfile = pcb_strdup(tmpnam(NULL)); #ifdef __WIN32__ { /* Guile doesn't like \ separators */ @@ -226,7 +227,7 @@ e--; } - dname = strdup(name); + dname = pcb_strdup(name); dname[e] = '\0'; /* Index: trunk/src/compat_lrealpath.c =================================================================== --- trunk/src/compat_lrealpath.c (revision 2527) +++ trunk/src/compat_lrealpath.c (revision 2528) @@ -41,6 +41,7 @@ #include #endif #include +#include "compat_misc.h" /* On GNU libc systems the declaration is only visible with _GNU_SOURCE. */ #if defined(HAVE_CANONICALIZE_FILE_NAME) \ @@ -76,7 +77,7 @@ const char *rp = realpath(filename, buf); if (rp == NULL) rp = filename; - return strdup(rp); + return pcb_strdup(rp); } /* REALPATH_LIMIT */ @@ -87,7 +88,7 @@ { char *rp = canonicalize_file_name(filename); if (rp == NULL) - return strdup(filename); + return pcb_strdup(filename); else return rp; } @@ -111,7 +112,7 @@ if (buf == NULL) return NULL; rp = realpath(filename, buf); - ret = strdup(rp ? rp : filename); + ret = pcb_strdup(rp ? rp : filename); free(buf); return ret; } @@ -130,18 +131,18 @@ char *basename; DWORD len = GetFullPathName(filename, MAX_PATH, buf, &basename); if (len == 0 || len > MAX_PATH - 1) - return strdup(filename); + return pcb_strdup(filename); else { /* The file system is case-preserving but case-insensitive, Canonicalize to lowercase, using the codepage associated with the process locale. */ CharLowerBuff(buf, len); - return strdup(buf); + return pcb_strdup(buf); } } #else /* This system is a lost cause, just duplicate the filename. */ - return strdup(filename); + return pcb_strdup(filename); #endif } Index: trunk/src/compat_misc.c =================================================================== --- trunk/src/compat_misc.c (revision 2527) +++ trunk/src/compat_misc.c (revision 2528) @@ -97,3 +97,24 @@ { return getpid(); } + +char *pcb_strndup(const char *s, int len) +{ + int a, l = strlen(s); + char *o; + + a = (len < l) ? len : l; + o = malloc(a+1); + memcpy(o, s, a); + o[a] = '\0'; + return o; +} + +char *pcb_strdup(const char *s) +{ + int l = strlen(s); + char *o; + o = malloc(l+1); + memcpy(o, s, l+1); + return o; +} Index: trunk/src/compat_misc.h =================================================================== --- trunk/src/compat_misc.h (revision 2527) +++ trunk/src/compat_misc.h (revision 2528) @@ -40,4 +40,9 @@ const char *get_user_name(void); int pcb_getpid(void); +char *pcb_strndup(const char *s, int len); +char *pcb_strdup(const char *s); + +#define pcb_strdup_null(x) (((x) != NULL) ? pcb_strdup (x) : NULL) + #endif /* PCB_COMPAT_MISC_H */ Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 2527) +++ trunk/src/conf.c (revision 2528) @@ -34,6 +34,7 @@ #include "error.h" #include "paths.h" #include "compat_fs.h" +#include "compat_misc.h" /* conf list node's name */ const char *conf_list_name = "pcb-rnd-conf-v1"; @@ -705,7 +706,7 @@ n = conf_get_field(path); if (n == NULL) { char *path_, *field; - path_ = strdup(path); + path_ = pcb_strdup(path); /* It might be an array element - truncate */ field = strrchr(path_, '['); @@ -808,7 +809,7 @@ } else { /* lihata syntax differs from conf syntax in array indexing */ - pc = strdup(path); + pc = pcb_strdup(path); pc[end-path] = '/'; end = strchr(pc+(end-path), ']'); if (end != NULL) @@ -943,7 +944,7 @@ lht_node_type_t ty; int idx = -1; - path = strdup(path_); + path = pcb_strdup(path_); sidx = strrchr(path, '['); if (sidx != NULL) { char *end; @@ -1124,7 +1125,7 @@ if (cwd->data.text.value != NULL) free(cwd->data.text.value); - cwd->data.text.value = strdup(new_val); + cwd->data.text.value = pcb_strdup(new_val); cwd->file_name = conf_root[target]->active_file; conf_lht_dirty[target]++; @@ -1155,7 +1156,7 @@ if (node->data.text.value != NULL) free(node->data.text.value); - node->data.text.value = strdup(new_val); + node->data.text.value = pcb_strdup(new_val); return 0; } @@ -1170,7 +1171,7 @@ if (prefix != NULL) { for(sc = arg_; (*sc != '=') && (*sc != '\0'); sc++) if (*sc == '/') - arg = strdup(arg_); /* full path, don't use prefix */ + arg = pcb_strdup(arg_); /* full path, don't use prefix */ if (arg == NULL) { /* insert prefix */ int pl = strlen(prefix), al = strlen(arg_); @@ -1182,7 +1183,7 @@ } } else - arg = strdup(arg_); + arg = pcb_strdup(arg_); /* replace any - with _ in the path part; cli accepts dash but the backing C struct field names don't */ @@ -1403,7 +1404,7 @@ if ((f == NULL) && (role == CFR_USER)) { /* create the directory and try again */ - char *path = strdup(efn), *end; + char *path = pcb_strdup(efn), *end; end = strrchr(path, '/'); if (end != NULL) { *end = '\0'; Index: trunk/src/copy.c =================================================================== --- trunk/src/copy.c (revision 2527) +++ trunk/src/copy.c (revision 2528) @@ -44,6 +44,7 @@ #include "rtree.h" #include "select.h" #include "undo.h" +#include "compat_misc.h" /* --------------------------------------------------------------------------- * some local prototypes @@ -186,7 +187,7 @@ if (!line) return (line); if (Line->Number) - line->Number = strdup(Line->Number); + line->Number = pcb_strdup(Line->Number); DrawLine(Layer, line); AddObjectToCreateUndoList(PCB_TYPE_LINE, Layer, line, line); return (line); Index: trunk/src/create.c =================================================================== --- trunk/src/create.c (revision 2527) +++ trunk/src/create.c (revision 2528) @@ -47,6 +47,7 @@ #include "hid_actions.h" #include "paths.h" #include "misc_util.h" +#include "compat_misc.h" /* --------------------------------------------------------------------------- * some local identifiers @@ -154,7 +155,7 @@ ptr->minRing = conf_core.design.min_ring; for (i = 0; i < MAX_LAYER; i++) - ptr->Data->Layer[i].Name = strdup(conf_core.design.default_layer_name[i]); + ptr->Data->Layer[i].Name = pcb_strdup(conf_core.design.default_layer_name[i]); CreateDefaultFont(ptr); @@ -238,7 +239,7 @@ conf_core.editor.grid_unit->allow, Via->DrillingHole, DrillingHole); } - Via->Name = STRDUP(Name); + Via->Name = pcb_strdup_null(Name); Via->Flags = Flags; CLEAR_FLAG(PCB_FLAG_WARN, Via); SET_FLAG(PCB_FLAG_VIA, Via); @@ -527,7 +528,7 @@ text->Direction = Direction; text->Flags = Flags; text->Scale = Scale; - text->TextString = strdup(TextString); + text->TextString = pcb_strdup(TextString); /* calculate size of the bounding box */ SetTextBoundingBox(PCBFont, text); @@ -690,8 +691,8 @@ pin->Thickness = Thickness; pin->Clearance = Clearance; pin->Mask = Mask; - pin->Name = STRDUP(Name); - pin->Number = STRDUP(Number); + pin->Name = pcb_strdup_null(Name); + pin->Number = pcb_strdup_null(Number); pin->Flags = Flags; CLEAR_FLAG(PCB_FLAG_WARN, pin); SET_FLAG(PCB_FLAG_PIN, pin); @@ -761,8 +762,8 @@ pad->Thickness = Thickness; pad->Clearance = Clearance; pad->Mask = Mask; - pad->Name = STRDUP(Name); - pad->Number = STRDUP(Number); + pad->Name = pcb_strdup_null(Name); + pad->Number = pcb_strdup_null(Number); pad->Flags = Flags; CLEAR_FLAG(PCB_FLAG_WARN, pad); pad->ID = ID++; @@ -779,7 +780,7 @@ Coord X, Coord Y, unsigned Direction, char *TextString, int Scale, FlagType Flags) { free(Text->TextString); - Text->TextString = (TextString && *TextString) ? strdup(TextString) : NULL; + Text->TextString = (TextString && *TextString) ? pcb_strdup(TextString) : NULL; Text->X = X; Text->Y = Y; Text->Direction = Direction; @@ -862,12 +863,12 @@ sprintf(temp, " %s", name); menu = GetLibraryMenuMemory(lib, NULL); - menu->Name = strdup(temp); + menu->Name = pcb_strdup(temp); menu->flag = 1; /* net is enabled by default */ if (style == NULL || NSTRCMP("(unknown)", style) == 0) menu->Style = NULL; else - menu->Style = strdup(style); + menu->Style = pcb_strdup(style); return (menu); } @@ -878,7 +879,7 @@ { LibraryEntryTypePtr entry = GetLibraryEntryMemory(net); - entry->ListEntry = STRDUP(conn); + entry->ListEntry = pcb_strdup_null(conn); entry->ListEntry_dontfree = 0; return (entry); @@ -893,8 +894,8 @@ list->Max += 10; list->List = (AttributeType *) realloc(list->List, list->Max * sizeof(AttributeType)); } - list->List[list->Number].name = STRDUP(name); - list->List[list->Number].value = STRDUP(value); + list->List[list->Number].name = pcb_strdup_null(name); + list->List[list->Number].value = pcb_strdup_null(value); list->Number++; return &list->List[list->Number - 1]; } Index: trunk/src/error.c =================================================================== --- trunk/src/error.c (revision 2527) +++ trunk/src/error.c (revision 2528) @@ -45,7 +45,7 @@ #include "plug_io.h" #include "compat_misc.h" -#define utf8_dup_string(a,b) *(a) = strdup(b) +#define utf8_dup_string(a,b) *(a) = pcb_strdup(b) /* ---------------------------------------------------------------------- * some external identifiers Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 2527) +++ trunk/src/file_act.c (revision 2528) @@ -43,6 +43,7 @@ #include "search.h" #include "hid_actions.h" #include "hid_attrib.h" +#include "compat_misc.h" /* ---------------------------------------------------------------- */ static const char execcommand_syntax[] = "ExecCommand(command)"; @@ -175,7 +176,7 @@ if (!PCB->Changed || gui->confirm_dialog(_("OK to clear layout data?"), 0)) { if (name) - name = strdup(name); + name = pcb_strdup(name); else name = gui->prompt_for(_("Enter the layout name:"), ""); @@ -267,7 +268,7 @@ if (SavePCB(name, fmt) == 0) { SetChangedFlag(false); free(PCB->Filename); - PCB->Filename = strdup(name); + PCB->Filename = pcb_strdup(name); if (gui->notify_filename_changed != NULL) gui->notify_filename_changed(); } Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 2527) +++ trunk/src/find.c (revision 2528) @@ -74,6 +74,7 @@ #include "plug_io.h" #include "hid_actions.h" #include "misc_util.h" +#include "compat_misc.h" #undef DEBUG Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 2527) +++ trunk/src/find_drc.c (revision 2528) @@ -41,8 +41,8 @@ { DrcViolationType *violation = (DrcViolationType *) malloc(sizeof(DrcViolationType)); - violation->title = strdup(title); - violation->explanation = strdup(explanation); + violation->title = pcb_strdup(title); + violation->explanation = pcb_strdup(explanation); violation->x = x; violation->y = y; violation->angle = angle; Index: trunk/src/global.h =================================================================== --- trunk/src/global.h (revision 2527) +++ trunk/src/global.h (revision 2528) @@ -550,4 +550,10 @@ #define AUSAGE(x) Message ("Usage:\n%s\n", (x##_syntax)) #define AFAIL(x) { Message ("Syntax error. Usage:\n%s\n", (x##_syntax)); return 1; } +/* Make sure to catch usage of non-portable functions in debug mode */ +#ifndef NDEBUG +# define strdup never_use_strdup__use_pcb_strdup +# define strndup never_use_strndup__use_pcb_strndup +#endif + #endif /* PCB_GLOBAL_H */ Index: trunk/src/hid_actions.c =================================================================== --- trunk/src/hid_actions.c (revision 2527) +++ trunk/src/hid_actions.c (revision 2528) @@ -12,6 +12,7 @@ #include "error.h" #include "event.h" #include "hid_actions.h" +#include "compat_misc.h" /* do not throw "unknown action" warning for these: they are known actions, the GUI HID may register them, but nothing bad happens if @@ -65,7 +66,7 @@ ca = malloc(sizeof(hid_cookie_action_t)); ca->cookie = cookie; ca->action = a+i; - htsp_set(all_actions, strdup(a[i].name), ca); + htsp_set(all_actions, pcb_strdup(a[i].name), ca); } } Index: trunk/src/hid_cfg.c =================================================================== --- trunk/src/hid_cfg.c (revision 2527) +++ trunk/src/hid_cfg.c (revision 2528) @@ -30,6 +30,7 @@ #include "hid_cfg.h" #include "error.h" #include "paths.h" +#include "compat_misc.h" char hid_cfg_error_shared[1024]; @@ -63,7 +64,7 @@ if (rel_level <= 1) { /* creating a main menu */ - char *end, *name = strdup(path); + char *end, *name = pcb_strdup(path); for(end = name; *end == '/'; end++) ; end = strchr(end, '/'); *end = '\0'; @@ -399,7 +400,7 @@ if (cval != NULL) { t = lht_dom_node_alloc(LHT_TEXT, cname); - t->data.text.value = strdup(cval); + t->data.text.value = pcb_strdup(cval); lht_dom_hash_put(node, t); } } Index: trunk/src/hid_helper.c =================================================================== --- trunk/src/hid_helper.c (revision 2527) +++ trunk/src/hid_helper.c (revision 2528) @@ -30,6 +30,7 @@ #include "misc.h" #include "hid_helper.h" #include "hid_attrib.h" +#include "compat_misc.h" const char *layer_type_to_file_name(int idx, int style) { @@ -97,9 +98,9 @@ char *pf; if (pcbfile == NULL) - pf = strdup("unknown.pcb"); + pf = pcb_strdup("unknown.pcb"); else - pf = strdup(pcbfile); + pf = pcb_strdup(pcbfile); if (!pf || (memory && filename_attrib->default_val.str_value != *memory)) return; Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 2527) +++ trunk/src/hid_init.c (revision 2528) @@ -30,6 +30,7 @@ #include "hid_flags.h" #include "misc_util.h" #include "conf_core.h" +#include "compat_misc.h" HID **hid_list = 0; int hid_num_hids = 0; @@ -58,7 +59,7 @@ char *basename, *path, *symname; struct stat st; - basename = strdup(de->d_name); + basename = pcb_strdup(de->d_name); if (strlen(basename) > 3 && strcasecmp(basename + strlen(basename) - 3, ".so") == 0) basename[strlen(basename) - 3] = 0; else if (strlen(basename) > 4 && strcasecmp(basename + strlen(basename) - 4, ".dll") == 0) Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 2527) +++ trunk/src/hid_nogui.c (revision 2528) @@ -7,6 +7,7 @@ #include "global.h" #include "hid.h" +#include "compat_misc.h" /* This is the "gui" that is installed at startup, and is used when there is no other real GUI to use. For the most part, it just @@ -258,7 +259,7 @@ if (s[0] == '\0') return NULL; - return strdup(s); + return pcb_strdup(s); } #undef MAX_LINE_LENGTH @@ -319,9 +320,9 @@ answer = read_stdin_line(); if (answer == NULL) - return strdup((default_string != NULL) ? default_string : ""); + return pcb_strdup((default_string != NULL) ? default_string : ""); else - return strdup(answer); + return pcb_strdup(answer); } /* FIXME - this could use some enhancement to actually use the other @@ -338,9 +339,9 @@ answer = read_stdin_line(); if (answer == NULL) - return (default_file != NULL) ? strdup(default_file) : NULL; + return (default_file != NULL) ? pcb_strdup(default_file) : NULL; else - return strdup(answer); + return pcb_strdup(answer); } static int Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 2527) +++ trunk/src/main.c (revision 2528) @@ -61,6 +61,7 @@ #include "hid_actions.h" #include "hid_attrib.h" #include "hid_init.h" +#include "compat_misc.h" #if ENABLE_NLS #include @@ -127,7 +128,7 @@ if (haspath) { #ifndef NO_BINDIR_HEURISTICS - bindir = strdup(lrealpath(argv0)); + bindir = pcb_strdup(lrealpath(argv0)); #endif found_bindir = 1; } @@ -139,7 +140,7 @@ tmps = getenv("PATH"); if (tmps != NULL) { - path = strdup(tmps); + path = pcb_strdup(tmps); /* search through the font path for a font file */ for (p = strtok(path, PCB_PATH_DELIMETER); p && *p; p = strtok(NULL, PCB_PATH_DELIMETER)) { @@ -182,7 +183,7 @@ /* we have failed to find out anything from argv[0] so fall back to the original * install prefix */ - bindir = strdup(BINDIR); + bindir = pcb_strdup(BINDIR); } /* now find the path to exec_prefix */ @@ -455,7 +456,7 @@ * file might not exist */ if (LoadPCB(command_line_pcb, true, 0)) - PCB->Filename = strdup(command_line_pcb); + PCB->Filename = pcb_strdup(command_line_pcb); } if (conf_core.design.initial_layer_stack && conf_core.design.initial_layer_stack[0]) { Index: trunk/src/misc.c =================================================================== --- trunk/src/misc.c (revision 2527) +++ trunk/src/misc.c (revision 2528) @@ -958,7 +958,7 @@ int i, argn, lno; int prev_sep = 1; - s = strdup(s); + s = pcb_strdup(s); args = (char **) malloc(l * sizeof(char *)); argn = 0; @@ -1544,7 +1544,7 @@ for (i = 0; i < list->Number; i++) if (strcmp(name, list->List[i].name) == 0) { free(list->List[i].value); - list->List[i].value = STRDUP(value); + list->List[i].value = pcb_strdup_null(value); return 1; } } @@ -1558,8 +1558,8 @@ /* Now add the new attribute. */ i = list->Number; - list->List[i].name = STRDUP(name); - list->List[i].value = STRDUP(value); + list->List[i].name = pcb_strdup_null(name); + list->List[i].value = pcb_strdup_null(value); list->Number++; return 0; } Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 2527) +++ trunk/src/move.c (revision 2528) @@ -46,6 +46,7 @@ #include "select.h" #include "undo.h" #include "hid_actions.h" +#include "compat_misc.h" /* --------------------------------------------------------------------------- * some local prototypes @@ -871,7 +872,7 @@ max_copper_layer++; memset(lp, 0, sizeof(LayerType)); lp->On = 1; - lp->Name = strdup("New Layer"); + lp->Name = pcb_strdup("New Layer"); lp->Color = conf_core.appearance.color.layer[new_index]; lp->SelectedColor = conf_core.appearance.color.layer_selected[new_index]; for (l = 0; l < max_copper_layer; l++) Index: trunk/src/mymem.h =================================================================== --- trunk/src/mymem.h (revision 2527) +++ trunk/src/mymem.h (revision 2528) @@ -51,8 +51,6 @@ #define STEP_LIBRARYENTRY 20 #define STEP_RUBBERBAND 100 -#define STRDUP(x) (((x) != NULL) ? strdup (x) : NULL) - /* --------------------------------------------------------------------------- * some memory types */ @@ -102,10 +100,6 @@ void RemoveFreeElement(ElementType * data); void RemoveFreeRat(RatType * data); -#ifdef NEED_STRDUP -char *strdup(const char *); -#endif - #ifndef HAVE_LIBDMALLOC #define malloc(x) calloc(1,(x)) #endif Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 2527) +++ trunk/src/netlist.c (revision 2528) @@ -47,6 +47,7 @@ #include "create.h" #include "rats_patch.h" #include "hid_actions.h" +#include "compat_misc.h" #ifdef HAVE_REGCOMP #undef HAVE_RE_COMP @@ -204,7 +205,7 @@ static void netlist_style(LibraryMenuType * net, const char *style) { free(net->Style); - net->Style = STRDUP((char *) style); + net->Style = pcb_strdup_null((char *) style); } Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 2527) +++ trunk/src/object_act.c (revision 2528) @@ -181,7 +181,7 @@ sprintf(buf, "Element %s Attributes", NAMEONPCB_NAME(e)); } else { - buf = strdup("Unnamed Element Attributes"); + buf = pcb_strdup("Unnamed Element Attributes"); } gui->edit_attributes(buf, &(e->Attributes)); free(buf); @@ -630,10 +630,10 @@ element_cache = NULL; e = find_element_by_refdes(refdes); - old = ChangeElementText(PCB, PCB->Data, e, NAMEONPCB_INDEX, strdup(refdes)); + old = ChangeElementText(PCB, PCB->Data, e, NAMEONPCB_INDEX, pcb_strdup(refdes)); if (old) free(old); - old = ChangeElementText(PCB, PCB->Data, e, VALUE_INDEX, strdup(value)); + old = ChangeElementText(PCB, PCB->Data, e, VALUE_INDEX, pcb_strdup(value)); if (old) free(old); @@ -691,7 +691,7 @@ if (attr && value) { free(attr->value); - attr->value = strdup(value); + attr->value = pcb_strdup(value); } if (attr && !value) { delete_attr(&e->Attributes, attr); Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 2527) +++ trunk/src/plug_footprint.c (revision 2528) @@ -38,6 +38,7 @@ #include "conf_core.h" #include "plugins.h" #include "error.h" +#include "compat_misc.h" plug_fp_t *plug_fp_chain = NULL; library_t library; @@ -46,7 +47,7 @@ { char *newname, *s; - *basename = newname = strdup(name); + *basename = newname = pcb_strdup(name); s = strchr(newname, '('); if (s == NULL) { *params = NULL; @@ -76,7 +77,7 @@ fp_tags = htsp_alloc(strhash, strkeyeq); e = htsp_getentry(fp_tags, (char *) tag); if ((e == NULL) && alloc) { - htsp_set(fp_tags, strdup(tag), (void *) counter); + htsp_set(fp_tags, pcb_strdup(tag), (void *) counter); counter++; e = htsp_getentry(fp_tags, (char *) tag); } @@ -137,7 +138,7 @@ strcpy(entry->name+nl, "()"); } else - entry->name = strdup(name); + entry->name = pcb_strdup(name); entry->type = LIB_FOOTPRINT; entry->data.fp.type = type; @@ -183,9 +184,9 @@ library_t *l = get_library_memory(parent); if (name_len > 0) - l->name = strndup(name, name_len); + l->name = pcb_strndup(name, name_len); else - l->name = strdup(name); + l->name = pcb_strdup(name); l->parent = parent; l->type = LIB_DIR; vtlib_init(&l->data.dir.children); @@ -345,7 +346,7 @@ /* Additional loop to allow for multiple 'newlib' style library directories * called out in Settings.LibraryTree */ - libpaths = strdup(searchpath); + libpaths = pcb_strdup(searchpath); for (p = strtok(libpaths, PCB_PATH_DELIMETER); p && *p; p = strtok(NULL, PCB_PATH_DELIMETER)) { /* remove trailing path delimeter */ strncpy(toppath, p, sizeof(toppath) - 1); Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 2527) +++ trunk/src/plug_io.c (revision 2528) @@ -460,7 +460,7 @@ } if (fname && *fname) - default_file = strdup(fname); + default_file = pcb_strdup(fname); fp = CheckAndOpenFile(fname, true, false, &result, NULL); free(fname); Index: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c (revision 2527) +++ trunk/src/plugins.c (revision 2528) @@ -31,6 +31,7 @@ #include "global.h" #include "config.h" #include "genvector/gds_char.h" +#include "compat_misc.h" plugin_info_t *plugins = NULL; @@ -38,8 +39,8 @@ { plugin_info_t *i = malloc(sizeof(plugin_info_t)); - i->name = strdup(name); - i->path = strdup(path); + i->name = pcb_strdup(name); + i->path = pcb_strdup(path); i->handle = handle; i->dynamic_loaded = dynamic_loaded; i->uninit = uninit; Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 2527) +++ trunk/src/rats.c (revision 2528) @@ -44,6 +44,7 @@ #include "undo.h" #include "stub_mincut.h" #include "route_style.h" +#include "compat_misc.h" #define TRIEDFIRST 0x1 #define BESTFOUND 0x2 @@ -855,7 +856,7 @@ return (NULL); } entry = GetLibraryEntryMemory(menu); - entry->ListEntry = strdup(name2); + entry->ListEntry = pcb_strdup(name2); entry->ListEntry_dontfree = 0; netnode_to_netname(name2); goto ratIt; @@ -864,7 +865,7 @@ menu = netnode_to_netname(name2); if (menu) { entry = GetLibraryEntryMemory(menu); - entry->ListEntry = strdup(name1); + entry->ListEntry = pcb_strdup(name1); entry->ListEntry_dontfree = 0; netnode_to_netname(name1); goto ratIt; @@ -882,13 +883,13 @@ } menu = GetLibraryMenuMemory(&(PCB->NetlistLib[NETLIST_EDITED]), NULL); - menu->Name = strdup(ratname); + menu->Name = pcb_strdup(ratname); entry = GetLibraryEntryMemory(menu); - entry->ListEntry = strdup(name1); + entry->ListEntry = pcb_strdup(name1); entry->ListEntry_dontfree = 0; entry = GetLibraryEntryMemory(menu); - entry->ListEntry = strdup(name2); + entry->ListEntry = pcb_strdup(name2); entry->ListEntry_dontfree = 0; menu->flag = 1; Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 2527) +++ trunk/src/rats_patch.c (revision 2528) @@ -34,6 +34,7 @@ #include "buffer.h" #include "remove.h" #include "copy.h" +#include "compat_misc.h" static void rats_patch_remove(PCBTypePtr pcb, rats_patch_line_t * n, int do_free); @@ -44,10 +45,10 @@ n = malloc(sizeof(rats_patch_line_t)); n->op = op; - n->id = strdup(id); - n->arg1.net_name = strdup(a1); + n->id = pcb_strdup(id); + n->arg1.net_name = pcb_strdup(a1); if (a2 != NULL) - n->arg2.attrib_val = strdup(a2); + n->arg2.attrib_val = pcb_strdup(a2); else n->arg2.attrib_val = NULL; @@ -174,7 +175,7 @@ LibraryMenuTypePtr smenu = &src->Menu[n]; LibraryMenuTypePtr dmenu = &dst->Menu[n]; /* fprintf(stderr, "Net %d name='%s': ", n, smenu->Name+2);*/ - dmenu->Name = strdup(smenu->Name); + dmenu->Name = pcb_strdup(smenu->Name); dmenu->EntryMax = dmenu->EntryN = smenu->EntryN; dmenu->Entry = calloc(sizeof(LibraryEntryType), dmenu->EntryN); dmenu->flag = smenu->flag; @@ -182,7 +183,7 @@ for (p = 0; p < smenu->EntryN; p++) { LibraryEntryTypePtr sentry = &smenu->Entry[p]; LibraryEntryTypePtr dentry = &dmenu->Entry[p]; - dentry->ListEntry = strdup(sentry->ListEntry); + dentry->ListEntry = pcb_strdup(sentry->ListEntry); dentry->ListEntry_dontfree = 0; /* fprintf (stderr, " '%s'/%p", dentry->ListEntry, dentry->ListEntry);*/ } @@ -450,7 +451,7 @@ strcpy(end, ".bap"); } else - default_file = strdup("unnamed.bap"); + default_file = pcb_strdup("unnamed.bap"); fn = gui->fileselect(_("Save netlist patch as ..."), _("Choose a file to save netlist patch to\n" Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 2527) +++ trunk/src/select_act.c (revision 2528) @@ -41,6 +41,7 @@ #include "remove.h" #include "copy.h" #include "hid_attrib.h" +#include "compat_misc.h" /* --------------------------------------------------------------------------- */ /* Ask the user for a search pattern */ @@ -63,7 +64,7 @@ *method = results[1].int_value; if (results[0].str_value == NULL) return NULL; - return strdup(results[0].str_value); + return pcb_strdup(results[0].str_value); #undef nattr } Index: trunk/src/strflags.c =================================================================== --- trunk/src/strflags.c (revision 2527) +++ trunk/src/strflags.c (revision 2528) @@ -33,6 +33,7 @@ #include "global.h" #include "strflags.h" +#include "compat_misc.h" /* Because all the macros expect it, that's why. */ typedef struct { @@ -382,7 +383,7 @@ error(msg); u = malloc(sizeof(unknown_flag_t)); - u->str = strndup(fp, flen); + u->str = pcb_strndup(fp, flen); u->next = NULL; /* need to append, to keep order of flags */ if (rv.Flags.unknowns != NULL) { Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 2527) +++ trunk/src/undo.c (revision 2528) @@ -64,6 +64,7 @@ #include "undo.h" #include "strflags.h" #include "conf_core.h" +#include "compat_misc.h" static bool between_increment_and_restore = false; static bool added_undo_between_increment_and_restore = false; @@ -1510,11 +1511,11 @@ old->Menu[i].EntryN = lib->Menu[i].EntryN; old->Menu[i].EntryMax = lib->Menu[i].EntryMax; - old->Menu[i].Name = lib->Menu[i].Name ? strdup(lib->Menu[i].Name) : NULL; + old->Menu[i].Name = lib->Menu[i].Name ? pcb_strdup(lib->Menu[i].Name) : NULL; - old->Menu[i].directory = lib->Menu[i].directory ? strdup(lib->Menu[i].directory) : NULL; + old->Menu[i].directory = lib->Menu[i].directory ? pcb_strdup(lib->Menu[i].directory) : NULL; - old->Menu[i].Style = lib->Menu[i].Style ? strdup(lib->Menu[i].Style) : NULL; + old->Menu[i].Style = lib->Menu[i].Style ? pcb_strdup(lib->Menu[i].Style) : NULL; old->Menu[i].Entry = (LibraryEntryTypePtr) malloc(old->Menu[i].EntryMax * sizeof(LibraryEntryType)); @@ -1526,18 +1527,18 @@ /* iterate over each pin on the net */ for (j = 0; j < lib->Menu[i].EntryN; j++) { - old->Menu[i].Entry[j].ListEntry = lib->Menu[i].Entry[j].ListEntry ? strdup(lib->Menu[i].Entry[j].ListEntry) : NULL; + old->Menu[i].Entry[j].ListEntry = lib->Menu[i].Entry[j].ListEntry ? pcb_strdup(lib->Menu[i].Entry[j].ListEntry) : NULL; old->Menu[i].Entry[j].ListEntry_dontfree = 0; old->Menu[i].Entry[j].AllocatedMemory = - lib->Menu[i].Entry[j].AllocatedMemory ? strdup(lib->Menu[i].Entry[j].AllocatedMemory) : NULL; + lib->Menu[i].Entry[j].AllocatedMemory ? pcb_strdup(lib->Menu[i].Entry[j].AllocatedMemory) : NULL; - old->Menu[i].Entry[j].Package = lib->Menu[i].Entry[j].Package ? strdup(lib->Menu[i].Entry[j].Package) : NULL; + old->Menu[i].Entry[j].Package = lib->Menu[i].Entry[j].Package ? pcb_strdup(lib->Menu[i].Entry[j].Package) : NULL; - old->Menu[i].Entry[j].Value = lib->Menu[i].Entry[j].Value ? strdup(lib->Menu[i].Entry[j].Value) : NULL; + old->Menu[i].Entry[j].Value = lib->Menu[i].Entry[j].Value ? pcb_strdup(lib->Menu[i].Entry[j].Value) : NULL; old->Menu[i].Entry[j].Description = - lib->Menu[i].Entry[j].Description ? strdup(lib->Menu[i].Entry[j].Description) : NULL; + lib->Menu[i].Entry[j].Description ? pcb_strdup(lib->Menu[i].Entry[j].Description) : NULL; } Index: trunk/src_plugins/dbus/dbus.c =================================================================== --- trunk/src_plugins/dbus/dbus.c (revision 2527) +++ trunk/src_plugins/dbus/dbus.c (revision 2528) @@ -39,6 +39,7 @@ #include "plugins.h" #include "hid_actions.h" #include "event.h" +#include "compat_misc.h" /* For lrealpath */ #include "compat_lrealpath.h" @@ -80,9 +81,9 @@ #ifdef DEBUG fprintf(stderr, "pcb_dbus: DEBUG: Couldn't get working filename, assuming none\n"); #endif - filename = strdup(""); + filename = pcb_strdup(""); if (filename == NULL) { - fprintf(stderr, "pcb_dbus: Couldn't strdup( \"\" ) for the filename\n"); + fprintf(stderr, "pcb_dbus: Couldn't pcb_strdup( \"\" ) for the filename\n"); goto out; } } Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 2527) +++ trunk/src_plugins/export_bom/bom.c (revision 2528) @@ -13,6 +13,7 @@ #include "misc.h" #include "pcb-printf.h" #include "plugins.h" +#include "compat_misc.h" #include "hid.h" #include "hid_nogui.h" @@ -173,7 +174,7 @@ } newlist->next = NULL; - newlist->str = strdup(str); + newlist->str = pcb_strdup(str); if (list == NULL) return (newlist); @@ -199,8 +200,8 @@ } newlist->next = NULL; - newlist->descr = strdup(descr); - newlist->value = strdup(value); + newlist->descr = pcb_strdup(descr); + newlist->value = pcb_strdup(value); newlist->num = 1; newlist->refdes = string_insert(refdes, NULL); return (newlist); @@ -228,8 +229,8 @@ prev->next = newlist; newlist->next = NULL; - newlist->descr = strdup(descr); - newlist->value = strdup(value); + newlist->descr = pcb_strdup(descr); + newlist->value = pcb_strdup(value); newlist->num = 1; newlist->refdes = string_insert(refdes, NULL); } Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 2527) +++ trunk/src_plugins/export_gerber/gerber.c (revision 2528) @@ -734,7 +734,7 @@ /* build a legal identifier. */ if (layername) free(layername); - layername = strdup(filesuff); + layername = pcb_strdup(filesuff); if (strrchr(layername, '.')) *strrchr(layername, '.') = 0; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 2527) +++ trunk/src_plugins/export_lpr/lpr.c (revision 2528) @@ -10,6 +10,7 @@ #include "data.h" #include "misc.h" #include "plugins.h" +#include "compat_misc.h" #include "hid.h" #include "../export_ps/ps.h" @@ -53,7 +54,7 @@ * new one based on how a user fills out a print dialog. */ if (base_lpr_options[HA_lprcommand].default_val.str_value == NULL) { - base_lpr_options[HA_lprcommand].default_val.str_value = strdup("lpr"); + base_lpr_options[HA_lprcommand].default_val.str_value = pcb_strdup("lpr"); } if (lpr_options == 0) { Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 2527) +++ trunk/src_plugins/export_ps/ps.c (revision 2528) @@ -27,6 +27,7 @@ #include "hid_flags.h" #include "hid_actions.h" #include "conf_core.h" +#include "compat_misc.h" #define CRASH fprintf(stderr, "HID error: pcb called unimplemented PS function %s.\n", __FUNCTION__); abort() @@ -1492,7 +1493,7 @@ } if (ps_calib_attribute_list[0].default_val.str_value == NULL) { - ps_calib_attribute_list[0].default_val.str_value = strdup("lpr"); + ps_calib_attribute_list[0].default_val.str_value = pcb_strdup("lpr"); } if (gui-> Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 2527) +++ trunk/src_plugins/fontmode/fontmode.c (revision 2528) @@ -46,6 +46,7 @@ #include "pcb-printf.h" #include "plugins.h" #include "hid_actions.h" +#include "compat_misc.h" /* FIXME - we currently hardcode the grid and PCB size. What we should do in the future is scan the font for its extents, and size @@ -95,10 +96,10 @@ PCB->MaxWidth = CELL_SIZE * 18; PCB->MaxHeight = CELL_SIZE * ((MAX_FONTPOSITION + 15) / 16 + 2); PCB->Grid = PCB_MIL_TO_COORD(5); - PCB->Data->Layer[0].Name = strdup("Font"); - PCB->Data->Layer[1].Name = strdup("OrigFont"); - PCB->Data->Layer[2].Name = strdup("Width"); - PCB->Data->Layer[3].Name = strdup("Grid"); + PCB->Data->Layer[0].Name = pcb_strdup("Font"); + PCB->Data->Layer[1].Name = pcb_strdup("OrigFont"); + PCB->Data->Layer[2].Name = pcb_strdup("Width"); + PCB->Data->Layer[3].Name = pcb_strdup("Grid"); hid_action("PCBChanged"); hid_action("LayersChanged"); Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 2527) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 2528) @@ -47,6 +47,7 @@ #include "plugins.h" #include "plug_footprint.h" #include "compat_fs.h" +#include "compat_misc.h" #include "error.h" #include "misc.h" #include "conf.h" @@ -82,8 +83,8 @@ pointer: GetLibraryMenuMemory (&Library) calls realloc()! Build a list of directories to be visited later, instead. */ d = malloc(sizeof(list_dir_t)); - d->subdir = strdup(name); - d->parent = strdup(subdir); + d->subdir = pcb_strdup(name); + d->parent = pcb_strdup(subdir); d->next = l->subdirs; l->subdirs = d; return 0; @@ -277,8 +278,8 @@ 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)) { - ctx->path = strdup(subdir); - ctx->real_name = strdup(name); + ctx->path = pcb_strdup(subdir); + ctx->real_name = pcb_strdup(name); return 1; } } @@ -293,7 +294,7 @@ fp_search_t ctx; if ((*basename == '/') || (*basename == PCB_DIR_SEPARATOR_C)) - return strdup(basename); + return pcb_strdup(basename); ctx.target = basename; ctx.target_len = strlen(ctx.target); @@ -320,7 +321,7 @@ free(ctx.real_name); /* fprintf(" found '%s'\n", path);*/ free(fpath); - return strdup(path); + return pcb_strdup(path); } free(fpath); if (end == NULL) Index: trunk/src_plugins/fp_wget/gedasymbols.c =================================================================== --- trunk/src_plugins/fp_wget/gedasymbols.c (revision 2527) +++ trunk/src_plugins/fp_wget/gedasymbols.c (revision 2528) @@ -9,8 +9,8 @@ #include "gedasymbols.h" #include "plugins.h" #include "plug_footprint.h" +#include "compat_misc.h" - #define REQUIRE_PATH_PREFIX "wget@gedasymbols" #define CGI_URL "http://www.gedasymbols.org/scripts/global_list.cgi" @@ -36,7 +36,7 @@ if ((*s == '\0') || (isspace(*s))) { if ((s - sum) == 32) { *s = '\0'; - return strdup(sum); + return pcb_strdup(sum); } else return NULL; @@ -139,7 +139,7 @@ l = fp_mkdir_p(vpath.array); l = fp_append_entry(l, fn, PCB_FP_FILE, NULL); fn[-1] = '/'; - l->data.fp.loc_info = strdup(vpath.array); + l->data.fp.loc_info = pcb_strdup(vpath.array); } fp_wget_close(&f, &fctx); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/actions/actions.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/actions/actions.c (revision 2527) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/actions/actions.c (revision 2528) @@ -7,6 +7,7 @@ #include "src/error.h" #include "actions.h" #include "src/hid_actions.h" +#include "src/compat_misc.h" #include "../../gpmi_plugin.h" typedef struct acontext_s acontext_t; @@ -73,14 +74,14 @@ ctx = malloc(sizeof(acontext_t)); - ctx->action.name = strdup(name); - ctx->action.need_coord_msg = strdup_null(need_xy); - ctx->action.description = strdup(description); - ctx->action.syntax = strdup(syntax); + ctx->action.name = pcb_strdup(name); + ctx->action.need_coord_msg = pcb_strdup_null(need_xy); + ctx->action.description = pcb_strdup(description); + ctx->action.syntax = pcb_strdup(syntax); ctx->action.trigger_cb = action_cb; - ctx->name = strdup(name); - ctx->module = gpmi_get_current_module(); - ctx->next = NULL; + ctx->name = pcb_strdup(name); + ctx->module = gpmi_get_current_module(); + ctx->next = NULL; hid_register_action(&ctx->action, gpmi_cookie, 0); 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 2527) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 2528) @@ -9,6 +9,7 @@ #include "src/pcb-printf.h" #include "src/hid_attrib.h" #include "src/hid_init.h" +#include "src/compat_misc.h" #define FROM_PKG #include "hid.h" @@ -38,8 +39,8 @@ h->module = gpmi_get_current_module(); - h->hid->name = strdup(hid_name); - h->hid->description = strdup(description); + h->hid->name = pcb_strdup(hid_name); + h->hid->description = pcb_strdup(description); h->hid->exporter = 1; h->hid->gui = 0; h->hid->struct_size = sizeof(HID); @@ -136,7 +137,7 @@ } if (res == NULL) return NULL; - return strdup(res); + return pcb_strdup(res); } @@ -191,7 +192,7 @@ case HIDA_Label: case HIDA_Enum: case HIDA_Path: - v.str_value = strdup(str); + v.str_value = pcb_strdup(str); break; case HIDA_Mixed: default: @@ -246,8 +247,8 @@ hid->attr = realloc(hid->attr, sizeof(HID_Attribute) * hid->attr_num); hid->type = realloc(hid->type, sizeof(hid_attr_type_t) * hid->attr_num); - hid->attr[current].name = strdup(attr_name); - hid->attr[current].help_text = strdup(help); + hid->attr[current].name = pcb_strdup(attr_name); + hid->attr[current].help_text = pcb_strdup(help); hid->attr[current].type = type; hid->attr[current].min_val = min; hid->attr[current].max_val = max; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c (revision 2527) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c (revision 2528) @@ -13,6 +13,7 @@ #include "scripts.h" #include "src/conf_core.h" #include "src/compat_fs.h" +#include "src/compat_misc.h" #define CONFNAME "pcb-rnd-gpmi.conf" @@ -47,10 +48,10 @@ char *name, *module_name, *conffile_name; /* make these copies before the free()'s because of reload calling us with the same pointers... */ - name = strdup(name_); - module_name = strdup(module_name_); + name = pcb_strdup(name_); + module_name = pcb_strdup(module_name_); if (conffile_name_ != NULL) - conffile_name = strdup(conffile_name_); + conffile_name = pcb_strdup(conffile_name_); else conffile_name = NULL; @@ -153,7 +154,7 @@ if (i->conffile_name != NULL) { char *end; - conf_dir = strdup(i->conffile_name); + conf_dir = pcb_strdup(i->conffile_name); end = strrchr(conf_dir, PCB_DIR_SEPARATOR_C); if (end == NULL) { free((char *)conf_dir); @@ -198,7 +199,7 @@ fprintf(fout, "%s", line); break; default: - module = strdup(line); + module = pcb_strdup(line); params = module + strcspn(module, "\t "); while((*params == ' ') || (*params == '\t')) { *(params) = '\0'; @@ -267,7 +268,7 @@ if (conf_core.rc.path.home != NULL) { snprintf(buffer, sizeof(buffer), "%s%c%s", conf_core.rc.path.home, PCB_DIR_SEPARATOR_C, file_name); fprintf(stderr, "asm_scriptname FN=%s\n", buffer); - return strdup(buffer); + return pcb_strdup(buffer); } else { fprintf(stderr, "pcb-gpmi error: can't access $HOME for substituting ~\n"); @@ -274,10 +275,10 @@ #ifdef CONFIG_DEBUG printf("FN=%s\n", file_name); #endif - return strdup(file_name); + return pcb_strdup(file_name); } case PCB_DIR_SEPARATOR_C: /* full path */ - return strdup(file_name); + return pcb_strdup(file_name); default: /* relative path - must be relative to the current conf_dir */ if ((file_name[0] == '.') && (file_name[1] == PCB_DIR_SEPARATOR_C)) file_name += 2; @@ -289,7 +290,7 @@ #ifdef CONFIG_DEBUG printf("FN=%s\n", buffer); #endif - return strdup(buffer); + return pcb_strdup(buffer); } return NULL; } Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 2527) +++ trunk/src_plugins/hid_batch/batch.c (revision 2528) @@ -12,6 +12,7 @@ #include "hid.h" #include "pcb-printf.h" #include "plugins.h" +#include "compat_misc.h" #include "hid_draw_helpers.h" #include "hid_nogui.h" @@ -62,10 +63,10 @@ else prompt = PCB->Filename; if (prompt != NULL) - prompt = strdup(prompt); + prompt = pcb_strdup(prompt); } else - prompt = strdup("no-board"); + prompt = pcb_strdup("no-board"); return 0; } Index: trunk/src_plugins/hid_gtk/gtk_conf_list.c =================================================================== --- trunk/src_plugins/hid_gtk/gtk_conf_list.c (revision 2527) +++ trunk/src_plugins/hid_gtk/gtk_conf_list.c (revision 2528) @@ -2,6 +2,7 @@ #include #include #include "gtk_conf_list.h" +#include "compat_misc.h" static void fill_misc_cols(gtk_conf_list_t *cl, int row_idx, GtkTreeIter *iter, lht_node_t *nd) { @@ -46,7 +47,7 @@ gtk_list_store_set(cl->l, &it, cl->col_src, "", -1); nd = lht_dom_node_alloc(LHT_TEXT, ""); - nd->data.text.value = strdup(s == NULL ? "" : s); + nd->data.text.value = pcb_strdup(s == NULL ? "" : s); nd->doc = cl->lst->doc; lht_dom_list_append(cl->lst, nd); Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 2527) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 2528) @@ -21,6 +21,7 @@ #include "hid_actions.h" #include "plug_footprint.h" #include "misc_util.h" +#include "compat_misc.h" #include "gtkhid.h" @@ -913,8 +914,8 @@ attributes_list->Max = attr_num_rows; } for (i = 0; i < attr_num_rows; i++) { - attributes_list->List[i].name = strdup(gtk_entry_get_text(GTK_ENTRY(attr_row[i].w_name))); - attributes_list->List[i].value = strdup(gtk_entry_get_text(GTK_ENTRY(attr_row[i].w_value))); + attributes_list->List[i].name = pcb_strdup(gtk_entry_get_text(GTK_ENTRY(attr_row[i].w_name))); + attributes_list->List[i].value = pcb_strdup(gtk_entry_get_text(GTK_ENTRY(attr_row[i].w_value))); attributes_list->Number = attr_num_rows; } @@ -1084,7 +1085,7 @@ #else char tmp[8193]; #endif - return strdup(getcwd(tmp, sizeof(tmp))); + return pcb_strdup(getcwd(tmp, sizeof(tmp))); } static int Load(int argc, char **argv, Coord x, Coord y) Index: trunk/src_plugins/hid_gtk/gui-config.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-config.c (revision 2527) +++ trunk/src_plugins/hid_gtk/gui-config.c (revision 2528) @@ -50,6 +50,7 @@ #include "gtk_conf_list.h" #include "paths.h" #include "plug_footprint.h" +#include "compat_misc.h" #include #if 0 @@ -765,7 +766,7 @@ *pemil = '/'; pemil++; -#warning leak: strdup(path) never free()d +#warning leak: pcb_strdup(path) never free()d /* ---- Grid Increment/Decrement ---- */ strcpy(pemm, "grid"); strcpy(pemil, "grid"); @@ -775,13 +776,13 @@ conf_core.editor.increments_mm.grid, conf_core.editor.increments_mm.grid_min, conf_core.editor.increments_mm.grid_max, - CE_SMALL, umm, width, increment_spin_button_cb, strdup(pathmm), _("Grid:"), NULL); + CE_SMALL, umm, width, increment_spin_button_cb, pcb_strdup(pathmm), _("Grid:"), NULL); ghid_coord_entry(hbox, NULL, conf_core.editor.increments_mil.grid, conf_core.editor.increments_mil.grid_min, conf_core.editor.increments_mil.grid_max, - CE_SMALL, umil, width, increment_spin_button_cb, strdup(pathmil), NULL, NULL); + CE_SMALL, umil, width, increment_spin_button_cb, pcb_strdup(pathmil), NULL, NULL); label = gtk_label_new(""); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); @@ -800,7 +801,7 @@ conf_core.editor.increments_mm.size_min, conf_core.editor.increments_mm.size_max, CE_SMALL, umm, width, increment_spin_button_cb, - strdup(pathmm), _("Size:"), NULL); + pcb_strdup(pathmm), _("Size:"), NULL); ghid_coord_entry(hbox, NULL, conf_core.editor.increments_mil.size, @@ -807,7 +808,7 @@ conf_core.editor.increments_mil.size_min, conf_core.editor.increments_mil.size_max, CE_SMALL, umil, width, increment_spin_button_cb, - strdup(pathmil), NULL, NULL); + pcb_strdup(pathmil), NULL, NULL); label = gtk_label_new(""); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); @@ -826,7 +827,7 @@ conf_core.editor.increments_mm.line_min, conf_core.editor.increments_mm.line_max, CE_SMALL, umm, width, increment_spin_button_cb, - strdup(pathmm), _("Line:"), NULL); + pcb_strdup(pathmm), _("Line:"), NULL); ghid_coord_entry(hbox, NULL, conf_core.editor.increments_mil.line, @@ -833,7 +834,7 @@ conf_core.editor.increments_mil.line_min, conf_core.editor.increments_mil.line_max, CE_SMALL, umil, width, increment_spin_button_cb, - strdup(pathmil), NULL, NULL); + pcb_strdup(pathmil), NULL, NULL); label = gtk_label_new(""); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); @@ -852,7 +853,7 @@ conf_core.editor.increments_mm.clear_min, conf_core.editor.increments_mm.clear_max, CE_SMALL, umm, width, increment_spin_button_cb, - strdup(pathmm), _("Clear:"), NULL); + pcb_strdup(pathmm), _("Clear:"), NULL); ghid_coord_entry(hbox, NULL, conf_core.editor.increments_mil.clear, @@ -859,7 +860,7 @@ conf_core.editor.increments_mil.clear_min, conf_core.editor.increments_mil.clear_max, CE_SMALL, umil, width, increment_spin_button_cb, - strdup(pathmil), NULL, NULL); + pcb_strdup(pathmil), NULL, NULL); label = gtk_label_new(""); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); @@ -1025,7 +1026,7 @@ sfn = NULL; txt = lht_dom_node_alloc(LHT_TEXT, ""); - txt->data.text.value = strdup(i->payload); + txt->data.text.value = pcb_strdup(i->payload); txt->file_name = sfn; txt->doc = config_library_lst_doc; printf("append: '%s' '%s'\n", txt->data.text.value, sfn); @@ -1461,7 +1462,7 @@ layer = &PCB->Data->Layer[n]; if (strcmp(layer->Name, nd->data.text.value) != 0) { free(nd->data.text.value); - nd->data.text.value = strdup(layer->Name); + nd->data.text.value = pcb_strdup(layer->Name); conf_makedirty(ctx->dst_role); } } Index: trunk/src_plugins/hid_gtk/gui-dialog-print.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-dialog-print.c (revision 2527) +++ trunk/src_plugins/hid_gtk/gui-dialog-print.c (revision 2528) @@ -35,6 +35,7 @@ #include "hid_attrib.h" #include "hid_init.h" #include "misc_util.h" +#include "compat_misc.h" static GtkWidget *export_dialog = NULL; @@ -73,7 +74,7 @@ if (*str) free(*str); - *str = strdup(s); + *str = pcb_strdup(s); } static void enum_changed_cb(GtkWidget * combo_box, int *val) @@ -292,7 +293,7 @@ for (i = 0; i < n_attrs; i++) { results[i] = attrs[i].default_val; if (results[i].str_value) - results[i].str_value = strdup(results[i].str_value); + results[i].str_value = pcb_strdup(results[i].str_value); } rc = 0; } Index: trunk/src_plugins/hid_gtk/gui-dialog.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-dialog.c (revision 2527) +++ trunk/src_plugins/hid_gtk/gui-dialog.c (revision 2528) @@ -28,8 +28,8 @@ */ #include "config.h" +#include "compat_misc.h" - #include "data.h" #include "gui.h" @@ -418,7 +418,7 @@ exit(1); } - recent_dirs[history_pool].id = strdup(history_tag); + recent_dirs[history_pool].id = pcb_strdup(history_tag); /* Initialize the entries in our history list to all be NULL */ for (i = 0; i < NHIST; i++) { Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 2527) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 2528) @@ -589,7 +589,7 @@ actual_nattrs++; results[i] = attrs[i].default_val; if (results[i].str_value) - results[i].str_value = strdup(results[i].str_value); + results[i].str_value = pcb_strdup(results[i].str_value); } wl = (Widget *) malloc(n_attrs * sizeof(Widget)); @@ -1807,8 +1807,8 @@ attributes_list->Max = attr_num_rows; } for (i = 0; i < attr_num_rows; i++) { - attributes_list->List[i].name = strdup(XmTextFieldGetString(attr_row[i].w_name)); - attributes_list->List[i].value = strdup(XmTextFieldGetString(attr_row[i].w_value)); + attributes_list->List[i].name = pcb_strdup(XmTextFieldGetString(attr_row[i].w_name)); + attributes_list->List[i].value = pcb_strdup(XmTextFieldGetString(attr_row[i].w_value)); attributes_list->Number = attr_num_rows; } } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 2527) +++ trunk/src_plugins/hid_lesstif/main.c (revision 2528) @@ -45,6 +45,7 @@ #include "hid_actions.h" #include "stdarg.h" #include "misc_util.h" +#include "compat_misc.h" #include @@ -2320,7 +2321,7 @@ case PCB_MODE_INSERT_POINT: case PCB_MODE_RUBBERBAND_MOVE: if (s45 != NULL) - buf = strdup(s45); + buf = pcb_strdup(s45); else buf = empty; break; @@ -2921,7 +2922,7 @@ if (name != gc->colorname) { if (gc->colorname != NULL) free(gc->colorname); - gc->colorname = strdup(name); + gc->colorname = pcb_strdup(name); } if (strcmp(name, "erase") == 0) { Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 2527) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 2528) @@ -25,6 +25,7 @@ #include "hid_actions.h" #include "hid_flags.h" #include "stdarg.h" +#include "compat_misc.h" #include Widget lesstif_menubar; @@ -803,7 +804,7 @@ } v = node->name; - stdarg(XmNlabelString, XmStringCreatePCB(strdup(v))); + stdarg(XmNlabelString, XmStringCreatePCB(pcb_strdup(v))); if (hid_cfg_has_submenus(node)) { int nn = stdarg_n; @@ -812,7 +813,7 @@ lht_node_t *submenu_node = hid_cfg_menu_field(node, MF_SUBMENU, &field_name); stdarg(XmNtearOffModel, XmTEAR_OFF_ENABLED); - sub = XmCreatePulldownMenu(menu, strdup(v), stdarg_args + nn, stdarg_n - nn); + sub = XmCreatePulldownMenu(menu, pcb_strdup(v), stdarg_args + nn, stdarg_n - nn); node->user_data = sub; stdarg_n = nn; stdarg(XmNsubMenuId, sub); Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 2527) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 2528) @@ -202,7 +202,7 @@ char *name = menu->Entry[cbs->item_position - 1].ListEntry; char *ename, *pname; - ename = strdup(name); + ename = pcb_strdup(name); pname = strchr(ename, '-'); if (!pname) { free(ename); Index: trunk/src_plugins/import_edif/edif.c =================================================================== --- trunk/src_plugins/import_edif/edif.c (revision 2527) +++ trunk/src_plugins/import_edif/edif.c (revision 2528) @@ -103,6 +103,7 @@ #include "data.h" #include "error.h" #include "plugins.h" +#include "compat_misc.h" /* from mymem.h, not include because of the malloc junk */ LibraryMenuTypePtr GetLibraryMenuMemory(LibraryTypePtr, int *idx); @@ -187,7 +188,7 @@ pair_list_free(nodes); return; } - menu->Name = strdup (name->str1); + menu->Name = pcb_strdup (name->str1); free(name->str1); /* if renamed str2 also exists and must be freed */ if ( name->str2 ) free(name->str2); @@ -251,7 +252,7 @@ free(node->str1); free(node->str2); entry = GetLibraryEntryMemory (menu); - entry->ListEntry = strdup(buf); + entry->ListEntry = pcb_strdup(buf); done_node = node; node = node->next; free(done_node); @@ -264,7 +265,7 @@ static void yyerror(const char *); static void PopC(void); -#line 268 "edif.tab.c" /* yacc.c:339 */ +#line 269 "edif.tab.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -599,13 +600,13 @@ typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 197 "../../src_plugins/import_edif/edif.y" /* yacc.c:355 */ +#line 198 "../../src_plugins/import_edif/edif.y" /* yacc.c:355 */ char* s; pair_list* pl; str_pair* ps; -#line 609 "edif.tab.c" /* yacc.c:355 */ +#line 610 "edif.tab.c" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -620,7 +621,7 @@ /* Copy the second part of user declarations. */ -#line 624 "edif.tab.c" /* yacc.c:358 */ +#line 625 "edif.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -946,119 +947,119 @@ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 509, 509, 512, 515, 516, 517, 518, 519, 520, - 521, 524, 527, 530, 534, 537, 538, 541, 544, 545, - 546, 547, 548, 549, 552, 555, 556, 559, 562, 563, - 564, 565, 566, 569, 572, 575, 576, 579, 582, 585, - 586, 587, 588, 589, 592, 595, 598, 601, 604, 607, - 610, 611, 612, 615, 618, 619, 622, 623, 626, 629, - 630, 631, 632, 635, 638, 639, 642, 645, 646, 649, - 652, 655, 658, 661, 662, 663, 664, 665, 666, 667, - 670, 673, 676, 677, 680, 683, 686, 687, 688, 691, - 694, 695, 696, 699, 700, 701, 704, 707, 708, 711, - 714, 717, 718, 721, 724, 725, 726, 727, 728, 729, - 730, 731, 734, 737, 740, 741, 742, 743, 744, 745, - 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, - 756, 757, 760, 763, 764, 767, 770, 771, 772, 775, - 778, 779, 782, 785, 788, 789, 790, 793, 796, 797, - 800, 803, 804, 807, 810, 811, 814, 817, 818, 821, - 824, 825, 828, 831, 832, 835, 838, 839, 842, 845, - 846, 849, 852, 853, 854, 857, 860, 861, 862, 863, - 864, 867, 870, 871, 874, 877, 880, 881, 882, 883, - 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, - 894, 897, 900, 901, 902, 903, 906, 909, 910, 911, - 914, 917, 918, 921, 922, 925, 926, 929, 930, 933, - 936, 937, 940, 943, 944, 947, 950, 954, 955, 956, - 957, 960, 963, 964, 965, 968, 972, 973, 974, 977, - 978, 979, 980, 983, 984, 985, 988, 991, 992, 993, - 994, 995, 996, 997, 1000, 1003, 1006, 1007, 1008, 1009, - 1010, 1013, 1016, 1019, 1022, 1023, 1024, 1025, 1026, 1027, - 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1038, 1041, - 1044, 1047, 1048, 1049, 1052, 1055, 1056, 1057, 1058, 1059, - 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1070, 1073, - 1074, 1077, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, - 1088, 1089, 1090, 1093, 1096, 1097, 1098, 1099, 1102, 1103, - 1104, 1105, 1106, 1109, 1112, 1113, 1114, 1115, 1118, 1121, - 1122, 1123, 1124, 1127, 1130, 1133, 1134, 1137, 1138, 1139, - 1140, 1143, 1146, 1147, 1150, 1153, 1154, 1155, 1156, 1157, - 1160, 1163, 1166, 1169, 1172, 1175, 1176, 1179, 1182, 1185, - 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1197, - 1200, 1201, 1202, 1205, 1208, 1209, 1210, 1211, 1212, 1215, - 1218, 1219, 1222, 1225, 1226, 1227, 1228, 1229, 1232, 1233, - 1236, 1237, 1240, 1243, 1244, 1247, 1250, 1251, 1252, 1253, - 1256, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, - 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1278, 1282, - 1283, 1284, 1285, 1288, 1291, 1292, 1293, 1294, 1297, 1300, - 1301, 1302, 1303, 1306, 1309, 1310, 1313, 1316, 1319, 1320, - 1321, 1322, 1325, 1328, 1329, 1330, 1331, 1332, 1333, 1334, - 1335, 1336, 1339, 1342, 1343, 1346, 1349, 1352, 1353, 1356, - 1359, 1362, 1365, 1368, 1371, 1374, 1375, 1376, 1377, 1378, - 1381, 1384, 1387, 1388, 1391, 1394, 1395, 1396, 1399, 1402, - 1403, 1406, 1409, 1410, 1413, 1414, 1415, 1418, 1419, 1420, - 1423, 1426, 1427, 1428, 1429, 1432, 1435, 1436, 1437, 1438, - 1441, 1444, 1445, 1448, 1451, 1452, 1455, 1458, 1461, 1464, - 1465, 1466, 1469, 1472, 1473, 1474, 1475, 1478, 1481, 1482, - 1483, 1484, 1487, 1490, 1491, 1494, 1497, 1498, 1499, 1500, - 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, - 1511, 1514, 1517, 1518, 1519, 1520, 1521, 1524, 1527, 1528, - 1531, 1532, 1533, 1536, 1539, 1540, 1541, 1544, 1545, 1546, - 1549, 1552, 1553, 1556, 1559, 1560, 1561, 1562, 1565, 1568, - 1569, 1572, 1573, 1576, 1579, 1580, 1581, 1584, 1587, 1588, - 1591, 1594, 1595, 1596, 1597, 1598, 1601, 1604, 1605, 1608, - 1609, 1610, 1613, 1614, 1617, 1620, 1621, 1622, 1623, 1624, - 1625, 1626, 1627, 1628, 1629, 1632, 1635, 1636, 1637, 1638, - 1639, 1642, 1645, 1646, 1647, 1648, 1649, 1650, 1653, 1656, - 1657, 1658, 1661, 1664, 1665, 1666, 1669, 1672, 1673, 1674, - 1675, 1676, 1679, 1680, 1684, 1685, 1688, 1691, 1692, 1693, - 1694, 1697, 1700, 1703, 1704, 1705, 1708, 1711, 1712, 1713, - 1716, 1719, 1720, 1721, 1722, 1725, 1728, 1729, 1730, 1731, - 1734, 1737, 1738, 1741, 1744, 1745, 1746, 1747, 1750, 1753, - 1754, 1755, 1756, 1757, 1760, 1763, 1766, 1767, 1770, 1773, - 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1783, 1786, 1790, - 1791, 1792, 1793, 1796, 1800, 1801, 1802, 1803, 1806, 1809, - 1810, 1813, 1816, 1819, 1820, 1821, 1822, 1823, 1824, 1825, - 1826, 1827, 1828, 1831, 1834, 1837, 1838, 1841, 1844, 1845, - 1848, 1851, 1854, 1855, 1858, 1861, 1862, 1865, 1868, 1871, - 1872, 1873, 1874, 1877, 1880, 1881, 1884, 1887, 1888, 1889, - 1890, 1893, 1896, 1897, 1900, 1903, 1904, 1907, 1910, 1913, - 1914, 1917, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, - 1928, 1929, 1930, 1931, 1932, 1935, 1938, 1939, 1940, 1941, - 1942, 1943, 1944, 1945, 1946, 1947, 1950, 1953, 1954, 1955, - 1956, 1959, 1962, 1963, 1964, 1965, 1968, 1971, 1972, 1973, - 1976, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, - 1988, 1989, 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2013, 2014, 2015, - 2018, 2021, 2024, 2025, 2026, 2027, 2028, 2031, 2032, 2035, - 2036, 2039, 2054, 2055, 2056, 2057, 2060, 2063, 2064, 2067, - 2070, 2071, 2074, 2077, 2078, 2079, 2080, 2081, 2084, 2087, - 2090, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, - 2102, 2103, 2104, 2107, 2108, 2109, 2110, 2111, 2112, 2115, - 2118, 2119, 2120, 2123, 2126, 2127, 2130, 2133, 2134, 2135, - 2136, 2139, 2143, 2144, 2147, 2148, 2151, 2154, 2155, 2158, - 2161, 2164, 2165, 2168, 2171, 2174, 2177, 2178, 2179, 2180, - 2183, 2186, 2187, 2190, 2193, 2196, 2197, 2198, 2199, 2200, - 2201, 2204, 2207, 2208, 2209, 2210, 2213, 2216, 2217, 2220, - 2223, 2224, 2227, 2230, 2231, 2234, 2237, 2238, 2241, 2244, - 2245, 2246, 2247, 2250, 2253, 2254, 2255, 2258, 2259, 2260, - 2263, 2266, 2269, 2270, 2271, 2272, 2275, 2276, 2279, 2282, - 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, - 2295, 2296, 2297, 2298, 2301, 2304, 2305, 2308, 2311, 2312, - 2313, 2316, 2319, 2320, 2321, 2322, 2325, 2326, 2327, 2330, - 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2342, 2345, 2348, - 2349, 2352, 2353, 2354, 2357, 2361, 2364, 2365, 2366, 2367, - 2368, 2371, 2375, 2376, 2379, 2380, 2383, 2384, 2387, 2388, - 2391, 2392, 2395, 2398, 2399, 2400, 2403, 2406, 2407, 2408, - 2409, 2412, 2415, 2416, 2417, 2418, 2419, 2420, 2423, 2426, - 2429, 2432, 2433, 2434, 2435, 2438, 2441, 2442, 2443, 2444, - 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, - 2455, 2456, 2459, 2462, 2465, 2466, 2467, 2468, 2469, 2472, - 2473, 2476, 2477, 2480, 2483, 2486, 2487, 2488, 2489, 2490, - 2491, 2494, 2497, 2498, 2499, 2502, 2505, 2506, 2507, 2508, - 2509, 2510, 2511, 2512, 2513, 2516, 2519, 2522, 2525, 2526, - 2529, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, - 2541, 2544, 2547, 2550, 2553, 2556, 2559, 2560, 2561, 2562, - 2565, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2577, 2580, - 2581, 2582, 2583, 2584, 2585, 2586, 2589, 2592, 2595, 2598 + 0, 510, 510, 513, 516, 517, 518, 519, 520, 521, + 522, 525, 528, 531, 535, 538, 539, 542, 545, 546, + 547, 548, 549, 550, 553, 556, 557, 560, 563, 564, + 565, 566, 567, 570, 573, 576, 577, 580, 583, 586, + 587, 588, 589, 590, 593, 596, 599, 602, 605, 608, + 611, 612, 613, 616, 619, 620, 623, 624, 627, 630, + 631, 632, 633, 636, 639, 640, 643, 646, 647, 650, + 653, 656, 659, 662, 663, 664, 665, 666, 667, 668, + 671, 674, 677, 678, 681, 684, 687, 688, 689, 692, + 695, 696, 697, 700, 701, 702, 705, 708, 709, 712, + 715, 718, 719, 722, 725, 726, 727, 728, 729, 730, + 731, 732, 735, 738, 741, 742, 743, 744, 745, 746, + 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, + 757, 758, 761, 764, 765, 768, 771, 772, 773, 776, + 779, 780, 783, 786, 789, 790, 791, 794, 797, 798, + 801, 804, 805, 808, 811, 812, 815, 818, 819, 822, + 825, 826, 829, 832, 833, 836, 839, 840, 843, 846, + 847, 850, 853, 854, 855, 858, 861, 862, 863, 864, + 865, 868, 871, 872, 875, 878, 881, 882, 883, 884, + 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, + 895, 898, 901, 902, 903, 904, 907, 910, 911, 912, + 915, 918, 919, 922, 923, 926, 927, 930, 931, 934, + 937, 938, 941, 944, 945, 948, 951, 955, 956, 957, + 958, 961, 964, 965, 966, 969, 973, 974, 975, 978, + 979, 980, 981, 984, 985, 986, 989, 992, 993, 994, + 995, 996, 997, 998, 1001, 1004, 1007, 1008, 1009, 1010, + 1011, 1014, 1017, 1020, 1023, 1024, 1025, 1026, 1027, 1028, + 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1039, 1042, + 1045, 1048, 1049, 1050, 1053, 1056, 1057, 1058, 1059, 1060, + 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1074, + 1075, 1078, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, + 1089, 1090, 1091, 1094, 1097, 1098, 1099, 1100, 1103, 1104, + 1105, 1106, 1107, 1110, 1113, 1114, 1115, 1116, 1119, 1122, + 1123, 1124, 1125, 1128, 1131, 1134, 1135, 1138, 1139, 1140, + 1141, 1144, 1147, 1148, 1151, 1154, 1155, 1156, 1157, 1158, + 1161, 1164, 1167, 1170, 1173, 1176, 1177, 1180, 1183, 1186, + 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1198, + 1201, 1202, 1203, 1206, 1209, 1210, 1211, 1212, 1213, 1216, + 1219, 1220, 1223, 1226, 1227, 1228, 1229, 1230, 1233, 1234, + 1237, 1238, 1241, 1244, 1245, 1248, 1251, 1252, 1253, 1254, + 1257, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, + 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1279, 1283, + 1284, 1285, 1286, 1289, 1292, 1293, 1294, 1295, 1298, 1301, + 1302, 1303, 1304, 1307, 1310, 1311, 1314, 1317, 1320, 1321, + 1322, 1323, 1326, 1329, 1330, 1331, 1332, 1333, 1334, 1335, + 1336, 1337, 1340, 1343, 1344, 1347, 1350, 1353, 1354, 1357, + 1360, 1363, 1366, 1369, 1372, 1375, 1376, 1377, 1378, 1379, + 1382, 1385, 1388, 1389, 1392, 1395, 1396, 1397, 1400, 1403, + 1404, 1407, 1410, 1411, 1414, 1415, 1416, 1419, 1420, 1421, + 1424, 1427, 1428, 1429, 1430, 1433, 1436, 1437, 1438, 1439, + 1442, 1445, 1446, 1449, 1452, 1453, 1456, 1459, 1462, 1465, + 1466, 1467, 1470, 1473, 1474, 1475, 1476, 1479, 1482, 1483, + 1484, 1485, 1488, 1491, 1492, 1495, 1498, 1499, 1500, 1501, + 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, + 1512, 1515, 1518, 1519, 1520, 1521, 1522, 1525, 1528, 1529, + 1532, 1533, 1534, 1537, 1540, 1541, 1542, 1545, 1546, 1547, + 1550, 1553, 1554, 1557, 1560, 1561, 1562, 1563, 1566, 1569, + 1570, 1573, 1574, 1577, 1580, 1581, 1582, 1585, 1588, 1589, + 1592, 1595, 1596, 1597, 1598, 1599, 1602, 1605, 1606, 1609, + 1610, 1611, 1614, 1615, 1618, 1621, 1622, 1623, 1624, 1625, + 1626, 1627, 1628, 1629, 1630, 1633, 1636, 1637, 1638, 1639, + 1640, 1643, 1646, 1647, 1648, 1649, 1650, 1651, 1654, 1657, + 1658, 1659, 1662, 1665, 1666, 1667, 1670, 1673, 1674, 1675, + 1676, 1677, 1680, 1681, 1685, 1686, 1689, 1692, 1693, 1694, + 1695, 1698, 1701, 1704, 1705, 1706, 1709, 1712, 1713, 1714, + 1717, 1720, 1721, 1722, 1723, 1726, 1729, 1730, 1731, 1732, + 1735, 1738, 1739, 1742, 1745, 1746, 1747, 1748, 1751, 1754, + 1755, 1756, 1757, 1758, 1761, 1764, 1767, 1768, 1771, 1774, + 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1784, 1787, 1791, + 1792, 1793, 1794, 1797, 1801, 1802, 1803, 1804, 1807, 1810, + 1811, 1814, 1817, 1820, 1821, 1822, 1823, 1824, 1825, 1826, + 1827, 1828, 1829, 1832, 1835, 1838, 1839, 1842, 1845, 1846, + 1849, 1852, 1855, 1856, 1859, 1862, 1863, 1866, 1869, 1872, + 1873, 1874, 1875, 1878, 1881, 1882, 1885, 1888, 1889, 1890, + 1891, 1894, 1897, 1898, 1901, 1904, 1905, 1908, 1911, 1914, + 1915, 1918, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, + 1929, 1930, 1931, 1932, 1933, 1936, 1939, 1940, 1941, 1942, + 1943, 1944, 1945, 1946, 1947, 1948, 1951, 1954, 1955, 1956, + 1957, 1960, 1963, 1964, 1965, 1966, 1969, 1972, 1973, 1974, + 1977, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, + 1989, 1990, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2014, 2015, 2016, + 2019, 2022, 2025, 2026, 2027, 2028, 2029, 2032, 2033, 2036, + 2037, 2040, 2055, 2056, 2057, 2058, 2061, 2064, 2065, 2068, + 2071, 2072, 2075, 2078, 2079, 2080, 2081, 2082, 2085, 2088, + 2091, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, + 2103, 2104, 2105, 2108, 2109, 2110, 2111, 2112, 2113, 2116, + 2119, 2120, 2121, 2124, 2127, 2128, 2131, 2134, 2135, 2136, + 2137, 2140, 2144, 2145, 2148, 2149, 2152, 2155, 2156, 2159, + 2162, 2165, 2166, 2169, 2172, 2175, 2178, 2179, 2180, 2181, + 2184, 2187, 2188, 2191, 2194, 2197, 2198, 2199, 2200, 2201, + 2202, 2205, 2208, 2209, 2210, 2211, 2214, 2217, 2218, 2221, + 2224, 2225, 2228, 2231, 2232, 2235, 2238, 2239, 2242, 2245, + 2246, 2247, 2248, 2251, 2254, 2255, 2256, 2259, 2260, 2261, + 2264, 2267, 2270, 2271, 2272, 2273, 2276, 2277, 2280, 2283, + 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, + 2296, 2297, 2298, 2299, 2302, 2305, 2306, 2309, 2312, 2313, + 2314, 2317, 2320, 2321, 2322, 2323, 2326, 2327, 2328, 2331, + 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2343, 2346, 2349, + 2350, 2353, 2354, 2355, 2358, 2362, 2365, 2366, 2367, 2368, + 2369, 2372, 2376, 2377, 2380, 2381, 2384, 2385, 2388, 2389, + 2392, 2393, 2396, 2399, 2400, 2401, 2404, 2407, 2408, 2409, + 2410, 2413, 2416, 2417, 2418, 2419, 2420, 2421, 2424, 2427, + 2430, 2433, 2434, 2435, 2436, 2439, 2442, 2443, 2444, 2445, + 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, + 2456, 2457, 2460, 2463, 2466, 2467, 2468, 2469, 2470, 2473, + 2474, 2477, 2478, 2481, 2484, 2487, 2488, 2489, 2490, 2491, + 2492, 2495, 2498, 2499, 2500, 2503, 2506, 2507, 2508, 2509, + 2510, 2511, 2512, 2513, 2514, 2517, 2520, 2523, 2526, 2527, + 2530, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, + 2542, 2545, 2548, 2551, 2554, 2557, 2560, 2561, 2562, 2563, + 2566, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2578, 2581, + 2582, 2583, 2584, 2585, 2586, 2587, 2590, 2593, 2596, 2599 }; #endif @@ -3366,541 +3367,541 @@ switch (yyn) { case 2: -#line 509 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 510 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { PopC(); } -#line 3372 "edif.tab.c" /* yacc.c:1646 */ +#line 3373 "edif.tab.c" /* yacc.c:1646 */ break; case 11: -#line 524 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 525 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3378 "edif.tab.c" /* yacc.c:1646 */ +#line 3379 "edif.tab.c" /* yacc.c:1646 */ break; case 12: -#line 527 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 528 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3384 "edif.tab.c" /* yacc.c:1646 */ +#line 3385 "edif.tab.c" /* yacc.c:1646 */ break; case 13: -#line 531 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 532 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 3390 "edif.tab.c" /* yacc.c:1646 */ +#line 3391 "edif.tab.c" /* yacc.c:1646 */ break; case 25: -#line 555 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 556 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3396 "edif.tab.c" /* yacc.c:1646 */ +#line 3397 "edif.tab.c" /* yacc.c:1646 */ break; case 34: -#line 572 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 573 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[-3].ps)); free((yyvsp[-2].s)); } -#line 3402 "edif.tab.c" /* yacc.c:1646 */ +#line 3403 "edif.tab.c" /* yacc.c:1646 */ break; case 36: -#line 576 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 577 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3408 "edif.tab.c" /* yacc.c:1646 */ +#line 3409 "edif.tab.c" /* yacc.c:1646 */ break; case 47: -#line 601 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 602 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3414 "edif.tab.c" /* yacc.c:1646 */ +#line 3415 "edif.tab.c" /* yacc.c:1646 */ break; case 69: -#line 649 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 650 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); free((yyvsp[-2].s)); } -#line 3420 "edif.tab.c" /* yacc.c:1646 */ +#line 3421 "edif.tab.c" /* yacc.c:1646 */ break; case 70: -#line 652 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 653 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3426 "edif.tab.c" /* yacc.c:1646 */ +#line 3427 "edif.tab.c" /* yacc.c:1646 */ break; case 80: -#line 670 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 671 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3432 "edif.tab.c" /* yacc.c:1646 */ +#line 3433 "edif.tab.c" /* yacc.c:1646 */ break; case 84: -#line 680 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 681 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3438 "edif.tab.c" /* yacc.c:1646 */ +#line 3439 "edif.tab.c" /* yacc.c:1646 */ break; case 91: -#line 695 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 696 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3444 "edif.tab.c" /* yacc.c:1646 */ +#line 3445 "edif.tab.c" /* yacc.c:1646 */ break; case 102: -#line 718 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 719 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3450 "edif.tab.c" /* yacc.c:1646 */ +#line 3451 "edif.tab.c" /* yacc.c:1646 */ break; case 140: -#line 778 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 779 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3456 "edif.tab.c" /* yacc.c:1646 */ +#line 3457 "edif.tab.c" /* yacc.c:1646 */ break; case 147: -#line 793 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 794 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3462 "edif.tab.c" /* yacc.c:1646 */ +#line 3463 "edif.tab.c" /* yacc.c:1646 */ break; case 150: -#line 800 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 801 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3468 "edif.tab.c" /* yacc.c:1646 */ +#line 3469 "edif.tab.c" /* yacc.c:1646 */ break; case 182: -#line 870 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 871 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3474 "edif.tab.c" /* yacc.c:1646 */ +#line 3475 "edif.tab.c" /* yacc.c:1646 */ break; case 184: -#line 874 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 875 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3480 "edif.tab.c" /* yacc.c:1646 */ +#line 3481 "edif.tab.c" /* yacc.c:1646 */ break; case 240: -#line 978 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 979 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3486 "edif.tab.c" /* yacc.c:1646 */ +#line 3487 "edif.tab.c" /* yacc.c:1646 */ break; case 247: -#line 991 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 992 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3492 "edif.tab.c" /* yacc.c:1646 */ +#line 3493 "edif.tab.c" /* yacc.c:1646 */ break; case 278: -#line 1038 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1039 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3498 "edif.tab.c" /* yacc.c:1646 */ +#line 3499 "edif.tab.c" /* yacc.c:1646 */ break; case 279: -#line 1041 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1042 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3504 "edif.tab.c" /* yacc.c:1646 */ +#line 3505 "edif.tab.c" /* yacc.c:1646 */ break; case 333: -#line 1127 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1128 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); free((yyvsp[-2].s)); } -#line 3510 "edif.tab.c" /* yacc.c:1646 */ +#line 3511 "edif.tab.c" /* yacc.c:1646 */ break; case 336: -#line 1134 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1135 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3516 "edif.tab.c" /* yacc.c:1646 */ +#line 3517 "edif.tab.c" /* yacc.c:1646 */ break; case 337: -#line 1137 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1138 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3522 "edif.tab.c" /* yacc.c:1646 */ +#line 3523 "edif.tab.c" /* yacc.c:1646 */ break; case 344: -#line 1150 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1151 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3528 "edif.tab.c" /* yacc.c:1646 */ +#line 3529 "edif.tab.c" /* yacc.c:1646 */ break; case 346: -#line 1154 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1155 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3534 "edif.tab.c" /* yacc.c:1646 */ +#line 3535 "edif.tab.c" /* yacc.c:1646 */ break; case 347: -#line 1155 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1156 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3540 "edif.tab.c" /* yacc.c:1646 */ +#line 3541 "edif.tab.c" /* yacc.c:1646 */ break; case 348: -#line 1156 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1157 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3546 "edif.tab.c" /* yacc.c:1646 */ +#line 3547 "edif.tab.c" /* yacc.c:1646 */ break; case 369: -#line 1197 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1198 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[-2].s); } -#line 3552 "edif.tab.c" /* yacc.c:1646 */ +#line 3553 "edif.tab.c" /* yacc.c:1646 */ break; case 371: -#line 1201 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1202 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3558 "edif.tab.c" /* yacc.c:1646 */ +#line 3559 "edif.tab.c" /* yacc.c:1646 */ break; case 374: -#line 1208 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1209 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3564 "edif.tab.c" /* yacc.c:1646 */ +#line 3565 "edif.tab.c" /* yacc.c:1646 */ break; case 381: -#line 1219 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1220 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3570 "edif.tab.c" /* yacc.c:1646 */ +#line 3571 "edif.tab.c" /* yacc.c:1646 */ break; case 384: -#line 1226 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1227 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3576 "edif.tab.c" /* yacc.c:1646 */ +#line 3577 "edif.tab.c" /* yacc.c:1646 */ break; case 388: -#line 1232 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1233 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3582 "edif.tab.c" /* yacc.c:1646 */ +#line 3583 "edif.tab.c" /* yacc.c:1646 */ break; case 390: -#line 1236 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1237 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3588 "edif.tab.c" /* yacc.c:1646 */ +#line 3589 "edif.tab.c" /* yacc.c:1646 */ break; case 393: -#line 1243 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1244 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3594 "edif.tab.c" /* yacc.c:1646 */ +#line 3595 "edif.tab.c" /* yacc.c:1646 */ break; case 397: -#line 1251 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1252 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3600 "edif.tab.c" /* yacc.c:1646 */ +#line 3601 "edif.tab.c" /* yacc.c:1646 */ break; case 408: -#line 1266 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1267 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { pair_list_free((yyvsp[0].pl)); } -#line 3606 "edif.tab.c" /* yacc.c:1646 */ +#line 3607 "edif.tab.c" /* yacc.c:1646 */ break; case 437: -#line 1316 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1317 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.pl) = new_pair_list((yyvsp[-1].ps)); } -#line 3612 "edif.tab.c" /* yacc.c:1646 */ +#line 3613 "edif.tab.c" /* yacc.c:1646 */ break; case 438: -#line 1319 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1320 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3618 "edif.tab.c" /* yacc.c:1646 */ +#line 3619 "edif.tab.c" /* yacc.c:1646 */ break; case 439: -#line 1320 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1321 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyvsp[0].ps)->next = (yyvsp[-1].ps); (yyval.ps) = (yyvsp[0].ps); } -#line 3624 "edif.tab.c" /* yacc.c:1646 */ +#line 3625 "edif.tab.c" /* yacc.c:1646 */ break; case 455: -#line 1346 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1347 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3630 "edif.tab.c" /* yacc.c:1646 */ +#line 3631 "edif.tab.c" /* yacc.c:1646 */ break; case 459: -#line 1356 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1357 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3636 "edif.tab.c" /* yacc.c:1646 */ +#line 3637 "edif.tab.c" /* yacc.c:1646 */ break; case 460: -#line 1359 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1360 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3642 "edif.tab.c" /* yacc.c:1646 */ +#line 3643 "edif.tab.c" /* yacc.c:1646 */ break; case 462: -#line 1365 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1366 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3648 "edif.tab.c" /* yacc.c:1646 */ +#line 3649 "edif.tab.c" /* yacc.c:1646 */ break; case 463: -#line 1368 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1369 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3654 "edif.tab.c" /* yacc.c:1646 */ +#line 3655 "edif.tab.c" /* yacc.c:1646 */ break; case 483: -#line 1410 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1411 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3660 "edif.tab.c" /* yacc.c:1646 */ +#line 3661 "edif.tab.c" /* yacc.c:1646 */ break; case 484: -#line 1413 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1414 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3666 "edif.tab.c" /* yacc.c:1646 */ +#line 3667 "edif.tab.c" /* yacc.c:1646 */ break; case 492: -#line 1427 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1428 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3672 "edif.tab.c" /* yacc.c:1646 */ +#line 3673 "edif.tab.c" /* yacc.c:1646 */ break; case 506: -#line 1455 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1456 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3678 "edif.tab.c" /* yacc.c:1646 */ +#line 3679 "edif.tab.c" /* yacc.c:1646 */ break; case 507: -#line 1458 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1459 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3684 "edif.tab.c" /* yacc.c:1646 */ +#line 3685 "edif.tab.c" /* yacc.c:1646 */ break; case 514: -#line 1473 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1474 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3690 "edif.tab.c" /* yacc.c:1646 */ +#line 3691 "edif.tab.c" /* yacc.c:1646 */ break; case 549: -#line 1528 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1529 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3696 "edif.tab.c" /* yacc.c:1646 */ +#line 3697 "edif.tab.c" /* yacc.c:1646 */ break; case 555: -#line 1540 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1541 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3702 "edif.tab.c" /* yacc.c:1646 */ +#line 3703 "edif.tab.c" /* yacc.c:1646 */ break; case 560: -#line 1549 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1550 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3708 "edif.tab.c" /* yacc.c:1646 */ +#line 3709 "edif.tab.c" /* yacc.c:1646 */ break; case 561: -#line 1552 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1553 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3714 "edif.tab.c" /* yacc.c:1646 */ +#line 3715 "edif.tab.c" /* yacc.c:1646 */ break; case 562: -#line 1553 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1554 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3720 "edif.tab.c" /* yacc.c:1646 */ +#line 3721 "edif.tab.c" /* yacc.c:1646 */ break; case 582: -#line 1595 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1596 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3726 "edif.tab.c" /* yacc.c:1646 */ +#line 3727 "edif.tab.c" /* yacc.c:1646 */ break; case 585: -#line 1598 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1599 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { pair_list_free((yyvsp[0].pl)); } -#line 3732 "edif.tab.c" /* yacc.c:1646 */ +#line 3733 "edif.tab.c" /* yacc.c:1646 */ break; case 586: -#line 1601 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1602 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[-1].s); } -#line 3738 "edif.tab.c" /* yacc.c:1646 */ +#line 3739 "edif.tab.c" /* yacc.c:1646 */ break; case 587: -#line 1604 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1605 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3744 "edif.tab.c" /* yacc.c:1646 */ +#line 3745 "edif.tab.c" /* yacc.c:1646 */ break; case 589: -#line 1608 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1609 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[0].s),NULL); } -#line 3750 "edif.tab.c" /* yacc.c:1646 */ +#line 3751 "edif.tab.c" /* yacc.c:1646 */ break; case 590: -#line 1609 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1610 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[0].s),NULL); } -#line 3756 "edif.tab.c" /* yacc.c:1646 */ +#line 3757 "edif.tab.c" /* yacc.c:1646 */ break; case 591: -#line 1610 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1611 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=(yyvsp[0].ps); } -#line 3762 "edif.tab.c" /* yacc.c:1646 */ +#line 3763 "edif.tab.c" /* yacc.c:1646 */ break; case 592: -#line 1613 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1614 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3768 "edif.tab.c" /* yacc.c:1646 */ +#line 3769 "edif.tab.c" /* yacc.c:1646 */ break; case 593: -#line 1614 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1615 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3774 "edif.tab.c" /* yacc.c:1646 */ +#line 3775 "edif.tab.c" /* yacc.c:1646 */ break; case 594: -#line 1617 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1618 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { define_pcb_net((yyvsp[-2].ps), (yyvsp[-1].pl)); } -#line 3780 "edif.tab.c" /* yacc.c:1646 */ +#line 3781 "edif.tab.c" /* yacc.c:1646 */ break; case 595: -#line 1620 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1621 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.pl)=(yyvsp[0].pl); } -#line 3786 "edif.tab.c" /* yacc.c:1646 */ +#line 3787 "edif.tab.c" /* yacc.c:1646 */ break; case 611: -#line 1642 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1643 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[-2].ps)); } -#line 3792 "edif.tab.c" /* yacc.c:1646 */ +#line 3793 "edif.tab.c" /* yacc.c:1646 */ break; case 632: -#line 1679 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1680 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=(yyvsp[0].ps); } -#line 3798 "edif.tab.c" /* yacc.c:1646 */ +#line 3799 "edif.tab.c" /* yacc.c:1646 */ break; case 633: -#line 1680 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1681 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3804 "edif.tab.c" /* yacc.c:1646 */ +#line 3805 "edif.tab.c" /* yacc.c:1646 */ break; case 634: -#line 1684 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1685 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3810 "edif.tab.c" /* yacc.c:1646 */ +#line 3811 "edif.tab.c" /* yacc.c:1646 */ break; case 639: -#line 1693 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1694 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3816 "edif.tab.c" /* yacc.c:1646 */ +#line 3817 "edif.tab.c" /* yacc.c:1646 */ break; case 644: -#line 1704 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1705 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3822 "edif.tab.c" /* yacc.c:1646 */ +#line 3823 "edif.tab.c" /* yacc.c:1646 */ break; case 698: -#line 1806 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1807 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); } -#line 3828 "edif.tab.c" /* yacc.c:1646 */ +#line 3829 "edif.tab.c" /* yacc.c:1646 */ break; case 701: -#line 1813 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1814 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3834 "edif.tab.c" /* yacc.c:1646 */ +#line 3835 "edif.tab.c" /* yacc.c:1646 */ break; case 727: -#line 1865 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1866 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3840 "edif.tab.c" /* yacc.c:1646 */ +#line 3841 "edif.tab.c" /* yacc.c:1646 */ break; case 730: -#line 1872 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1873 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3846 "edif.tab.c" /* yacc.c:1646 */ +#line 3847 "edif.tab.c" /* yacc.c:1646 */ break; case 747: -#line 1907 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1908 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 3852 "edif.tab.c" /* yacc.c:1646 */ +#line 3853 "edif.tab.c" /* yacc.c:1646 */ break; case 766: -#line 1938 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1939 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3858 "edif.tab.c" /* yacc.c:1646 */ +#line 3859 "edif.tab.c" /* yacc.c:1646 */ break; case 789: -#line 1973 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1974 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3864 "edif.tab.c" /* yacc.c:1646 */ +#line 3865 "edif.tab.c" /* yacc.c:1646 */ break; case 791: -#line 1979 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1980 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3870 "edif.tab.c" /* yacc.c:1646 */ +#line 3871 "edif.tab.c" /* yacc.c:1646 */ break; case 803: -#line 1995 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 1996 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3876 "edif.tab.c" /* yacc.c:1646 */ +#line 3877 "edif.tab.c" /* yacc.c:1646 */ break; case 818: -#line 2014 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2015 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3882 "edif.tab.c" /* yacc.c:1646 */ +#line 3883 "edif.tab.c" /* yacc.c:1646 */ break; case 823: -#line 2025 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2026 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3888 "edif.tab.c" /* yacc.c:1646 */ +#line 3889 "edif.tab.c" /* yacc.c:1646 */ break; case 827: -#line 2031 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2032 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3894 "edif.tab.c" /* yacc.c:1646 */ +#line 3895 "edif.tab.c" /* yacc.c:1646 */ break; case 829: -#line 2035 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2036 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3900 "edif.tab.c" /* yacc.c:1646 */ +#line 3901 "edif.tab.c" /* yacc.c:1646 */ break; case 831: -#line 2040 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2041 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { if ((yyvsp[-1].ps)) { @@ -3913,251 +3914,251 @@ (yyval.ps) = new_str_pair(NULL,(yyvsp[-2].s)); } } -#line 3917 "edif.tab.c" /* yacc.c:1646 */ +#line 3918 "edif.tab.c" /* yacc.c:1646 */ break; case 832: -#line 2054 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2055 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3923 "edif.tab.c" /* yacc.c:1646 */ +#line 3924 "edif.tab.c" /* yacc.c:1646 */ break; case 833: -#line 2055 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2056 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=(yyvsp[0].ps); } -#line 3929 "edif.tab.c" /* yacc.c:1646 */ +#line 3930 "edif.tab.c" /* yacc.c:1646 */ break; case 834: -#line 2056 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2057 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[0].s),NULL); } -#line 3935 "edif.tab.c" /* yacc.c:1646 */ +#line 3936 "edif.tab.c" /* yacc.c:1646 */ break; case 835: -#line 2057 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2058 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3941 "edif.tab.c" /* yacc.c:1646 */ +#line 3942 "edif.tab.c" /* yacc.c:1646 */ break; case 848: -#line 2084 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2085 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3947 "edif.tab.c" /* yacc.c:1646 */ +#line 3948 "edif.tab.c" /* yacc.c:1646 */ break; case 849: -#line 2087 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2088 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3953 "edif.tab.c" /* yacc.c:1646 */ +#line 3954 "edif.tab.c" /* yacc.c:1646 */ break; case 881: -#line 2140 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2141 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[-2].s),(yyvsp[-1].s)); } -#line 3959 "edif.tab.c" /* yacc.c:1646 */ +#line 3960 "edif.tab.c" /* yacc.c:1646 */ break; case 882: -#line 2143 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2144 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3965 "edif.tab.c" /* yacc.c:1646 */ +#line 3966 "edif.tab.c" /* yacc.c:1646 */ break; case 883: -#line 2144 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2145 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3971 "edif.tab.c" /* yacc.c:1646 */ +#line 3972 "edif.tab.c" /* yacc.c:1646 */ break; case 884: -#line 2147 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2148 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3977 "edif.tab.c" /* yacc.c:1646 */ +#line 3978 "edif.tab.c" /* yacc.c:1646 */ break; case 885: -#line 2148 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2149 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=NULL; } -#line 3983 "edif.tab.c" /* yacc.c:1646 */ +#line 3984 "edif.tab.c" /* yacc.c:1646 */ break; case 889: -#line 2158 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2159 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3989 "edif.tab.c" /* yacc.c:1646 */ +#line 3990 "edif.tab.c" /* yacc.c:1646 */ break; case 891: -#line 2164 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2165 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3995 "edif.tab.c" /* yacc.c:1646 */ +#line 3996 "edif.tab.c" /* yacc.c:1646 */ break; case 892: -#line 2165 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2166 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4001 "edif.tab.c" /* yacc.c:1646 */ +#line 4002 "edif.tab.c" /* yacc.c:1646 */ break; case 893: -#line 2168 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2169 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4007 "edif.tab.c" /* yacc.c:1646 */ +#line 4008 "edif.tab.c" /* yacc.c:1646 */ break; case 894: -#line 2171 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2172 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4013 "edif.tab.c" /* yacc.c:1646 */ +#line 4014 "edif.tab.c" /* yacc.c:1646 */ break; case 896: -#line 2177 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2178 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4019 "edif.tab.c" /* yacc.c:1646 */ +#line 4020 "edif.tab.c" /* yacc.c:1646 */ break; case 898: -#line 2179 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2180 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4025 "edif.tab.c" /* yacc.c:1646 */ +#line 4026 "edif.tab.c" /* yacc.c:1646 */ break; case 903: -#line 2190 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2191 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4031 "edif.tab.c" /* yacc.c:1646 */ +#line 4032 "edif.tab.c" /* yacc.c:1646 */ break; case 935: -#line 2254 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2255 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4037 "edif.tab.c" /* yacc.c:1646 */ +#line 4038 "edif.tab.c" /* yacc.c:1646 */ break; case 943: -#line 2270 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2271 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4043 "edif.tab.c" /* yacc.c:1646 */ +#line 4044 "edif.tab.c" /* yacc.c:1646 */ break; case 946: -#line 2275 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2276 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4049 "edif.tab.c" /* yacc.c:1646 */ +#line 4050 "edif.tab.c" /* yacc.c:1646 */ break; case 973: -#line 2320 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2321 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4055 "edif.tab.c" /* yacc.c:1646 */ +#line 4056 "edif.tab.c" /* yacc.c:1646 */ break; case 987: -#line 2342 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2343 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 4061 "edif.tab.c" /* yacc.c:1646 */ +#line 4062 "edif.tab.c" /* yacc.c:1646 */ break; case 994: -#line 2358 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2359 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-6].s)); free((yyvsp[-5].s)); free((yyvsp[-4].s)); free((yyvsp[-3].s)); free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4067 "edif.tab.c" /* yacc.c:1646 */ +#line 4068 "edif.tab.c" /* yacc.c:1646 */ break; case 1054: -#line 2465 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2466 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4073 "edif.tab.c" /* yacc.c:1646 */ +#line 4074 "edif.tab.c" /* yacc.c:1646 */ break; case 1055: -#line 2466 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2467 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4079 "edif.tab.c" /* yacc.c:1646 */ +#line 4080 "edif.tab.c" /* yacc.c:1646 */ break; case 1056: -#line 2467 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2468 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4085 "edif.tab.c" /* yacc.c:1646 */ +#line 4086 "edif.tab.c" /* yacc.c:1646 */ break; case 1057: -#line 2468 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2469 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4091 "edif.tab.c" /* yacc.c:1646 */ +#line 4092 "edif.tab.c" /* yacc.c:1646 */ break; case 1059: -#line 2472 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2473 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4097 "edif.tab.c" /* yacc.c:1646 */ +#line 4098 "edif.tab.c" /* yacc.c:1646 */ break; case 1061: -#line 2476 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2477 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4103 "edif.tab.c" /* yacc.c:1646 */ +#line 4104 "edif.tab.c" /* yacc.c:1646 */ break; case 1063: -#line 2480 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2481 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 4109 "edif.tab.c" /* yacc.c:1646 */ +#line 4110 "edif.tab.c" /* yacc.c:1646 */ break; case 1085: -#line 2516 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2517 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4115 "edif.tab.c" /* yacc.c:1646 */ +#line 4116 "edif.tab.c" /* yacc.c:1646 */ break; case 1086: -#line 2519 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2520 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4121 "edif.tab.c" /* yacc.c:1646 */ +#line 4122 "edif.tab.c" /* yacc.c:1646 */ break; case 1107: -#line 2560 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2561 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4127 "edif.tab.c" /* yacc.c:1646 */ +#line 4128 "edif.tab.c" /* yacc.c:1646 */ break; case 1109: -#line 2562 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2563 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { pair_list_free((yyvsp[0].pl)); } -#line 4133 "edif.tab.c" /* yacc.c:1646 */ +#line 4134 "edif.tab.c" /* yacc.c:1646 */ break; case 1126: -#line 2589 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2590 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4139 "edif.tab.c" /* yacc.c:1646 */ +#line 4140 "edif.tab.c" /* yacc.c:1646 */ break; case 1127: -#line 2592 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2593 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4145 "edif.tab.c" /* yacc.c:1646 */ +#line 4146 "edif.tab.c" /* yacc.c:1646 */ break; case 1128: -#line 2595 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2596 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4151 "edif.tab.c" /* yacc.c:1646 */ +#line 4152 "edif.tab.c" /* yacc.c:1646 */ break; case 1129: -#line 2598 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ +#line 2599 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4157 "edif.tab.c" /* yacc.c:1646 */ +#line 4158 "edif.tab.c" /* yacc.c:1646 */ break; -#line 4161 "edif.tab.c" /* yacc.c:1646 */ +#line 4162 "edif.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4385,7 +4386,7 @@ #endif return yyresult; } -#line 2601 "../../src_plugins/import_edif/edif.y" /* yacc.c:1906 */ +#line 2602 "../../src_plugins/import_edif/edif.y" /* yacc.c:1906 */ /* * xmalloc: Index: trunk/src_plugins/import_edif/edif.h =================================================================== --- trunk/src_plugins/import_edif/edif.h (revision 2527) +++ trunk/src_plugins/import_edif/edif.h (revision 2528) @@ -345,7 +345,7 @@ typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 197 "../../src_plugins/import_edif/edif.y" /* yacc.c:1909 */ +#line 198 "../../src_plugins/import_edif/edif.y" /* yacc.c:1909 */ char* s; pair_list* pl; Index: trunk/src_plugins/import_edif/edif.y =================================================================== --- trunk/src_plugins/import_edif/edif.y (revision 2527) +++ trunk/src_plugins/import_edif/edif.y (revision 2528) @@ -30,6 +30,7 @@ #include "data.h" #include "error.h" #include "plugins.h" +#include "compat_misc.h" /* from mymem.h, not include because of the malloc junk */ LibraryMenuTypePtr GetLibraryMenuMemory(LibraryTypePtr, int *idx); @@ -114,7 +115,7 @@ pair_list_free(nodes); return; } - menu->Name = strdup (name->str1); + menu->Name = pcb_strdup (name->str1); free(name->str1); /* if renamed str2 also exists and must be freed */ if ( name->str2 ) free(name->str2); @@ -178,7 +179,7 @@ free(node->str1); free(node->str2); entry = GetLibraryEntryMemory (menu); - entry->ListEntry = strdup(buf); + entry->ListEntry = pcb_strdup(buf); done_node = node; node = node->next; free(done_node); Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 2527) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 2528) @@ -31,8 +31,8 @@ #include "misc.h" #include "data.h" #include "rats_patch.h" +#include "compat_misc.h" - static plug_import_t import_netlist; @@ -116,7 +116,7 @@ i++; if (kind == 0) { menu = GetLibraryMenuMemory(&PCB->NetlistLib[NETLIST_INPUT], NULL); - menu->Name = strdup(temp); + menu->Name = pcb_strdup(temp); menu->flag = 1; kind++; } @@ -123,11 +123,11 @@ else { if (kind == 1 && strchr(temp, '-') == NULL) { kind++; - menu->Style = strdup(temp); + menu->Style = pcb_strdup(temp); } else { entry = GetLibraryEntryMemory(menu); - entry->ListEntry = strdup(temp); + entry->ListEntry = pcb_strdup(temp); entry->ListEntry_dontfree = 0; } } Index: trunk/src_plugins/io_pcb/attribs.c =================================================================== --- trunk/src_plugins/io_pcb/attribs.c (revision 2527) +++ trunk/src_plugins/io_pcb/attribs.c (revision 2528) @@ -22,6 +22,7 @@ #include "conf.h" #include "misc.h" +#include "compat_misc.h" #define LISTSEP " [[pcb-rnd]] " @@ -107,7 +108,7 @@ if (nv == NULL) continue; if (nv->type == CFN_LIST) { - char *tmp = strdup(pcb->Attributes.List[n].value); + char *tmp = pcb_strdup(pcb->Attributes.List[n].value); char *next, *curr; for(curr = tmp; curr != NULL; curr = next) { next = strstr(curr, LISTSEP); Index: trunk/src_plugins/mincut/pcb-mincut/load.c =================================================================== --- trunk/src_plugins/mincut/pcb-mincut/load.c (revision 2527) +++ trunk/src_plugins/mincut/pcb-mincut/load.c (revision 2528) @@ -22,6 +22,7 @@ #include #include "genht/htsi.h" #include "graph.h" +#include "compat_misc.h" /*#define DEBUG_GR*/ @@ -114,7 +115,7 @@ if (htsi_has(name2node, (char *)id)) return htsi_get(name2node, (char *)id); if (alloc) { - node2name[num_nodes] = strdup(id); + node2name[num_nodes] = pcb_strdup(id); htsi_set(name2node, node2name[num_nodes], num_nodes); return num_nodes++; } @@ -187,8 +188,8 @@ } name2node = htsi_alloc(keyhash, strkeyeq); - node2name[0] = strdup("(S)"); htsi_set(name2node, node2name[0], 0); - node2name[1] = strdup("(T)"); htsi_set(name2node, node2name[1], 1); + node2name[0] = pcb_strdup("(S)"); htsi_set(name2node, node2name[0], 0); + node2name[1] = pcb_strdup("(T)"); htsi_set(name2node, node2name[1], 1); num_nodes = 2; nn_net[0] = 0; nn_net[1] = 0; Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 2527) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 2528) @@ -45,6 +45,7 @@ #include "set.h" #include "undo.h" #include "plugins.h" +#include "compat_misc.h" #include "rats.h" #include "pcb-mincut/graph.h" @@ -204,8 +205,8 @@ sprintf(s, "%s #%ld", typ, n->to->ID); g->node2name[n->gid] = s; } - g->node2name[0] = strdup("S"); - g->node2name[1] = strdup("T"); + g->node2name[0] = pcb_strdup("S"); + g->node2name[1] = pcb_strdup("T"); /* calculate how many edges each node has and the max edge count */ maxedges = 0; @@ -390,7 +391,7 @@ if ((spn == NULL) || (spi == NULL)) continue; - /* can compare by pointer - names are never strdup()'d */ + /* can compare by pointer - names are never pcb_strdup()'d */ if ((&spn->Name[2] == i->with_net) || (&spi->Name[2] == n->with_net)) i->ignore = 1; } Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 2527) +++ trunk/src_plugins/renumber/renumber.c (revision 2528) @@ -36,6 +36,7 @@ #include "plugins.h" #include "hid_actions.h" #include "conf_core.h" +#include "compat_misc.h" #include "pcb-printf.h" @@ -96,7 +97,7 @@ } if (name && *name) { - default_file = strdup(name); + default_file = pcb_strdup(name); } if ((out = fopen(name, "r"))) { @@ -200,7 +201,7 @@ /* If there is no refdes, maybe just spit out a warning */ if (NAMEONPCB_NAME(element_list[i])) { /* figure out the prefix */ - tmps = strdup(NAMEONPCB_NAME(element_list[i])); + tmps = pcb_strdup(NAMEONPCB_NAME(element_list[i])); j = 0; while (tmps[j] && (tmps[j] < '0' || tmps[j] > '9') && tmps[j] != '?') @@ -231,7 +232,7 @@ * prefix */ if (!cnt_list[j].name) { - cnt_list[j].name = strdup(tmps); + cnt_list[j].name = pcb_strdup(tmps); cnt_list[j].cnt = 0; } @@ -274,8 +275,8 @@ fprintf(out, "*RENAME* \"%s\" \"%s\"\n", NAMEONPCB_NAME(element_list[i]), tmps); /* add this rename to our table of renames so we can update the netlist */ - was[c_cnt] = strdup(NAMEONPCB_NAME(element_list[i])); - is[c_cnt] = strdup(tmps); + was[c_cnt] = pcb_strdup(NAMEONPCB_NAME(element_list[i])); + is[c_cnt] = pcb_strdup(tmps); c_cnt++; AddObjectToChangeNameUndoList(PCB_TYPE_ELEMENT, NULL, NULL, element_list[i], NAMEONPCB_NAME(element_list[i])); @@ -311,7 +312,7 @@ for (j = 0; j < PCB->NetlistLib[WTF].Menu[i].EntryN; j++) { /* figure out the pin number part from strings like U3-21 */ - tmps = strdup(PCB->NetlistLib[WTF].Menu[i].Entry[j].ListEntry); + tmps = pcb_strdup(PCB->NetlistLib[WTF].Menu[i].Entry[j].ListEntry); for (k = 0; tmps[k] && tmps[k] != '-'; k++); tmps[k] = '\0'; pin = tmps + k + 1; Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 2527) +++ trunk/src_plugins/report/report.c (revision 2528) @@ -52,6 +52,7 @@ #include "hid_actions.h" #include "misc_util.h" #include "report_conf.h" +#include "compat_misc.h" conf_report_t conf_report; @@ -573,7 +574,7 @@ char *pname; bool got_one = 0; - ename = strdup(ename); + ename = pcb_strdup(ename); pname = strchr(ename, '-'); if (!pname) { free(ename); Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 2527) +++ trunk/src_plugins/shand_cmd/command.c (revision 2528) @@ -47,6 +47,7 @@ #include "set.h" #include "plugins.h" #include "hid_actions.h" +#include "compat_misc.h" /* ---------------------------------------------------------------------- */ @@ -323,7 +324,7 @@ if (SavePCB(argv[0], NULL) == 0) { SetChangedFlag(false); free(PCB->Filename); - PCB->Filename = strdup(argv[0]); + PCB->Filename = pcb_strdup(argv[0]); if (gui->notify_filename_changed != NULL) gui->notify_filename_changed(); } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 2527) +++ trunk/src_plugins/vendordrill/vendor.c (revision 2528) @@ -51,6 +51,7 @@ #include "hid_actions.h" #include "hid_cfg.h" #include "vendor_conf.h" +#include "compat_misc.h" #include #include @@ -183,7 +184,7 @@ default_file = NULL; if (fname && *fname) - default_file = strdup(fname); + default_file = pcb_strdup(fname); } vendor_free_all(); @@ -563,7 +564,7 @@ fprintf(stderr, "realloc() failed\n"); exit(-1); } - (*lst)[*cnt - 1] = strdup(sval); + (*lst)[*cnt - 1] = pcb_strdup(sval); } else hid_cfg_error(n, "invalid skip type; must be text");