Subversion Repositories SvarDOS

Rev

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

Rev 576 Rev 949
Line 29... Line 29...
29
#define FLAG_PERMANENT        2
29
#define FLAG_PERMANENT        2
30
#define FLAG_ECHOFLAG         4
30
#define FLAG_ECHOFLAG         4
31
#define FLAG_ECHO_BEFORE_BAT  8
31
#define FLAG_ECHO_BEFORE_BAT  8
32
#define FLAG_SKIP_AUTOEXEC   16
32
#define FLAG_SKIP_AUTOEXEC   16
33
 
33
 
-
 
34
/* batch context structure used to track what batch file is being executed,
-
 
35
 * at what line, arguments, whether or not it has a parent batch... */
-
 
36
struct batctx {
-
 
37
  char fname[130];            /* truename of batch file being processed */
-
 
38
  char argv[130];             /* args of the batch call (0-separated) */
-
 
39
  unsigned long nextline;     /* offset in file of next bat line to process */
-
 
40
  struct batctx far *parent;  /* parent context if this batch was CALLed */
-
 
41
};
-
 
42
 
34
struct rmod_props {
43
struct rmod_props {
35
  char inputbuf[130];         /* input buffer for INT 21, AH=0x0A */
44
  char inputbuf[130];         /* input buffer for INT 21, AH=0x0A */
36
  unsigned short rmodseg;     /* segment where rmod is loaded */
45
  unsigned short rmodseg;     /* segment where rmod is loaded */
37
  unsigned long origparent;   /* original parent (far ptr) of the shell */
46
  unsigned long origparent;   /* original parent (far ptr) of the shell */
38
  unsigned short origenvseg;  /* original environment segment */
47
  unsigned short origenvseg;  /* original environment segment */
39
  unsigned char flags;        /* command line parameters */
48
  unsigned char flags;        /* command line parameters */
40
  unsigned char version;      /* used to detect mismatch between rmod and SvarCOM */
49
  unsigned char version;      /* used to detect mismatch between rmod and SvarCOM */
41
  char batfile[130];          /* truename of batch file being processed */
-
 
42
  char batargv[130];          /* args of the batch call (0-separated) */
-
 
43
  unsigned long batnextline;  /* offset in file of next bat line to process */
-
 
44
  char awaitingcmd[130];      /* command to exec next time (if any) */
50
  char awaitingcmd[130];      /* command to exec next time (if any) */
-
 
51
  struct batctx far *bat;
45
};
52
};
46
 
53
 
47
#define RMOD_OFFSET_ENVSEG     0x2C   /* stored in rmod's PSP */
54
#define RMOD_OFFSET_ENVSEG     0x2C   /* stored in rmod's PSP */
48
#define RMOD_OFFSET_COMSPECPTR (0x100 + 0x4A)
55
#define RMOD_OFFSET_COMSPECPTR (0x100 + 0x4A)
49
#define RMOD_OFFSET_BOOTDRIVE  (0x100 + 0x4C)
56
#define RMOD_OFFSET_BOOTDRIVE  (0x100 + 0x4C)
Line 59... Line 66...
59
 
66
 
60
struct rmod_props far *rmod_install(unsigned short envsize, unsigned char *rmodcore, unsigned short rmodcore_len);
67
struct rmod_props far *rmod_install(unsigned short envsize, unsigned char *rmodcore, unsigned short rmodcore_len);
61
struct rmod_props far *rmod_find(unsigned short rmodcore_len);
68
struct rmod_props far *rmod_find(unsigned short rmodcore_len);
62
void rmod_updatecomspecptr(unsigned short rmod_seg, unsigned short env_seg);
69
void rmod_updatecomspecptr(unsigned short rmod_seg, unsigned short env_seg);
63
 
70
 
-
 
71
/* allocate */
-
 
72
void far *rmod_fmalloc(unsigned short bytes, unsigned short rmod_seg, char *ident);
-
 
73
void rmod_ffree(void far *ptr);
-
 
74
 
64
#endif
75
#endif