remove unused global artifact `dynLlen'

This commit is contained in:
rlar 2011-07-09 18:45:54 +00:00
parent 7ecafe2aa3
commit 1876ad1094
4 changed files with 13 additions and 17 deletions

View File

@ -1,3 +1,9 @@
2011-07-09 Robert Larice
* src/frontend/inpcom.c ,
* src/frontend/numparam/spicenum.c ,
* src/frontend/numparam/xpressn.c' :
remove unused global artifact `dynLlen'
2011-07-09 Robert Larice
* src/frontend/com_sysinfo.c ,
* src/winmain.c :

View File

@ -77,8 +77,6 @@ static COMPATMODE_T inp_compat_mode;
/* Collect information for dynamic allocation of numparam arrays */
/* number of lines in input deck */
int dynmaxline; /* inpcom.c 1529 */
/* max. line length in input deck */
unsigned int dynLlen; /* inpcom.c 1526 */
/* number of lines in deck after expansion */
int dynMaxckt = 0; /* subckt.c 307 */
/* number of parameter substitutions */
@ -1109,6 +1107,9 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
int line_number = 1; /* sjb - renamed to avoid confusion with struct line */
int line_number_orig = 1, line_number_lib = 1, line_number_inc = 1;
unsigned int no_braces = 0; /* number of '{' */
size_t max_line_length; /* max. line length in input deck */
FILE *newfp;
FILE *fdo;
struct line *tmp_ptr1 = NULL;
@ -1684,7 +1685,7 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
count the number of '{' per line as an upper estimate of the number
of parameter substitutions in a line*/
dynmaxline = 0;
dynLlen = 0;
max_line_length = 0;
for(tmp_ptr1 = cc; tmp_ptr1 != NULL; tmp_ptr1 = tmp_ptr1->li_next) {
char *s;
unsigned int braces_per_line = 0;
@ -1692,8 +1693,8 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
dynmaxline++;
/* renumber the lines of the processed input deck */
tmp_ptr1->li_linenum = dynmaxline;
if (dynLlen < strlen(tmp_ptr1->li_line))
dynLlen = strlen(tmp_ptr1->li_line);
if (max_line_length < strlen(tmp_ptr1->li_line))
max_line_length = strlen(tmp_ptr1->li_line);
/* count '{' */
for (s = tmp_ptr1->li_line; *s; s++)
if (*s == '{') braces_per_line++;
@ -1708,15 +1709,8 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
(void) fclose(fdo);
fprintf(stdout, "max line length %d, max subst. per line %d, number of lines %d\n",
dynLlen, no_braces, dynmaxline);
(int) max_line_length, no_braces, dynmaxline);
}
/* max line length increased by maximum number of parameter substitutions per line
times parameter string length (25) */
dynLlen += no_braces * 25;
/* several times a string of length dynLlen is used for messages, thus give it a
minimum length */
if (dynLlen < 512) dynLlen = 512;
return;
}
/*-------------------------------------------------------------------------*

View File

@ -39,9 +39,6 @@ extern long dynsubst; /* spicenum.c:144 */
/* number of lines in input deck */
extern int dynmaxline; /* inpcom.c:1529 */
/* max. line length in input deck */
/* unsigned int dynLlen; No longer needed with d strings */ /* inpcom.c:1531 */
/* Uncomment this line to allow debug tracing */
/* #define TRACE_NUMPARAMS */

View File

@ -29,7 +29,6 @@ static SPICE_DSTRING fmathS ; /* all math functions */
extern char *nupa_inst_name; /* see spicenum.c */
extern long dynsubst; /* see inpcom.c */
extern unsigned int dynLlen;
#define MAX_STRING_INSERT 17 /* max. string length to be inserted and replaced */
#define ACT_CHARACTS 17 /* actual string length to be inserted and replaced */