Subversion Repositories SvarDOS

Rev

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

Rev 1848 Rev 1852
Line 1088... Line 1088...
1088
  lastexitcode = MK_FP(rmod->rmodseg, RMOD_OFFSET_LEXITCODE);
1088
  lastexitcode = MK_FP(rmod->rmodseg, RMOD_OFFSET_LEXITCODE);
1089
 
1089
 
1090
  /* make COMSPEC point to myself */
1090
  /* make COMSPEC point to myself */
1091
  set_comspec_to_self(*rmod_envseg);
1091
  set_comspec_to_self(*rmod_envseg);
1092
 
1092
 
1093
  /* update rmod's ptr to COMSPEC so it is always up to date - this needs to be
-
 
1094
   * done early so it is up to date even if this instance of SvarCOM dies
-
 
1095
   * early (for example because of a CTRL+C event) */
-
 
1096
  rmod_updatecomspecptr(rmod->rmodseg, *rmod_envseg);
-
 
1097
 
-
 
1098
  /* on /P check for the presence of AUTOEXEC.BAT and execute it if found,
1093
  /* on /P check for the presence of AUTOEXEC.BAT and execute it if found,
1099
   * but skip this check if /D was also passed */
1094
   * but skip this check if /D was also passed */
1100
  if ((cfg.flags & (FLAG_PERMANENT | FLAG_SKIP_AUTOEXEC)) == FLAG_PERMANENT) {
1095
  if ((cfg.flags & (FLAG_PERMANENT | FLAG_SKIP_AUTOEXEC)) == FLAG_PERMANENT) {
1101
    if (file_getattr("AUTOEXEC.BAT") >= 0) cfg.execcmd = "AUTOEXEC.BAT";
1096
    if (file_getattr("AUTOEXEC.BAT") >= 0) cfg.execcmd = "AUTOEXEC.BAT";
1102
  }
1097
  }
1103
 
1098
 
1104
  do {
1099
  do {
1105
 
1100
 
-
 
1101
    /* update rmod's ptr to COMSPEC so it is always up to date - this needs to be
-
 
1102
     * done early so it is up to date even if this instance of SvarCOM dies
-
 
1103
     * early (for example because of a CTRL+C event) */
-
 
1104
    rmod_updatecomspecptr(rmod->rmodseg, *rmod_envseg);
-
 
1105
 
1106
    /* terminate previous command with a CR/LF if ECHO ON (but not during BAT processing) */
1106
    /* terminate previous command with a CR/LF if ECHO ON (but not during BAT processing) */
1107
    if ((rmod->flags & FLAG_ECHOFLAG) && (rmod->bat == NULL)) outputnl("");
1107
    if ((rmod->flags & FLAG_ECHOFLAG) && (rmod->bat == NULL)) outputnl("");
1108
 
1108
 
1109
    SKIP_NEWLINE:
1109
    SKIP_NEWLINE:
1110
 
1110