Index: src/global.h =================================================================== --- src/global.h (revision 297) +++ src/global.h (revision 298) @@ -847,10 +847,7 @@ * at runtime to allow pcb to be relocatable */ extern char *bindir; /* The dir in which PCB installation was found */ -extern char *pcblibdir; /* The system M4 fp directory */ -extern char *pcblibpath; /* The search path for M4 fps */ -extern char *pcbtreedir; /* The system newlib fp directory */ -extern char *pcbtreepath; /* The search path for newlib fps */ +extern char *pcblibdir; extern char *exec_prefix; extern char *homedir; Index: src/hid/gtk/gui-top-window.c =================================================================== --- src/hid/gtk/gui-top-window.c (revision 297) +++ src/hid/gtk/gui-top-window.c (revision 298) @@ -1672,7 +1672,7 @@ char * tmps; char * libdir; tmps = g_win32_get_package_installation_directory(PACKAGE "-" VERSION, NULL); -#define REST_OF_PATH G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "newlib" +#define REST_OF_PATH G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "pcblib" libdir = (char *) malloc(strlen(tmps) + strlen(REST_OF_PATH) + 1); Index: src/main.c =================================================================== --- src/main.c (revision 297) +++ src/main.c (revision 298) @@ -1469,9 +1469,6 @@ char *bindir = NULL; char *exec_prefix = NULL; char *pcblibdir = NULL; -char *pcblibpath = NULL; -char *pcbtreedir = NULL; -char *pcbtreepath = NULL; char *homedir = NULL; static void @@ -1606,43 +1603,9 @@ sprintf (pcblibdir, "%s%s%s", bindir, PCB_DIR_SEPARATOR_S, BINDIR_TO_PCBLIBDIR); - /* and the path to PCBTREEDIR */ - l = strlen (bindir) + 1 + strlen (BINDIR_TO_PCBTREEDIR) + 1; - if ( (pcbtreedir = (char *) malloc (l * sizeof (char) )) == NULL ) - { - fprintf (stderr, "InitPaths(): malloc failed\n"); - exit (1); - } - sprintf (pcbtreedir, "%s%s%s", bindir, PCB_DIR_SEPARATOR_S, - BINDIR_TO_PCBTREEDIR); - - /* and the search path including PCBLIBDIR */ - l = strlen (pcblibdir) + 3; - if ( (pcblibpath = (char *) malloc (l * sizeof (char) )) == NULL ) - { - fprintf (stderr, "InitPaths(): malloc failed\n"); - exit (1); - } - sprintf (pcblibpath, ".%s%s", PCB_PATH_DELIMETER, pcblibdir); - - /* and the newlib search path */ - l = strlen (pcblibdir) + 1 + strlen (pcbtreedir) - + strlen ("pcblib-newlib") + 2; - if ( (pcbtreepath = (char *) malloc (l * sizeof (char) )) == NULL ) - { - fprintf (stderr, "InitPaths(): malloc failed\n"); - exit (1); - } - sprintf (pcbtreepath, "%s%s%s%spcblib-newlib", pcbtreedir, - PCB_PATH_DELIMETER, pcblibdir, - PCB_DIR_SEPARATOR_S); - #ifdef DEBUG printf ("bindir = %s\n", bindir); printf ("pcblibdir = %s\n", pcblibdir); - printf ("pcblibpath = %s\n", pcblibpath); - printf ("pcbtreedir = %s\n", pcbtreedir); - printf ("pcbtreepath = %s\n", pcbtreepath); #endif l = sizeof (main_attribute_list) / sizeof (main_attribute_list[0]); @@ -1657,14 +1620,9 @@ || (NSTRCMP (main_attribute_list[i].name, "element-path") == 0) || (NSTRCMP (main_attribute_list[i].name, "lib-path") == 0) ) { - main_attribute_list[i].default_val.str_value = pcblibpath; + main_attribute_list[i].default_val.str_value = pcblibdir; } - if (NSTRCMP (main_attribute_list[i].name, "lib-newlib") == 0) - { - main_attribute_list[i].default_val.str_value = pcbtreepath; - } - } {