Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 28444) +++ trunk/src/hid_cam.c (revision 28445) @@ -62,7 +62,8 @@ dst->fn = pcb_strdup_subst(dst->fn_template, cam_update_name_cb, &ctx, PCB_SUBST_HOME | PCB_SUBST_PERCENT | PCB_SUBST_CONF); } -char *pcb_layer_to_file_name(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) + +char *pcb_layer_to_file_name_append(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) { const pcb_virt_layer_t *v; pcb_layergrp_id_t group; @@ -73,7 +74,6 @@ if (flags == 0) flags = pcb_layer_flags(PCB, lid); - dest->used = 0; if (style == PCB_FNS_pcb_rnd) { const char *sloc, *styp; @@ -154,7 +154,13 @@ return dest->array; } +char *pcb_layer_to_file_name(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) +{ + dest->used = 0; + return pcb_layer_to_file_name_append(dest, lid, flags, purpose, purpi, style); +} + char *pcb_derive_default_filename_(const char *pcbfile, const char *suffix) { char *buf; Index: trunk/src/hid_cam.h =================================================================== --- trunk/src/hid_cam.h (revision 28444) +++ trunk/src/hid_cam.h (revision 28445) @@ -89,6 +89,7 @@ /* Returns a filename base that can be used to output the layer. The file name is built in dest, the returned pointer is pointing to the array of dest. */ char *pcb_layer_to_file_name(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style); +char *pcb_layer_to_file_name_append(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style); /* Returns a filename base that can be used to output the layer; if flags is 0, look it up. Copies result in dest (which should be at least PCB_DERIVE_FN_SUFF_LEN bytes wide). */