aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 00:54:43 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-20 19:14:46 +0200
commit93aa1a0eb4044e2cc405484524e4e26d0df2fedc (patch)
tree020a63475ea3790556b55fab6f60db4a5688c954 /shell
parent157e975c7617c12d38bdfa6e095ffdf56b3f0d72 (diff)
downloadbusybox-w32-93aa1a0eb4044e2cc405484524e4e26d0df2fedc.tar.gz
busybox-w32-93aa1a0eb4044e2cc405484524e4e26d0df2fedc.tar.bz2
busybox-w32-93aa1a0eb4044e2cc405484524e4e26d0df2fedc.zip
win32: ash: struct tblentry **cmdtable
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index ffbd473a0..18cb260b5 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13418,6 +13418,30 @@ tblentry_copy(struct tblentry *tep)
13418 *newp = NULL; 13418 *newp = NULL;
13419 return start; 13419 return start;
13420} 13420}
13421
13422static void
13423cmdtable_size(struct tblentry **cmdtablep)
13424{
13425 int i;
13426 nodeptrsize += CMDTABLESIZE;
13427 funcblocksize += sizeof(struct tblentry *)*CMDTABLESIZE;
13428 for (i = 0; i < CMDTABLESIZE; i++)
13429 tblentry_size(cmdtablep[i]);
13430}
13431
13432static struct tblentry **
13433cmdtable_copy(struct tblentry **cmdtablep)
13434{
13435 struct tblentry **new = funcblock;
13436 int i;
13437
13438 funcblock = (char *) funcblock + sizeof(struct tblentry *)*CMDTABLESIZE;
13439 for (i = 0; i < CMDTABLESIZE; i++) {
13440 new[i] = tblentry_copy(cmdtablep[i]);
13441 SAVE_PTR(new[i]);
13442 }
13443 return new;
13444}
13421/*- 13445/*-
13422 * Copyright (c) 1989, 1991, 1993, 1994 13446 * Copyright (c) 1989, 1991, 1993, 1994
13423 * The Regents of the University of California. All rights reserved. 13447 * The Regents of the University of California. All rights reserved.