Mercurial > hg > index.cgi
comparison lwasm/list.c @ 227:721a5ea5e36a
Make warnings show up in assembly listings.
Make warnings show up in assembly listings. They don't show up anywhere else
currently.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 15 Jul 2012 21:42:39 -0600 |
parents | f8b33b3a45ac |
children | e09985968e64 |
comparison
equal
deleted
inserted
replaced
226:7c2c2239ec9c | 227:721a5ea5e36a |
---|---|
82 if (nl -> noexpand_end) | 82 if (nl -> noexpand_end) |
83 nc--; | 83 nc--; |
84 | 84 |
85 if (nl -> outputl > 0) | 85 if (nl -> outputl > 0) |
86 obytelen += nl -> outputl; | 86 obytelen += nl -> outputl; |
87 if (nl -> warn) | |
88 { | |
89 lwasm_error_t *e; | |
90 for (e = nl -> warn; e; e = e -> next) | |
91 { | |
92 printf("Warning: %s\n", e -> mess); | |
93 } | |
94 } | |
87 if (nc == 0) | 95 if (nc == 0) |
88 break; | 96 break; |
89 } | 97 } |
90 obytes = lw_alloc(obytelen); | 98 obytes = lw_alloc(obytelen); |
91 nc = 0; | 99 nc = 0; |
101 } | 109 } |
102 nl = nl -> next; | 110 nl = nl -> next; |
103 } | 111 } |
104 else | 112 else |
105 { | 113 { |
114 if (cl -> warn) | |
115 { | |
116 lwasm_error_t *e; | |
117 for (e = cl -> warn; e; e = e -> next) | |
118 { | |
119 printf("Warning: %s\n", e -> mess); | |
120 } | |
121 } | |
106 obytelen = cl -> outputl; | 122 obytelen = cl -> outputl; |
107 if (obytelen > 0) | 123 if (obytelen > 0) |
108 { | 124 { |
109 obytes = lw_alloc(obytelen); | 125 obytes = lw_alloc(obytelen); |
110 memmove(obytes, cl -> output, cl -> outputl); | 126 memmove(obytes, cl -> output, cl -> outputl); |
220 fprintf(of, "\n"); | 236 fprintf(of, "\n"); |
221 } | 237 } |
222 lw_free(obytes); | 238 lw_free(obytes); |
223 obytes = NULL; | 239 obytes = NULL; |
224 } | 240 } |
225 if (as -> flags & FLAG_SYMBOLS) | 241 if ((as -> flags & FLAG_SYMBOLS) && (as -> flags & FLAG_UNICORNS) == 0) |
226 list_symbols(as, of); | 242 list_symbols(as, of); |
227 } | 243 } |