#include <ast/error.h>
#include <cgraph/exit.h>
#include <stddef.h>
+#include <stdio.h>
#include <string.h>
#include <errno.h>
const char *prefix;
if (level && ((prefix = error_info.id) || (prefix = id))) {
if (flags & ERROR_USAGE)
- sfprintf(sfstderr, "Usage: %s ", prefix);
+ fprintf(stderr, "Usage: %s ", prefix);
else
- sfprintf(sfstderr, "%s: ", prefix);
+ fprintf(stderr, "%s: ", prefix);
}
if (flags & ERROR_USAGE)
/*nop */ ;
else if (level < 0) {
int i;
for (i = 0; i < error_info.indent; i++)
- sfprintf(sfstderr, " ");
- sfprintf(sfstderr, "debug%d: ", level);
+ fprintf(stderr, " ");
+ fprintf(stderr, "debug%d: ", level);
} else if (level) {
if (level == ERROR_WARNING) {
- sfprintf(sfstderr, "warning: ");
+ fprintf(stderr, "warning: ");
error_info.warnings++;
} else {
error_info.errors++;
if (level == ERROR_PANIC)
- sfprintf(sfstderr, "panic: ");
+ fprintf(stderr, "panic: ");
}
if (error_info.line) {
if (error_info.file && *error_info.file)
- sfprintf(sfstderr, "\"%s\", ", error_info.file);
- sfprintf(sfstderr, "line %d: ", error_info.line);
+ fprintf(stderr, "\"%s\", ", error_info.file);
+ fprintf(stderr, "line %d: ", error_info.line);
}
}
- sfvprintf(sfstderr, s, ap);
+ vfprintf(stderr, s, ap);
if (flags & ERROR_SYSTEM)
- sfprintf(sfstderr, "\n%s", strerror(errno));
- sfprintf(sfstderr, "\n");
+ fprintf(stderr, "\n%s", strerror(errno));
+ fprintf(stderr, "\n");
if (level >= ERROR_FATAL)
graphviz_exit(level - ERROR_FATAL + 1);
}
opts->verbose = 1;
break;
case 'V':
- sfprintf(sfstderr, "%s version %s (%s)\n",
- Info[0], Info[1], Info[2]);
+ fprintf(stderr, "%s version %s (%s)\n", Info[0], Info[1], Info[2]);
return 0;
break;
case '?':
incoreGraphs = 0;
if (opts->verbose)
- sfprintf (sfstderr, "Parse/compile/init: %.2f secs.\n", gvelapsed_sec());
+ fprintf(stderr, "Parse/compile/init: %.2f secs.\n", gvelapsed_sec());
/* do begin */
if (xprog->begin_stmt)
exeval(xprog->prog, xprog->begin_stmt, state);
if (opts->verbose) gvstart_timer ();
for (state->curgraph = nextGraph(ing); state->curgraph; state->curgraph = nextg) {
- if (opts->verbose) sfprintf (sfstderr, "Read graph: %.2f secs.\n", gvelapsed_sec());
+ if (opts->verbose) fprintf(stderr, "Read graph: %.2f secs.\n", gvelapsed_sec());
state->infname = fileName(ing);
if (opts->readAhead)
nextg = state->nextgraph = nextGraph(ing);
state->curobj = (Agobj_t *) state->curgraph;
if (xprog->endg_stmt)
exeval(xprog->prog, xprog->endg_stmt, state);
- if (opts->verbose) sfprintf (sfstderr, "Finish graph: %.2f secs.\n", gvelapsed_sec());
+ if (opts->verbose) fprintf(stderr, "Finish graph: %.2f secs.\n", gvelapsed_sec());
/* if $O == $G and $T is empty, delete $T */
if ((state->outgraph == state->curgraph) &&
if (opts->verbose) gvstart_timer ();
if (!opts->readAhead)
nextg = nextGraph(ing);
- if (opts->verbose && nextg) sfprintf (sfstderr, "Read graph: %.2f secs.\n", gvelapsed_sec());
+ if (opts->verbose && nextg) fprintf(stderr, "Read graph: %.2f secs.\n", gvelapsed_sec());
}
}