Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4983) +++ trunk/doc-rnd/hacking/renames (revision 4984) @@ -636,3 +636,19 @@ ParseFont -> pcb_parse_font WriteBuffer -> pcb_write_buffer WriteElementData -> pcb_write_element_data +CheckAndOpenFile -> pcb_check_and_open_file +OpenConnectionDataFile -> pcb_open_connection_file +SavePCB -> pcb_save_pcb +LoadPCB -> pcb_load_pcb +EnableAutosave -> pcb_enable_autosave +Backup -> pcb_backup +SaveInTMP -> pcb_save_in_tmp +EmergencySave -> pcb_emergency_save +DisableEmergencySave -> pcb_disable_emergency_save +RevertPCB -> pcb_revert_pcb +SaveBufferElements -> pcb_save_buffer_elements +PrintQuotedString -> pcb_print_quoted_string +sort_library -> pcb_library_sort +set_some_route_style -> pcb_set_some_route_style +WritePCBFile -> pcb_write_pcb_file +WritePipe -> pcb_write_pipe Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 4983) +++ trunk/src/board.c (revision 4984) @@ -117,7 +117,7 @@ dpcb = -1; pcb_io_err_inhibit_inc(); - conf_list_foreach_path_first(dpcb, &conf_core.rc.default_pcb_file, LoadPCB(__path__, NULL, pcb_false, 1)); + conf_list_foreach_path_first(dpcb, &conf_core.rc.default_pcb_file, pcb_load_pcb(__path__, NULL, pcb_false, 1)); pcb_io_err_inhibit_dec(); if (dpcb == 0) { Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4983) +++ trunk/src/buffer.c (revision 4984) @@ -836,10 +836,10 @@ if ((!force) && ((exist = fopen(name, "r")))) { fclose(exist); if (gui->confirm_dialog(_("File exists! Ok to overwrite?"), 0)) - SaveBufferElements(name, fmt); + pcb_save_buffer_elements(name, fmt); } else - SaveBufferElements(name, fmt); + pcb_save_buffer_elements(name, fmt); if (free_name && name) free((char*)name); Index: trunk/src/build_run.c =================================================================== --- trunk/src/build_run.c (revision 4983) +++ trunk/src/build_run.c (revision 4984) @@ -42,13 +42,13 @@ { /* * save data if necessary. It not needed, then don't trigger EmergencySave - * via our atexit() registering of EmergencySave(). We presumably wanted to + * via our atexit() registering of pcb_emergency_save(). We presumably wanted to * exit here and thus it is not an emergency. */ if (PCB->Changed && conf_core.editor.save_in_tmp) - EmergencySave(); + pcb_emergency_save(); else - DisableEmergencySave(); + pcb_disable_emergency_save(); if (gui->do_exit == NULL) { pcb_main_uninit(); Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 4983) +++ trunk/src/file_act.c (revision 4984) @@ -133,7 +133,7 @@ else if (strcasecmp(function, "Layout") == 0) { if (!PCB->Changed || gui->confirm_dialog(_("OK to override layout data?"), 0)) - LoadPCB(name, format, pcb_true, 0); + pcb_load_pcb(name, format, pcb_true, 0); } else if (strcasecmp(function, "Netlist") == 0) { @@ -150,7 +150,7 @@ } else if (strcasecmp(function, "Revert") == 0 && PCB->Filename && (!PCB->Changed || gui->confirm_dialog(_("OK to override changes?"), 0))) { - RevertPCB(); + pcb_revert_pcb(); } return 0; @@ -187,7 +187,7 @@ * clear the old struct and allocate memory for the new one */ if (PCB->Changed && conf_core.editor.save_in_tmp) - SaveInTMP(); + pcb_save_in_tmp(); RemovePCB(PCB); PCB = pcb_board_new(); pcb_board_new_postproc(PCB, 1); @@ -253,7 +253,7 @@ name = argv[1]; if (strcasecmp(function, "Layout") == 0) { - if (SavePCB(PCB->Filename, NULL) == 0) + if (pcb_save_pcb(PCB->Filename, NULL) == 0) SetChangedFlag(pcb_false); if (gui->notify_filename_changed != NULL) gui->notify_filename_changed(); @@ -267,7 +267,7 @@ fmt = argv[2]; if (strcasecmp(function, "LayoutAs") == 0) { - if (SavePCB(name, fmt) == 0) { + if (pcb_save_pcb(name, fmt) == 0) { SetChangedFlag(pcb_false); free(PCB->Filename); PCB->Filename = pcb_strdup(name); @@ -280,7 +280,7 @@ if (strcasecmp(function, "AllConnections") == 0) { FILE *fp; pcb_bool result; - if ((fp = CheckAndOpenFile(name, pcb_true, pcb_false, &result, NULL)) != NULL) { + if ((fp = pcb_check_and_open_file(name, pcb_true, pcb_false, &result, NULL)) != NULL) { pcb_lookup_conns_to_all_elements(fp); fclose(fp); SetChangedFlag(pcb_true); @@ -291,7 +291,7 @@ if (strcasecmp(function, "AllUnusedPins") == 0) { FILE *fp; pcb_bool result; - if ((fp = CheckAndOpenFile(name, pcb_true, pcb_false, &result, NULL)) != NULL) { + if ((fp = pcb_check_and_open_file(name, pcb_true, pcb_false, &result, NULL)) != NULL) { pcb_lookup_unused_pins(fp); fclose(fp); SetChangedFlag(pcb_true); @@ -307,7 +307,7 @@ if ((SearchScreen(Crosshair.X, Crosshair.Y, PCB_TYPE_ELEMENT, &ptrtmp, &ptrtmp, &ptrtmp)) != PCB_TYPE_NONE) { element = (pcb_element_t *) ptrtmp; - if ((fp = CheckAndOpenFile(name, pcb_true, pcb_false, &result, NULL)) != NULL) { + if ((fp = pcb_check_and_open_file(name, pcb_true, pcb_false, &result, NULL)) != NULL) { pcb_lookup_element_conns(element, fp); fclose(fp); SetChangedFlag(pcb_true); @@ -317,7 +317,7 @@ } if (strcasecmp(function, "PasteBuffer") == 0) { - return SaveBufferElements(name, fmt); + return pcb_save_buffer_elements(name, fmt); } PCB_AFAIL(saveto); Index: trunk/src/find_debug.c =================================================================== --- trunk/src/find_debug.c (revision 4983) +++ trunk/src/find_debug.c (revision 4984) @@ -33,11 +33,11 @@ static void PrintElementNameList(pcb_element_t *Element, FILE * FP) { fputc('(', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(Element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(Element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(Element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(Element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(VALUE_NAME(Element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(VALUE_NAME(Element))); fputc(')', FP); fputc('\n', FP); } @@ -59,12 +59,12 @@ { if (FirstOne) { fputc('\t', FP); - PrintQuotedString(FP, ObjName); + pcb_print_quoted_string(FP, ObjName); fprintf(FP, "\n\t{\n"); } else { fprintf(FP, "\t\t"); - PrintQuotedString(FP, ObjName); + pcb_print_quoted_string(FP, ObjName); fputc(' ', FP); if (Element) PrintElementNameList(Element, FP); Index: trunk/src/find_print.c =================================================================== --- trunk/src/find_print.c (revision 4983) +++ trunk/src/find_print.c (revision 4984) @@ -64,7 +64,7 @@ /* write name to list and draw selected object */ fputc('\t', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Name)); fputc('\n', FP); PCB_FLAG_SET(PCB_FLAG_SELECTED, pin); DrawPin(pin); @@ -105,7 +105,7 @@ /* write name to list and draw selected object */ fputc('\t', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Name)); fputc('\n', FP); PCB_FLAG_SET(PCB_FLAG_SELECTED, pad); Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 4983) +++ trunk/src/main.c (revision 4984) @@ -377,7 +377,7 @@ * If the OS doesn't have at least one of them, * the critical sections will be handled by parse_l.l */ - atexit(EmergencySave); + atexit(pcb_emergency_save); pcb_events_init(); @@ -462,7 +462,7 @@ /* keep filename even if initial load command failed; * file might not exist */ - if (LoadPCB(command_line_pcb, NULL, pcb_true, 0)) + if (pcb_load_pcb(command_line_pcb, NULL, pcb_true, 0)) PCB->Filename = pcb_strdup(command_line_pcb); } @@ -491,7 +491,7 @@ exit(0); } - EnableAutosave(); + pcb_enable_autosave(); /* main loop */ do { Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 4983) +++ trunk/src/plug_io.c (revision 4984) @@ -459,7 +459,7 @@ return string_cmp(a, b); } -void sort_library(pcb_lib_t *lib) +void pcb_library_sort(pcb_lib_t *lib) { int i; qsort(lib->Menu, lib->MenuN, sizeof(lib->Menu[0]), netlist_sort); @@ -470,7 +470,7 @@ void pcb_sort_netlist() { netlist_sort_offset = 2; - sort_library(&(PCB->NetlistLib[NETLIST_INPUT])); + pcb_library_sort(&(PCB->NetlistLib[NETLIST_INPUT])); netlist_sort_offset = 0; } @@ -477,7 +477,7 @@ /* --------------------------------------------------------------------------- * opens a file and check if it exists */ -FILE *CheckAndOpenFile(const char *Filename, pcb_bool Confirm, pcb_bool AllButton, pcb_bool * WasAllButton, pcb_bool * WasCancelButton) +FILE *pcb_check_and_open_file(const char *Filename, pcb_bool Confirm, pcb_bool AllButton, pcb_bool * WasAllButton, pcb_bool * WasCancelButton) { FILE *fp = NULL; struct stat buffer; @@ -515,7 +515,7 @@ /* --------------------------------------------------------------------------- * opens a file for saving connection data */ -FILE *OpenConnectionDataFile(void) +FILE *pcb_open_connection_file(void) { char *fname; FILE *fp; @@ -536,7 +536,7 @@ if (fname && *fname) default_file = pcb_strdup(fname); - fp = CheckAndOpenFile(fname, pcb_true, pcb_false, &result, NULL); + fp = pcb_check_and_open_file(fname, pcb_true, pcb_false, &result, NULL); free(fname); return fp; @@ -545,13 +545,13 @@ /* --------------------------------------------------------------------------- * save elements in the current buffer */ -int SaveBufferElements(const char *Filename, const char *fmt) +int pcb_save_buffer_elements(const char *Filename, const char *fmt) { int result; if (SWAP_IDENT) pcb_swap_buffers(); - result = WritePipe(Filename, pcb_false, fmt); + result = pcb_write_pipe(Filename, pcb_false, fmt); if (SWAP_IDENT) pcb_swap_buffers(); return (result); @@ -560,15 +560,15 @@ /* --------------------------------------------------------------------------- * save PCB */ -int SavePCB(const char *file, const char *fmt) +int pcb_save_pcb(const char *file, const char *fmt) { int retcode; if (gui->notify_save_pcb == NULL) - return WritePipe(file, pcb_true, fmt); + return pcb_write_pipe(file, pcb_true, fmt); gui->notify_save_pcb(file, pcb_false); - retcode = WritePipe(file, pcb_true, fmt); + retcode = pcb_write_pipe(file, pcb_true, fmt); gui->notify_save_pcb(file, pcb_true); return retcode; @@ -578,7 +578,7 @@ /* --------------------------------------------------------------------------- * Load PCB */ -int LoadPCB(const char *file, const char *fmt, pcb_bool require_font, int how) +int pcb_load_pcb(const char *file, const char *fmt, pcb_bool require_font, int how) { return real_load_pcb(file, fmt, pcb_false, require_font, how); } @@ -586,7 +586,7 @@ /* --------------------------------------------------------------------------- * Revert PCB */ -int RevertPCB(void) +int pcb_revert_pcb(void) { return real_load_pcb(PCB->Filename, NULL, pcb_true, pcb_true, pcb_true); } @@ -594,7 +594,7 @@ /* --------------------------------------------------------------------------- * writes the quoted string created by another subroutine */ -void PrintQuotedString(FILE * FP, const char *S) +void pcb_print_quoted_string(FILE * FP, const char *S) { const char *start; @@ -620,7 +620,7 @@ * this is used for fatal errors and does not call the program specified * in 'saveCommand' for safety reasons */ -void SaveInTMP(void) +void pcb_save_in_tmp(void) { char filename[256]; @@ -628,25 +628,25 @@ if (PCB && PCB->Changed && (conf_core.rc.emergency_name != NULL) && (*conf_core.rc.emergency_name != '\0')) { sprintf(filename, conf_core.rc.emergency_name, (long int)pcb_getpid()); pcb_message(PCB_MSG_DEFAULT, _("Trying to save your layout in '%s'\n"), filename); - WritePCBFile(filename, pcb_true, DEFAULT_FMT, pcb_true); + pcb_write_pcb_file(filename, pcb_true, DEFAULT_FMT, pcb_true); } } /* --------------------------------------------------------------------------- - * front-end for 'SaveInTMP()' + * front-end for 'pcb_save_in_tmp()' * just makes sure that the routine is only called once */ static pcb_bool dont_save_any_more = pcb_false; -void EmergencySave(void) +void pcb_emergency_save(void) { if (!dont_save_any_more) { dont_save_any_more = pcb_true; - SaveInTMP(); + pcb_save_in_tmp(); } } -void DisableEmergencySave(void) +void pcb_disable_emergency_save(void) { dont_save_any_more = pcb_true; } @@ -659,18 +659,18 @@ /* * If the backup interval is > 0 then set another timer. Otherwise - * we do nothing and it is up to the GUI to call EnableAutosave() + * we do nothing and it is up to the GUI to call pcb_enable_autosave() * after setting conf_core.rc.backup_interval > 0 again. */ static void backup_cb(pcb_hidval_t data) { backup_timer.ptr = NULL; - Backup(); + pcb_backup(); if (conf_core.rc.backup_interval > 0 && gui->add_timer) backup_timer = gui->add_timer(backup_cb, 1000 * conf_core.rc.backup_interval, data); } -void EnableAutosave(void) +void pcb_enable_autosave(void) { pcb_hidval_t x; @@ -691,7 +691,7 @@ * a "-" appended (like "foo.pcb-") and if we don't have a pcb file name * then use the template in conf_core.rc.backup_name */ -void Backup(void) +void pcb_backup(void) { char *filename = NULL; @@ -698,7 +698,7 @@ if (PCB && PCB->Filename) { filename = (char *) malloc(sizeof(char) * (strlen(PCB->Filename) + 2)); if (filename == NULL) { - fprintf(stderr, "Backup(): malloc failed\n"); + fprintf(stderr, "pcb_backup(): malloc failed\n"); exit(1); } sprintf(filename, "%s-", PCB->Filename); @@ -707,12 +707,12 @@ /* conf_core.rc.backup_name has %.8i which will be replaced by the process ID */ filename = pcb_build_fn(conf_core.rc.backup_name); if (filename == NULL) { - fprintf(stderr, "Backup(): can't build file name for a backup\n"); + fprintf(stderr, "pcb_backup(): can't build file name for a backup\n"); exit(1); } } - WritePCBFile(filename, pcb_true, DEFAULT_FMT, pcb_true); + pcb_write_pcb_file(filename, pcb_true, DEFAULT_FMT, pcb_true); free(filename); } @@ -726,7 +726,7 @@ void SaveTMPData(void) { char *fn = pcb_build_fn(conf_core.rc.emergency_name); - WritePCBFile(fn, pcb_true, DEFAULT_FMT, pcb_true); + pcb_write_pcb_file(fn, pcb_true, DEFAULT_FMT, pcb_true); if (TMPFilename != NULL) free(TMPFilename); TMPFilename = fn; @@ -756,7 +756,7 @@ /* --------------------------------------------------------------------------- * writes PCB to file */ -int WritePCBFile(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency) +int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency) { FILE *fp; int result, overwrite; @@ -802,7 +802,7 @@ * writes to pipe using the command defined by conf_core.rc.save_command * %f are replaced by the passed filename */ -int WritePipe(const char *Filename, pcb_bool thePcb, const char *fmt) +int pcb_write_pipe(const char *Filename, pcb_bool thePcb, const char *fmt) { FILE *fp; int result; @@ -810,7 +810,7 @@ static gds_t command; if (PCB_EMPTY_STRING_P(conf_core.rc.save_command)) - return WritePCBFile(Filename, thePcb, fmt, pcb_false); + return pcb_write_pcb_file(Filename, thePcb, fmt, pcb_false); /* setup commandline */ gds_truncate(&command,0); Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 4983) +++ trunk/src/plug_io.h (revision 4984) @@ -98,23 +98,23 @@ int pcb_write_element_data(FILE *f, pcb_data_t *e, const char *fmt); /********** common function used to be part of file.[ch] and friends **********/ -FILE *CheckAndOpenFile(const char *, pcb_bool, pcb_bool, pcb_bool *, pcb_bool *); -FILE *OpenConnectionDataFile(void); -int SavePCB(const char *, const char *fmt); -int LoadPCB(const char *name, const char *fmt, pcb_bool, int how); /* how: 0=normal pcb; 1=default.pcb, 2=misc (do not load settings) */ -void EnableAutosave(void); -void Backup(void); -void SaveInTMP(void); -void EmergencySave(void); -void DisableEmergencySave(void); -int RevertPCB(void); -int SaveBufferElements(const char *, const char *fmt); +FILE *pcb_check_and_open_file(const char *, pcb_bool, pcb_bool, pcb_bool *, pcb_bool *); +FILE *pcb_open_connection_file(void); +int pcb_save_pcb(const char *, const char *fmt); +int pcb_load_pcb(const char *name, const char *fmt, pcb_bool, int how); /* how: 0=normal pcb; 1=default.pcb, 2=misc (do not load settings) */ +void pcb_enable_autosave(void); +void pcb_backup(void); +void pcb_save_in_tmp(void); +void pcb_emergency_save(void); +void pcb_disable_emergency_save(void); +int pcb_revert_pcb(void); +int pcb_save_buffer_elements(const char *, const char *fmt); void pcb_sort_netlist(void); -void PrintQuotedString(FILE *, const char *); -void sort_library(pcb_lib_t *lib); -void set_some_route_style(); -int WritePCBFile(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency); -int WritePipe(const char *, pcb_bool, const char *fmt); +void pcb_print_quoted_string(FILE *, const char *); +void pcb_library_sort(pcb_lib_t *lib); +void pcb_set_some_route_style(); +int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency); +int pcb_write_pipe(const char *, pcb_bool, const char *fmt); #ifndef HAS_ATEXIT void SaveTMPData(void); Index: trunk/src_plugins/hid_gtk/gui-config.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-config.c (revision 4983) +++ trunk/src_plugins/hid_gtk/gui-config.c (revision 4984) @@ -431,7 +431,7 @@ i = gtk_spin_button_get_value_as_int(spin_button); sprintf(s, "%d", i); conf_set(CFR_DESIGN, "rc/backup_interval", -1, s, POL_OVERWRITE); - EnableAutosave(); + pcb_enable_autosave(); } static void config_history_spin_button_cb(GtkSpinButton * spin_button, gpointer data) Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4983) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4984) @@ -163,7 +163,7 @@ _gui->info_bar = NULL; if (response_id == GTK_RESPONSE_ACCEPT) - RevertPCB(); + pcb_revert_pcb(); } static void close_file_modified_externally_prompt(void) Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 4983) +++ trunk/src_plugins/io_kicad/write.c (revision 4984) @@ -580,7 +580,7 @@ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); */ @@ -623,7 +623,7 @@ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); */ @@ -695,7 +695,7 @@ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); */ @@ -835,11 +835,11 @@ information fprintf(FP, "\nDS %s ", F2S(element, PCB_TYPE_ELEMENT)); - PrintQuotedString(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(VALUE_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(VALUE_NAME(element))); pcb_fprintf(FP, " %mm %mm %mm %mm %d %d %s]\n(\n", element->MarkX, element->MarkY, DESCRIPTION_TEXT(element).X - element->MarkX, @@ -917,7 +917,7 @@ pin->Y - element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Number)); if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pin)) { fputs(" R ",FP); /* square */ @@ -935,7 +935,7 @@ fputs("Ne 0 \"\"\n",FP); /* library parts have empty net descriptors */ /* - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Name)); fprintf(FP, " %s\n", F2S(pin, PCB_TYPE_PIN)); */ fputs("$EndPAD\n",FP); @@ -948,7 +948,7 @@ (pad->Point1.Y + pad->Point2.Y)/2- element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Number)); fputs(" R ",FP); /* rectangular, not a pin */ if ((pad->Point1.X-pad->Point2.X) <= 0 @@ -1161,7 +1161,7 @@ pinlist_foreach(&element->Pin, &it, pin) { fprintf(FP, "%*s", indentation + 2, ""); fputs("(pad ", FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Number)); if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pin)) { fputs(" thru_hole rect ",FP); /* square */ } else { @@ -1170,7 +1170,7 @@ pcb_fprintf(FP, "(at %.3mm %.3mm)", /* positions of pad */ pin->X - element->MarkX, pin->Y - element->MarkY); - /* PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Number)); */ + /* pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Number)); */ pcb_fprintf(FP, " (size %.3mm %.3mm)", pin->Thickness, pin->Thickness); /* height = width */ /* drill details; size */ pcb_fprintf(FP, " (drill %.3mm)\n", pin->DrillingHole); @@ -1185,7 +1185,7 @@ } fprintf(FP, "%*s)\n", indentation + 2, ""); /* - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Name)); fprintf(FP, " %s\n", F2S(pin, PCB_TYPE_PIN)); */ } @@ -1197,7 +1197,7 @@ (pad->Point1.Y + pad->Point2.Y)/2- element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Number)); fputs(" R ",FP); /* rectangular, not a pin */ if ((pad->Point1.X-pad->Point2.X) <= 0 Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 4983) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 4984) @@ -539,7 +539,7 @@ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); */ @@ -584,7 +584,7 @@ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); */ @@ -659,7 +659,7 @@ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); */ @@ -795,11 +795,11 @@ information fprintf(FP, "\nDS %s ", F2S(element, PCB_TYPE_ELEMENT)); - PrintQuotedString(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(VALUE_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(VALUE_NAME(element))); pcb_fprintf(FP, " %mm %mm %mm %mm %d %d %s]\n(\n", element->MarkX, element->MarkY, DESCRIPTION_TEXT(element).X - element->MarkX, @@ -877,7 +877,7 @@ pin->Y - element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Number)); if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pin)) { fputs(" R ",FP); /* square */ @@ -895,7 +895,7 @@ fputs("Ne 0 \"\"\n",FP); /* library parts have empty net descriptors */ /* - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Name)); fprintf(FP, " %s\n", F2S(pin, PCB_TYPE_PIN)); */ fputs("$EndPAD\n",FP); @@ -908,7 +908,7 @@ (pad->Point1.Y + pad->Point2.Y)/2- element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Number)); fputs(" R ",FP); /* rectangular, not a pin */ if ((pad->Point1.X-pad->Point2.X) <= 0 @@ -1055,7 +1055,7 @@ pin->Y - element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Number)); if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pin)) { fputs(" R ",FP); /* square */ @@ -1078,7 +1078,7 @@ fprintf(FP, "Ne 0 \"\"\n"); /* unconnected pads have zero for net */ } /* - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Name)); fprintf(FP, " %s\n", F2S(pin, PCB_TYPE_PIN)); */ fputs("$EndPAD\n",FP); @@ -1091,7 +1091,7 @@ (pad->Point1.Y + pad->Point2.Y)/2- element->MarkY); fputs("Sh ",FP); /* pin shape descriptor */ - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Number)); fputs(" R ",FP); /* rectangular, not a pin */ if ((pad->Point1.X-pad->Point2.X) <= 0 Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 4983) +++ trunk/src_plugins/io_pcb/file.c (revision 4984) @@ -237,7 +237,7 @@ fprintf(FP, "FileVersion[%i]\n", PCBFileVersionNeeded()); fputs("\nPCB[", FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(PCB->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(PCB->Name)); pcb_fprintf(FP, " %[0] %[0]]\n\n", PCB->MaxWidth, PCB->MaxHeight); pcb_fprintf(FP, "Grid[%[0] %[0] %[0] %d]\n", PCB->Grid, PCB->GridOffsetX, PCB->GridOffsetY, conf_core.editor.draw_grid); pcb_fprintf(FP, "Cursor[%[0] %[0] %s]\n", Crosshair.X, Crosshair.Y, c_dtostr(PCB->Zoom)); @@ -301,7 +301,7 @@ pinlist_foreach(&Data->Via, &it, via) { pcb_fprintf(FP, "Via[%[0] %[0] %[0] %[0] %[0] %[0] ", via->X, via->Y, via->Thickness, via->Clearance, via->Mask, via->DrillingHole); - PrintQuotedString(FP, (char *) PCB_EMPTY(via->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(via->Name)); fprintf(FP, " %s]\n", F2S(via, PCB_TYPE_VIA)); } } @@ -335,14 +335,14 @@ for (n = 0; n < PCB->NetlistLib[NETLIST_INPUT].MenuN; n++) { pcb_lib_menu_t *menu = &PCB->NetlistLib[NETLIST_INPUT].Menu[n]; fprintf(FP, "\tNet("); - PrintQuotedString(FP, &menu->Name[2]); + pcb_print_quoted_string(FP, &menu->Name[2]); fprintf(FP, " "); - PrintQuotedString(FP, (char *) PCB_UNKNOWN(menu->Style)); + pcb_print_quoted_string(FP, (char *) PCB_UNKNOWN(menu->Style)); fprintf(FP, ")\n\t(\n"); for (p = 0; p < menu->EntryN; p++) { pcb_lib_entry_t *entry = &menu->Entry[p]; fprintf(FP, "\t\tConnect("); - PrintQuotedString(FP, entry->ListEntry); + pcb_print_quoted_string(FP, entry->ListEntry); fprintf(FP, ")\n"); } fprintf(FP, "\t)\n"); @@ -386,11 +386,11 @@ * both names of an element */ fprintf(FP, "\nElement[%s ", F2S(element, PCB_TYPE_ELEMENT)); - PrintQuotedString(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(DESCRIPTION_NAME(element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(NAMEONPCB_NAME(element))); fputc(' ', FP); - PrintQuotedString(FP, (char *) PCB_EMPTY(VALUE_NAME(element))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(VALUE_NAME(element))); pcb_fprintf(FP, " %[0] %[0] %[0] %[0] %d %d %s]\n(\n", element->MarkX, element->MarkY, DESCRIPTION_TEXT(element).X - element->MarkX, @@ -402,9 +402,9 @@ pcb_fprintf(FP, "\tPin[%[0] %[0] %[0] %[0] %[0] %[0] ", pin->X - element->MarkX, pin->Y - element->MarkY, pin->Thickness, pin->Clearance, pin->Mask, pin->DrillingHole); - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Name)); fprintf(FP, " "); - PrintQuotedString(FP, (char *) PCB_EMPTY(pin->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pin->Number)); fprintf(FP, " %s]\n", F2S(pin, PCB_TYPE_PIN)); } pinlist_foreach(&element->Pad, &it, pad) { @@ -412,9 +412,9 @@ pad->Point1.X - element->MarkX, pad->Point1.Y - element->MarkY, pad->Point2.X - element->MarkX, pad->Point2.Y - element->MarkY, pad->Thickness, pad->Clearance, pad->Mask); - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Name)); fprintf(FP, " "); - PrintQuotedString(FP, (char *) PCB_EMPTY(pad->Number)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pad->Number)); fprintf(FP, " %s]\n", F2S(pad, PCB_TYPE_PAD)); } linelist_foreach(&element->Line, &it, line) { @@ -447,7 +447,7 @@ /* write information about non empty layers */ if (!LAYER_IS_PCB_EMPTY(layer) || (layer->Name && *layer->Name)) { fprintf(FP, "Layer(%i ", (int) Number + 1); - PrintQuotedString(FP, (char *) PCB_EMPTY(layer->Name)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t"); @@ -463,7 +463,7 @@ } textlist_foreach(&layer->Text, &it, text) { pcb_fprintf(FP, "\tText[%[0] %[0] %d %d ", text->X, text->Y, text->Direction, text->Scale); - PrintQuotedString(FP, (char *) PCB_EMPTY(text->TextString)); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(text->TextString)); fprintf(FP, " %s]\n", F2S(text, PCB_TYPE_TEXT)); } textlist_foreach(&layer->Polygon, &it, polygon) { Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 4983) +++ trunk/src_plugins/shand_cmd/command.c (revision 4984) @@ -127,7 +127,7 @@ } if (!PCB->Changed || gui->confirm_dialog("OK to override layout data?", 0)) - LoadPCB(filename, format, pcb_true, 0); + pcb_load_pcb(filename, format, pcb_true, 0); return (0); } @@ -316,7 +316,7 @@ switch (argc) { case 0: if (PCB->Filename) { - if (SavePCB(PCB->Filename, NULL) == 0) + if (pcb_save_pcb(PCB->Filename, NULL) == 0) SetChangedFlag(pcb_false); } else @@ -324,7 +324,7 @@ break; case 1: - if (SavePCB(argv[0], NULL) == 0) { + if (pcb_save_pcb(argv[0], NULL) == 0) { SetChangedFlag(pcb_false); free(PCB->Filename); PCB->Filename = pcb_strdup(argv[0]);