-
Notifications
You must be signed in to change notification settings - Fork 0
/
wsi.c
66 lines (54 loc) · 1.69 KB
/
wsi.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* vim: expandtab sw=4 sts=4 ts=8
**********************************************************
* wsi.c
*
* Copyright 2004, Stefan Siegl <ssiegl@gmx.de>, Germany
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Publice License,
* version 2 or any later. The license is contained in the COPYING
* file that comes with the wsdebug distribution.
*
* whitespace interpreter
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include "fileio.h"
#include "interprt.h"
int main(int argc, char **argv)
{
if(argc != 2) {
printf("WhiteSpace Interpreter " VERSION "\n"
"Copyright 2004, Stefan Siegl <ssiegl@gmx.de>, Germany\n"
"WSI is free software, covered by the GNU General Public License, any you are\n"
"welcome to change it and/or distribute copies of it under certain conditions.\n"
"There is absolutely no warranty for WSDBG. See COPYING file for more info.\n"
"\n"
"Usage:\n"
" %s [executable-file]\n"
" %s --help\n"
"\n"
"Options:\n"
" --help Print this message.\n"
"\n", argv[0], argv[0]);
return 2;
}
if(load_file(argv[1])) {
fprintf(stderr, "%s: unable to load file.\n", argv[1]);
return 2;
}
interprt_init();
return interprt_err_handler(stderr, interprt_cont()) != DO_EXIT;
}
/***** -*- emacs is great -*-
Local Variables:
mode: C
c-basic-offset: 4
indent-tabs-mode: nil
end:
****************************/