aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index c99a1351f..518615316 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13281,6 +13281,41 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
13281 /* NOTREACHED */ 13281 /* NOTREACHED */
13282} 13282}
13283 13283
13284/*
13285 * forkshell_prepare() and friends
13286 */
13287#define SLIST_SIZE_BEGIN(name,type) \
13288static void \
13289name(type *p) \
13290{ \
13291 while (p) { \
13292 funcblocksize += sizeof(type);
13293 /* do something here with p */
13294#define SLIST_SIZE_END() \
13295 nodeptrsize++; \
13296 p = p->next; \
13297 } \
13298}
13299
13300#define SLIST_COPY_BEGIN(name,type) \
13301static type * \
13302name(type *vp) \
13303{ \
13304 type *start; \
13305 type **vpp; \
13306 vpp = &start; \
13307 while (vp) { \
13308 *vpp = funcblock; \
13309 funcblock = (char *) funcblock + sizeof(type);
13310 /* do something here with vpp and vp */
13311#define SLIST_COPY_END() \
13312 SAVE_PTR((*vpp)->next); \
13313 vp = vp->next; \
13314 vpp = &(*vpp)->next; \
13315 } \
13316 *vpp = NULL; \
13317 return start; \
13318}
13284 13319
13285/*- 13320/*-
13286 * Copyright (c) 1989, 1991, 1993, 1994 13321 * Copyright (c) 1989, 1991, 1993, 1994