inpcom.c, inp_sort_params(), use insert_deck()

This commit is contained in:
rlar 2017-04-22 21:18:44 +02:00
parent a26ec804cb
commit 76bbaf4ac3
1 changed files with 2 additions and 5 deletions

View File

@ -3722,7 +3722,7 @@ inp_sort_params(struct line *param_cards, struct line *card_bf_start, struct lin
{
int i, j, num_params, ind = 0, max_level;
struct line *c, *tail;
struct line *c;
int skipped;
int arr_size;
@ -3787,18 +3787,15 @@ inp_sort_params(struct line *param_cards, struct line *card_bf_start, struct lin
}
c = card_bf_start;
tail = c->li_next;
ind = 0;
for (i = 0; i <= max_level; i++)
for (j = 0; j < num_params; j++)
if (!deps[j].skip && deps[j].level == i) {
c = c->li_next = deps[j].card;
c = insert_deck(c, deps[j].card);
ind++;
}
c->li_next = tail;
num_params -= skipped;
if (ind != num_params) {
fprintf(stderr, "ERROR: found wrong number of parameters during levelization ( %d instead of %d parameter s)!\n", ind, num_params);