projects
/
infodrom
/
dtaus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ddd1b7
)
Return better exit codes
author
Joey Schulze
<joey@infodrom.org>
Sun, 11 Nov 2001 15:09:23 +0000
(15:09 +0000)
committer
Joey Schulze
<joey@infodrom.org>
Sun, 11 Nov 2001 15:09:23 +0000
(15:09 +0000)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
80d4e37
..
d4a088f
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-41,7
+41,7
@@
void help ()
#define DTAUS 1
#define CONTROL 2
#define DTAUS 1
#define CONTROL 2
-
void
main (int argc, char **argv)
+
int
main (int argc, char **argv)
{
char *dtaus[60];
char *control[60];
{
char *dtaus[60];
char *control[60];
@@
-91,8
+91,10
@@
void main (int argc, char **argv)
}
if (action == DTAUS) {
}
if (action == DTAUS) {
- if (!stat((char *)control, &sbuf))
- control2dtaus ((char *)control, (char *)dtaus, (char *)beleg, (char *)check);
+ if (!stat((char *)control, &sbuf)) {
+ if (control2dtaus ((char *)control, (char *)dtaus, (char *)beleg, (char *)check) == 0)
+ exit (1);
+ }
else exit (1);
} else if (action == CONTROL) {
if (!stat((char *)dtaus, &sbuf))
else exit (1);
} else if (action == CONTROL) {
if (!stat((char *)dtaus, &sbuf))
@@
-102,4
+104,5
@@
void main (int argc, char **argv)
printf ("Keine Routine angegeben (-dtaus bzw. -control vergessen).\n");
exit (1);
}
printf ("Keine Routine angegeben (-dtaus bzw. -control vergessen).\n");
exit (1);
}
+ exit (0);
}
}