Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 27330) +++ trunk/src/plug_io.c (revision 27331) @@ -374,13 +374,13 @@ } -int pcb_write_buffer(FILE *f, pcb_buffer_t *buff, const char *fmt, pcb_bool elem_only) +int pcb_write_buffer(FILE *f, pcb_buffer_t *buff, const char *fmt, pcb_bool subc_only) { int res/*, newfmt = 0*/; - pcb_plug_io_t *p = find_writer(elem_only ? PCB_IOT_BUFFER_SUBC : PCB_IOT_BUFFER, fmt); + pcb_plug_io_t *p = find_writer(subc_only ? PCB_IOT_BUFFER_SUBC : PCB_IOT_BUFFER, fmt); if (p != NULL) { - if (elem_only) + if (subc_only) res = p->write_buffer_subc(p, f, buff, 0); else res = p->write_buffer(p, f, buff); @@ -588,7 +588,7 @@ } /* Write the pcb file, a footprint or a buffer */ -static int pcb_write_file(FILE *fp, pcb_bool thePcb, const char *old_path, const char *new_path, const char *fmt, pcb_bool emergency, pcb_bool elem_only) +static int pcb_write_file(FILE *fp, pcb_bool thePcb, const char *old_path, const char *new_path, const char *fmt, pcb_bool emergency, pcb_bool subc_only) { if (thePcb) { if (PCB->is_footprint) @@ -595,12 +595,12 @@ return pcb_write_footprint_data(fp, PCB->Data, fmt); return pcb_write_pcb(fp, old_path, new_path, fmt, emergency); } - return pcb_write_buffer(fp, PCB_PASTEBUFFER, fmt, elem_only); + return pcb_write_buffer(fp, PCB_PASTEBUFFER, fmt, subc_only); } /* writes to pipe using the command defined by conf_core.rc.save_command %f are replaced by the passed filename */ -static int pcb_write_pipe(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool elem_only) +static int pcb_write_pipe(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool subc_only) { FILE *fp; int result; @@ -609,7 +609,7 @@ const char *save_cmd; if (PCB_EMPTY_STRING_P(conf_core.rc.save_command)) - return pcb_write_pcb_file(Filename, thePcb, fmt, pcb_false, elem_only); + return pcb_write_pcb_file(Filename, thePcb, fmt, pcb_false, subc_only); save_cmd = conf_core.rc.save_command; /* setup commandline */ @@ -631,7 +631,7 @@ return (-1); } - result = pcb_write_file(fp, thePcb, NULL, NULL, fmt, pcb_false, elem_only); + result = pcb_write_file(fp, thePcb, NULL, NULL, fmt, pcb_false, subc_only); return (pcb_pclose(fp) ? (-1) : result); } @@ -849,7 +849,7 @@ free(filename); } -int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency, pcb_bool elem_only) +int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency, pcb_bool subc_only) { FILE *fp; int result, overwrite; @@ -879,7 +879,7 @@ return (-1); } - result = pcb_write_file(fp, thePcb, fn_tmp, Filename, fmt, emergency, elem_only); + result = pcb_write_file(fp, thePcb, fn_tmp, Filename, fmt, emergency, subc_only); fclose(fp); if (fn_tmp != NULL) { Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 27330) +++ trunk/src/plug_io.h (revision 27331) @@ -87,7 +87,7 @@ /* Write the idxth subcircuit from buffer to a file. Return 0 on success. */ int (*write_buffer_subc)(pcb_plug_io_t *ctx, FILE *f, pcb_buffer_t *buff, long idx); - /* Write element data to a file. Return 0 on success. */ + /* Write subcirciots from 'e' to a library file. Return 0 on success. */ int (*write_footprint)(pcb_plug_io_t *ctx, FILE *f, pcb_data_t *e); /* Write PCB to f; there's a copy of the file we are going to @@ -126,7 +126,7 @@ int pcb_parse_pcb(pcb_board_t *Ptr, const char *Filename, const char *fmt, int load_settings, int ignore_missing); int pcb_parse_footprint(pcb_data_t *Ptr, const char *name, const char *fmt); int pcb_parse_font(pcb_font_t *Ptr, const char *Filename); -int pcb_write_buffer(FILE *f, pcb_buffer_t *buff, const char *fmt, pcb_bool elem_only); +int pcb_write_buffer(FILE *f, pcb_buffer_t *buff, const char *fmt, pcb_bool subc_only); int pcb_write_footprint_data(FILE *f, pcb_data_t *e, const char *fmt); int pcb_write_font(pcb_font_t *Ptr, const char *Filename, const char *fmt); @@ -144,7 +144,7 @@ int pcb_save_buffer(const char *Filename, const char *fmt); void pcb_print_quoted_string_(FILE *, const char *); /* without wrapping in "" */ void pcb_print_quoted_string(FILE *, const char *); /* with wrapping in "" */ -int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency, pcb_bool elem_only); +int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency, pcb_bool subc_only); void pcb_set_design_dir(const char *fn); int pcb_load_buffer(pcb_hidlib_t *hidlib, pcb_buffer_t *buff, const char *fn, const char *fmt);