Mercurial > hg-old > index.cgi
comparison src/pragma.c @ 143:0ee5f65bccf9
Added pragma to allow all undefined symbols to be considered external and also added a --pragma command line option
author | lost |
---|---|
date | Thu, 29 Jan 2009 01:32:11 +0000 |
parents | 4b37f17624a7 |
children | 006d737756fd |
comparison
equal
deleted
inserted
replaced
142:36ca3fa755e0 | 143:0ee5f65bccf9 |
---|---|
74 { | 74 { |
75 if (error) | 75 if (error) |
76 { | 76 { |
77 register_error(as, cl, 1, "Unrecognized pragma"); | 77 register_error(as, cl, 1, "Unrecognized pragma"); |
78 } | 78 } |
79 if (error == 2) | |
80 { | |
81 *optr = NULL; | |
82 } | |
79 return; | 83 return; |
80 } | 84 } |
81 pragma[c] = 0; | 85 pragma[c] = 0; |
82 if (!strcmp(pragma, "noindex0tonone")) | 86 if (!strcmp(pragma, "noindex0tonone")) |
83 { | 87 { |
85 } | 89 } |
86 else if (!strcmp(pragma, "index0tonone")) | 90 else if (!strcmp(pragma, "index0tonone")) |
87 { | 91 { |
88 as -> pragmas &= ~PRAGMA_NOINDEX0TONONE; | 92 as -> pragmas &= ~PRAGMA_NOINDEX0TONONE; |
89 } | 93 } |
94 else if (!strcmp(pragma, "undefextern")) | |
95 { | |
96 as -> pragmas |= PRAGMA_UNDEFEXTERN; | |
97 } | |
98 else if (!strcmp(pragma, "noundefextern")) | |
99 { | |
100 as -> pragmas &= ~PRAGMA_UNDEFEXTERN; | |
101 } | |
90 else | 102 else |
91 { | 103 { |
92 if (error) | 104 if (error) |
93 { | 105 { |
94 register_error(as, cl, 1, "Unrecognized pragma"); | 106 register_error(as, cl, 1, "Unrecognized pragma"); |
107 if (error == 2) | |
108 { | |
109 *optr = NULL; | |
110 } | |
95 } | 111 } |
96 } | 112 } |
97 } | 113 } |
98 | 114 |
99 OPFUNC(pseudo_pragma) | 115 OPFUNC(pseudo_pragma) |