Fetch Flex from Sourceforge.
[AROS-Contrib.git] / regina / regina.c
blobd30257dcd010310562710e36560bcc29c53e11b4
1 #ifndef lint
2 static char *RCSid = "$Id$";
3 #endif
5 /*
6 * The Regina Rexx Interpreter
7 * Copyright (C) 1992-1994 Anders Christensen <anders@pvv.unit.no>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #if defined(WIN32) && defined(__IBMC__)
24 # include <windows.h>
25 # pragma warning(default: 4115 4201 4214)
26 #else
27 # define APIENTRY
28 # if defined(WIN32) && (defined(__WATCOMC__) || defined(__BORLANDC__))
29 # undef APIENTRY
30 # include <windows.h>
31 # endif
32 # if defined(_MSC_VER)
33 # undef APIENTRY
34 # if _MSC_VER >= 1100
35 /* Stupid MSC can't compile own headers without warning at least in VC 5.0 */
36 # pragma warning(disable: 4115 4201 4214)
37 # endif
38 # include <windows.h>
39 # if _MSC_VER >= 1100
40 # pragma warning(default: 4115 4201 4214)
41 # endif
42 #endif
43 #endif
45 #if !(defined(__AROS__) || defined(_AMIGA))
46 #include "rexxsaa.h"
47 #define DONT_TYPEDEF_PFN
48 #ifndef RXLIB /* need __regina_faked_main which is known with RXLIB only */
49 # define RXLIB
50 #endif
51 #include "rexx.h"
52 #else
53 #include <exec/exec.h>
54 #include <exec/libraries.h>
55 #include <proto/exec.h>
56 #include <proto/regina.h>
58 #include <stdio.h>
59 #include <stdlib.h>
60 #endif
62 struct Library *ReginaBase;
64 #if defined(__AROS__) || defined(_AMIGA)
65 void closelib(void)
67 CloseLibrary(ReginaBase);
69 #endif
71 int main(int argc, char *argv[])
73 int rc;
75 #if defined(__AROS__) || defined(_AMIGA)
76 if (!(ReginaBase=OpenLibrary("regina.library", 0))) {
77 puts("Error opening regina.library");
79 atexit(closelib);
80 #endif
82 rc = __regina_faked_main(argc,argv);
84 return(rc);