1 /* @(#) pf_main.c 98/01/26 1.2 */
2 /***************************************************************
5 ** main() routine that demonstrates how to call PForth as
6 ** a module from 'C' based application.
7 ** Customize this as needed for your application.
10 ** Copyright 1994 3DO, Phil Burk, Larry Polansky, Devid Rosenboom
12 ** The pForth software code is dedicated to the public domain,
13 ** and any third party may reproduce, distribute and modify
14 ** the pForth software code or any derivative works thereof
15 ** without any compensation or license. The pForth software
16 ** code is provided on an "as is" basis without any warranty
17 ** of any kind, including, without limitation, the implied
18 ** warranties of merchantability and fitness for a particular
19 ** purpose and their equivalents under the laws of any jurisdiction.
21 ***************************************************************/
24 #define NULL ((void *) 0)
25 #define ERR(msg) /* { printf msg; } */
28 #define ERR(msg) { printf msg; }
43 int main( int argc, char **argv )
45 const char *DicName = "/usr/lib/pforth/pforth.dic";
46 const char *SourceName = NULL;
52 /* For Metroworks on Mac */
54 argc = ccommand(&argv);
57 /* Parse command line. */
58 for( i=1; i<argc; i++ )
80 ERR(("Unrecognized option!\n"));
81 ERR(("pforth {-i} {-q} {-dfilename.dic} {sourcefilename}\n"));
98 Result = pfDoForth( DicName, SourceName, IfInit);