2 main.c - Belegloser Datenträgeraustausch mit einer Bank
3 Copyright (c) 1996,8,2001-4 Martin Schulze <joey@infodrom.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 static char version[] = "0.6";
31 char *dtaus = "dtaus0.txt";
32 char *control = "dtaus0.ctl";
33 char *beleg = "dtaus0.doc";
34 char *check = "dtaus0.sik";
38 printf ("dtaus - Belegloser Datenträgeraustausch mit einer Bank\n\n");
39 printf (" -dtaus Erzeugt eine Bankdatei\n");
40 printf (" -control Liest eine Bankdatei und erzeugt die Kontrolldatei\n");
42 printf (" -d <dtaus> Bankdatei [%s]\n", dtaus);
43 printf (" -c <control> Steuerdatei [%s]\n", control);
44 printf (" -b <begleit> Begleitzettel fĂ¼r die Bank [%s]\n", beleg);
45 printf (" -o <kontroll> Kontrolldatei zum Abheften [%s]\n", check);
51 int main (int argc, char **argv)
57 while (argc - i > 1) {
59 if ( !strcmp(argv[i], "-h") ) {
61 } else if ( !strcmp(argv[i], "-v") ) {
62 printf ("dtaus version %s - Copyright (c) 1997,8,2001 by Martin Schulze <joey@infodrom.org>\n", version);
64 } else if ( !strcmp(argv[i], "-d") ) {
69 } else if ( !strcmp(argv[i], "-c") ) {
74 } else if ( !strcmp(argv[i], "-b") ) {
79 } else if ( !strcmp(argv[i], "-o") ) {
84 } else if ( !strcmp(argv[i], "-dtaus") ) {
86 } else if ( !strcmp(argv[i], "-control") ) {
91 if (action == DTAUS) {
92 if (!stat((char *)control, &sbuf)) {
93 if (control2dtaus ((char *)control, (char *)dtaus, (char *)beleg, (char *)check) == 0)
97 } else if (action == CONTROL) {
98 if (!stat((char *)dtaus, &sbuf))
99 dtaus2control ((char *)dtaus, (char *)control);
102 printf ("Keine Routine angegeben (-dtaus bzw. -control vergessen).\n");