aboutsummaryrefslogtreecommitdiff
path: root/src/macro.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-03-08 13:51:57 +0000
committerIan C <ianc@noddybox.co.uk>2016-03-08 13:51:57 +0000
commit282fa7725993c9b0b0d2bb0977c124f11abea1fd (patch)
treee798be921f3cfc51ef0ca39c195a07218defc8d8 /src/macro.c
parent3bad2fc2e05e0ddbf7d398f120b6d5d525476ff9 (diff)
Wildcard for args, EX changes and CP/M test.
+ Added '*' wildcard for macro arguments + Allow 'EX' with parameters reversed on the Z80 + Added simple CP/M example test. + Added some files to gitignore
Diffstat (limited to 'src/macro.c')
-rw-r--r--src/macro.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/macro.c b/src/macro.c
index 03891c2..3e0ce2b 100644
--- a/src/macro.c
+++ b/src/macro.c
@@ -390,9 +390,29 @@ char *MacroPlay(Macro *macro)
}
else
{
- num[in_num] = 0;
- AddArg(str, macro, atoi(num));
- in_num = -1;
+ if (in_num == 0 && line[rd] == '*')
+ {
+ int f;
+
+ rd++;
+
+ for(f = 0; f < macro->argc; f++)
+ {
+ if (f > 0)
+ {
+ VarcharAddChar(str, ',');
+ }
+
+ AddArg(str, macro, f);
+ }
+ in_num = -1;
+ }
+ else
+ {
+ num[in_num] = 0;
+ AddArg(str, macro, atoi(num));
+ in_num = -1;
+ }
}
}
else if (in_arg != -1)