Subversion Repositories SvarDOS

Rev

Rev 1840 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1840 Rev 1846
Line 45... Line 45...
45
 * mismatch, then it would likely mean that SvarCOM has been upgraded and
45
 * mismatch, then it would likely mean that SvarCOM has been upgraded and
46
 * RMOD should not be accessed as its structure might no longer be in sync
46
 * RMOD should not be accessed as its structure might no longer be in sync
47
 * with what I think it is.
47
 * with what I think it is.
48
 *          *** INCREMENT THIS AT EACH NEW SVARCOM RELEASE! ***
48
 *          *** INCREMENT THIS AT EACH NEW SVARCOM RELEASE! ***
49
 *            (or at least whenever RMOD's struct is changed)            */
49
 *            (or at least whenever RMOD's struct is changed)            */
50
#define BYTE_VERSION 5
50
#define BYTE_VERSION 6
51
 
51
 
52
 
52
 
53
struct config {
53
struct config {
54
  unsigned char flags; /* command.com flags, as defined in rmodinit.h */
54
  unsigned char flags; /* command.com flags, as defined in rmodinit.h */
55
  char *execcmd;
55
  char *execcmd;
Line 1057... Line 1057...
1057
     * have a purpose in life, UNLESS I still have a batch file to run or
1057
     * have a purpose in life, UNLESS I still have a batch file to run or
1058
     * a FOR loop to execute */
1058
     * a FOR loop to execute */
1059
    if ((rmod->flags & FLAG_EXEC_AND_QUIT) && (rmod->bat == NULL) && (rmod->forloop == NULL)) {
1059
    if ((rmod->flags & FLAG_EXEC_AND_QUIT) && (rmod->bat == NULL) && (rmod->forloop == NULL)) {
1060
      sayonara(rmod);
1060
      sayonara(rmod);
1061
    }
1061
    }
-
 
1062
 
1062
    /* */
1063
    /* */
1063
    if (rmod->version != BYTE_VERSION) {
1064
    if (rmod->version != BYTE_VERSION) {
1064
      nls_outputnl_err(2,0);
1065
      nls_outputnl_err(2,0);
1065
      _asm {
1066
      _asm {
1066
        HALT:
1067
        HALT:
Line 1068... Line 1069...
1068
        jmp HALT
1069
        jmp HALT
1069
      }
1070
      }
1070
    }
1071
    }
1071
  }
1072
  }
1072
 
1073
 
-
 
1074
  /* if last operation was ended by CTRL+C then make sure to abort any
-
 
1075
   * ongoing BAT file or FOR loop */
-
 
1076
  {
-
 
1077
    char far *ctrlcflag = MK_FP(rmod->rmodseg, RMOD_OFFSET_CTRLCFLAG);
-
 
1078
    if (*ctrlcflag != 0) {
-
 
1079
      outputnl("<last process interrupted through CTRL+C>");
-
 
1080
      *ctrlcflag = 0;
-
 
1081
    }
-
 
1082
  }
-
 
1083
 
1073
  /* 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 */
1074
  memguard_set(cmdlinebuf);
1085
  memguard_set(cmdlinebuf);
1075
 
1086
 
1076
  rmod_envseg = MK_FP(rmod->rmodseg, RMOD_OFFSET_ENVSEG);
1087
  rmod_envseg = MK_FP(rmod->rmodseg, RMOD_OFFSET_ENVSEG);
1077
  lastexitcode = MK_FP(rmod->rmodseg, RMOD_OFFSET_LEXITCODE);
1088
  lastexitcode = MK_FP(rmod->rmodseg, RMOD_OFFSET_LEXITCODE);