Mercurial > hg > index.cgi
annotate lwasm/pragma.c @ 508:10f62dc61a75
Fix bad usage of sprintf()
Usage of sprintf() to append to a string in the form of
sprintf(buf, "%s...", buf...) is undefined, regardless whether it
worked on a lot of older systems. It was always a bad idea and it
now breaks on current glibc and gcc development environments.
The moral: if any of your code uses sprintf() in a way similar to
the above, fix it. It may not fail in a benign way.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 10 May 2020 22:38:24 -0600 |
parents | 74d0c394666e |
children | 1260b4eec5a5 |
rev | line source |
---|---|
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
1 /* |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
2 pragma.c |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
3 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
4 Copyright © 2010 William Astle |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
5 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
6 This file is part of LWTOOLS. |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
7 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
8 LWTOOLS is free software: you can redistribute it and/or modify it under the |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
9 terms of the GNU General Public License as published by the Free Software |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
10 Foundation, either version 3 of the License, or (at your option) any later |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
11 version. |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
12 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
13 This program is distributed in the hope that it will be useful, but WITHOUT |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
16 more details. |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
17 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
18 You should have received a copy of the GNU General Public License along with |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
19 this program. If not, see <http://www.gnu.org/licenses/>. |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
20 */ |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
21 |
2
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
0
diff
changeset
|
22 #include <string.h> |
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
0
diff
changeset
|
23 #include <ctype.h> |
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
0
diff
changeset
|
24 |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
25 #include <lw_string.h> |
2
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
0
diff
changeset
|
26 #include <lw_alloc.h> |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
27 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
28 #include "lwasm.h" |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
29 #include "instab.h" |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
30 #include "input.h" |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
31 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
32 struct pragma_list |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
33 { |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
34 const char *setstr; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
35 const char *resetstr; |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
36 int flag; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
37 }; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
38 |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
39 struct pragma_stack_entry |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
40 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
41 int magic; // must always be at the start of any input stack entry |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
42 int flag; // the pragma flag bit |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
43 char str[1]; // magic number - this will be allocated bigger |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
44 // string will be what's needed to re-instate a pragma |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
45 }; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
46 |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
47 static const struct pragma_list set_pragmas[] = |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
48 { |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
49 { "dollarnotlocal", "nodollarnotlocal", PRAGMA_DOLLARNOTLOCAL }, |
118
b6b8c2645f5c
Add back the dollarlocal and nodollarlocal pragma strings for compatibility with the documentation.
lost@l-w.ca
parents:
115
diff
changeset
|
50 { "nodollarlocal", "dollarlocal", PRAGMA_DOLLARNOTLOCAL }, |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
51 { "noindex0tonone", "index0tonone", PRAGMA_NOINDEX0TONONE }, |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
52 { "undefextern", "noundefextern", PRAGMA_UNDEFEXTERN }, |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
53 { "cescapes", "nocescapes", PRAGMA_CESCAPES }, |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
54 { "importundefexport", "noimportundefexport", PRAGMA_IMPORTUNDEFEXPORT }, |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
55 { "pcaspcr", "nopcaspcr", PRAGMA_PCASPCR }, |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
56 { "shadow", "noshadow", PRAGMA_SHADOW }, |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
57 { "nolist", "list", PRAGMA_NOLIST }, |
115
344cfc25afec
Added initial infrastructure for pragma autobranchlength (suggested by Ebonhand on irc)
lost@l-w.ca
parents:
110
diff
changeset
|
58 { "autobranchlength", "noautobranchlength", PRAGMA_AUTOBRANCHLENGTH }, |
206 | 59 { "export", "noexport", PRAGMA_EXPORT }, |
207
07e1fac76321
Added pragma to allow non case sensitive symbols
William Astle <lost@l-w.ca>
parents:
206
diff
changeset
|
60 { "symbolnocase", "nosymbolnocase", PRAGMA_SYMBOLNOCASE }, |
07e1fac76321
Added pragma to allow non case sensitive symbols
William Astle <lost@l-w.ca>
parents:
206
diff
changeset
|
61 { "nosymbolcase", "symbolcase", PRAGMA_SYMBOLNOCASE }, |
210 | 62 { "condundefzero", "nocondundefzero", PRAGMA_CONDUNDEFZERO }, |
367
c6d2a1f54e0c
Change processor target variations to pragmas.
William Astle <lost@l-w.ca>
parents:
343
diff
changeset
|
63 { "6809", "6309", PRAGMA_6809 }, |
333
507f442dc71e
Add support for 6800 compatibility instructions.
William Astle <lost@l-w.ca>
parents:
259
diff
changeset
|
64 { "6800compat", "no6800compat", PRAGMA_6800COMPAT }, |
343
98f3e016cfd8
Add pragma to turn off forward reference optimization
William Astle <lost@l-w.ca>
parents:
333
diff
changeset
|
65 { "forwardrefmax", "noforwardrefmax", PRAGMA_FORWARDREFMAX }, |
375 | 66 { "testmode", "notestmode", PRAGMA_TESTMODE }, |
376 | 67 { "c", "noc", PRAGMA_C }, |
68 { "cc", "nocc", PRAGMA_CC }, | |
69 { "cd", "nocd", PRAGMA_CD }, | |
70 { "ct", "noct", PRAGMA_CT }, | |
377
67373a053c49
Add ?rts target for branch instructions
William Astle <lost@l-w.ca>
parents:
376
diff
changeset
|
71 { "qrts", "noqrts", PRAGMA_QRTS }, |
379
d791d47afc48
Add m80ext pragma for Macro-80C compatibility and ignore END in includes
William Astle <lost@l-w.ca>
parents:
377
diff
changeset
|
72 { "m80ext", "nom80ext", PRAGMA_M80EXT }, |
385 | 73 { "6809conv", "no6809conv", PRAGMA_6809CONV }, |
74 { "6309conv", "no6309conv", PRAGMA_6309CONV }, | |
399
6153cb49403c
Initial commit of pragma newsource
William Astle <lost@l-w.ca>
parents:
385
diff
changeset
|
75 { "newsource", "nonewsource", PRAGMA_NEWSOURCE }, |
6153cb49403c
Initial commit of pragma newsource
William Astle <lost@l-w.ca>
parents:
385
diff
changeset
|
76 { "nooldsource", "oldsource", PRAGMA_NEWSOURCE }, |
455 | 77 { "operandsizewarning", "nooperandsizewarning", PRAGMA_OPERANDSIZE }, |
472
e97f9a302c6a
Add emuext pragma and associated instructions.
William Astle <lost@l-w.ca>
parents:
462
diff
changeset
|
78 { "emuext", "noemuext", PRAGMA_EMUEXT }, |
473 | 79 { "nooutput", "output", PRAGMA_NOOUTPUT }, |
474
74d0c394666e
Add "noexpandcond" pragma (cleans up listings)
William Astle <lost@l-w.ca>
parents:
473
diff
changeset
|
80 { "noexpandcond", "expandcond", PRAGMA_NOEXPANDCOND }, |
376 | 81 { 0, 0, 0 } |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
82 }; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
83 |
384
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
84 int parse_pragma_helper(char *p) |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
85 { |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
86 int i; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
87 |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
88 for (i = 0; set_pragmas[i].setstr; i++) |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
89 { |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
90 if (!strcasecmp(p, set_pragmas[i].setstr)) |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
91 { |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
92 return set_pragmas[i].flag; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
93 return 1; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
94 } |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
95 if (!strcasecmp(p, set_pragmas[i].resetstr)) |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
96 { |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
97 return set_pragmas[i].flag | PRAGMA_CLEARBIT; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
98 return 2; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
99 } |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
100 } |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
101 |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
102 return 0; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
103 } |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
104 |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
105 int parse_pragma_string(asmstate_t *as, char *str, int ignoreerr) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
106 { |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
107 char *p; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
108 const char *np = str; |
384
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
109 int pragma; |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
110 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
111 while (np) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
112 { |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
113 p = lw_token(np, ',', &np); |
384
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
114 debug_message(as, 200, "Setting/resetting pragma %s", p); |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
115 pragma = parse_pragma_helper(p); |
462 | 116 debug_message(as, 200, "Got pragma code %08X", pragma); |
384
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
117 lw_free(p); |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
118 |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
119 if (pragma == 0 && !ignoreerr) |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
120 return 0; |
384
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
121 |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
122 if (pragma & PRAGMA_CLEARBIT) |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
123 as->pragmas &= ~pragma; |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
124 else |
6ee9c67a0f8d
Add conditional for testing if a pragma is in effect
William Astle <lost@l-w.ca>
parents:
379
diff
changeset
|
125 as->pragmas |= pragma; |
462 | 126 |
127 debug_message(as, 200, "New pragma state: %08X", as -> pragmas); | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
128 } |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
129 return 1; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
130 } |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
131 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
132 PARSEFUNC(pseudo_parse_pragma) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
133 { |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
134 char *ps, *t; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
135 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
136 for (t = *p; *t && !isspace(*t); t++) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
137 /* do nothing */ ; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
138 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
139 ps = lw_strndup(*p, t - *p); |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
140 *p = t; |
56 | 141 |
142 l -> len = 0; | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
143 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
144 if (parse_pragma_string(as, ps, 0) == 0) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
145 { |
370
8764142b3192
Convert internal error/warning handling framework to a new unified system
William Astle <lost@l-w.ca>
parents:
367
diff
changeset
|
146 lwasm_register_error(as, l, E_PRAGMA_UNRECOGNIZED); |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
147 } |
81
428068681cbf
Added nolist pragma to suppress listing output of non-code generating lines
Lost Wizard (lost@starbug3)
parents:
56
diff
changeset
|
148 if (as -> pragmas & PRAGMA_NOLIST) |
428068681cbf
Added nolist pragma to suppress listing output of non-code generating lines
Lost Wizard (lost@starbug3)
parents:
56
diff
changeset
|
149 l -> pragmas |= PRAGMA_NOLIST; |
407
c501b3ce39c8
Make "pragma" and "*pragma/opt" fully equivalent
William Astle <lost@l-w.ca>
parents:
399
diff
changeset
|
150 if (as->pragmas & PRAGMA_CC) |
c501b3ce39c8
Make "pragma" and "*pragma/opt" fully equivalent
William Astle <lost@l-w.ca>
parents:
399
diff
changeset
|
151 { |
c501b3ce39c8
Make "pragma" and "*pragma/opt" fully equivalent
William Astle <lost@l-w.ca>
parents:
399
diff
changeset
|
152 l->pragmas |= PRAGMA_CC; |
c501b3ce39c8
Make "pragma" and "*pragma/opt" fully equivalent
William Astle <lost@l-w.ca>
parents:
399
diff
changeset
|
153 as->pragmas &= ~PRAGMA_CC; |
c501b3ce39c8
Make "pragma" and "*pragma/opt" fully equivalent
William Astle <lost@l-w.ca>
parents:
399
diff
changeset
|
154 } |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
155 lw_free(ps); |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
156 } |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
157 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
158 PARSEFUNC(pseudo_parse_starpragma) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
159 { |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
160 char *ps, *t; |
85 | 161 |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
162 for (t = *p; *t && !isspace(*t); t++) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
163 /* do nothing */ ; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
164 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
165 ps = lw_strndup(*p, t - *p); |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
166 *p = t; |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
167 |
56 | 168 l -> len = 0; |
169 | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
170 // *pragma must NEVER throw an error |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
171 parse_pragma_string(as, ps, 1); |
81
428068681cbf
Added nolist pragma to suppress listing output of non-code generating lines
Lost Wizard (lost@starbug3)
parents:
56
diff
changeset
|
172 if (as -> pragmas & PRAGMA_NOLIST) |
428068681cbf
Added nolist pragma to suppress listing output of non-code generating lines
Lost Wizard (lost@starbug3)
parents:
56
diff
changeset
|
173 l -> pragmas |= PRAGMA_NOLIST; |
376 | 174 if (as->pragmas & PRAGMA_CC) |
175 { | |
176 l->pragmas |= PRAGMA_CC; | |
177 as->pragmas &= ~PRAGMA_CC; | |
178 } | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
179 lw_free(ps); |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
180 } |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
181 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
182 static int pragma_stack_compare(input_stack_entry *e, void *d) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
183 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
184 int flag = *((int *)d); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
185 struct pragma_stack_entry *pse = (struct pragma_stack_entry *)e; |
110 | 186 |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
187 if (pse -> flag == flag) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
188 return 1; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
189 return 0; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
190 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
191 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
192 PARSEFUNC(pseudo_parse_starpragmapop) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
193 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
194 char *ps, *t; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
195 char *pp; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
196 int i; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
197 const char *np; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
198 struct pragma_stack_entry *pse; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
199 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
200 for (t = *p; *t && !isspace(*t); t++) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
201 /* do nothing */ ; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
202 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
203 ps = lw_strndup(*p, t - *p); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
204 *p = t; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
205 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
206 l -> len = 0; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
207 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
208 // *pragma stuff must never throw an error |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
209 np = ps; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
210 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
211 while (np) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
212 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
213 pp = lw_token(np, ',', &np); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
214 for (i = 0; set_pragmas[i].setstr; i++) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
215 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
216 if (!strcasecmp(pp, set_pragmas[i].setstr) || !strcasecmp(pp, set_pragmas[i].resetstr)) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
217 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
218 pse = (struct pragma_stack_entry *)input_stack_pop(as, 0x42424242, pragma_stack_compare, (void *)&(set_pragmas[i].flag)); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
219 if (pse) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
220 { |
110 | 221 debug_message(as, 100, "Popped pragma string %s", pse->str); |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
222 parse_pragma_string(as, (char *)&(pse->str), 1); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
223 lw_free(pse); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
224 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
225 if (set_pragmas[i].flag == PRAGMA_NOLIST) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
226 l -> pragmas |= PRAGMA_NOLIST; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
227 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
228 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
229 lw_free(pp); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
230 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
231 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
232 lw_free(ps); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
233 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
234 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
235 PARSEFUNC(pseudo_parse_starpragmapush) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
236 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
237 char *ps, *t; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
238 char *pp; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
239 int i; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
240 const char *np; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
241 struct pragma_stack_entry *pse; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
242 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
243 for (t = *p; *t && !isspace(*t); t++) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
244 /* do nothing */ ; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
245 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
246 ps = lw_strndup(*p, t - *p); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
247 *p = t; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
248 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
249 l -> len = 0; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
250 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
251 // *pragma stuff must never throw an error |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
252 np = ps; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
253 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
254 while (np) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
255 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
256 pp = lw_token(np, ',', &np); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
257 for (i = 0; set_pragmas[i].setstr; i++) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
258 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
259 if (!strcasecmp(pp, set_pragmas[i].setstr) || !strcasecmp(pp, set_pragmas[i].resetstr)) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
260 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
261 /* found set or reset pragma */ |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
262 /* push pragma state */ |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
263 if (as -> pragmas & (set_pragmas[i].flag)) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
264 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
265 /* use set string */ |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
266 t = (char *)set_pragmas[i].setstr; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
267 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
268 else |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
269 { |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
270 /* use reset string */ |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
271 t = (char *)set_pragmas[i].resetstr; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
272 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
273 pse = lw_alloc(sizeof(struct pragma_stack_entry) + strlen(t)); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
274 pse -> flag = set_pragmas[i].flag; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
275 pse -> magic = 0x42424242; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
276 strcpy((char *)&(pse -> str), t); |
110 | 277 debug_message(as, 100, "Pushed pragma string %s", pse->str); |
278 | |
108
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
279 input_stack_push(as, (input_stack_entry *)pse); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
280 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
281 if (set_pragmas[i].flag == PRAGMA_NOLIST) |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
282 l -> pragmas |= PRAGMA_NOLIST; |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
283 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
284 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
285 lw_free(pp); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
286 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
287 |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
288 lw_free(ps); |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
289 } |
9960e05cbe3a
Added *pragmapush and *pragmapop; still seems to be nonfunctional
lost@l-w.ca
parents:
85
diff
changeset
|
290 |