From 0ef837e1990df80ca9e64f384aeec095a370ad8a Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Thu, 13 Jan 2000 16:43:01 +0000 Subject: [PATCH] Added -freeze option. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@82 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/SWIG1.1/main.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SWIG/Source/SWIG1.1/main.cxx b/SWIG/Source/SWIG1.1/main.cxx index dbf854505..d6605f214 100644 --- a/SWIG/Source/SWIG1.1/main.cxx +++ b/SWIG/Source/SWIG1.1/main.cxx @@ -74,6 +74,7 @@ FILE *swig_log; #endif char *SwigLib; +static int freeze = 0; int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { @@ -90,6 +91,7 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { int ignorecomments = 0; int checkout = 0; int cpp_only = 0; + char *typemap_file = 0; char *includefiles[256]; int includecount = 0; @@ -236,6 +238,9 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { } else if (strcmp(argv[i],"-co") == 0) { checkout = 1; SWIG_mark_arg(i); + } else if (strcmp(argv[i],"-freeze") == 0) { + freeze = 1; + SWIG_mark_arg(i); } else if (strcmp(argv[i],"-help") == 0) { fputs(usage,stderr); SWIG_mark_arg(i); @@ -405,6 +410,7 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { cpps = SWIG_cpp_parse(ds); if (cpp_only) { Printf(stdout,"%s", cpps); + while (freeze); SWIG_exit(0); } f = fopen(fn_cpp,"w"); @@ -529,6 +535,7 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { fclose(swig_log); } #else + while (freeze); exit(error_count); #endif return(error_count); @@ -558,6 +565,7 @@ void SWIG_exit(int) { fclose(f_runtime); remove(fn_runtime); } + while (freeze); #ifndef MACSWIG exit(1); #else