]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | Index: Source/Modules/xml.cxx |
2 | =================================================================== | |
3 | RCS file: /cvsroot/SWIG/Source/Modules/xml.cxx,v | |
4 | retrieving revision 1.7 | |
5 | diff -u -r1.7 xml.cxx | |
6 | --- Source/Modules/xml.cxx 11 Sep 2003 20:26:56 -0000 1.7 | |
7 | +++ Source/Modules/xml.cxx 30 Oct 2003 01:29:32 -0000 | |
8 | @@ -14,6 +14,7 @@ | |
9 | static const char *usage = "\ | |
10 | XML Options (available with -xml)\n\ | |
11 | -xmllang <lang> - Typedef language\n\ | |
12 | + -xmllite - More lightweight version of XML\n\ | |
13 | ------\n\ | |
14 | deprecated (use -o): -xml <output.xml> - Use <output.xml> as output file (extension .xml mandatory)\n"; | |
15 | ||
16 | @@ -22,6 +23,8 @@ | |
17 | ||
18 | //static Node *view_top = 0; | |
19 | static File *out = 0; | |
20 | +static int xmllite = 0; | |
21 | + | |
22 | ||
23 | class XML | |
24 | : public Language | |
25 | @@ -79,6 +82,11 @@ | |
26 | { | |
27 | fputs( usage, stderr ); | |
28 | } | |
29 | + if( strcmp( argv[iX], "-xmllite" ) == 0 ) | |
30 | + { | |
31 | + Swig_mark_arg (iX); | |
32 | + xmllite = 1; | |
33 | + } | |
34 | } | |
35 | ||
36 | // Add a symbol to the parser for conditional compilation | |
37 | @@ -93,6 +101,7 @@ | |
38 | { | |
39 | String *outfile = Getattr(n,"outfile"); | |
40 | Replaceall(outfile,".cxx", ".xml"); | |
41 | + Replaceall(outfile,".cpp", ".xml"); | |
42 | Replaceall(outfile,".c", ".xml"); | |
43 | out = NewFile(outfile,"w"); | |
44 | if (!out) | |
45 | @@ -159,11 +168,11 @@ | |
46 | { | |
47 | Xml_print_baselist( Getattr(obj,k) ); | |
48 | } | |
49 | - else if (Cmp(k,"typescope") == 0) | |
50 | + else if (!xmllite && Cmp(k,"typescope") == 0) | |
51 | { | |
52 | Xml_print_typescope( Getattr(obj,k) ); | |
53 | } | |
54 | - else if (Cmp(k,"typetab") == 0) | |
55 | + else if (!xmllite && Cmp(k,"typetab") == 0) | |
56 | { | |
57 | Xml_print_typetab( Getattr(obj,k) ); | |
58 | } |