Browse Source

inpcom.c, cleanup `inp_reorder_params()', swallow `end'

pre-master-46
rlar 11 years ago
parent
commit
a842144e02
  1. 16
      src/frontend/inpcom.c

16
src/frontend/inpcom.c

@ -115,7 +115,7 @@ static void inp_fix_inst_calls_for_numparam(struct names *subckt_w_params, struc
static void inp_expand_macros_in_func(struct function_env *);
static struct line *inp_expand_macros_in_deck(struct function_env *, struct line *deck);
static void inp_fix_param_values(struct line *deck);
static void inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line *list_head, struct line *end);
static void inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line *list_head);
static int inp_split_multi_param_lines(struct line *deck, int line_number);
static void inp_sort_params(struct line *start_card, struct line *end_card, struct line *card_bf_start, struct line *s_c, struct line *e_c);
static char *inp_remove_ws(char *s);
@ -501,7 +501,7 @@ inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile)
unsigned int no_braces; /* number of '{' */
size_t max_line_length; /* max. line length in input deck */
struct line *tmp_ptr1, *end;
struct line *tmp_ptr1;
struct names *subckt_w_params = new_names();
struct line *working = cc->li_next;
@ -524,10 +524,7 @@ inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile)
inp_expand_macros_in_deck(NULL, working);
inp_fix_param_values(working);
for (end = cc; end->li_next; end = end->li_next)
;
inp_reorder_params(subckt_w_params, working, cc, end);
inp_reorder_params(subckt_w_params, working, cc);
inp_fix_inst_calls_for_numparam(subckt_w_params, working);
delete_names(subckt_w_params);
@ -3882,7 +3879,7 @@ inp_reorder_params_subckt(struct names *subckt_w_params, struct line *subckt_car
static void
inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line *list_head, struct line *end)
inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line *list_head)
{
struct line *first_param_card = NULL;
struct line *last_param_card = NULL;
@ -3890,6 +3887,11 @@ inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line
struct line *prev_card = list_head;
struct line *c = deck;
struct line *end;
for (end = list_head; end->li_next; end = end->li_next)
;
/* move .param lines to beginning of deck */
while (c != NULL) {

Loading…
Cancel
Save