}
if (action == DTAUS) {
- if (!stat((char *)control, &sbuf)) {
- if (control2dtaus ((char *)control, (char *)dtaus, (char *)beleg, (char *)check) == 0)
+ if (!strcmp("-", control) || !stat(control, &sbuf)) {
+ if (control2dtaus (control, dtaus, beleg, check) == 0)
exit (1);
}
- else exit (1);
+ else {
+ fprintf( stderr, "Can't stat %s\n", control);
+ exit (1);
+ }
} else if (action == CONTROL) {
- if (!stat((char *)dtaus, &sbuf))
- dtaus2control ((char *)dtaus, (char *)control);
- else exit (1);
+ if (!strcmp("-",dtaus) || !stat(dtaus, &sbuf))
+ dtaus2control (dtaus, control);
+ else {
+ fprintf( stderr, "Can't stat %s\n", dtaus);
+ exit (1);
+ }
} else {
printf ("Keine Routine angegeben (-dtaus bzw. -control vergessen).\n");
exit (1);