X-Git-Url: https://git.infodrom.org/?p=infodrom%2Fdtaus;a=blobdiff_plain;f=main.c;h=af2e385b410ad561db3af7abe766cf50fbba40cb;hp=80d4e37d2f696896350d4834c4d0ff47027714cf;hb=b05e3d542b9440ea08758788a4c859a842de4f5d;hpb=f5a3f18df99674b9ec9d9576df14225ccb435d2b diff --git a/main.c b/main.c index 80d4e37..af2e385 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,6 @@ /* - main.c - Datentraegeraustausch mit einer Bank - Copyright (c) 1996,8 Martin Schulze + main.c - Belegloser Datenträgeraustausch mit einer Bank + Copyright (c) 1996,8,2001 Martin Schulze This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,11 +19,13 @@ $Id$ */ -static char version[] = "0.2.1"; +static char version[] = "0.5"; #include #include #include +#include +#include #include "dtaus.h" void help () @@ -41,7 +43,7 @@ void help () #define DTAUS 1 #define CONTROL 2 -void main (int argc, char **argv) +int main (int argc, char **argv) { char *dtaus[60]; char *control[60]; @@ -61,7 +63,7 @@ void main (int argc, char **argv) if ( !strcmp(argv[i], "-h") ) { help(); exit(0); } else if ( !strcmp(argv[i], "-v") ) { - printf ("dtaus version %s - Copyright (c) 1997,8 by Martin Schulze \n", version); + printf ("dtaus version %s - Copyright (c) 1997,8,2001 by Martin Schulze \n", version); exit (0); } else if ( !strcmp(argv[i], "-d") ) { if (argc - i > 1) { @@ -91,8 +93,10 @@ void main (int argc, char **argv) } 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)) @@ -102,4 +106,5 @@ void main (int argc, char **argv) printf ("Keine Routine angegeben (-dtaus bzw. -control vergessen).\n"); exit (1); } + exit (0); }