use find_file_first instead of find_file in C code

This commit is contained in:
stefan schippers 2023-05-24 09:12:29 +02:00
parent 694bc631a0
commit 5e90f5c319
2 changed files with 8 additions and 8 deletions

View File

@ -971,8 +971,8 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710
int use_label_prefix;
int found=0;
my_strdup(_ALLOC_ID_, &symname_pin, tcleval("rel_sym_path [find_file lab_pin.sym]"));
my_strdup(_ALLOC_ID_, &symname_wire, tcleval("rel_sym_path [find_file lab_wire.sym]"));
my_strdup(_ALLOC_ID_, &symname_pin, tcleval("rel_sym_path [find_file_first lab_pin.sym]"));
my_strdup(_ALLOC_ID_, &symname_wire, tcleval("rel_sym_path [find_file_first lab_wire.sym]"));
if(symname_pin && symname_wire) {
rebuild_selected_array();
k = xctx->lastsel;
@ -1126,10 +1126,10 @@ void delete_files(void)
void place_net_label(int type)
{
if(type == 1) {
const char *lab = tcleval("rel_sym_path [find_file lab_pin.sym]");
const char *lab = tcleval("rel_sym_path [find_file_first lab_pin.sym]");
place_symbol(-1, lab, xctx->mousex_snap, xctx->mousey_snap, 0, 0, NULL, 4, 1, 1/*to_push_undo*/);
} else {
const char *lab = tcleval("rel_sym_path [find_file lab_wire.sym]");
const char *lab = tcleval("rel_sym_path [find_file_first lab_wire.sym]");
place_symbol(-1, lab, xctx->mousex_snap, xctx->mousey_snap, 0, 0, NULL, 4, 1, 1/*to_push_undo*/);
}
move_objects(START,0,0,0);

View File

@ -3941,10 +3941,10 @@ void create_sch_from_sym(void)
char *sch = NULL;
size_t ln;
my_strdup(_ALLOC_ID_, &pinname[0], tcleval("rel_sym_path [find_file ipin.sym]"));
my_strdup(_ALLOC_ID_, &pinname[1], tcleval("rel_sym_path [find_file opin.sym]"));
my_strdup(_ALLOC_ID_, &pinname[2], tcleval("rel_sym_path [find_file iopin.sym]"));
my_strdup(_ALLOC_ID_, &generic_pin, tcleval("rel_sym_path [find_file generic_pin.sym]"));
my_strdup(_ALLOC_ID_, &pinname[0], tcleval("rel_sym_path [find_file_first ipin.sym]"));
my_strdup(_ALLOC_ID_, &pinname[1], tcleval("rel_sym_path [find_file_first opin.sym]"));
my_strdup(_ALLOC_ID_, &pinname[2], tcleval("rel_sym_path [find_file_first iopin.sym]"));
my_strdup(_ALLOC_ID_, &generic_pin, tcleval("rel_sym_path [find_file_first generic_pin.sym]"));
if(pinname[0] && pinname[1] && pinname[2] && generic_pin) {
rebuild_selected_array();