]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/Modules/swigmain.cxx
1 /*******************************************************************************
2 * Simplified Wrapper and Interface Generator (SWIG)
4 * Author : David Beazley
6 * Department of Computer Science
7 * University of Chicago
10 * beazley@cs.uchicago.edu
12 * Please read the file LICENSE for the copyright and terms by which SWIG
13 * can be used and distributed.
14 *******************************************************************************/
16 /***********************************************************************
23 ***********************************************************************/
30 // #include "pythoncom.h"
39 static char *usage
= "\
40 swig <options> filename\n\n\
41 Target Language Options:\n\
42 -tcl - Generate Tcl wrappers.\n\
43 -tcl8 - Generate Tcl 8.0 wrappers.\n\
44 -python - Generate Python wrappers.\n\
45 -perl5 - Generate Perl5 wrappers.\n\
46 -guile - Generate Guile wrappers.\n\
47 -debug - Parser debugging module.\n";
50 static char *macmessage
= "\
51 Copyright (c) 1995-1997\n\
52 University of Utah and the Regents of the University of California\n\n\
53 Enter SWIG processing options and filename below. For example :\n\
55 -tcl -c++ interface.i\n\
57 -help displays a list of all available options.\n\
59 Note : Macintosh filenames should be enclosed in quotes if they contain whitespace.\n\
64 //-----------------------------------------------------------------
67 // Main program. Initializes the files and starts the parser.
68 //-----------------------------------------------------------------
71 int main(int argc
, char **argv
) {
73 int Mac_main(int argc
, char **argv
) {
78 Language
*dl
= new SWIG_LANG
;
79 Documentation
*dd
= new SWIG_DOC
;
80 extern int SWIG_main(int, char **, Language
*, Documentation
*);
85 for (i
= 1; i
< argc
; i
++) {
87 if(strcmp(argv
[i
],"-tcl") == 0) {
90 } else if (strcmp(argv
[i
],"-tcl8") == 0) {
93 } else if (strcmp(argv
[i
],"-perl5") == 0) {
96 } else if (strcmp(argv
[i
],"-python") == 0) {
99 } else if (strcmp(argv
[i
],"-debug") == 0) {
102 } else if (strcmp(argv
[i
],"-guile") == 0) {
105 } else if (strcmp(argv
[i
],"-help") == 0) {
111 SWIG_main(argc
,argv
,dl
,dd
);
116 int MacMainEntry(char *options
) {
117 static char *_argv
[256];
121 swig_log
= fopen("swig_log","w");
122 fprintf(swig_log
,"SWIG 1.1\n");
123 fprintf(swig_log
,"Options : %s\n", options
);
124 fprintf(swig_log
,"-----------------------------------------------------\n");
126 // Tokenize the user input
132 while(isspace(*c
)) c
++;
134 s
= c
; // Starting character
138 while ((*c
) && (*c
!= '\"'))
145 // Found some whitespace
150 _argv
[i
] = copy_string(s
);
151 // Go through and remove quotes (if necessary)
165 return Mac_main(argc
,_argv
);