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 c0828343..19228e46 100644 --- a/src/ui/command.c +++ b/src/ui/command.c | |||
@@ -28,6 +28,15 @@ int arg_Command(const char *cmd) { | |||
28 | return argLabel_Command(cmd, "arg"); | 28 | return argLabel_Command(cmd, "arg"); |
29 | } | 29 | } |
30 | 30 | ||
31 | float argfLabel_Command(const char *cmd, const char *label) { | ||
32 | const iString *tok = tokenString_(label); | ||
33 | const char *ptr = strstr(cmd, cstr_String(tok)); | ||
34 | if (ptr) { | ||
35 | return strtof(ptr + size_String(tok), NULL); | ||
36 | } | ||
37 | return 0.0f; | ||
38 | } | ||
39 | |||
31 | float argf_Command(const char *cmd) { | 40 | float argf_Command(const char *cmd) { |
32 | const char *ptr = strstr(cmd, " arg:"); | 41 | const char *ptr = strstr(cmd, " arg:"); |
33 | if (ptr) { | 42 | if (ptr) { |