;       SCCSID = @(#)vars.inc   6.4 92/03/10

; WARNING !!! THE FOLLOWING SECTION IS SHARED BY DOSQUERYMESSAGECP

;***********************************************************************
; VARS.INC:  DEFINE THE LOCAL VARIABLES USED FOR MESSAGE FILE SUPPORT
;            (Warning: shared by DOSQUERYMESSAGECP and DOSGETMESSAGE)
;***********************************************
;
;   Modification history
;
; B028 PB725896 11/08/91 fgw FVT manual test case error: wrong return code
; B037 PJ200380 02/15/92 fgw Unable to access sub-message file messages.
; @F03 D-053583 11/24/92 fgw Message files left open after boot-up;
;                            add DOSCLOSEMESSAGEFILE to close them on request.


;***********************************************
; CREATE LOCAL VARIABLE MASK ON THE STACK
;
LOCALVAR  HANDLE,WORD                   ; FILE HANDLE FROM FIND_FILE
LOCALVAR  SUB_HANDLE,WORD               ; sub file handle
LOCALVAR  SYS_ERROR,WORD                ; SYSTEM ERROR FIELD
LOCALVAR  SAV_ERROR,WORD                ; SAVED ERROR FIELD
LOCALVAR  MSR_ERROR,WORD                ; SAVED ERROR FIELD      ;BN028;
LOCALVAR  CPLIST,6                      ; code page list
LOCALVAR  CP_RTNLNG,WORD                ; cp returned data length
LOCALVAR  SUBFILE_FLAG,BYTE             ; sub_file flag
LOCALVAR  RAM_MSG_FOUND,BYTE            ; Message in RAM: 1 = yes
                                                        ; 0 = no
LOCALVAR  OLD_FILE,BYTE                 ; OLD FILE FLAG: 1 = OLD FILE
                                                       ; 0 = NEW FILE
LOCALVAR  DEFAULT_ROOT,BYTE             ; Use default root message file

LOCALVAR  ROOT_BASEID,WORD              ; SAVE ROOT BASE ID
LOCALVAR  ROOT_MSGCNT,WORD              ; SAVE ROOT MESSAGE COUNT
LOCALVAR  ROOT_VERSION,WORD             ; SAVE ROOT VERSION NUMBER
LOCALVAR  ROOT_COMPONENT,3              ; SAVE ROOT COMPONENT
LOCALVAR  ROOT_INDICATOR,BYTE           ; SAVE ROOT INDICATOR
LOCALVAR  ROOT_EXT_HEADER,DWORD         ; Offset to EXT Header ;BN037;

LOCALVAR  FREE_SAVE_STRUC,WORD          ; Offset to available "SAVE" area @F03

IFDEF   FamilyAPI
LOCALVAR  ENVSEGMENT,WORD               ; SELECTOR FOR ENVIRONMENT
LOCALVAR  CMDOFFSET,WORD                ; OFFSET TO COMMAND LINE START
ENDIF  ;FamilyAPI

LOCALVAR  COMPONENT,9                   ; storage for "SYSnnnn: "
LOCALVAR  MSGF_HEADER,<SIZE HEADER>     ; MSG FILE HEADER
LOCALVAR  temp_name, 3                  ; for c:\ for filename

                                      ; Validate message files ;BN037;
LOCALVAR  VMSG_HANDLE,WORD              ; Current file handle  ;BN037;
LOCALVAR  VMSG_MSGCNT,WORD              ; Total message count  ;BN037;
LOCALVAR  VMSG_BASEID,WORD              ; Base message number  ;BN037;
LOCALVAR  VMSG_VERSION,WORD             ; MKMSGF version id    ;BN037;
LOCALVAR  VMSG_EXT_HEADER,DWORD         ; Offset to EXT Header ;BN037;
LOCALVAR  VMSG_INDICATOR,BYTE           ; Table size indicator ;BN037;

                                        ; 1=Opened, 0=Closed/saved ;BN037;
LOCALVAR  WORK_HNDL,BYTE                  ; Current file           ;BN037;
LOCALVAR  WORK_SUBF,BYTE                  ; Subfile state          ;BN037;
LOCALVAR  WORK_ROOT,BYTE                  ; RootFile state         ;BN037;

LOCALVAR  GOT_RAM_SEM,BYTE              ; Got a ram semaphore  ;BN037;
LOCALVAR  ACTIONTAKEN,WORD              ; ACTION TAKEN AS RESULT OF OPEN FILE
LOCALVAR  RESULT,WORD                   ; RESULT OF WRITE (# OF BYTES READ)
LOCALVAR  MSG_SEL,WORD                  ; SELECTOR FIELD FOR MSG TEXT ALLOCATION
LOCALVAR  NXT_MSG_OFFSET,DWORD          ; OFFSET OF MSG_NUMBER+1
LOCALVAR  MSG_NUM_OFFSET,DWORD          ; OFFSET OF REQUESTED MSG
LOCALVAR  NEW_POINTER,DWORD             ; NEW POINTER LOCATION FOR DOSCHGFILEPTR
LOCALVAR  MSG_NUMBER_LEN,WORD           ; LENGTH OF MESSAGE TEXT

;***********************************************
; SUPPORT FOR DBCS
;
LOCALVAR  IS_DBCS,BYTE                  ; DBCS FLAG: 1= DBCS, 0= NOT DBCS
LOCALVAR  casemap_char,BYTE             ; case map FLAG
                                          ; 1= needs to case mapped
                                          ; 0= all chars <= 127 ASCII

;***********************************************
; SUPPORT FOR COPYRETMSG and decdump
;
LOCALVAR  ERR2_IVTABLE,DWORD            ; LOCAL IVTABLE FOR (filename)
LOCALVAR  ERR1_IVTABLE,DWORD            ; LOCAL IVTABLE FOR (mid)
LOCALVAR  mid_string,6                  ; buffer for ascii message id

;***********************************************
; SUPPORT FOR DCR 244 - MSG_ID flag
;
LOCALVAR  msg_id,BYTE                   ; msg id flag: 1 = display msg id
                                                     ; 0 = don't display msg id

;***********************************************
; SUPPORT FOR DCR 569 - DPATH/DosSearchPath
;
IFNDEF  FamilyAPI
LOCALVAR  search_sel,WORD               ; selector for search buffer
ENDIF  ;FamilyAPI

;***********************************************
; SUPPORT FOR DCR 361 - Multi CodePage support
;
LOCALVAR  EXTHD_FLG,BYTE                ; =1 if def record header processed
LOCALVAR  EXTHD_CNT,WORD                ; number of def records
LOCALVAR  EXTHD_PTR,DWORD               ; offset to next def record
LOCALVAR  CP_EXT_HEADER,<SIZE EXT_HDR>  ; buffer for extended header

;***********************************************
; END OF LOCAL VARIABLES
;***********************************************************************
