Subversion Repositories SvarDOS

Rev

Rev 479 | Rev 543 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 479 Rev 517
Line 23... Line 23...
23
 */
23
 */
24
 
24
 
25
#ifndef REDIR_H
25
#ifndef REDIR_H
26
#define REDIR_H
26
#define REDIR_H
27
 
27
 
-
 
28
#define REDIR_MAX_PIPES 15
-
 
29
 
-
 
30
struct redir_data {
-
 
31
  char *pipes[REDIR_MAX_PIPES + 1];
-
 
32
  char *stdinfile;
-
 
33
  char *stdoutfile;
-
 
34
  unsigned short stdout_openflag; /* 0x11 or 0x12, used for the 'extended open' call */
-
 
35
};
-
 
36
 
28
/* parse commandline and performs necessary redirections. cmdline is
37
/* parse commandline and performs necessary redirections. cmdline is
29
 * modified so all redirections are cut out.
38
 * modified so all redirections are cut out. */
30
 * returns 0 on success, non-zero otherwise */
39
void redir_parsecmd(struct redir_data *r, char *cmdline);
-
 
40
 
-
 
41
/* apply stdin/stdout redirections defined in redir_data, returns 0 on success */
31
int redir_parsecmd(char *cmdline, char *BUFFER);
42
int redir_apply(const struct redir_data *d);
32
 
43
 
33
/* restores previous stdout/stdin handlers if they have been redirected */
44
/* restores previous stdout/stdin handlers if they have been redirected */
34
void redir_revert(void);
45
void redir_revert(void);
35
 
46
 
36
#endif
47
#endif