Subversion Repositories SvarDOS

Rev

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

Rev 1854 Rev 1855
Line 1013... Line 1013...
1013
 
1013
 
1014
 
1014
 
1015
int main(void) {
1015
int main(void) {
1016
  static struct config cfg;
1016
  static struct config cfg;
1017
  static unsigned short far *rmod_envseg;
1017
  static unsigned short far *rmod_envseg;
1018
  static unsigned short far *lastexitcode;
-
 
1019
  static struct rmod_props far *rmod;
1018
  static struct rmod_props far *rmod;
1020
  static char cmdlinebuf[CMDLINE_MAXLEN + 2]; /* 1 extra byte for 0-terminator and another for memguard */
1019
  static char cmdlinebuf[CMDLINE_MAXLEN + 2]; /* 1 extra byte for 0-terminator and another for memguard */
1021
  static char *cmdline;
1020
  static char *cmdline;
1022
  static struct redir_data redirprops;
1021
  static struct redir_data redirprops;
1023
  static enum cmd_result cmdres;
1022
  static enum cmd_result cmdres;
Line 1084... Line 1083...
1084
 
1083
 
1085
  /* install a few guardvals in memory to detect some cases of overflows */
1084
  /* install a few guardvals in memory to detect some cases of overflows */
1086
  memguard_set(cmdlinebuf);
1085
  memguard_set(cmdlinebuf);
1087
 
1086
 
1088
  rmod_envseg = MK_FP(rmod->rmodseg, RMOD_OFFSET_ENVSEG);
1087
  rmod_envseg = MK_FP(rmod->rmodseg, RMOD_OFFSET_ENVSEG);
1089
  lastexitcode = MK_FP(rmod->rmodseg, RMOD_OFFSET_LEXITCODE);
-
 
1090
 
1088
 
1091
  /* make COMSPEC point to myself */
1089
  /* make COMSPEC point to myself */
1092
  set_comspec_to_self(*rmod_envseg);
1090
  set_comspec_to_self(*rmod_envseg);
1093
 
1091
 
1094
  /* on /P check for the presence of AUTOEXEC.BAT and execute it if found,
1092
  /* on /P check for the presence of AUTOEXEC.BAT and execute it if found,