diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 00:55:42 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-20 19:14:47 +0200 |
commit | 724bee02b64ed1591334b28956d9a53d8f69c0ad (patch) | |
tree | 5147003c2ef0b187414e3d5b47040e4171ca1478 /shell | |
parent | 16623b6c5924b90dbb25c4d2b45cf89bfed72f9d (diff) | |
download | busybox-w32-724bee02b64ed1591334b28956d9a53d8f69c0ad.tar.gz busybox-w32-724bee02b64ed1591334b28956d9a53d8f69c0ad.tar.bz2 busybox-w32-724bee02b64ed1591334b28956d9a53d8f69c0ad.zip |
win32: ash: struct redirtab
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index d22f91e49..ea338f1dd 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -13476,6 +13476,39 @@ argv_copy(char **p) | |||
13476 | *new = NULL; | 13476 | *new = NULL; |
13477 | return start; | 13477 | return start; |
13478 | } | 13478 | } |
13479 | |||
13480 | /* | ||
13481 | * struct redirtab | ||
13482 | */ | ||
13483 | static void | ||
13484 | redirtab_size(struct redirtab *rdtp) | ||
13485 | { | ||
13486 | while (rdtp) { | ||
13487 | funcblocksize += sizeof(*rdtp)+sizeof(rdtp->two_fd[0])*rdtp->pair_count; | ||
13488 | rdtp = rdtp->next; | ||
13489 | nodeptrsize++; /* rdtp->next */ | ||
13490 | } | ||
13491 | } | ||
13492 | |||
13493 | static struct redirtab * | ||
13494 | redirtab_copy(struct redirtab *rdtp) | ||
13495 | { | ||
13496 | struct redirtab *start; | ||
13497 | struct redirtab **vpp; | ||
13498 | |||
13499 | vpp = &start; | ||
13500 | while (rdtp) { | ||
13501 | int size = sizeof(*rdtp)+sizeof(rdtp->two_fd[0])*rdtp->pair_count; | ||
13502 | *vpp = funcblock; | ||
13503 | funcblock = (char *) funcblock + size; | ||
13504 | memcpy(*vpp, rdtp, size); | ||
13505 | SAVE_PTR((*vpp)->next); | ||
13506 | rdtp = rdtp->next; | ||
13507 | vpp = &(*vpp)->next; | ||
13508 | } | ||
13509 | *vpp = NULL; | ||
13510 | return start; | ||
13511 | } | ||
13479 | /*- | 13512 | /*- |
13480 | * Copyright (c) 1989, 1991, 1993, 1994 | 13513 | * Copyright (c) 1989, 1991, 1993, 1994 |
13481 | * The Regents of the University of California. All rights reserved. | 13514 | * The Regents of the University of California. All rights reserved. |