diff options
-rw-r--r-- | src/driver/ntux_driver_ctx.c | 2 | ||||
-rw-r--r-- | src/internal/argv/argv.h | 23 | ||||
-rw-r--r-- | src/internal/ntux_nolibc_impl.c | 5 | ||||
-rw-r--r-- | src/internal/ntux_nolibc_impl.h | 2 |
4 files changed, 31 insertions, 1 deletions
diff --git a/src/driver/ntux_driver_ctx.c b/src/driver/ntux_driver_ctx.c index e0f381d..470f281 100644 --- a/src/driver/ntux_driver_ctx.c +++ b/src/driver/ntux_driver_ctx.c @@ -438,7 +438,7 @@ int ntux_get_driver_ctx( size_t pathlen; struct argv_ctx ctx = {ARGV_VERBOSITY_NONE, ARGV_MODE_SCAN, - 0,0,0,0,0,0,0}; + 0,0,0,0,0,0,0,0}; /* fdctx */ if (!fdctx) { diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index 6131485..d287e86 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -856,8 +856,10 @@ static void argv_show_status( struct argv_ctx * ctx, struct argv_meta * meta) { + int i; int argc; char ** argv; + struct argv_keyval * keyv; struct argv_entry * entry; const struct argv_option * option; char short_name[2] = {0}; @@ -887,6 +889,27 @@ static void argv_show_status( else argv_dprintf(fd,"[-%s,--%s]\n", short_name,option->long_name); + + if (entry->keyv) { + for (i=0,keyv=entry->keyv; keyv->keyword; i++,keyv++) { + switch (keyv->flags) { + case ARGV_KEYVAL_ASSIGN: + argv_dprintf(fd,"\tkeyval[%d]: <%s>=%s\n", + i,keyv->keyword,keyv->value); + break; + + case ARGV_KEYVAL_OVERRIDE: + argv_dprintf(fd,"\tkeyval[%d]: <%s>:=%s\n", + i,keyv->keyword,keyv->value); + break; + + default: + argv_dprintf(fd,"\tkeyval[%d]: <%s>\n", + i,keyv->keyword); + break; + } + } + } } else { argv_dprintf(fd,"<program arg> := %s\n",entry->arg); } diff --git a/src/internal/ntux_nolibc_impl.c b/src/internal/ntux_nolibc_impl.c index e20d046..c414bc8 100644 --- a/src/internal/ntux_nolibc_impl.c +++ b/src/internal/ntux_nolibc_impl.c @@ -63,6 +63,11 @@ char * ntux_strrchr(const char * ch, int c) return 0; } +int ntux_isblank(int c) +{ + return ((c == 0x20) || (c == 0x09)); +} + #ifdef NTUX_EXPORT int __stdcall ntux_entry_point(void * hinstance, uint32_t reason, void * reserved) { diff --git a/src/internal/ntux_nolibc_impl.h b/src/internal/ntux_nolibc_impl.h index eac2631..f68d282 100644 --- a/src/internal/ntux_nolibc_impl.h +++ b/src/internal/ntux_nolibc_impl.h @@ -16,6 +16,8 @@ #define strchr ntux_strchr #define strrchr ntux_strrchr +#define isblank ntux_isblank + #define calloc ntux_calloc #define free ntux_free |