diff options
Diffstat (limited to 'src/ui/command.c')
-rw-r--r-- | src/ui/command.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/command.c b/src/ui/command.c index c5ca164e..3ae0f0c9 100644 --- a/src/ui/command.c +++ b/src/ui/command.c | |||
@@ -50,6 +50,15 @@ int arg_Command(const char *cmd) { | |||
50 | return argLabel_Command(cmd, "arg"); | 50 | return argLabel_Command(cmd, "arg"); |
51 | } | 51 | } |
52 | 52 | ||
53 | uint32_t argU32Label_Command(const char *cmd, const char *label) { | ||
54 | const iString *tok = tokenString_(label); | ||
55 | const char *ptr = strstr(cmd, cstr_String(tok)); | ||
56 | if (ptr) { | ||
57 | return strtoul(ptr + size_String(tok), NULL, 10); | ||
58 | } | ||
59 | return 0; | ||
60 | } | ||
61 | |||
53 | float argfLabel_Command(const char *cmd, const char *label) { | 62 | float argfLabel_Command(const char *cmd, const char *label) { |
54 | const iString *tok = tokenString_(label); | 63 | const iString *tok = tokenString_(label); |
55 | const char *ptr = strstr(cmd, cstr_String(tok)); | 64 | const char *ptr = strstr(cmd, cstr_String(tok)); |