Subversion Repositories SvarDOS

Rev

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

Rev 421 Rev 479
Line 30... Line 30...
30
static unsigned short oldstdout = 0xffff;
30
static unsigned short oldstdout = 0xffff;
31
 
31
 
32
/* parse commandline and performs necessary redirections. cmdline is
32
/* parse commandline and performs necessary redirections. cmdline is
33
 * modified so all redirections are cut out.
33
 * modified so all redirections are cut out.
34
 * returns 0 on success, non-zero otherwise */
34
 * returns 0 on success, non-zero otherwise */
35
int redir_parsecmd(char far *cmdline, char *BUFFER) {
35
int redir_parsecmd(char *cmdline, char *BUFFER) {
36
  unsigned short i;
36
  unsigned short i;
37
  unsigned short rediroffset_stdin = 0;
37
  unsigned short rediroffset_stdin = 0;
38
  unsigned short rediroffset_stdout = 0;
38
  unsigned short rediroffset_stdout = 0;
39
  unsigned short pipesoffsets[16];
39
  unsigned short pipesoffsets[16];
40
  unsigned short pipescount = 0;
40
  unsigned short pipescount = 0;
Line 80... Line 80...
80
 
80
 
81
  if (rediroffset_stdout != 0) {
81
  if (rediroffset_stdout != 0) {
82
    unsigned short openflag = 0x12;  /* used during the int 21h,ah=6c call */
82
    unsigned short openflag = 0x12;  /* used during the int 21h,ah=6c call */
83
    unsigned short errcode = 0;
83
    unsigned short errcode = 0;
84
    unsigned short handle = 0;
84
    unsigned short handle = 0;
85
    char far *ptr;
85
    char *ptr;
86
    /* append? */
86
    /* append? */
87
    if (cmdline[rediroffset_stdout] == '>') {
87
    if (cmdline[rediroffset_stdout] == '>') {
88
      openflag = 0x11;
88
      openflag = 0x11;
89
      rediroffset_stdout++;
89
      rediroffset_stdout++;
90
    }
90
    }