From 93aa1a0eb4044e2cc405484524e4e26d0df2fedc Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 00:54:43 +0200 Subject: win32: ash: struct tblentry **cmdtable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy --- shell/ash.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'shell') 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) *newp = NULL; return start; } + +static void +cmdtable_size(struct tblentry **cmdtablep) +{ + int i; + nodeptrsize += CMDTABLESIZE; + funcblocksize += sizeof(struct tblentry *)*CMDTABLESIZE; + for (i = 0; i < CMDTABLESIZE; i++) + tblentry_size(cmdtablep[i]); +} + +static struct tblentry ** +cmdtable_copy(struct tblentry **cmdtablep) +{ + struct tblentry **new = funcblock; + int i; + + funcblock = (char *) funcblock + sizeof(struct tblentry *)*CMDTABLESIZE; + for (i = 0; i < CMDTABLESIZE; i++) { + new[i] = tblentry_copy(cmdtablep[i]); + SAVE_PTR(new[i]); + } + return new; +} /*- * Copyright (c) 1989, 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. -- cgit v1.2.3-55-g6feb