!MMOSYM.DEF [102] - INMEMO symbols
!-------------------.-------------------.-------------------.-------------------.
!EDIT HISTORY
! VEDIT=102
! Note: history reformatted 9-Feb-17
! [102] 05-Feb-13 / jdm / Add MMO_RAW /jdm
! [101] 27-Jul-12 / jdm / Change MMOE'xxx to MMOE_xxx
! [100] 25-Mar-12 / jdm / Create from MMOSYM.BSI
!-------------------.-------------------.-------------------.-------------------.
! NOTES
! This file supersedes MMOSYM.BSI which is now deprecated (but
! if you were using the old symbols, you would need to do some global
! replacements of the apostrophes to underscores and possibly some 
! other changes, like MMX' to MMOX_

! It is highly recommended that you specify the XCALL INMEMO opcode
! as an OR'd combination of these variables rather than their values.
!  For example,
!
!   OPCODE = MMO_EDT or MMO_BDR or MMO_LID or MMO_NMR
!   XCALL INMEMO,OPCODE,...
! or
!   XCALL INMEMO,MMO_DPG or MMO_BDR,...
! 
! Same applies to the return errors and XFRMMO opcodes
!-------------------.-------------------.-------------------.-------------------.

++IFNDEF MMOSYM_DEF_INC      ! prevent it from being included multiple times
DEFINE MMOSYM_DEF_INC = 1

! INMEMO opcodes

    define  MMO_DSP = &h00000000      ! 0 Display only
    define  MMO_EDT = &h00000001      ! 1 Edit
    define  MMO_BDR = &h00000002      ! 2 Use a window border
    define  MMO_LID = &h00000004      ! 4 Smart line insert & delete
    define  MMO_DEL = &h00000008      ! 8 Delete memo
    define  MMO_LIN = &h00000010      ! 16 Return 1 logical line
    define  MMO_OPN = &h00000020      ! 32 Open file 
    define  MMO_CLS = &h00000040      ! 64 Close file
    define  MMO_NBR = &h00000080      ! 128 No border redisplay
    define  MMO_NMR = &h00000100      ! 256 No memo or border redisplay
    define  MMO_SCH = &h00000200      ! 512 Search
    define  MMO_SIL = &h00000400      ! 1024 Silent mode (no terminal output)
    define  MMO_DPG = &h00000800      ! 2048 Display only, with paging
    define  MMO_MNU = &h00001000      ! 4096 Menu bar mode (vertical menus)
    define  MMO_TBL = &h00002000      ! 8192 Table lookup (only with MMO_SCH)
    define  MMO_FST = &h00004000      ! 16384 Fast Mode (only with MMO_MNU)
    define  MMO_EWU = &h00008000      ! 32768 Update w/o edit
    define  MMO_UWE = &h00010000      ! 65536 Edit w/o update
    define  MMO_SVA = &h00020000      ! 131072 (2^17) Save memo screen area
    define  MMO_RSA = &h00040000      ! 262144 (2^18) Restore memo screen area
    define  MMO_CXY = &h00080000      ! 524288 (2^19) Specify start ROW,COL
    define  MMO_NOA = &h00100000      ! 1048576 (2^20) Omit arrows
    define  MMO_AAH = &h00200000      ! 2097152 (2^21) Auto adjust window height
    define  MMO_IPG = &h00400000      ! 4194304 (2^22) Intelligent version of DPG 
    define  MMO_DBM = &h00800000      ! 8388608 (2^23) Start disp. at bottom 
    define  MMO_ISL = &h01000000      ! 16777216 (2^24) Insert into Sorted List
    define  MMO_APS = &h02000000      ! 33554432 (2^25) Alternate Prompt Style
    define  MMO_NAF = &h04000000      ! 67108864 (2^26) No auto format on pre-load 
    define  MMO_OTX = &h08000000      ! 134217728 (2^27) Output to TEXT param. 
    define  MMO_FFM = &h10000000      ! 268435456 (2^28) Free form menu mode
    define  MMO_OPT = &h20000000      ! 536870912 (2^29) OPTimized disk output
    define  MMO_RET = &h40000000      ! 1073741824 (2^30) RETURN on bottom line exits
    define  MMO_HDR = &h80000000      ! 2147483648 (2^31) Use chr(26) for memo header
    define  MMO_RAW = &h80000000      ! [102] use with MMO_UWE or MMO_OTX for raw

! INMEMO error codes (returned in POS)
! (Note: these only apply when comparing to a B,4 variable!)
    define  MMO_LKE = 4294967295      ! (-1) Link error
    define  MMO_FUL = 1               ! file full
    define  MMO_VTS = 2               ! memo full (VSPEC Too Small)

                             ! Following added for HMOpro features

    define  MMO_OPE = 4294967294     ! (-2) Error opening memo file	
    define  MMO_CRE = 4294967293     ! (-3) Error creating memo file
    define  MMO_INI = 4294967292     ! (-4) Error initializing memo file
    define  MMO_SPC = 4294967291     ! (-5) Illegal memo file spec
    define  MMO_OFE = 4294967290     ! (-6) Output file error (special MMO_LIN mode)

! INMEMO EXTCOD values (previously MMX'xxx)

    define  MMOX_SPC = 13     ! (spacebar used to select menu item)  
    define  MMOX_TAB = 7      ! (TAB used to select menu item)       
    define  MMOX_TIM = 4      ! (Time out - otherwise like OK)       
    define  MMOX_VTS = 2      ! (no update) VSPEC Too Small
    define  MMOX_QUI = 1      ! (no update) (control-c)
    define  MMOX_OK  = 0      ! normal exit (updated)

                    ! negative numbers are command keys
! Note: the original MMOSYM.BSI had out-of-date values for the shifted
! arrow keys. Also note that these symbols only apply when comparing to
! the return EXTCOD mapped as B,2

    define  MMOX_STB = 65501      ! shifted tab (-35)
    define  MMOX_SLA = 65500      ! shifted left arrow (-36)
    define  MMOX_SUA = 65499      ! shifted up arrow  (-37)
    define  MMOX_SRA = 65498      ! shifted right arrow (-38)
    define  MMOX_SDA = 65497      ! shifted down arrow  (-39)

! INMEMO EXTERR values (previously MME'xxx)

    define  MMOE_ERR = 2      ! abnormal exit - see POS
    define  MMOE_SAF = 1      ! failed to save or restore area
    define  MMOE_OK  = 0      ! ok    
    define  MMOE_NOR = 0      ! ok (used in D01 manual by accident)

! XFRMMO opcodes (previously XFR'xxx)

    define  MMOXFR_CPY = 0      ! XFRMMO copy mode
    define  MMOXFR_MOV = 1      ! XFRMMO move mode 
    
! XFRMMO error codes (previously XFR'xxx)

    define  MMOXFR_SUC = 0      ! success
    define  MMOXFR_LKE = 1      ! Link error
    define  MMOXFR_FUL = 2      ! file full 
    define  MMOXFR_SYS = 3      ! system error

! various INMEMO control definitions
    define  MMO_STMNU$ =  "["      ! start menu item
    define  MMO_ENDMNU$ = "]"      ! end menu item

! INMEMO invisible header code. This is an oddball since it is 
! composed of control characters that can't easily be expressed 
! in a define statement, so we'll leave it as a map statement
MAP1 MMO_INVHDR,S,2,chr(19)+chr(8)  ! invisible header command

++ENDIF

! end of MMOSYM.DEF --------------------------------------------------------!
