gestion des signaux non-assignes

This commit is contained in:
Francois Donnet 2003-01-13 10:56:39 +00:00
parent 056ab8754b
commit 7ec025703f
3 changed files with 32 additions and 1 deletions

View File

@ -144,6 +144,9 @@ char *str2;
fprintf (stderr, "pattern is loaded while the scheduler isn't empty\n");
break;
case 109:
fprintf (stderr, "signal `%s` never assigned\n", str1);
break;
case 112:
fprintf (stderr, "driver conflict on `%s`\n", str1);
break;

View File

@ -52,6 +52,9 @@ unsigned int mode ;
struct bebus *pt_bebus ;
struct bebux *pt_bebux ;
struct bereg *pt_bereg ;
struct berin *pt_berin;
struct beaux *pred_beaux ;
struct berin *pred_berin ;
int err_flg = 0;
/* ###------------------------------------------------------### */
@ -88,10 +91,32 @@ unsigned int mode ;
/* ###------------------------------------------------------### */
pt_beaux = pt_befig->BEAUX;
pred_beaux = NULL;
while (pt_beaux != NULL)
{
if (pt_beaux->ABL == NULL)
err_flg += beh_error (40, pt_beaux->NAME);
{
fprintf (stderr, "BEH : Warning %d: ", 40);
fprintf (stderr, "signal `%s` never assigned\n", pt_beaux->NAME);
/*removing signal*/
if ( pred_beaux ) pred_beaux->NEXT = pt_beaux->NEXT;
else pt_befig->BEAUX = pt_beaux->NEXT;
/*removing other ref to signal*/
pred_berin = NULL;
for ( pt_berin = pt_befig->BERIN; pt_berin; pt_berin = pt_berin->NEXT )
{
if ( pt_berin->NAME == pt_beaux->NAME )
{
if ( pred_berin ) pred_berin->NEXT = pt_berin->NEXT;
else pt_befig->BERIN = pt_berin->NEXT;
break;
}
pred_berin = pt_berin;
}
}
else pred_beaux = pt_beaux;
pt_beaux = pt_beaux->NEXT;
}

View File

@ -92,7 +92,10 @@ struct chain *pt_exp;
value = gethtitem (rin_list, tmp_chain->DATA);
if (value == EMPTYHT)
{
pt_fig->ERRFLG = beh_error (3, tmp_chain->DATA);
exit( pt_fig->ERRFLG );
}
else
tmp_chain->DATA = (void *) value;