aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 00:55:14 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-20 19:14:46 +0200
commit16623b6c5924b90dbb25c4d2b45cf89bfed72f9d (patch)
tree475c8c9023efd33a9d7d7a992616c35f719435c4 /shell
parent93aa1a0eb4044e2cc405484524e4e26d0df2fedc (diff)
downloadbusybox-w32-16623b6c5924b90dbb25c4d2b45cf89bfed72f9d.tar.gz
busybox-w32-16623b6c5924b90dbb25c4d2b45cf89bfed72f9d.tar.bz2
busybox-w32-16623b6c5924b90dbb25c4d2b45cf89bfed72f9d.zip
win32: ash: char **
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 18cb260b5..d22f91e49 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13442,6 +13442,40 @@ cmdtable_copy(struct tblentry **cmdtablep)
13442 } 13442 }
13443 return new; 13443 return new;
13444} 13444}
13445
13446/*
13447 * char **
13448 */
13449static void
13450argv_size(char **p)
13451{
13452 while (p && *p) {
13453 funcblocksize += sizeof(char *);
13454 funcstringsize += strlen(*p)+1;
13455 nodeptrsize++;
13456 p++;
13457 }
13458 funcblocksize += sizeof(char *);
13459}
13460
13461static char **
13462argv_copy(char **p)
13463{
13464 char **new, **start = funcblock;
13465
13466 while (p && *p) {
13467 new = funcblock;
13468 funcblock = (char *) funcblock + sizeof(char *);
13469 *new = nodeckstrdup(*p);
13470 SAVE_PTR(*new);
13471 p++;
13472 new++;
13473 }
13474 new = funcblock;
13475 funcblock = (char *) funcblock + sizeof(char *);
13476 *new = NULL;
13477 return start;
13478}
13445/*- 13479/*-
13446 * Copyright (c) 1989, 1991, 1993, 1994 13480 * Copyright (c) 1989, 1991, 1993, 1994
13447 * The Regents of the University of California. All rights reserved. 13481 * The Regents of the University of California. All rights reserved.