diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 00:55:14 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 11:04:27 +1000 |
commit | 3a3de418649e2b2d5121cf1cfa0f4b9b2d0ed6ba (patch) | |
tree | 7476703f7d36f9988f1c0f21acfccf8be6b4b596 | |
parent | 612facb32acb4907156c11a47b31e5edecf2957a (diff) | |
download | busybox-w32-3a3de418649e2b2d5121cf1cfa0f4b9b2d0ed6ba.tar.gz busybox-w32-3a3de418649e2b2d5121cf1cfa0f4b9b2d0ed6ba.tar.bz2 busybox-w32-3a3de418649e2b2d5121cf1cfa0f4b9b2d0ed6ba.zip |
win32: ash: char **
-rw-r--r-- | shell/ash.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index b4ecf9d3a..2b7bc66c7 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -13443,6 +13443,40 @@ cmdtable_copy(struct tblentry **cmdtablep) | |||
13443 | } | 13443 | } |
13444 | return new; | 13444 | return new; |
13445 | } | 13445 | } |
13446 | |||
13447 | /* | ||
13448 | * char ** | ||
13449 | */ | ||
13450 | static void | ||
13451 | argv_size(char **p) | ||
13452 | { | ||
13453 | while (p && *p) { | ||
13454 | funcblocksize += sizeof(char *); | ||
13455 | funcstringsize += strlen(*p)+1; | ||
13456 | nodeptrsize++; | ||
13457 | p++; | ||
13458 | } | ||
13459 | funcblocksize += sizeof(char *); | ||
13460 | } | ||
13461 | |||
13462 | static char ** | ||
13463 | argv_copy(char **p) | ||
13464 | { | ||
13465 | char **new, **start = funcblock; | ||
13466 | |||
13467 | while (p && *p) { | ||
13468 | new = funcblock; | ||
13469 | funcblock = (char *) funcblock + sizeof(char *); | ||
13470 | *new = nodeckstrdup(*p); | ||
13471 | SAVE_PTR(*new); | ||
13472 | p++; | ||
13473 | new++; | ||
13474 | } | ||
13475 | new = funcblock; | ||
13476 | funcblock = (char *) funcblock + sizeof(char *); | ||
13477 | *new = NULL; | ||
13478 | return start; | ||
13479 | } | ||
13446 | /*- | 13480 | /*- |
13447 | * Copyright (c) 1989, 1991, 1993, 1994 | 13481 | * Copyright (c) 1989, 1991, 1993, 1994 |
13448 | * The Regents of the University of California. All rights reserved. | 13482 | * The Regents of the University of California. All rights reserved. |