inpcom.c: rename num_lib_names --> num_sections

This commit is contained in:
rlar 2013-02-24 19:12:10 +01:00
parent 20cdd5b731
commit 7c4255fc5c
1 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ static char *library_name[1000][1000];
static struct line *library_ll_ptr[1000][1000]; static struct line *library_ll_ptr[1000][1000];
static struct line *libraries[1000]; static struct line *libraries[1000];
static int num_libraries; static int num_libraries;
static int num_lib_names[1000]; static int num_sections[1000];
static char *global; static char *global;
static char *subckt_w_params[1000]; static char *subckt_w_params[1000];
static int num_subckt_w_params; static int num_subckt_w_params;
@ -116,7 +116,7 @@ find_lib(char *s)
static int static int
find_section(int i, char *s) { find_section(int i, char *s) {
int j; int j;
for (j = 0; j < num_lib_names[i]; j++) for (j = 0; j < num_sections[i]; j++)
if (strcmp(library_name[i][j], s) == 0) if (strcmp(library_name[i][j], s) == 0)
return j; return j;
return -1; return -1;
@ -125,8 +125,8 @@ find_section(int i, char *s) {
static void static void
remember_section_ref(int i, char *y, struct line *c) { remember_section_ref(int i, char *y, struct line *c) {
library_ll_ptr[i][num_lib_names[i]] = c; library_ll_ptr[i][num_sections[i]] = c;
library_name[i][num_lib_names[i]++] = strdup(y); library_name[i][num_sections[i]++] = strdup(y);
} }
@ -2417,7 +2417,7 @@ inp_init_lib_data(void)
int i; int i;
for (i = 0; i < num_libraries; i++) for (i = 0; i < num_libraries; i++)
num_lib_names[i] = 0; num_sections[i] = 0;
} }