Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4851) +++ trunk/doc-rnd/hacking/renames (revision 4852) @@ -226,3 +226,6 @@ QueryInputAndpcb_chg_obj_name -> pcb_chg_obj_name_query ChangePCBSize -> pcb_board_resize ClipLine -> pcb_line_clip +GetWorkingDirectory -> pcb_get_wd +tempfile_name_new -> pcb_tempfile_name_new +tempfile_unlink -> pcb_tempfile_unlink Index: trunk/src/compat_fs.c =================================================================== --- trunk/src/compat_fs.c (revision 4851) +++ trunk/src/compat_fs.c (revision 4852) @@ -56,7 +56,7 @@ * NULL, then the current working directory is copied to the array * pointed to by 'path' */ -char *GetWorkingDirectory(char *path) +char *pcb_get_wd(char *path) { #if defined(HAVE_GETCWD) return getcwd(path, MAXPATHLEN); @@ -138,17 +138,17 @@ * the returned string is made up of the directory plus the name * variable. For example: * - * tempfile_name_new ("myfile") might return + * pcb_tempfile_name_new("myfile") might return * "/var/tmp/pcb.123456/myfile". * * If mkdtemp() is not available then 'name' is ignored and the * insecure tmpnam() function is used. * - * Files/names created with tempfile_name_new() should be unlinked + * Files/names created with pcb_tempfile_name_new() should be unlinked * with tempfile_unlink to make sure the temporary directory is also * removed when mkdtemp() is used. */ -char *tempfile_name_new(const char *name) +char *pcb_tempfile_name_new(const char *name) { char *tmpfile = NULL; #ifdef HAVE_MKDTEMP @@ -178,7 +178,7 @@ mytmpdir = (char *) malloc(sizeof(char) * (strlen(tmpdir) + 1 + strlen(TEMPLATE) + 1)); if (mytmpdir == NULL) { - fprintf(stderr, "tempfile_name_new(): malloc failed()\n"); + fprintf(stderr, "pcb_tempfile_name_new(): malloc failed()\n"); exit(1); } @@ -233,7 +233,7 @@ * lives in a temporary directory and we need to remove that directory * too. */ -int tempfile_unlink(char *name) +int pcb_tempfile_unlink(char *name) { #ifdef DEBUG /* SDB says: Want to keep old temp files for examination when debugging */ @@ -269,8 +269,8 @@ } else { - fprintf(stderr, _("tempfile_unlink(): Unable to determine temp directory name from the temp file\n")); - fprintf(stderr, "tempfile_unlink(): \"%s\"\n", name); + fprintf(stderr, _("pcb_tempfile_unlink(): Unable to determine temp directory name from the temp file\n")); + fprintf(stderr, "pcb_tempfile_unlink(): \"%s\"\n", name); rc2 = -1; } Index: trunk/src/compat_fs.h =================================================================== --- trunk/src/compat_fs.h (revision 4851) +++ trunk/src/compat_fs.h (revision 4852) @@ -1,4 +1,4 @@ -char *GetWorkingDirectory(char *); +char *pcb_get_wd(char *); int pcb_mkdir(const char *path, int mode); int pcb_spawnvp(const char **argv); @@ -6,9 +6,9 @@ /* Return 1 if path is a file that can be opened for read */ int pcb_file_readable(const char *path); -char *tempfile_name_new(const char *name); +char *pcb_tempfile_name_new(const char *name); /* remove temporary file and _also_ free the memory for name * (this fact is a little confusing) */ -int tempfile_unlink(char *name); +int pcb_tempfile_unlink(char *name); Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 4851) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 4852) @@ -123,7 +123,7 @@ /* Cache old dir, then cd into subdir because stat is given relative file names. */ memset(olddir, 0, sizeof olddir); - if (GetWorkingDirectory(olddir) == NULL) { + if (pcb_get_wd(olddir) == NULL) { Message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine initial working directory\n")); return 0; } @@ -139,7 +139,7 @@ /* Determine subdir's abs path */ - if (GetWorkingDirectory(new_subdir) == NULL) { + if (pcb_get_wd(new_subdir) == NULL) { Message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine new working directory\n")); if (chdir(olddir)) ChdirErrorMessage(olddir); Index: trunk/src_plugins/import_sch/import_sch.c =================================================================== --- trunk/src_plugins/import_sch/import_sch.c (revision 4851) +++ trunk/src_plugins/import_sch/import_sch.c (revision 4852) @@ -306,7 +306,7 @@ } if (strcasecmp(mode, "gnetlist") == 0) { - char *tmpfile = tempfile_name_new("gnetlist_output"); + char *tmpfile = pcb_tempfile_name_new("gnetlist_output"); const char **cmd; int i; @@ -350,7 +350,7 @@ ActionExecuteFile(1, cmd, 0, 0); free(cmd); - tempfile_unlink(tmpfile); + pcb_tempfile_unlink(tmpfile); } else if (strcasecmp(mode, "make") == 0) { int must_free_tmpfile = 0; @@ -378,7 +378,7 @@ if (user_outfile) tmpfile = user_outfile; else { - tmpfile = tempfile_name_new("gnetlist_output"); + tmpfile = pcb_tempfile_name_new("gnetlist_output"); if (tmpfile == NULL) { Message(PCB_MSG_ERROR, _("Could not create temp file")); return 1; @@ -427,7 +427,7 @@ free((char*)cmd[3]); free((char*)cmd[4]); if (must_free_tmpfile) - tempfile_unlink(tmpfile); + pcb_tempfile_unlink(tmpfile); } else { Message(PCB_MSG_DEFAULT, _("Unknown import mode: %s\n"), mode);