diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-06-28 11:43:49 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-06-28 11:43:49 +0000 |
commit | ac98da8eacbf1147d69e378db62432db05e8c73e (patch) | |
tree | 0742eb93bf0bb414872d13b505ab9829a349a4b2 /src | |
parent | c427a7a635ed7f367d3581f0f78b09ef0ac736b9 (diff) | |
download | libbu++-ac98da8eacbf1147d69e378db62432db05e8c73e.tar.gz libbu++-ac98da8eacbf1147d69e378db62432db05e8c73e.tar.bz2 libbu++-ac98da8eacbf1147d69e378db62432db05e8c73e.tar.xz libbu++-ac98da8eacbf1147d69e378db62432db05e8c73e.zip |
Minor fixes to the command line processor.
Diffstat (limited to '')
-rw-r--r-- | src/pproc.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pproc.cpp b/src/pproc.cpp index 55de6fe..eb52913 100644 --- a/src/pproc.cpp +++ b/src/pproc.cpp | |||
@@ -75,6 +75,8 @@ void grabParamAsData( PPROC *pproc, char *str, int *aind, int *cind ) | |||
75 | break; | 75 | break; |
76 | 76 | ||
77 | case PPROC_STRING: | 77 | case PPROC_STRING: |
78 | strcpy( (char *)(pproc->stateVar), str ); | ||
79 | (*aind)++; | ||
78 | break; | 80 | break; |
79 | } | 81 | } |
80 | } | 82 | } |
@@ -136,7 +138,15 @@ void processParams( int argc, char *argv[], PPROC *pproc ) | |||
136 | if( pproc[k].stateVar != NULL ) | 138 | if( pproc[k].stateVar != NULL ) |
137 | { | 139 | { |
138 | int tmp = 1; | 140 | int tmp = 1; |
139 | grabParamAsData( &pproc[k], argv[j], &j, &tmp ); | 141 | if( argv[j][2] == '\0' ) |
142 | { | ||
143 | grabParamAsData( &pproc[k], argv[j+1], &j, &tmp ); | ||
144 | } | ||
145 | else | ||
146 | { | ||
147 | j--; | ||
148 | grabParamAsData( &pproc[k], (&argv[j+1][2]), &j, &tmp ); | ||
149 | } | ||
140 | } | 150 | } |
141 | break; | 151 | break; |
142 | } | 152 | } |