Line 23... |
Line 23... |
23 |
*/
|
23 |
*/
|
24 |
|
24 |
|
25 |
#ifndef RMODINIT_H
|
25 |
#ifndef RMODINIT_H
|
26 |
#define RMODINIT_H
|
26 |
#define RMODINIT_H
|
27 |
|
27 |
|
- |
|
28 |
#include "helpers.h" /* struct DTA definition */
|
- |
|
29 |
|
28 |
#define FLAG_EXEC_AND_QUIT 1
|
30 |
#define FLAG_EXEC_AND_QUIT 1
|
29 |
#define FLAG_PERMANENT 2
|
31 |
#define FLAG_PERMANENT 2
|
30 |
#define FLAG_ECHOFLAG 4
|
32 |
#define FLAG_ECHOFLAG 4
|
31 |
#define FLAG_ECHO_BEFORE_BAT 8
|
33 |
#define FLAG_ECHO_BEFORE_BAT 8
|
32 |
#define FLAG_SKIP_AUTOEXEC 16
|
34 |
#define FLAG_SKIP_AUTOEXEC 16
|
Line 41... |
Line 43... |
41 |
unsigned char flags; /* used for step-by-step execution */
|
43 |
unsigned char flags; /* used for step-by-step execution */
|
42 |
unsigned long nextline; /* offset in file of next bat line to process */
|
44 |
unsigned long nextline; /* offset in file of next bat line to process */
|
43 |
struct batctx far *parent; /* parent context if this batch was CALLed */
|
45 |
struct batctx far *parent; /* parent context if this batch was CALLed */
|
44 |
};
|
46 |
};
|
45 |
|
47 |
|
- |
|
48 |
/* for context structure used to track the execution of the ongoing FOR loop */
|
- |
|
49 |
struct forctx {
|
- |
|
50 |
char cmd[130]; /* copy of the original FOR command */
|
- |
|
51 |
unsigned short varname; /* cmd offset of the replaceable variable name */
|
- |
|
52 |
unsigned short curpat; /* cmd offset of currently processed pattern */
|
- |
|
53 |
unsigned short exec; /* cmd offset of the command to be executed */
|
- |
|
54 |
struct DTA dta; /* DTA for FindNext on current pattern */
|
- |
|
55 |
unsigned char dta_inited; /* 0=requires FindFirst 1=FindNext */
|
- |
|
56 |
};
|
- |
|
57 |
|
46 |
struct rmod_props {
|
58 |
struct rmod_props {
|
47 |
unsigned short rmodseg; /* segment where rmod is loaded */
|
59 |
unsigned short rmodseg; /* segment where rmod is loaded */
|
48 |
unsigned long origparent; /* original parent (far ptr) of the shell */
|
60 |
unsigned long origparent; /* original parent (far ptr) of the shell */
|
49 |
unsigned short origenvseg; /* original environment segment */
|
61 |
unsigned short origenvseg; /* original environment segment */
|
50 |
unsigned char flags; /* command line parameters */
|
62 |
unsigned char flags; /* command line parameters */
|
51 |
unsigned char version; /* used to detect mismatch between rmod and SvarCOM */
|
63 |
unsigned char version; /* used to detect mismatch between rmod and SvarCOM */
|
52 |
char awaitingcmd[130]; /* command to exec next time (if any) */
|
64 |
char awaitingcmd[130]; /* command to exec next time (if any) */
|
53 |
struct batctx far *bat;
|
65 |
struct batctx far *bat; /* linked list of bat contexts, if BAT ongoing */
|
- |
|
66 |
struct forctx far *forloop; /* a single FOR loop structure, if FOR ongoing */
|
54 |
};
|
67 |
};
|
55 |
|
68 |
|
56 |
#define RMOD_OFFSET_ENVSEG 0x2C /* stored in rmod's PSP */
|
69 |
#define RMOD_OFFSET_ENVSEG 0x2C /* stored in rmod's PSP */
|
57 |
#define RMOD_OFFSET_INPUTBUF (0x100 + 0x08)
|
70 |
#define RMOD_OFFSET_INPUTBUF (0x100 + 0x08)
|
58 |
#define RMOD_OFFSET_COMSPECPTR (0x100 + 0xCE)
|
71 |
#define RMOD_OFFSET_COMSPECPTR (0x100 + 0xCE)
|