comparison lwasm/macro.c @ 57:e2728091b75a

Added a \* macro parameter expansion to include all macro parameters
author lost@l-w.ca
date Wed, 06 Apr 2011 00:12:33 -0600
parents bd8b3fbd1e28
children afd50d6b4113
comparison
equal deleted inserted replaced
56:337301ddf74a 57:e2728091b75a
225 225
226 for (lc = 0; lc < m -> numlines; lc++) 226 for (lc = 0; lc < m -> numlines; lc++)
227 { 227 {
228 for (p2 = m -> lines[lc]; *p2; p2++) 228 for (p2 = m -> lines[lc]; *p2; p2++)
229 { 229 {
230 if (*p2 == '\\' && isdigit(p2[1])) 230 if (*p2 == '\\' && p2[1] == '*')
231 {
232 int n;
233 /* all arguments */
234 for (n = 0; n < nargs; n++)
235 {
236 for (p3 = args[n]; *p3; p3++)
237 {
238 macro_add_to_buff(&linebuff, &bloc, &blen, *p3);
239 }
240 if (n != (nargs -1))
241 {
242 macro_add_to_buff(&linebuff, &bloc, &blen, ',');
243 }
244 }
245 p2++;
246 }
247 else if (*p2 == '\\' && isdigit(p2[1]))
231 { 248 {
232 int n; 249 int n;
233 250
234 p2++; 251 p2++;
235 n = *p2 - '0'; 252 n = *p2 - '0';