- Timestamp:
- Jun 19, 2012, 5:24:19 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Ohana/src/opihi/lib.shell/string.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/Ohana/src/opihi/lib.shell/string.c
r31667 r34041 301 301 *out = *in; 302 302 } 303 304 // paste together argv[0] .. argv[N] into a single string 305 char *paste_args (int argc, char **argv) { 306 307 int i; 308 309 int length = 0; 310 for (i = 0; i < argc; i++) { 311 length += strlen(argv[i]) + 1; 312 } 313 314 char *string = NULL; 315 ALLOCATE (string, char, length); 316 string[0] = 0; 317 for (i = 0; i < argc; i++) { 318 strcat (string, argv[i]); 319 if (i < argc - 1) strcat (string, " "); 320 } 321 return string; 322 } 323
Note:
See TracChangeset
for help on using the changeset viewer.
