Browse Source

remove unused global artifact `dynLlen'

rlar 15 years ago
parent
commit
1876ad1094
  1. 6
      ChangeLog
  2. 20
      src/frontend/inpcom.c
  3. 3
      src/frontend/numparam/spicenum.c
  4. 1
      src/frontend/numparam/xpressn.c

6
ChangeLog

@ -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 2011-07-09 Robert Larice
* src/frontend/com_sysinfo.c , * src/frontend/com_sysinfo.c ,
* src/winmain.c : * src/winmain.c :

20
src/frontend/inpcom.c

@ -77,8 +77,6 @@ static COMPATMODE_T inp_compat_mode;
/* Collect information for dynamic allocation of numparam arrays */ /* Collect information for dynamic allocation of numparam arrays */
/* number of lines in input deck */ /* number of lines in input deck */
int dynmaxline; /* inpcom.c 1529 */ int dynmaxline; /* inpcom.c 1529 */
/* max. line length in input deck */
unsigned int dynLlen; /* inpcom.c 1526 */
/* number of lines in deck after expansion */ /* number of lines in deck after expansion */
int dynMaxckt = 0; /* subckt.c 307 */ int dynMaxckt = 0; /* subckt.c 307 */
/* number of parameter substitutions */ /* 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 = 1; /* sjb - renamed to avoid confusion with struct line */
int line_number_orig = 1, line_number_lib = 1, line_number_inc = 1; int line_number_orig = 1, line_number_lib = 1, line_number_inc = 1;
unsigned int no_braces = 0; /* number of '{' */ unsigned int no_braces = 0; /* number of '{' */
size_t max_line_length; /* max. line length in input deck */
FILE *newfp; FILE *newfp;
FILE *fdo; FILE *fdo;
struct line *tmp_ptr1 = NULL; 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 count the number of '{' per line as an upper estimate of the number
of parameter substitutions in a line*/ of parameter substitutions in a line*/
dynmaxline = 0; dynmaxline = 0;
dynLlen = 0;
max_line_length = 0;
for(tmp_ptr1 = cc; tmp_ptr1 != NULL; tmp_ptr1 = tmp_ptr1->li_next) { for(tmp_ptr1 = cc; tmp_ptr1 != NULL; tmp_ptr1 = tmp_ptr1->li_next) {
char *s; char *s;
unsigned int braces_per_line = 0; 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++; dynmaxline++;
/* renumber the lines of the processed input deck */ /* renumber the lines of the processed input deck */
tmp_ptr1->li_linenum = dynmaxline; 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 '{' */ /* count '{' */
for (s = tmp_ptr1->li_line; *s; s++) for (s = tmp_ptr1->li_line; *s; s++)
if (*s == '{') braces_per_line++; 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); (void) fclose(fdo);
fprintf(stdout, "max line length %d, max subst. per line %d, number of lines %d\n", 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;
} }
/*-------------------------------------------------------------------------* /*-------------------------------------------------------------------------*

3
src/frontend/numparam/spicenum.c

@ -39,9 +39,6 @@ extern long dynsubst; /* spicenum.c:144 */
/* number of lines in input deck */ /* number of lines in input deck */
extern int dynmaxline; /* inpcom.c:1529 */ 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 */ /* Uncomment this line to allow debug tracing */
/* #define TRACE_NUMPARAMS */ /* #define TRACE_NUMPARAMS */

1
src/frontend/numparam/xpressn.c

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

Loading…
Cancel
Save