diff options
| author | 2024-04-25 21:24:10 +0100 | |
|---|---|---|
| committer | 2024-04-25 22:32:27 +0000 | |
| commit | 2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch) | |
| tree | 80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/CMD/FILESYS/PSDATA.H | |
| parent | Merge pull request #430 from jpbaltazar/typoptbr (diff) | |
| download | ms-dos-main.tar.gz ms-dos-main.tar.xz ms-dos-main.zip | |
Diffstat (limited to 'v4.0/src/CMD/FILESYS/PSDATA.H')
| -rw-r--r-- | v4.0/src/CMD/FILESYS/PSDATA.H | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/v4.0/src/CMD/FILESYS/PSDATA.H b/v4.0/src/CMD/FILESYS/PSDATA.H new file mode 100644 index 0000000..569fc1c --- /dev/null +++ b/v4.0/src/CMD/FILESYS/PSDATA.H | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | /* */ | ||
| 2 | /*----------------------------------------------------------------------+ | ||
| 3 | | | | ||
| 4 | | This file contains the structures and defines that are needed to use | | ||
| 5 | | the parser from a C program. | | ||
| 6 | | | | ||
| 7 | | | | ||
| 8 | | Date: 5-21-87 | | ||
| 9 | | | | ||
| 10 | +----------------------------------------------------------------------*/ | ||
| 11 | |||
| 12 | |||
| 13 | #define P_Len_PARMS 4 /* length of p_parms */ | ||
| 14 | #define P_I_Use_Default 0 /* no extra stuff specified */ | ||
| 15 | #define P_I_Have_Delim 1 /* extra delimiter specified */ | ||
| 16 | #define P_I_Have_EOL 2 /* extra EOL specified */ | ||
| 17 | |||
| 18 | struct p_parms | ||
| 19 | { | ||
| 20 | struct p_parmsx *p_parmsx_address; /* address of p_parmsx */ | ||
| 21 | unsigned char p_num_extra; /* number of extra stuff */ | ||
| 22 | unsigned char p_len_extra_delim; /* length of extra delimiter */ | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct p_parmsx | ||
| 26 | { | ||
| 27 | unsigned char p_minp; /* Minimum positional number */ | ||
| 28 | unsigned char p_maxp; /* Maximum positional number */ | ||
| 29 | unsigned int p_1st_control; /* Address of the 1st CONTROL block */ | ||
| 30 | }; | ||
| 31 | |||
| 32 | |||
| 33 | struct p_control_blk | ||
| 34 | { | ||
| 35 | unsigned int p_match_flag; /* Controls type matched */ | ||
| 36 | unsigned int p_function_flag; /* Function should be taken */ | ||
| 37 | unsigned int p_result_buf; /* Result buffer address */ | ||
| 38 | unsigned int p_value_list; /* Value list address */ | ||
| 39 | unsigned char p_nid; /* # of keyword/SW synonyms */ | ||
| 40 | unsigned char p_keyorsw; /* keyword or sw */ | ||
| 41 | }; | ||
| 42 | |||
| 43 | /* Match_Flags */ | ||
| 44 | |||
| 45 | #define P_Num_Val 0x8000 /* Numeric Value */ | ||
| 46 | #define P_SNum_Val 0x4000 /* Signed numeric value */ | ||
| 47 | #define P_Simple_S 0x2000 /* Simple string */ | ||
| 48 | #define P_Date_S 0x1000 /* Date string */ | ||
| 49 | #define P_Time_S 0x0800 /* Time string */ | ||
| 50 | #define P_Cmpx_S 0x0400 /* Complex string */ | ||
| 51 | #define P_File_Spc 0x0200 /* File Spec */ | ||
| 52 | #define P_Drv_Only 0x0100 /* Drive Only */ | ||
| 53 | #define P_Qu_String 0x0080 /* Quoted string */ | ||
| 54 | #define P_Ig_Colon 0x0010 /* Ignore colon at end in match */ | ||
| 55 | #define P_Repeat 0x0002 /* Repeat allowed */ | ||
| 56 | #define P_Optional 0x0001 /* Optional */ | ||
| 57 | |||
| 58 | /*----------------------------------------------------------------------+ | ||
| 59 | | | | ||
| 60 | | Function flags | | ||
| 61 | | | | ||
| 62 | +----------------------------------------------------------------------*/ | ||
| 63 | |||
| 64 | #define P_CAP_File 0x0001 /* CAP result by file table */ | ||
| 65 | #define P_CAP_Char 0x0002 /* CAP result by character table */ | ||
| 66 | #define P_Rm_Colon 0x0010 /* Remove ":" at the end */ | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | #define P_nval_None 0 /* no value list ID */ | ||
| 73 | #define P_nval_Range 1 /* range list ID */ | ||
| 74 | #define P_nval_Value 2 /* value list ID */ | ||
| 75 | #define P_nval_String 3 /* string list ID */ | ||
| 76 | #define P_Len_Range 9 /* Length of a range choice(two DD plus one DB) */ | ||
| 77 | #define P_Len_Value 5 /* Length of a value choice(one DD plus one DB) */ | ||
| 78 | #define P_Len_String 3 /* Length of a string choice(one DW plus one DB) */ | ||
| 79 | |||
| 80 | |||
| 81 | /*----------------------------------------------------------------------+ | ||
| 82 | | | | ||
| 83 | | problem with doing this in C | | ||
| 84 | | | | ||
| 85 | +----------------------------------------------------------------------*/ | ||
| 86 | struct p_val_list | ||
| 87 | { | ||
| 88 | unsigned char P_NumofList; /* number of following choice */ | ||
| 89 | unsigned int P_Val_XL; /* lower word of value */ | ||
| 90 | unsigned int P_Val_XH; /* higher word of value */ | ||
| 91 | unsigned int P_Val_YL; /* lower word of another value */ | ||
| 92 | unsigned int P_Val_YH; /* higher word of another value */ | ||
| 93 | }; | ||
| 94 | |||
| 95 | |||
| 96 | /*----------------------------------------------------------------------+ | ||
| 97 | | | | ||
| 98 | | Result block structure | | ||
| 99 | | | | ||
| 100 | +----------------------------------------------------------------------*/ | ||
| 101 | |||
| 102 | struct p_result_blk | ||
| 103 | { | ||
| 104 | unsigned char P_Type; /* Type returned */ | ||
| 105 | unsigned char P_Item_Tag; /* Matched item tag */ | ||
| 106 | unsigned int P_SYNONYM_Ptr; /* pointer to Synonym list returned */ | ||
| 107 | unsigned char P_Picked_Val[4]; /* value */ | ||
| 108 | }; | ||
| 109 | |||
| 110 | /*----------------------------------------------------------------------+ | ||
| 111 | | | | ||
| 112 | | type | | ||
| 113 | | | | ||
| 114 | +----------------------------------------------------------------------*/ | ||
| 115 | |||
| 116 | #define P_EOL 0 /* End of line */ | ||
| 117 | #define P_Number 1 /* Number */ | ||
| 118 | #define P_List_Idx 2 /* List Index */ | ||
| 119 | #define P_String 3 /* String */ | ||
| 120 | #define P_Complex 4 /* Complex */ | ||
| 121 | #define P_File_Spec 5 /* File Spec */ | ||
| 122 | #define P_Drive 6 /* Drive */ | ||
| 123 | #define P_Date_F 7 /* Date */ | ||
| 124 | #define P_Time_F 8 /* Time */ | ||
| 125 | #define P_Quoted_String 9 /* Quoted String */ | ||
| 126 | |||
| 127 | #define P_No_Tag 0x0FF /* No ITEM_TAG found */ | ||
| 128 | |||
| 129 | /*----------------------------------------------------------------------+ | ||
| 130 | | | | ||
| 131 | | following return code will be returned in the AX register. | | ||
| 132 | | | | ||
| 133 | +----------------------------------------------------------------------*/ | ||
| 134 | |||
| 135 | #define P_No_Error 0 /* No error */ | ||
| 136 | #define P_Too_Many 1 /* Too many operands */ | ||
| 137 | #define P_Op_Missing 2 /* Required operand missing */ | ||
| 138 | #define P_Not_In_SW 3 /* Not in switch list provided */ | ||
| 139 | #define P_Not_In_Key 4 /* Not in keyword list provided */ | ||
| 140 | #define P_Out_Of_Range 6 /* Out of range specified */ | ||
| 141 | #define P_Not_In_Val 7 /* Not in value list provided */ | ||
| 142 | #define P_Not_In_Str 8 /* Not in string list provided */ | ||
| 143 | #define P_Syntax 9 /* Syntax error */ | ||
| 144 | #define P_RC_EOL 0x0ffff /* End of command line */ | ||
| 145 | |||
| 146 | |||