From deba8cc58be7511ede63d0b6417c739e8e35b176 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 26 Jul 2020 14:32:02 +0300 Subject: Asking the user for input --- src/ui/command.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ui/command.c') diff --git a/src/ui/command.c b/src/ui/command.c index 71228784..b79c8bcf 100644 --- a/src/ui/command.c +++ b/src/ui/command.c @@ -51,7 +51,7 @@ void *pointer_Command(const char *cmd) { return pointerLabel_Command(cmd, "ptr"); } -const char *valuePtr_Command(const char *cmd, const char *label) { +const char *suffixPtr_Command(const char *cmd, const char *label) { const iString *tok = tokenString_(label); const char *ptr = strstr(cmd, cstr_String(tok)); if (ptr) { @@ -60,8 +60,12 @@ const char *valuePtr_Command(const char *cmd, const char *label) { return NULL; } +iString *suffix_Command(const char *cmd, const char *label) { + return newCStr_String(suffixPtr_Command(cmd, label)); +} + const iString *string_Command(const char *cmd, const char *label) { - iRangecc val = { valuePtr_Command(cmd, label), NULL }; + iRangecc val = { suffixPtr_Command(cmd, label), NULL }; if (val.start) { for (val.end = val.start; *val.end && !isspace(*val.end); val.end++) {} return collect_String(newRange_String(val)); -- cgit v1.2.3