Merge branch 'pre-master' into bt_dev

This commit is contained in:
Brian Taylor 2022-10-26 19:34:42 -07:00
commit 3037aa2838
3 changed files with 27 additions and 3 deletions

View File

@ -1878,8 +1878,12 @@ void create_circbyline(char *line, bool reset, bool lastline)
circarray = TREALLOC(char *, circarray, n_elem_alloc);
}
/* Remove any leading whitespace by shifting */
char *p_src = skip_ws(line);
/* return if line is empty */
if (*p_src == '\0')
return;
/* Remove any leading whitespace by shifting */
if (p_src != line) {
char *p_dst = line;
char ch_cur;
@ -1899,7 +1903,7 @@ void create_circbyline(char *line, bool reset, bool lastline)
* free the deck. The card allocations themselves will be freed
* elsewhere */
if (ciprefix(".end", line) && (line[4] == '\0' || isspace_c(line[4]))) {
circarray[linec] = NULL; /* termiante the deck */
circarray[linec] = NULL; /* terminate the deck */
inp_spsource((FILE *) NULL, FALSE, NULL, TRUE); /* process */
tfree(circarray); /* set to empty */
linec = 0;

View File

@ -365,12 +365,16 @@ Commands are executed immediately */
IMPEXP
int ngSpice_Command(char* command);
/* get info about a vector */
IMPEXP
pvector_info ngGet_Vec_Info(char* vecname);
#ifdef XSPICE
/* Set the input path for files loaded by code models.
If NULL is sent, return the current Infile_Path. */
IMPEXP
char* ngCM_Input_Path(const char* path);
/* get info about the event node vector */
IMPEXP
pevt_shared_data ngGet_Evt_NodeInfo(char* nodename);

View File

@ -1085,6 +1085,22 @@ int ngSpice_Command(char* comexec)
return 1;
}
#ifdef XSPICE
/* Set the input path for files loaded by code models.
If NULL is sent, return the current Infile_Path. */
IMPEXP
char *ngCM_Input_Path(const char* path)
{
/* delete existing command memory */
if (path) {
txfree(Infile_Path);
Infile_Path = copy(path);
}
fprintf(stdout, "Note: Codel model file loading path is %s\n", Infile_Path);
return Infile_Path;
}
#endif
/* Return information about a vector to the caller */
IMPEXP
pvector_info ngGet_Vec_Info(char* vecname)