aboutsummaryrefslogtreecommitdiffstats
path: root/src/argparser.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-21 18:58:22 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-21 18:58:22 +0200
commitc7a1d7c25668b82293db3bee5cbf0f0a80a2feec (patch)
treef7662997684b606dfd3d1a4036be9f9a309eb846 /src/argparser.c
parentm (diff)
downloadargparser-c7a1d7c25668b82293db3bee5cbf0f0a80a2feec.tar.gz
argparser-c7a1d7c25668b82293db3bee5cbf0f0a80a2feec.tar.bz2
argparser-c7a1d7c25668b82293db3bee5cbf0f0a80a2feec.tar.xz
give value to args_message
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/argparser.c')
-rw-r--r--src/argparser.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/argparser.c b/src/argparser.c
index 018dc58..f1b9359 100644
--- a/src/argparser.c
+++ b/src/argparser.c
@@ -821,7 +821,28 @@ extern long args_parse(int argc, char** argv)
free(optqueue);
free(freequeue);
- /* TODO ' '.join(self.files) if len(self.files) > 0 else None */
+ args_message = null;
+ if (args_files_count > 0)
+ {
+ long n = args_files_count, i, j;
+ for (i = 0; i < args_files_count; i++)
+ {
+ char* file = *(args_files + i);
+ for (j = 0; *(file + j); j++)
+ ;
+ n += j;
+ }
+ args_message = (char*)malloc(n * sizeof(char));
+ n = 0;
+ for (i = 0; i < args_files_count; i++)
+ {
+ char* file = *(args_files + i);
+ for (j = 0; *(file + j); j++)
+ *(args_message + n++) = *(file + j);
+ *(args_message + n++) = ' ';
+ }
+ *(args_message + --n) = 0;
+ }
if (args_unrecognsed_count > 5)
{