- Redirected some stuff to stderr.

This commit is contained in:
ccremers 2004-05-12 14:07:56 +00:00
parent 97f178aee5
commit 93dfcf6370
3 changed files with 14 additions and 13 deletions

View File

@ -24,7 +24,7 @@ debug (int level, char *string)
if (debugCond (level))
{
indent ();
printf ("DEBUG [%i]: %s\n", level, string);
fprintf (stderr, "DEBUG [%i]: %s\n", level, string);
}
#endif
}

View File

@ -95,7 +95,7 @@ main (int argc, char **argv)
if (arg_nullcheck (argtable) != 0)
{
/* NULL entries were detected, some allocations must have failed */
printf ("%s: insufficient memory\n", progname);
fprintf (stderr, "%s: insufficient memory\n", progname);
exitcode = 1;
goto exit;
}
@ -168,10 +168,10 @@ main (int argc, char **argv)
/* Lutger-tries-to-test-with-broken-methods detector */
if (clp->count > 0)
{
printf ("For the time being, this method is not supported, \n");
printf ("as too many changes have been made to the normal \n");
printf ("matching logic, and CL simply isn't reliable in \nmany ");
printf ("ways. Try again in a few weeks.\n");
fprintf (stderr, "For the time being, this method is not supported, \n");
fprintf (stderr, "as too many changes have been made to the normal \n");
fprintf (stderr, "matching logic, and CL simply isn't reliable in \nmany ");
fprintf (stderr, "ways. Try again in a few weeks.\n");
exit(0);
}
@ -182,7 +182,7 @@ main (int argc, char **argv)
/* try to open */
if (!freopen (outfile->filename[0], "w", stdout))
{
printf("Could not create output file '%s'.\n", outfile->filename[0]);
fprintf(stderr, "Could not create output file '%s'.\n", outfile->filename[0]);
exit(1);
}
}
@ -194,7 +194,7 @@ main (int argc, char **argv)
{
if (!freopen (infile->filename[0], "r", stdin))
{
printf("Could not open input file '%s'.\n", infile->filename[0]);
fprintf(stderr, "Could not open input file '%s'.\n", infile->filename[0]);
exit(1);
}
}

View File

@ -194,7 +194,7 @@ explorify (const System sys, const int run)
rd = runPointerGet (sys, run);
if (rd == NULL)
{
printf ("ERROR: trying to progress completed run!\n");
fprintf (stderr, "ERROR: trying to progress completed run!\n");
exit (1);
}
@ -354,7 +354,7 @@ traversePOR (const System sys)
flag = block_clp (sys, phase);
break;
default:
printf ("Non existing clp switch.\n");
fprintf (stderr, "Non existing clp switch.\n");
exit (1);
}
}
@ -646,7 +646,7 @@ traversePOR2 (const System sys)
flag = block_clp (sys, phase);
break;
default:
printf ("Non existing clp switch.\n");
fprintf (stderr, "Non existing clp switch.\n");
exit (1);
}
}
@ -829,7 +829,7 @@ traversePOR4 (const System sys)
break;
default:
printf ("Encountered unknown event type %i.\n", rd->type);
fprintf (stderr, "Encountered unknown event type %i.\n", rd->type);
exit (1);
}
}
@ -877,6 +877,7 @@ propertyCheck (const System sys)
if (claimev == -1)
{
/* weird, should not occur */
fprintf(stderr, "Violation, but cannot locate claim.\n");
printf("A secrecy claim was supposed to be violated on term ");
termPrint(scan->term);
printf(" but we couldn't find the corresponding claim.\n");
@ -988,7 +989,7 @@ claimViolationDetails (const System sys, const int run, const Roledef rd, const
{
if (rd->type != CLAIM)
{
printf("Trying to determine details of something other than a claim!\n");
fprintf(stderr, "Trying to determine details of something other than a claim!\n");
exit(-1);
}