Ancora non ci siamo...ti faccio vedere il main come lo farei io:
Codice:
int main ()
{
struct richiesta * testa_stack = NULL;
struct elemento *testa_lista = NULL;
struct elemento *elem = NULL;
struct richiesta * y = NULL;
int codice, esci;
while(!esci)
{
esci = 1;
elem = preleva_richiesta_da_stack(&testa_stack, &y);
codice = elabora_elemento_stack(y);
if(codice >= 1 && codice <= 1024)
{
esci = 0;
in_lista_ordinata(&testa_lista, &elem);
}
}
return 0;
}