Hint added.
[AROS.git] / workbench / c / Shell / redirection.c
blobee096c1684bc76ae6bd61afc57afd524bc5f8515
1 /*
2 Copyright (C) 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
7 #include <proto/dos.h>
9 #include "Shell.h"
11 LONG Redirection_init(ShellState *ss)
13 return 0;
16 void Redirection_release(ShellState *ss)
18 /* Close redirection files and install regular input and output streams */
19 if (ss->newIn)
21 D(bug("[Shell] Closing redirected input 0x%p, old 0x%p\n", ss->newIn, ss->oldIn));
22 SelectInput(ss->oldIn);
23 Close(ss->newIn);
26 if (ss->newOut)
28 D(bug("[Shell] Closing redirected output 0x%p, old 0x%p\n", ss->newOut, ss->oldOut));
29 SelectOutput(ss->oldOut);
30 Close(ss->newOut);
33 ss->newIn = BNULL;
34 ss->newOut = BNULL;