summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/argv/argv.h23
-rw-r--r--src/internal/ptycon_nolibc_impl.c5
-rw-r--r--src/internal/ptycon_nolibc_impl.h4
3 files changed, 32 insertions, 0 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 8753ebb..199e9c6 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/ptycon_nolibc_impl.c b/src/internal/ptycon_nolibc_impl.c
index 2319505..c489b98 100644
--- a/src/internal/ptycon_nolibc_impl.c
+++ b/src/internal/ptycon_nolibc_impl.c
@@ -61,6 +61,11 @@ char * ptyc_strrchr(const char * ch, int c)
return 0;
}
+int ptyc_isblank(int c)
+{
+ return ((c == 0x20) || (c == 0x09));
+}
+
#ifdef PTYC_EXPORT
int __stdcall ptycon_entry_point(void * hinstance, uint32_t reason, void * reserved)
{
diff --git a/src/internal/ptycon_nolibc_impl.h b/src/internal/ptycon_nolibc_impl.h
index 0c58141..c9caf13 100644
--- a/src/internal/ptycon_nolibc_impl.h
+++ b/src/internal/ptycon_nolibc_impl.h
@@ -16,6 +16,8 @@
#define strchr ptyc_strchr
#define strrchr ptyc_strrchr
+#define isblank ptyc_isblank
+
#define calloc ptyc_calloc
#define free ptyc_free
@@ -35,6 +37,8 @@ int ptyc_strncmp(const char * a, const char * b, size_t n);
char * ptyc_strchr(const char * ch, int c);
char * ptyc_strrchr(const char * ch, int c);
+int ptyc_isblank(int c);
+
void * ptyc_calloc(size_t n, size_t size);
void ptyc_free(void *);