Rename p3 in load_igen to gen_list

This commit is contained in:
Marcus Weseloh 2021-03-14 20:51:10 +01:00
parent b506304bef
commit bc2afb682b

View file

@ -1878,7 +1878,8 @@ static int load_imod(SFData *sf, int size)
/* load instrument generators (see load_pgen for loading rules) */
static int load_igen(SFData *sf, int size)
{
fluid_list_t *p, *p2, *p3, *dup, **hz = NULL;
fluid_list_t *p, *p2, *dup, **hz = NULL;
fluid_list_t *gen_list;
SFZone *z;
SFGen *g;
SFGenAmount genval;
@ -1904,9 +1905,9 @@ static int load_igen(SFData *sf, int size)
/* traverse this instrument's zones */
level = 0;
z = (SFZone *)(p2->data);
p3 = z->gen;
gen_list = z->gen;
while(p3)
while(gen_list)
{
/* load zone's generators */
dup = NULL;
@ -1984,7 +1985,7 @@ static int load_igen(SFData *sf, int size)
return FALSE;
}
p3->data = g;
gen_list->data = g;
g->id = genid;
}
else
@ -2005,18 +2006,18 @@ static int load_igen(SFData *sf, int size)
if(!drop)
{
p3 = fluid_list_next(p3); /* next gen */
gen_list = fluid_list_next(gen_list); /* next gen */
}
else
{
SLADVREM(z->gen, p3);
SLADVREM(z->gen, gen_list);
}
} /* generator loop */
if(level == 3)
{
SLADVREM(z->gen, p3); /* zone has sample? */
SLADVREM(z->gen, gen_list); /* zone has sample? */
}
else
{
@ -2046,7 +2047,7 @@ static int load_igen(SFData *sf, int size)
}
}
while(p3)
while(gen_list)
{
/* Kill any zones following a sample */
discarded = TRUE;
@ -2058,7 +2059,7 @@ static int load_igen(SFData *sf, int size)
}
FSKIP(sf, SF_GEN_SIZE);
SLADVREM(z->gen, p3);
SLADVREM(z->gen, gen_list);
}
p2 = fluid_list_next(p2); /* next zone */