home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmmac.zip / STDCNF.E < prev    next >
Text File  |  1995-11-15  |  69KB  |  1,833 lines

  1. /* New way to configure E. In response to the requests of many users, we have
  2.    changed things so that it is no longer required that you modify this file
  3.    in order to reconfigure E. An optional MYCNF file is included before this
  4.    one.  There are three sections to this file, setting different types of
  5.    defaults, and each can be overridden in the MYCNF.E file.  The first
  6.    section, most of which doesn't apply to EPM, contains SET statements.  The
  7.    second section defines constants, and the third section initializes various
  8.    global variables.  To override the first section, you simply include the
  9.    appropriate SET statement in your MYCNF.  The ones here are commented out,
  10.    and exist just to document the defaults.
  11.  
  12.    To override the second section, simply define the constants.
  13.  
  14.    To override the third section, define a MY_variablename set to the
  15.    desired value.  Examples of each follow:
  16.  
  17.  
  18.       set insert_state 0           -- I prefer to have insert initially off
  19.     compile if EVERSION < 5   -- Setup customization for E3 and EOS2, not EPM.
  20.       set coms  1 'c:\e3\'
  21.     compile endif
  22.  
  23.     const         -- Second section.  Predefine preferred constants.
  24.        ENTER_ACTION   = 'ADDATEND'
  25.        C_ENTER_ACTION = 'ADDLINE'
  26.  
  27.     define        -- Third section.  Override DEFINIT initializations.
  28.        my_messy = 1        -- I'd rather have MESSY set to 1.
  29.  
  30.     The above is a little more complicated than the old way; the advantage
  31.     is that when a new STDCNF comes out, you don't have to modify it to
  32.     contain your personalized definitions, but you still get anything that
  33.     might have been added to it since the previous release.
  34.  
  35.     Reminder:  To have these changes take effect, you must recompile your
  36.     main .ex file.  Enter 'ET E', 'ET SMALL', or 'ET EPM', as appropriate.
  37.  
  38. */
  39.  
  40. /* The following are the default settings.  Most don't apply to EPM.
  41.  
  42. -- Change in EOS2:  We no longer differentiate by color vs. mono display type,
  43. -- but by whether the character cell is low- or high-resolution.
  44. --    LOW -RESOLUTION = a CGA or an EGA/VGA with 43 or more rows.
  45. --    HIGH-RESOLUTION = a monochrome or an EGA/VGA with <43 rows.
  46. -- The minimum top scan line is 0.  (Scan lines are numbered from the top.)
  47. -- The maximum bottom scan line is 7 in low resolution, 13 or more in high.
  48. set cursors
  49.   3  7   -- insert -mode cursor size for low -res (EOS2) / color (E3) display
  50.   6  7   -- replace-mode cursor size for low -res (EOS2) / color (E3) display
  51.   6  12  -- insert -mode cursor size for high-res (EOS2) / mono  (E3) display
  52.   11 13  -- replace-mode cursor size for high-res (EOS2) / mono  (E3) display
  53.  
  54. set insert_state 1      -- (EPM recognizes this one.)
  55.                         -- Default insert state at startup, 1=on, 0=off
  56.  
  57. set coms  0 ''
  58.                         -- If you want your command stack saved between runs,
  59.                         --   enter 1 and a path.  For example:
  60.                         --      set coms 1 'C:\EDIT\'
  61.                         --   Don't forget the trailing backslash on path!
  62.  
  63.  
  64. ; SET EOF 1 means:  When saving a file, append an EOF marker (the end-of-file
  65. ; character, x'1A').  When loading a file, treat any CR-LF-EOF sequence as the
  66. ; end of the file and stop loading.  This is the normal treatment many older
  67. ; programs expect the EOF marker, and some (like REXX) will store uneditable
  68. ; data after the final EOF.
  69. ;
  70. ; SET EOF 0 means:  Do not add an EOF when saving.  Do not stop loading at
  71. ; a CR-LF-EOF sequence.  (An EOF as the very last byte of a file will still
  72. ; be discarded when loading.)  This treatment is new in version 4.04.
  73. ;
  74. set eof 1                        -- (EPM supports this, also.)
  75.  
  76.  
  77. ; Specifies on which row of the screen the initial logo/copyright message
  78. ; is displayed.  Default is 1, top of screen.  (EOS2 only.)
  79. set logo 1 ''
  80.  
  81.  . . . . End of sample SET statements. . . .     */
  82. -------------------------------------------------------------------------------
  83.  
  84. const
  85. ; Ver.3.10/4.03:  we no longer need to declare EVERSION here; it's a predefined
  86. ; constant.  You can use it as if we'd said:
  87. ;    const EVERSION='3.12'   (if E3)
  88. ;    const EVERSION='4.13'   (if EOS2)
  89. ;    const EVERSION='5.15'   (if EPM)
  90.  
  91. compile if not defined(NLS_LANGUAGE)
  92.   NLS_LANGUAGE = 'ENGLISH'
  93. compile endif
  94.  
  95. compile if not defined(TEMP_FILENAME)
  96. TEMP_FILENAME= 'e.tmp'
  97. compile endif
  98.                         -- Define a TEMP_PATH as well as a TEMP_FILENAME
  99.                         --   Typically put this on a VDISK, like 'D:\e.tmp'.
  100. compile if not defined(TEMP_PATH)
  101. TEMP_PATH=''
  102. compile endif
  103.                         -- Some applications (external sorts)
  104.                         --   need to create more than one temp file.
  105.                         --   Suggestions:  put on a VDISK.
  106.                         --   Typical 'D:\'.  Don't forget last backslash.
  107. compile if not defined(AUTOSAVE_PATH)
  108. AUTOSAVE_PATH=''
  109. compile endif
  110.                         -- Allow a separate directory for autosaved files.
  111.                         --   Don't put this one on a VDISK.
  112.                         --   Don't forget last backslash.
  113.  
  114. -- Set this to a nonzero number if you wish autosave to be turned on
  115. -- automatically for all files.  In EPM this is the number of changes to the
  116. -- file, not the number of Enter keys, so we prefer a higher value.
  117. -- You can set this to 0 if you don't want autosave all the time, and turn it
  118. -- on when desired with the 'autosave' command.
  119. compile if not defined(DEFAULT_AUTOSAVE)
  120.  compile if E3
  121. DEFAULT_AUTOSAVE = 0
  122.  compile elseif EVERSION >= '5.20'  -- Full undo means more frequent changes
  123. DEFAULT_AUTOSAVE = 100
  124.  compile elseif EPM
  125. DEFAULT_AUTOSAVE = 40
  126.  compile else
  127. DEFAULT_AUTOSAVE = 20
  128.  compile endif
  129. compile endif
  130.  
  131. -- jbl 1/89 new feature.  Set this to some non-blank directory name if you want
  132. -- a backup copy of your file upon saving.  E will copy the previous file
  133. -- to this directory before writing the new one.  Typical values are:
  134. --    ''             empty string to disable this feature (as in old E)
  135. --    '.\'           for current directory (don't forget the last backslash)
  136. --    'C:\OLDFILES\' to put them all in one place
  137. compile if not defined(BACKUP_PATH)
  138. BACKUP_PATH = ''
  139. compile endif
  140.  
  141.  
  142. compile if not defined(HELPFILENAME)
  143.  compile if EVERSION < 5
  144.   HELPFILENAME='ehelp.hlp'
  145.  compile else
  146.   HELPFILENAME='epmhelp.qhl'
  147.  compile endif
  148. compile endif
  149.                         -- Set help filename
  150. compile if not defined(EPATH)
  151.   compile if EPM    -- EPM uses a different name, for easier coexistance
  152. EPATH= 'epmpath'
  153.   compile else
  154. EPATH= 'epath'
  155.   compile endif
  156. compile endif
  157.                         -- Set environment variable name
  158. compile if not defined(MAINFILE)
  159.  compile if EVERSION < 5
  160.   MAINFILE= 'e.e'
  161.  compile else
  162.   MAINFILE= 'epm.e'
  163.  compile endif
  164. compile endif
  165.                         -- Set main file for the ET compilation command
  166. compile if not defined(WANT_ET_COMMAND)
  167. WANT_ET_COMMAND = 1
  168. compile endif
  169.                         -- Ver. 3.09 - Lets user omit ET command.
  170. compile if not defined(WANT_CHAR_OPS)
  171. WANT_CHAR_OPS = 1
  172. compile endif
  173.                         -- Ver. 3.09 - Lets user omit macro support for
  174.                         -- character marks.
  175.  
  176. -- 4.10:  We removed the warning about 'constants must be specified in upper
  177. -- case'.  No longer necessary.
  178.  
  179. -- This constant tells the compiler which host-support method
  180. -- to include.  Only modify the first copy.  Typical values are:
  181. --   'STD'  uses the original E3 method (mytecopy, etc.).
  182. --   'EMUL' uses Brian Tucker's E3EMUL package.  Download it separately.
  183. --   'PDQ'  uses the E3PDQ package.  Download it separately.
  184. --   'SRPI' uses SLSRPI.E, part of the LaMail package.
  185. --   ''     loads no host-file support at all.
  186. compile if not defined(HOST_SUPPORT)
  187.  compile if not SMALL
  188.    HOST_SUPPORT = 'STD'
  189.  compile else
  190.    HOST_SUPPORT = ''      -- Do not change this!!  Only the previous one.
  191.  compile endif
  192. compile endif
  193.  
  194. -- If you're tight on space in the .ex file, you can now have the host support
  195. -- routines linked in at run time.  Currently only supported for E3EMUL and
  196. -- SLSRPI.  Set HOST_SUPPORT='EMUL' (or 'SRPI'), LINK_HOST_SUPPORT=1, compile
  197. -- your base macros (E or EPM) and also compile E3EMUL (or SLSRPI).  Warning:
  198. -- you'll have to remember to recompile the host support .ex file whenever you
  199. -- make a change to your MYCNF.E that affects it, and whenever a new version of
  200. -- the editor comes out that doesn't accept your current level of .ex file.
  201. compile if not defined(LINK_HOST_SUPPORT)
  202.    LINK_HOST_SUPPORT = 0
  203. compile endif
  204.  
  205. compile if LINK_HOST_SUPPORT & E3
  206.    *** Error - LINK_HOST_SUPPORT not permitted for E3.
  207. compile endif
  208.  
  209. compile if HOST_SUPPORT = 'PDQ'
  210. -- The PDQ support uses a subset of the DOS procedures found in Bryan
  211. -- Lewis' DOS.E.  If you include DOS.E in MYSTUFF.E, then set the following
  212. -- constant to 1.
  213.  compile if not defined(HAVE_DOS)
  214. HAVE_DOS = 0
  215.  compile endif
  216.  
  217. -- The PDQ support will optionally poll the host and see if anyone has sent
  218. -- you a message.  If so, it will pop up a window and display the messages.
  219. -- To enable this, set the following constant to 1.
  220.  compile if not defined(PDQ_MSG)
  221. PDQ_MSG = 1
  222.  compile endif
  223. compile endif
  224.  
  225. -- These constants specify what actions should be taken for the
  226. -- Enter and C_Enter keys.  Possible values for ENTER_ACTION are:
  227. --    'ADDLINE'   Insert a line after the current line.
  228. --    'NEXTLINE'  Move to the next line without inserting a line.
  229. --    'ADDATEND'  ADDLINE if on last line, else NEXTLINE.
  230. --    'DEPENDS'   ADDLINE if in insert_mode, else NEXTLINE.
  231. --    'DEPENDS+'  ADDLINE if on last line, else DEPENDS.
  232. --    'STREAM'    Act like stream editors; Enter splits a line.
  233. --    ''          Don't define; user will supply a routine (in MYSTUFF.E).
  234. -- Possible values for C_ENTER_ACTION are the same, except that the action
  235. -- taken for DEPENDS is reversed.  If ENTER_ACTION='STREAM', some other key
  236. -- definitions are modified also - Delete past the end of a line, or Backspace
  237. -- in column 1 will join the two lines as if it had deleted a CR/LF; Left and
  238. -- Right will wrap from line to line.  Setting C_ENTER_ACTION='STREAM' doesn't
  239. -- affect these other keys.
  240. compile if not defined(ENTER_ACTION)
  241. ENTER_ACTION   = 'ADDLINE'
  242. compile endif
  243. compile if not defined(C_ENTER_ACTION)
  244. C_ENTER_ACTION = 'NEXTLINE'
  245. compile endif
  246.  
  247. -- These constants specify which syntax-assist modules to include.
  248. compile if not defined(ALTERNATE_KEYSETS)
  249. ALTERNATE_KEYSETS = 1
  250. compile endif
  251.                         -- Master control for the following 3 and also
  252.                         -- MYSELECT and MYKEYSET.  If you don't use any of
  253.                         -- them, it makes SELECT.E much simpler.
  254.  
  255. compile if not defined(C_SYNTAX_ASSIST)
  256. C_SYNTAX_ASSIST = 1
  257. compile endif
  258.                         -- 1 means to include C assist, 0 means omit it.
  259. compile if not defined(CPP_SYNTAX_ASSIST)
  260. CPP_SYNTAX_ASSIST = C_SYNTAX_ASSIST
  261. compile endif
  262.                         -- 1 means to include C++ assist, 0 means omit it.
  263. compile if not defined(C_TABS)
  264. C_TABS    = '3'
  265. compile endif
  266. compile if not defined(C_MARGINS)
  267. C_MARGINS = 1 MAXMARGIN 1
  268. compile endif
  269.  
  270. compile if not defined(E_SYNTAX_ASSIST)
  271. E_SYNTAX_ASSIST = 1
  272. compile endif
  273.                         -- Similarly for E, Rexx and Pascal support.
  274. compile if not defined(E_TABS)
  275. E_TABS    = '3'
  276. compile endif
  277. compile if not defined(E_MARGINS)
  278. E_MARGINS = 1 MAXMARGIN 1
  279. compile endif
  280.  
  281. compile if not defined(REXX_SYNTAX_ASSIST)
  282. REXX_SYNTAX_ASSIST = 0
  283. compile endif
  284. compile if not defined(REXX_TABS)
  285. REXX_TABS    = '3'
  286. compile endif
  287. compile if not defined(REXX_MARGINS)
  288. REXX_MARGINS = 1 MAXMARGIN 1
  289. compile endif
  290.  
  291. compile if not defined(P_SYNTAX_ASSIST)
  292. P_SYNTAX_ASSIST = 1
  293. compile endif
  294. compile if not defined(P_TABS)
  295. P_TABS    = '3'
  296. compile endif
  297. compile if not defined(P_MARGINS)
  298. P_MARGINS = 1 MAXMARGIN 1
  299. compile endif
  300.  
  301. -- Tab and margin settings for normal (not C/E/PAS) files.
  302. compile if not defined(DEFAULT_TABS)
  303. DEFAULT_TABS    = '8'
  304. compile endif
  305. compile if not defined(DEFAULT_MARGINS)
  306. DEFAULT_MARGINS = 1 MAXMARGIN 1
  307. compile endif
  308.  
  309.  
  310.  
  311. -- This constant tells the compiler which key should trigger the
  312. -- syntax-assist second expansion.  Choose either ENTER or C_ENTER.
  313. compile if not defined(ASSIST_TRIGGER)
  314. ASSIST_TRIGGER = 'ENTER'
  315. compile endif
  316.  
  317. -- Set this to the desired indentation if using syntax-assist.
  318. -- Normal values are 2, 3, 8.  Has no effect if not using assist.
  319. compile if not defined(SYNTAX_INDENT)
  320. SYNTAX_INDENT = 3
  321. compile endif
  322.  
  323. -- Set this to 1 if you like PE2's method of reflowing a paragraph -- moving
  324. -- the cursor to the next paragraph.
  325. compile if not defined(REFLOW_LIKE_PE)
  326. REFLOW_LIKE_PE = 0
  327. compile endif
  328.  
  329. -- Ver.3.09:  Set this to 1 if you want the FILE key to quit rather than
  330. -- save the file if the file was not modified.  Has the side effect that
  331. -- the Name command sets .modify to 1.
  332. compile if not defined(SMARTFILE)
  333. SMARTFILE = 0
  334. compile endif
  335.  
  336. -- Set this to 1 if you want the Save key to prompt you if the file was not
  337. -- modified.  the side effect that
  338. compile if not defined(SMARTSAVE)
  339. SMARTSAVE = 0
  340. compile endif
  341.  
  342. -- Set this to 1 if you want the QUIT key to let you press the FILE key if the
  343. -- file was modified.  You must also set the FILEKEY to be the key you use.
  344. -- NOTE:  This only affects the key accepted as meaning "File" when the QUIT
  345. -- key is pressed and the file has been modified.  If you want to use a
  346. -- different FILE key than the default, you still have to define it yourself in
  347. -- MYKEYS.E.  Also, SMARTQUIT doesn't apply to EPM.
  348. compile if not defined(SMARTQUIT)
  349. SMARTQUIT = 0
  350. compile endif
  351. compile if not defined(FILEKEY)
  352. FILEKEY   = 'F4'  -- Note:  Must be a string (in quotes).
  353. compile endif
  354.  
  355. -- This is used as the decimal point in MATH.E.  Some users might prefer to
  356. -- use a comma.  Not used in DOS version, which only allows integers.
  357. compile if EVERSION >= 4            -- OS/2 version - real numbers
  358.  compile if not defined(DECIMAL)
  359. DECIMAL = '.'
  360.  compile endif
  361. compile endif
  362.  
  363. compile if not defined(WANT_WINDOWS)
  364.  compile if EVERSION < 5
  365. -- 3.12:  Window support can be omitted completely, for those wanting a
  366. --         minimal-sized E.
  367. WANT_WINDOWS = 1
  368.  compile else
  369. WANT_WINDOWS = 0      -- Don't change.  No window support in EPM
  370.  compile endif
  371. compile endif
  372.  
  373. compile if WANT_WINDOWS
  374. -- Ver.3.09:  Set this to 1 for Jim Hurley-style windows - zoomed window
  375. -- in messy mode shows no box and respects window-style.
  376.  compile if not defined(JHwindow)
  377. JHwindow = 0
  378.  compile endif
  379. compile endif
  380.  
  381. -- This determines if DRAW.E will be included.  Set to 'F6'
  382. -- if you want it associated with that key; set to 1 if you want the DRAW
  383. -- command but no key set; set to 0 to have DRAW.E omitted completely.
  384. --
  385. -- Ver 4.02:  In EOS2 the Draw feature is not compiled into the base.  Draw
  386. -- is always available (as an external module) regardless of whether this
  387. -- constant is 0 or 1.  You should still set this to 'F6' if you want the key.
  388. compile if not defined(WANT_DRAW)
  389. WANT_DRAW = 'F6'
  390. compile endif
  391.  
  392. -- Ver.4.11:  Pick the name of the sort utility you prefer.  Choices are:
  393. --   ''    for none:  no sort command at all.
  394. --   'E'   for the standard internal (E-language) sort.  Good for small jobs,
  395. --         no external utility, no disk access.  Runs in OS/2 protect mode.
  396. --   'DLL' to use the quicksort dynamic link library.  Good for all jobs.
  397. --         This requires the QISRTMEM.DLL and QISRTSTB.DLL files
  398. --         to be placed in the LIBPATH.  Limited to 64k of data.
  399. --   'EPM' The best method to use, but only for EPM 5.60 or above.
  400. --         Fastest, with no size limits.
  401. -- The rest require E3SORT PACKAGE....
  402. --   'F'   to use the external program FSORT.COM.
  403. --   'G'   to use the external program GSORT.COM.  Best for numeric columns.
  404. --   'GW'  to use the external program GWSORT.COM.  Recommended since it
  405. --         can handle files larger than available memory.
  406. --   'DOS' to use the external program SORT.EXE supplied with DOS or OS/2.
  407. --         Not recommended:  slowest, ignores upper/lower case.  But available
  408. --         in OS/2 protect mode.
  409. compile if not defined(SORT_TYPE)
  410.  compile if EVERSION >= '5.60'       -- At long last - an internal sort.
  411.   SORT_TYPE = 'EPM'
  412.  compile elseif EVERSION >= '4.10'   -- OS/2 only version - use quicksort
  413.   SORT_TYPE = 'DLL'
  414.  compile else                        -- Use DOS-compatible internal sort
  415.   SORT_TYPE = 'E'
  416.  compile endif
  417. compile endif
  418.  
  419. -- Set this to 0 if you want the marked area left unmarked after the sort.
  420. compile if SORT_TYPE
  421.  compile if not defined(RESTORE_MARK_AFTER_SORT)
  422. RESTORE_MARK_AFTER_SORT = 1
  423.  compile endif
  424. compile endif
  425.  
  426. -- Ver.3.10:  Set this to 1 if you use the DOS 3.3 APPEND command.  Without
  427. -- this, if a file is found via APPEND, E3 will load it as if it were found
  428. -- in the current subdirectory.  If the file is then saved, the original file
  429. -- will not be updated, but a new file will be created in the current directory.
  430.  
  431. -- Ver.3.11:  Can be used even if you don't use the APPEND command; just set
  432. -- the APPEND variable to the path desired.
  433.  
  434. -- EOS2 4.02:  On OS/2 we'll search the DPATH for text files if this is 1.
  435. compile if not defined(USE_APPEND)
  436. USE_APPEND = 0
  437. compile endif
  438.  
  439. -- Ver.3.11:  SETSTAY determines which is to be the current line after a Change
  440. -- command.  If SETSTAY = 0, then the cursor will be positioned on the last
  441. -- occurrence of the string in the file.  If SETSTAY = 1, then the position of
  442. -- the cursor will not be changed.  If SETSTAY = '?', then a new command, STAY,
  443. -- will be added to let the user change this dynamically.  If SETSTAY='?' then
  444. -- STAY will be initialized in the next section.
  445. compile if not defined(SETSTAY)
  446. SETSTAY = 0
  447. compile endif
  448.  
  449. -- EOS2:  This constant enables a small DEFEXIT which keeps you in the editor
  450. -- after you've quit the last file.  See EXIT.E for details.
  451. compile if EVERSION >= '4.0' & EVERSION < 5
  452.  compile if not defined(ASK_BEFORE_LEAVING)
  453. ASK_BEFORE_LEAVING = 0
  454.  compile endif
  455. compile endif
  456.  
  457. -- Ver. 3.11d:  This constant lets the E3 user omit the SaveFileWithTabs
  458. -- routine in STDPROCS.E.
  459. compile if not defined(WANT_TABS)
  460. WANT_TABS = 1
  461. compile endif
  462.  
  463. -- Ver. 3.11d:  This constant lets the user specify where the cursor should
  464. -- be when starting E.  0 means in the file area, 1 means on the command line.
  465. -- (No effect if using EPM.)
  466. compile if not defined(CURSOR_ON_COMMAND)
  467. CURSOR_ON_COMMAND = 0
  468. compile endif
  469.  
  470. compile if EVERSION >= '4.11' & EVERSION < 5   -- new in EOS2
  471.  compile if not defined(SHELL_USAGE)
  472. SHELL_USAGE = 1
  473.                          /* specifies whether the process window will be used.*/
  474.                          /* a process window allows the editor to view output */
  475.                          /* directed to the standard output device (stdout)   */
  476.                          /* as if it were directed into an editor file        */
  477.  compile endif
  478. compile else
  479. SHELL_USAGE = 0
  480. compile endif
  481.  
  482. -- Ver. 3.12:  Lets you include the routine that searches a path for a file
  483. -- even if USE_APPEND = 0.  (If USE_APPEND = 1, this routine will be included
  484. -- automatically.)
  485. compile if not defined(WANT_SEARCH_PATH)
  486. WANT_SEARCH_PATH = 0
  487. compile endif
  488.  
  489. -- Ver. 3.12:  Lets you include the routine that gets the value of an
  490. -- environment variable even if USE_APPEND = 0. (If USE_APPEND = 1, this
  491. -- routine will be included automatically.)
  492. -- Ver. 4.12:  The default is 1 rather than 0; OS/2 users have more room.
  493. compile if not defined(WANT_GET_ENV)
  494.   compile if E3
  495. WANT_GET_ENV = 0
  496.   compile else
  497. WANT_GET_ENV = 1
  498.   compile endif
  499. compile endif
  500.  
  501. compile if EPM & EVERSION < '5.21'   -- status line configuration
  502.  compile if not defined(STATUS_TEMPLATE)
  503.   compile if EPATH = 'LAMPATH'
  504.    STATUS_TEMPLATE=   'Line %l of %s   Column %c  %i   %m   %f   LaMail 2.0'
  505.   compile else
  506.    STATUS_TEMPLATE=   'Line %l of %s   Column %c  %i   %m   %f   EPM 'EVERSION
  507.   compile endif
  508.    -- Template for status line.  %l = current line; %s = size of file,
  509.    -- %c = current column; %i = Insert/Replace; %m = Modified/<blank>
  510.    -- %z = character above cursor in decimal; %x = character above cursor in hex;
  511.    -- %f = 1 file/<n> files
  512.  compile endif
  513. compile endif
  514.  
  515. ;  We've provided three methods of showing the modified status.
  516. ;  1. The COLOR method changes the window color, for a very obvious indicator.
  517. ;  2. The FKTEXTCOLOR method changes the color of the bottom line of the
  518. ;     screen, for EOS2 only.
  519. ;  3. The TITLE method does one of two things.  For EOS2 it changes the color
  520. ;     of the filename.  For EPM it adds the string " (mod)" to the title bar.
  521. ;     This isn't as obvious as COLOR, but you can check it even when the file
  522. ;     is shrunk to an icon by clicking on the icon.
  523. compile if not defined(SHOW_MODIFY_METHOD)   -- If user didn't define in MYCNF,
  524.  compile if EVERSION < 5                     --    then if non-PM
  525.    SHOW_MODIFY_METHOD = 'TITLE'              --         change filename color
  526.  compile else                                --    if PM
  527.    SHOW_MODIFY_METHOD = ''                   --         change is on status line
  528.  compile endif
  529. compile endif
  530.  
  531. -- Lets you quit temporary files regardless of the state of the .modify bit.
  532. -- Temporary files are assumed to be any file where the first character of the
  533. -- .filename is a period.  If set to 1, you won't get the "Throw away changes?"
  534. -- prompt when trying to quit one of these files.
  535. compile if not defined(TRASH_TEMP_FILES)
  536. TRASH_TEMP_FILES = 0
  537. compile endif
  538.  
  539. -- Adds LOCK and UNLOCK commands.
  540. compile if EVERSION < 4 or not defined(WANT_LAN_SUPPORT)
  541. WANT_LAN_SUPPORT = 0
  542. compile endif
  543.  
  544. -- Include or omit the MATH routines.  Values are '?' meaning do a TRYINCLUDE
  545. -- (this is what we used to do), 1 meaning it's required, so do an INCLUDE, or
  546. -- 0 meaning it's not wanted, so don't try to include it at all.
  547. compile if not defined(WANT_MATH)
  548. WANT_MATH = '?'
  549. compile endif
  550.  
  551. -- Include the MATHLIB routines in the base .EX file.  Ignored for E3.  Default
  552. -- is 0 for OS/2 versions, which means that a separate MATHLIB.EX file is linked
  553. -- at runtime if any MATH commands are executed.  May be set to 1 if you have
  554. -- sufficient room in your EPM.EX file and don't want to maintain a MATHLIB.EX.
  555. -- Will be ignored if EXTRA_EX is 1.
  556. compile if not defined(INCLUDE_MATHLIB)
  557. INCLUDE_MATHLIB = 0
  558. compile endif
  559.  
  560. -- Include or omit the DOSUTIL routines.  Values are '?' meaning do a TRYINCLUDE
  561. -- (this is what we used to do), 1 meaning it's required, so do an INCLUDE, or
  562. -- 0 meaning it's not wanted, so don't try to include it at all.
  563. -- Note that Use_Append=1 or Host_Support='EMUL' forces DOSUTIL to be included.
  564. compile if not defined(WANT_DOSUTIL)
  565. WANT_DOSUTIL = '?'
  566. compile endif
  567.  
  568. -- This provides a simple way to omit all user includes, for problem resolution.
  569. -- If you set VANILLA to 1 in MYCNF.E, then no MY*.E files will be included.
  570. compile if not defined(VANILLA)
  571. VANILLA = 0
  572. compile endif
  573.  
  574. -- Optionally include Larry Margolis' ALL command.
  575. compile if not defined(WANT_ALL)
  576. WANT_ALL = 0
  577. compile endif
  578.  
  579. -- Optionally include Ralph Yozzo's RETRIEVE command.
  580. compile if not defined(WANT_RETRIEVE)
  581. WANT_RETRIEVE = 0
  582. compile endif
  583.  
  584. -- This defines the limit on the number of files that will be included in the Ring
  585. -- pulldown.  If more than this many files are in the ring, the (MENU_LIMIT + 1)
  586. -- entry will be "More...".  One exception - if you set this to 0, then the routine
  587. -- UpdateRingMenu will never be called (or defined), there will be no Ring pulldown,
  588. -- and instead a "List files in ring" entry will be added to the Options pulldown.
  589. -- This means that adding files to or removing them from the ring will be faster.
  590. compile if not defined(MENU_LIMIT)
  591. MENU_LIMIT = 0
  592. compile endif
  593.  
  594. -- Spelling support can now be optionally included.  Set to 1 to include, 0 to
  595. -- omit, and 'LINK' to link in at runtime.  E3 can't link.  EPMLEX comes with
  596. -- the distributed macros; EOS2LEX and E3SPELL are available separately.
  597. -- New:  set to 'DYNALINK' to only link in if the user needs it.
  598. compile if not defined(SPELL_SUPPORT)
  599.  compile if EPM
  600. SPELL_SUPPORT = 'DYNALINK'          -- New default
  601.  compile else
  602. SPELL_SUPPORT = 0
  603.  compile endif
  604. compile endif
  605.  
  606. -- Enhanced print support for EPM - can display list of printers.
  607. compile if not defined(ENHANCED_PRINT_SUPPORT)
  608.  compile if EVERSION >= '5.51'  -- No longer any macro overhead
  609. ENHANCED_PRINT_SUPPORT = 1
  610.  compile else                   -- Expensive in older versions, so default is to omit.
  611. ENHANCED_PRINT_SUPPORT = 0
  612.  compile endif
  613. compile endif
  614.  
  615. compile if not defined(WANT_EPM_SHELL) or EVERSION < '5.20'
  616. WANT_EPM_SHELL = 0
  617.                          /* Specifies whether support should be included   */
  618.                          /* for a shell window.                            */
  619. compile endif
  620.  
  621. -- Specify a string to be written whenever a new EPM command shell window
  622. -- is opened.  Normally a prompt command, but can be anything.  If the
  623. -- string is one of the ones shown below, then the Enter key can be used
  624. -- to do a write-to-shell of the text following the prompt, and a listbox
  625. -- can be generated showing all the commands which were entered in the
  626. -- current shell window.  If a different prompt is used, EPM won't know
  627. -- how to parse the line to distinguish between the prompt and the command
  628. -- that follows, so those features will be omitted.
  629. compile if not defined(EPM_SHELL_PROMPT)
  630.    EPM_SHELL_PROMPT = '@prompt epm: $p $g '
  631. ;; EPM_SHELL_PROMPT = '@prompt [epm: $p ] '  -- Also supported
  632. compile endif
  633.  
  634. -- Normally, when you shift a mark left or right, text to the right of the
  635. -- marked area moves with it.  Bob Langer supplied code that lets us shift
  636. -- only what's inside the mark.  The default is the old behavior.
  637. compile if not defined(SHIFT_BLOCK_ONLY)
  638. SHIFT_BLOCK_ONLY = 0
  639. compile endif
  640.  
  641. -- Determines if DBCS support should be included in the macros.  Note
  642. -- that EPM includes internal DBCS support; other versions of E do not.
  643. compile if not defined(WANT_DBCS_SUPPORT)
  644. WANT_DBCS_SUPPORT = 0
  645. compile endif
  646.  
  647. -- When the File Manager copies a file from a HPFS drive to a FAT drive,
  648. -- if the file name isn't in 8.3 format, it gets truncated, with the original
  649. -- name being preserved in a .LONGNAME extended attribute.  Setting this to 1
  650. -- will cause the long name to be displayed on the EPM title bar, instead of the
  651. -- real (short) name.
  652. compile if not defined(WANT_LONGNAMES)
  653. WANT_LONGNAMES = 0
  654. compile endif
  655.  
  656. -- Adds PUSHMARK, POPMARK, PUSHPOS and POPPOS commands.  For EPM, also adds
  657. -- pulldown entries to the action bar.
  658. compile if not defined(WANT_STACK_CMDS)
  659. WANT_STACK_CMDS = 0
  660. compile endif
  661.  
  662. -- WANT_CUA_MARKING causes the mouse definitions to be limited to the CUA actions,
  663. -- instead of the more powerful standard EPM actions.  Also causes typing
  664. -- while a mark exists to delete the mark, and Del to delete a mark if one
  665. -- exists, instead of always deleting a text character.  Can be set to 1, to
  666. -- behave this way all the time, or to 'SWITCH' to enable switching it on and
  667. -- off.  The default is 0, meaning that the standard EPM settings are in effect.
  668. compile if not defined(WANT_CUA_MARKING)
  669. WANT_CUA_MARKING = 0
  670. compile endif
  671.  
  672. -- MOUSE_SUPPORT only applies to EPM.  It can should normally be set to 1,
  673. -- to have mouse support compiled into the base .EX file.  It can be set to
  674. -- 'LINK' to have mouse support linked in at run time, or to 0 to omit mouse
  675. -- support completely.
  676. compile if not defined(MOUSE_SUPPORT)
  677. MOUSE_SUPPORT = 1
  678. compile endif
  679.  
  680. -- WANT_DM_BUFFER specifies whether a "deletemark buffer" is used in EPM.
  681. -- If so, any time a mark is deleted, a copy is saved in a buffer.  An entry on
  682. -- the Edit pulldown can be used to paste this buffer back into the editor.
  683. -- Not as useful as it originally was, since full undo has been added.
  684. compile if not defined(WANT_DM_BUFFER)
  685. WANT_DM_BUFFER = 0
  686. compile endif
  687.  
  688. -- WANT_STREAM_MODE enables stream mode editing, in which we pretend to be a
  689. -- stream mode editor instead of a line mode editor.  Can be set to 1, to
  690. -- behave this way all the time, or to 'SWITCH' to enable switching it on and
  691. -- off.  The default is 0, meaning forget stream mode entirely.
  692. compile if not defined(WANT_STREAM_MODE)
  693. WANT_STREAM_MODE = 0
  694. compile endif
  695.  
  696. -- WANT_STREAM_INDENTED lets you specify that if the Enter key splits a line,
  697. -- the new line should be indented the same way the previous line was.
  698. compile if not defined(WANT_STREAM_INDENTED)
  699. WANT_STREAM_INDENTED = 0
  700. compile endif
  701.  
  702. -- ENHANCED_ENTER_KEYS (EPM_only) specifies that the user can configure each
  703. -- variant of the enter or ctrl-enter key separately, via a dialog.  Great for
  704. -- LAN installations, so people can use a common .EX but still customize the
  705. -- keys.
  706. compile if not defined(ENHANCED_ENTER_KEYS)
  707. ENHANCED_ENTER_KEYS = 0
  708. compile endif
  709.  
  710. -- RING_OPTIONAL makes it so you can enable or disable having more than one
  711. -- file in the ring.  Pretty useless, but the CUA people insisted on it.
  712. -- Most people will want this to be set to 0, so that you always can load as
  713. -- many files as you like.
  714. compile if not defined(RING_OPTIONAL)
  715. RING_OPTIONAL = 0
  716. compile endif
  717.  
  718. -- SUPPORT_BOOK_ICON specifies whether or not the "Book icon" entry is on
  719. -- the Options pulldown.  Another useless one for internals.
  720. compile if not defined(SUPPORT_BOOK_ICON)
  721. ;compile if EVERSION < '5.50'
  722.    SUPPORT_BOOK_ICON = 1
  723. ; compile else
  724. ;  SUPPORT_BOOK_ICON = 0  -- EPM/G has no book (yet)
  725. ; compile endif
  726. compile endif
  727.  
  728. -- WANT_DYNAMIC_PROMPTS specifies whether support for dynamic prompting is
  729. -- included or not.  (EPM only.)  If support is included, the actual prompts
  730. -- can be enabled or disabled from a menu pulldown.  Keeping this costs about
  731. -- 3k in terms of .EX space.
  732. compile if EPM -- was EVERSION >= '5.21'
  733.  compile if not defined(WANT_DYNAMIC_PROMPTS)
  734. WANT_DYNAMIC_PROMPTS = 1
  735.  compile endif
  736. compile else
  737. WANT_DYNAMIC_PROMPTS = 0  -- Must be 0 for earlier EPM
  738. compile endif
  739.  
  740. -- WANT_BOOKMARKS specifies whether support for bookmarks is included or not.
  741. -- (EPM only.)  Can be set to 0, 1, or 'LINK'.
  742. compile if EPM
  743.  compile if not defined(WANT_BOOKMARKS)
  744.   compile if EVERSION >= '6.00c'
  745. WANT_BOOKMARKS = 1
  746.   compile else
  747. WANT_BOOKMARKS = 'LINK'
  748.   compile endif
  749.  compile endif
  750. compile else
  751. WANT_BOOKMARKS = 0
  752. compile endif
  753.  
  754. -- CHECK_FOR_LEXAM specifies whether or not EPM will check for Lexam, and only include
  755. -- PROOF on the menus if it's available.  Useful for product, if we're not shipping Lexam
  756. -- and don't want to advertise spell checking; a waste of space internally.
  757. compile if EPM
  758.  compile if not defined(CHECK_FOR_LEXAM)
  759. CHECK_FOR_LEXAM = 0
  760.  compile endif
  761. compile else
  762. CHECK_FOR_LEXAM = 0
  763. compile endif
  764.  
  765. -- Set this to 1 to include bracket-matching (Ctrl+[)
  766. compile if not defined(WANT_BRACKET_MATCHING)
  767. WANT_BRACKET_MATCHING = 0
  768. compile endif
  769.  
  770. -- For GPI version of EPM, this lets you select an AVIO-style underline cursor instead
  771. -- of the GPI-style vertical bar.
  772. compile if not defined(UNDERLINE_CURSOR)
  773. UNDERLINE_CURSOR = 0
  774. compile endif
  775.  
  776. -- Select which style pointer you prefer.
  777. compile if EPM & not defined(EPM_POINTER)
  778.  compile if EVERSION < 5.50
  779.    EPM_POINTER = SYSTEM_POINTER    -- AVIO version gets arrow pointer
  780.  compile else
  781.    EPM_POINTER = TEXT_POINTER      -- GPI version gets text pointer
  782.  compile endif
  783. compile endif
  784.  
  785. -- We're getting too big to fit all the standard stuff into EPM.EX, even without
  786. -- user additions, so this new option says to include a separate .EX file for
  787. -- MOUSE, MARKFILT, BOOKMARK, CLIPBRD, CHAROPS, DOSUTIL, ALL, MATH and SORT.
  788. compile if not defined(EXTRA_EX)
  789. EXTRA_EX = 0
  790. compile endif
  791.  
  792. -- Add support for looking up keywords in an index file and getting help.
  793. -- See KWHELP.E for details.  EPM only.
  794. compile if not defined(WANT_KEYWORD_HELP)
  795. WANT_KEYWORD_HELP = 0
  796. compile endif
  797.  
  798. -- By default, in EPM we block the action of action bar mnemonics being
  799. -- automatic accelerators.  Some users might not want this.  Can be 'SWITCH'.
  800. compile if not defined(BLOCK_ACTIONBAR_ACCELERATORS)
  801. BLOCK_ACTIONBAR_ACCELERATORS = 1
  802. compile endif
  803.  
  804. -- Define the default PASTE action for Shift+Ins.  Can be '' (for Paste Lines),
  805. -- 'B' (for Paste Block), or 'C' (for standard PM character mark).
  806. compile if not defined(DEFAULT_PASTE) & EPM
  807. DEFAULT_PASTE = 'C'
  808. compile endif
  809.  
  810. -- Include Rexx support?  (EPM 5.50 or above only.)
  811. compile if not defined(WANT_REXX)
  812. WANT_REXX = 1
  813. compile endif
  814.  
  815. -- Search for a Rexx profile?  (EPM 5.50 or above only.)
  816. compile if not defined(WANT_PROFILE)
  817. WANT_PROFILE = 0
  818. compile endif
  819.  
  820. compile if WANT_PROFILE & not WANT_REXX
  821.    *** Error:  Can not have WANT_PROFILE set if WANT_REXX is 0.
  822. compile endif
  823.  
  824. -- Toggle Escape key?  Default EPM for Boca doesn't use Esc to bring up command
  825. -- dialog, but all "real" EPM users want it.
  826. compile if not defined(TOGGLE_ESCAPE)
  827. TOGGLE_ESCAPE = 0
  828. compile endif
  829.  
  830. -- Toggle Tab key?  Some people want the Tab key to insert a tab, rather than
  831. -- inserting spaces to the next tab stop.
  832. compile if not defined(TOGGLE_TAB)
  833. TOGGLE_TAB = 0
  834. compile endif
  835.  
  836. -- Make menu support optional for people using the E Toolkit who want to
  837. -- use most of the standard macros.  *Not* for most users.
  838. compile if not defined(INCLUDE_MENU_SUPPORT)
  839. INCLUDE_MENU_SUPPORT = 1
  840. compile endif
  841.  
  842. -- For people using the E Toolkit who want to include the base menu support,
  843. -- but supply their own menus.  *Not* for most users.  Omits STDMENU.E,
  844. -- loaddefaultmenu cmd,
  845. compile if not defined(INCLUDE_STD_MENUS)
  846. INCLUDE_STD_MENUS = 1
  847. compile endif
  848.  
  849. -- The compiler support is only included if the bookmark support is; this lets
  850. -- you omit the former while including the latter.
  851. compile if not defined(INCLUDE_WORKFRAME_SUPPORT)
  852.    INCLUDE_WORKFRAME_SUPPORT = 1
  853. compile endif
  854.  
  855. -- For Toolkit developers - set to 0 if you don't want the user to be able
  856. -- to go to line 0.  Affects MH_gotoposition in MOUSE.E and Def Up in STDKEYS.E.
  857. compile if not defined(TOP_OF_FILE_VALID)
  858.    TOP_OF_FILE_VALID = 1       -- Can be '0', '1', or 'STREAM' (dependant on STREAM_MODE)
  859. compile endif
  860.  
  861. -- EBOOKIE support desired?  0=no; 1=include bkeys.e; 'LINK'=always link BKEYS
  862. -- at startup; 'DYNALINK'=support for dynamically linking it in.
  863. compile if not defined(WANT_EBOOKIE)
  864.  compile if E3
  865.    WANT_EBOOKIE = 0
  866.  compile else
  867.    WANT_EBOOKIE = 'DYNALINK'
  868.  compile endif
  869. compile endif
  870.  
  871. -- Starting in EPM 5.50, EPM was modified so that when scrolling with the
  872. -- scroll bars, the cursor would stay in the same text-relative location, and
  873. -- could move off the window; pressing a key that moved the cursor would then
  874. -- cause the displayed text to jump back so that the cursor was visible.
  875. -- We were told to make this change in order to comply with CUA, but most
  876. -- users found it horribly confusing and annoying.  Starting with 5.60, we
  877. -- can work either way; the default is now that we do what people prefer.
  878. compile if not defined(KEEP_CURSOR_ON_SCREEN)
  879.    KEEP_CURSOR_ON_SCREEN = 1
  880. compile endif
  881.  
  882. -- E Toolkit users might want to omit support for accessing the application
  883. -- .INI file (e.g., EPM.INI).
  884. compile if not defined(WANT_APPLICATION_INI_FILE)
  885.    WANT_APPLICATION_INI_FILE = 1
  886. compile endif
  887.  
  888. -- Support for a TAGS file (EPM 5.60 or above, only).
  889. compile if EVERSION < '5.60' | not defined(WANT_TAGS)
  890.    WANT_TAGS = 0
  891. compile endif
  892.  
  893. -- Unmark after doing a move mark?
  894. compile if not defined(UNMARK_AFTER_MOVE)
  895.    UNMARK_AFTER_MOVE = 0
  896. compile endif
  897.  
  898. -- Keep EPM's Preferences and Frame menus up after a selection?
  899. compile if not defined(WANT_NODISMISS_MENUS)
  900.    WANT_NODISMISS_MENUS = 1
  901. compile endif
  902.  
  903. -- Allow menu prompting even if status line is at top of edit window
  904. -- (and so menus would overlay prompts)?
  905. compile if not defined(ALLOW_PROMPTING_AT_TOP)
  906.    ALLOW_PROMPTING_AT_TOP = 1
  907. compile endif
  908.  
  909. -- Include support for viewing the EPM User's guide in the Help menu.
  910. compile if not defined(SUPPORT_USERS_GUIDE)
  911.    SUPPORT_USERS_GUIDE = 0
  912. compile endif
  913.  
  914. -- Include support for viewing the EPM Technical Reference in the Help menu.
  915. compile if not defined(SUPPORT_TECHREF)
  916.    SUPPORT_TECHREF = 0
  917. compile endif
  918.  
  919. -- Include support for calling user exits in DEFMAIN, SAVE, NAME, and QUIT.
  920. -- (EPM 5.51+ only; requires isadefproc() ).
  921. compile if EVERSION < '5.51' or not defined(SUPPORT_USER_EXITS)
  922.    SUPPORT_USER_EXITS = 0
  923. compile endif
  924. compile if EVERSION < '5.51' or not defined(INCLUDE_BMS_SUPPORT)
  925.    INCLUDE_BMS_SUPPORT = 0
  926. compile endif
  927.  
  928. -- Lets EOS2 users delay the SAVEPATH check the way that EPM does, so that a
  929. -- DEFINIT can modify the value before E3EMUL checks it.
  930. compile if not defined(DELAY_SAVEPATH_CHECK)
  931.    DELAY_SAVEPATH_CHECK = 0
  932. compile endif
  933.  
  934. compile if EPM & not defined(LOCATE_CIRCLE_STYLE)
  935.    LOCATE_CIRCLE_STYLE = 1
  936. compile endif
  937. compile if EVERSION >= '5.60'
  938.  compile if not defined(LOCATE_CIRCLE_COLOR1)
  939.    LOCATE_CIRCLE_COLOR1 = 16777220
  940.  compile endif
  941.  compile if not defined(LOCATE_CIRCLE_COLOR2)
  942.    LOCATE_CIRCLE_COLOR2 = 16777218
  943.  compile endif
  944. compile endif
  945.  
  946. -- Include support for toolbar (EPM 6.00+ only)
  947. compile if EVERSION >= 6 and not defined(WANT_TOOLBAR)
  948.    WANT_TOOLBAR = 1
  949. compile elseif EVERSION < 6
  950.    WANT_TOOLBAR = 0  -- Toolbar only supported for EPM 6.00 & above.
  951. compile endif
  952.  
  953. -- Use System Monospaced as default font, rather than the PM default.
  954. compile if not defined(WANT_SYS_MONOSPACED)
  955.    WANT_SYS_MONOSPACED = 0
  956. compile endif
  957.  
  958. -- Specify the size of the System Monospaced font to use.  Default is 0, which
  959. -- means system picks it.  (Generally, 20x9)  Could set 'WW8HH16' for 16x8, etc.
  960. -- Applies to MONOFONT cmd as well as (if WANT_SYS_MONOSPACED set) to default font.
  961. -- 1995/05/30  Changed default size to 10.  A 10 point size looks good on most
  962. -- displays, while specifying 0 gave too large a font on VGA.
  963. compile if not defined(SYS_MONOSPACED_SIZE)
  964.    SYS_MONOSPACED_SIZE = 10
  965. compile endif
  966.  
  967. -- Allow pressing tab in insert mode to insert spaces to next tab stop in
  968. -- line mode as well as in stream mode.
  969. compile if not defined(WANT_TAB_INSERTION_TO_SPACE)
  970.    WANT_TAB_INSERTION_TO_SPACE = 0
  971. compile endif
  972.  
  973. -- Tree support - TREE command & related stuff.  Works best in EPM 5.60 &
  974. -- above due to long line support, but will work in earlier EPM and even
  975. -- EOS2.
  976. compile if not defined(WANT_TREE)
  977.  compile if E3
  978.    WANT_TREE = 0
  979.  compile else
  980.    WANT_TREE = 'DYNALINK'
  981.  compile endif
  982. compile endif
  983.  
  984. -- For GPI, we manage the cursor ourself.  This provides an alternate to
  985. -- UNDERLINE_CURSOR, to allow changing the shape at runtime.
  986. compile if EVERSION >='5.50'
  987.  compile if not defined(DYNAMIC_CURSOR_STYLE)
  988.     DYNAMIC_CURSOR_STYLE = 0
  989.  compile endif
  990. compile endif
  991.  
  992. -- For EPM 6.00, we have the ability to be a Workplace Shell object.  If we
  993. -- are, the configuration information comes from the object and not the .INI
  994. -- file.  This saves a good amount of startup time.
  995. compile if EPM
  996.  compile if not defined(WPS_SUPPORT)
  997.     WPS_SUPPORT = EPM32
  998.  compile endif
  999. compile endif
  1000.  
  1001. -- Delay the building of the menus?  Gives faster startup for EPM 6.01, where
  1002. -- we can load a dummy menu from a resource as a placeholder.  For earlier
  1003. -- versions, the extra redrawing of the windows makes this not worthwhile.
  1004. -- People who use external add-ons that update the menus might prefer to
  1005. -- turn this off, to simplify the addition of those packages.
  1006. compile if EPM
  1007.  compile if not defined(DELAY_MENU_CREATION)
  1008. ;;  DELAY_MENU_CREATION = EVERSION >= '6.01'
  1009.     DELAY_MENU_CREATION = 0  -- Traps in PMWIN.DLL; leave off for now.
  1010.  compile endif
  1011. compile endif
  1012.  
  1013. -- Use the normal-sized or the tiny icons for the built-in toolbar?
  1014. compile if EPM32
  1015.  compile if not defined(WANT_TINY_ICONS)
  1016.     WANT_TINY_ICONS = 0
  1017.  compile endif
  1018. compile endif
  1019.  
  1020. -- Support the Shift+cursor movement for marking?
  1021. compile if not defined(WANT_SHIFT_MARKING)
  1022.     WANT_SHIFT_MARKING = EPM
  1023. compile endif
  1024.  
  1025. -- Respect the Scroll lock key?  If set to 1, Shift+F1 - Shift+F4 must not be
  1026. -- redefined.  (The cursor keys execute those keys directly, in order to
  1027. -- avoid duplicating code.)  Note that setting this flag turns off the internal
  1028. -- cursor key handling, so if WANT_CUA_MARKING = 'SWITCH',
  1029. -- WANT_STREAM_EDITING = 'SWITCH', and RESPECT_SCROLL_LOCK = 1, cursor movement
  1030. -- might be unacceptably slow.
  1031. compile if not defined(RESPECT_SCROLL_LOCK)
  1032.     RESPECT_SCROLL_LOCK = 0
  1033. compile endif
  1034.  
  1035. -- Should word-marking use a character or block mark?
  1036. compile if not defined(WORD_MARK_TYPE)
  1037. ;compile if WANT_CHAR_OPS
  1038. ;   WORD_MARK_TYPE = 'CHAR'
  1039. ;compile else
  1040.     WORD_MARK_TYPE = 'BLOCK'
  1041. ;compile endif
  1042. compile endif
  1043.  
  1044. include NLS_LANGUAGE'.e'
  1045.  
  1046. -- This defines the "Directory of" string searched for by Alt-1 in DIR output.
  1047. -- (User-definable for NLS requirements.)
  1048. compile if not defined(DIRECTORYOF_STRING)
  1049. DIRECTORYOF_STRING = DIR_OF__MSG
  1050. compile endif
  1051. -------------------------------------------------------------------------------
  1052.  
  1053. definit
  1054. universal expand_on, matchtab_on, default_search_options
  1055. universal vTEMP_FILENAME, vTEMP_PATH, vAUTOSAVE_PATH
  1056. compile if EVERSION < 5
  1057.    universal ZoomWindowStyle, comsfileid, messy
  1058. compile else
  1059.    universal edithwnd, MouseStyle, appname
  1060.  compile if EVERSION >= '5.20'
  1061.    universal app_hini
  1062.    universal CurrentHLPFiles
  1063.  compile endif
  1064.  compile if EVERSION >= '5.21'
  1065.    universal vSTATUSCOLOR, vMESSAGECOLOR
  1066.   compile if EVERSION >= '5.60'
  1067.    universal vDESKTOPCOLOR
  1068.   compile endif
  1069.  compile endif
  1070.  compile if CHECK_FOR_LEXAM
  1071.    universal LEXAM_is_available
  1072.  compile endif
  1073.  compile if WANT_DYNAMIC_PROMPTS
  1074.    universal menu_prompt
  1075.  compile endif
  1076.  compile if ENHANCED_ENTER_KEYS
  1077.    universal enterkey, a_enterkey, c_enterkey, s_enterkey
  1078.    universal padenterkey, a_padenterkey, c_padenterkey, s_padenterkey
  1079.  compile endif
  1080.  compile if RING_OPTIONAL
  1081.    universal ring_enabled
  1082.  compile endif
  1083.    universal EPM_utility_array_ID, defaultmenu, font
  1084.    universal vDEFAULT_TABS, vDEFAULT_MARGINS, vDEFAULT_AUTOSAVE
  1085.    universal  ADDENDA_FILENAME
  1086.    universal  DICTIONARY_FILENAME
  1087.  compile if WANT_EPM_SHELL
  1088.    universal shell_index
  1089.  compile endif
  1090.  compile if WANT_CUA_MARKING = 'SWITCH'
  1091.    universal CUA_marking_switch
  1092.  compile endif
  1093. compile endif
  1094. compile if EVERSION < '4.12'
  1095.    universal autosave
  1096. compile endif
  1097. compile if HOST_SUPPORT
  1098.    universal hostcopy
  1099. compile endif
  1100. compile if SETSTAY='?'
  1101.    universal stay
  1102. compile endif
  1103. compile if WANT_STREAM_MODE = 'SWITCH'
  1104.    universal stream_mode
  1105. compile endif
  1106. compile if WANT_STACK_CMDS = 'SWITCH'
  1107.    universal stack_cmds
  1108. compile endif
  1109. compile if EVERSION >= '5.50'
  1110.    universal default_font
  1111.  compile if DYNAMIC_CURSOR_STYLE
  1112.    universal cursordimensions
  1113.  compile endif
  1114. compile endif
  1115.    universal bitmap_present
  1116. compile if WANT_LONGNAMES = 'SWITCH'
  1117.    universal SHOW_LONGNAMES
  1118. compile endif
  1119. compile if WANT_PROFILE = 'SWITCH'
  1120.    universal REXX_PROFILE
  1121. compile endif
  1122. compile if TOGGLE_ESCAPE
  1123.    universal ESCAPE_KEY
  1124. compile endif
  1125. compile if TOGGLE_TAB
  1126.    universal TAB_KEY
  1127. compile endif
  1128.    universal save_with_tabs, default_edit_options, default_save_options
  1129.    universal last_append_file
  1130. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  1131.    universal CUA_MENU_ACCEL
  1132. compile endif
  1133. compile if EPM
  1134.  compile if WPS_SUPPORT
  1135.    universal wpshell_handle
  1136.    wpshell_handle = windowmessage(1,  getpminfo(EPMINFO_OWNERFRAME),
  1137.                                 5152,    -- EPM_QUERY_CONFIG
  1138.                                 getpminfo(EPMINFO_EDITCLIENT),
  1139.                                 0)
  1140.    if wpshell_handle then
  1141.       call dynalink32('DOSCALLS',
  1142.                       '#302',  -- Dos32GetSharedMem
  1143.                       atol(wpshell_handle) ||  -- Base address
  1144.                       atol(1))             -- PAG_READ
  1145.    endif
  1146.  compile endif
  1147. compile endif
  1148.  
  1149. compile if defined(my_expand_on)
  1150. expand_on        = my_expand_on
  1151. compile else
  1152. expand_on        = 1
  1153. compile endif
  1154.                         -- set automatic syntax expansion 0/1
  1155. compile if defined(my_matchtab_on)
  1156. matchtab_on      = my_matchtab_on
  1157. compile else
  1158. matchtab_on      = 0
  1159. compile endif
  1160.                         -- set default matchtab to 0 or 1
  1161. compile if EVERSION < 5
  1162.  compile if defined(my_ZoomWindowStyle)
  1163. ZoomWindowStyle  = my_ZoomWindowStyle
  1164.  compile else
  1165. ZoomWindowStyle  = 1
  1166.  compile endif
  1167.                         -- set default zoom window style
  1168.  compile if EVERSION < '4.12'
  1169.   compile if defined(my_autosave)
  1170. autosave         = my_AUTOSAVE
  1171.   compile else
  1172. autosave         = DEFAULT_AUTOSAVE
  1173.   compile endif
  1174.                         -- set autosave initial value
  1175.  compile endif    -- EVERSION < 4.12
  1176.  compile if WANT_WINDOWS
  1177.   compile if defined(my_messy)
  1178. messy            = my_messy
  1179.   compile else
  1180. messy            = 0
  1181.   compile endif
  1182.                         -- set to 1 for messy-desk windowing
  1183.  compile else        -- No windowing ==> no choice of windowing style.
  1184. messy            = 0    -- Do not change this copy!!!
  1185.  compile endif
  1186.  
  1187. compile endif  -- EVERSION < 5
  1188.  
  1189.  
  1190. -- This option JOIN_AFTER_WRAP specifies whether to join the
  1191. -- next line after a word-wrap.  To see its effect:  set margins to 1 79 1;
  1192. -- go into insert mode; type a few characters into this line to cause a wrap.
  1193. -- (sample next line)
  1194. -- If join_after_wrap = 1, you'll get:
  1195. --    wrap. -- (sample next line)
  1196. -- If join_after_wrap = 0, you'll get:
  1197. --    wrap.
  1198. --    -- (sample next line)
  1199. compile if defined(my_join_after_wrap)
  1200. join_after_wrap = my_join_after_wrap
  1201. compile else
  1202. join_after_wrap = 1
  1203. compile endif
  1204.  
  1205.  
  1206. -- This option CENTER_SEARCH specifies how the cursor moves
  1207. --   during a search or replace operation.
  1208. -- 0 :  Hold the cursor fixed; move the word to the cursor.  Like old E.
  1209. -- 1 :  Move the cursor to the word if it's visible on the current screen,
  1210. --      to minimize text motion.  Else center the word in mid-screen.
  1211. compile if defined(my_center_search)
  1212. center_search = my_center_search
  1213. compile else
  1214. center_search = 1
  1215. compile endif
  1216.  
  1217. compile if not EPM
  1218. -- This option TOP_OF_FILE_FIXED specifies whether the
  1219. --   "Top of File" line is allowed to move down from the top of the window.
  1220. -- 0 :  Allow the line to move down, so that cursor operations act the same
  1221. --      regardless of proximity to top of file.  For example, the key Shift-F5
  1222. --      (center the current line) will move the top-of-file line down if that's
  1223. --      what's needed to center the current line in a small file.
  1224. -- 1 :  Hold the line fixed; some cursor operations will change their behavior
  1225. --      as the cursor approaches the top of file.  Shift-F5 will not center the
  1226. --      current line in a small file.
  1227.  compile if defined(my_top_of_file_fixed)
  1228. top_of_file_fixed = my_top_of_file_fixed
  1229.  compile else
  1230. top_of_file_fixed = 1
  1231.  compile endif
  1232. compile endif
  1233.  
  1234. -- Ver. 4.12:  Some users want only one space after a period or colon when
  1235. -- they reflow a paragraph.  This is a predefined universal variable similar to
  1236. -- top_of_file_fixed, so a macro can switch it on and off when desired for
  1237. -- special purposes.
  1238. --    1 (TRUE)  ==>  supply two spaces after a sentence or colon.
  1239. --    0 (FALSE) ==>  supply only one space.
  1240. compile if EVERSION >= 4    -- not in E3
  1241.  compile if defined(my_two_spaces)
  1242.   two_spaces = my_two_spaces
  1243.  compile else
  1244.   two_spaces = TRUE  -- Default is as before, two spaces after sentence.
  1245.  compile endif
  1246. compile endif
  1247.  
  1248. -- Default options for locate and change commands.  Pick from:
  1249. --
  1250. --   E  Exact match (case sensitive)    C  Case-insensitive (ignore case)
  1251. --   A  All text (ignore marks)         M  Marked area only
  1252. --   +  Advance thru file, top->bott    -  Backward, bottom -> top
  1253. --   F  Forward in line, left->right    R  Reverse in line, right->left
  1254. --
  1255. -- The standard is 'EA+F' to be compatible with previous releases; that's
  1256. -- what you get if you leave this blank.  Many users will prefer 'C'.
  1257. compile if defined(my_default_search_options)
  1258. default_search_options= my_default_search_options
  1259. compile else
  1260. default_search_options=''
  1261. compile endif
  1262.  
  1263. compile if HOST_SUPPORT
  1264.  compile if defined(my_hostcopy)
  1265.    hostcopy= my_hostcopy
  1266.  compile else
  1267.   compile if E3
  1268.    hostcopy='mytecopy'    -- Default for DOS is MYTECOPY.
  1269.   compile else
  1270.    hostcopy='almcopy'     -- Default for OS/2 is the OS/2 version of ALMCOPY.
  1271.   compile endif
  1272.  compile endif
  1273.                         -- Could be mytecopy, e78copy, bondcopy, cp78copy, almcopy, etc.
  1274.                         -- Add options if necessary (e.g., 'mytecopy /nowsf')
  1275. compile endif
  1276.  
  1277.  
  1278. -- EOS2 ver 4.10:  E can now save files with tab compression.  You can choose
  1279. -- to save an individual file with tabs by issuing 'save /t' or 'file /t'.
  1280. -- If you want ALL files saved with tab compression, without specifying
  1281. -- the '/t', set this to 1.
  1282. compile if defined(my_save_with_tabs)
  1283. save_with_tabs = my_save_with_tabs
  1284. compile else
  1285. save_with_tabs = 0
  1286. compile endif
  1287.  
  1288. compile if EVERSION < 5
  1289. -- Four function_key_text strings now for four shift states.
  1290. -- 80 characters (one line) max.  Broken into two strings here,
  1291. -- with arrow graphics replaced with ASCII codes for printability.
  1292.  
  1293.  compile if defined(my_function_key_text)
  1294. function_key_text  = my_function_key_text
  1295.  compile else
  1296.    compile if (WANT_DRAW=F6 | WANT_DRAW='F6') & not SMALL
  1297. function_key_text  = "F1=Help  2=Save  3=Quit  4=File         "||
  1298.                      " 6=Draw  7=Name  8=Edit  9=Undo  10=Next"
  1299.    compile else
  1300. function_key_text  = "F1=Help  2=Save  3=Quit  4=File         "||
  1301.                      "         7=Name  8=Edit  9=Undo  10=Next"
  1302.    compile endif
  1303.  compile endif
  1304.  
  1305.  compile if defined(my_a_function_key_text)
  1306. a_function_key_text= my_a_function_key_text
  1307.  compile else
  1308. a_function_key_text= "F1=LineChars                            "||
  1309.                      "       7="\27"Shift  8=Shift"\26"        10=Prev"
  1310.  compile endif
  1311.  
  1312.  compile if defined(my_c_function_key_text)
  1313. c_function_key_text= my_c_function_key_text
  1314.  compile else
  1315. c_function_key_text= "F1=UpperWord  2=LowerWord  3=UpperMark  "||
  1316.                      "4=LowerMark  5=BeginWord  6=EndWord     "
  1317.  compile endif
  1318.  
  1319.  compile if defined(my_s_function_key_text)
  1320. s_function_key_text= my_s_function_key_text
  1321.  compile else
  1322. s_function_key_text= "F1="\27"Scrl  2=Scrl"\26"  3=Scrl"\24"  4=Scrl"||
  1323.                      \25"  5=CenterLine                               "
  1324.  compile endif
  1325.  
  1326. -- This specifies how long you must hold down a shift/ctrl/alt key before
  1327. -- the function_key_text changes.
  1328. -- It's an arbitrary value:  2000 gives about 3/4 second delay on an AT.
  1329. -- Set this to zero if you don't want the function_key_text to shift.
  1330.  compile if defined(my_function_key_text_delay)
  1331. function_key_text_delay = my_function_key_text_delay
  1332.  compile else
  1333. function_key_text_delay = 2000
  1334.                                                                -- for DOS 3
  1335. -- On OS/2 real mode use about 1/10th of that.
  1336. if machine()='OS2REAL' or dos_version() >= 1000 then
  1337.    function_key_text_delay = function_key_text_delay % 10      -- for OS/2 real
  1338. endif
  1339.   compile if EVERSION >= '4.00'  -- Save a few bytes in DOS version
  1340. -- In protect mode use machine-independent units, milliseconds!
  1341. if machine()='OS2PROTECT' then
  1342.    function_key_text_delay = 800
  1343.                                                                -- OS/2 protect
  1344. endif
  1345.   compile endif
  1346.  compile endif
  1347.  
  1348. -- Note:  You'll want to change the f.k.texts if you define new keysets with
  1349. -- different function keys.  The preferred method is:
  1350. --    define your new keyset in a separate file (like CKEYS.E);
  1351. --    write a small condition-check to select your keyset (like CKEYSEL.E);
  1352. --    assign the new function_key_texts in the select file.
  1353. compile endif  -- EVERSION < 5
  1354.  
  1355. compile if WANT_LONGNAMES = 'SWITCH'
  1356.  compile if defined(my_SHOW_LONGNAMES)
  1357.    SHOW_LONGNAMES = my_SHOW_LONGNAMES
  1358.  compile else
  1359.    SHOW_LONGNAMES = 0
  1360.  compile endif
  1361. compile endif
  1362.  
  1363. compile if WANT_PROFILE = 'SWITCH'
  1364.  compile if defined(my_REXX_PROFILE)
  1365.    REXX_PROFILE = my_REXX_PROFILE
  1366.  compile else
  1367.    REXX_PROFILE = 0
  1368.  compile endif
  1369. compile endif
  1370.  
  1371. compile if TOGGLE_ESCAPE
  1372.    ESCAPE_KEY = 0
  1373. compile endif
  1374. compile if TOGGLE_TAB
  1375.    TAB_KEY = 0
  1376. compile endif
  1377.  
  1378. compile if SETSTAY='?'
  1379.  compile if defined(my_stay)
  1380.    stay = my_stay
  1381.  compile else
  1382.    stay = 0
  1383.  compile endif
  1384. compile endif
  1385.  
  1386. ; We now save the constants in universal variables.  This way, they can be
  1387. ; over-ridden at execution time by a definit (e.g., the user might check an
  1388. ; environment variable to see if a VDISK has been defined, and if so, set the
  1389. ; temp_path to point to it).  The constants are used as default initialization,
  1390. ; and for compatability with older macros.
  1391. vTEMP_FILENAME = TEMP_FILENAME
  1392. vTEMP_PATH = TEMP_PATH
  1393. vAUTOSAVE_PATH = AUTOSAVE_PATH
  1394.  
  1395. ; Default options to be added to the EDIT command.  Normally null, some users
  1396. ; might prefer to make it '/L'.
  1397. ;  /L means to use the DOS convention that any line feed character (x'0A')
  1398. ;     not paired with a carriage return (x'0D') should be left alone;
  1399. ;     this is useful if you wish to use the line feed as a printer control.
  1400. ;  /U means to use the Unix convention that a line feed alone is sufficient
  1401. ;     to start a new line, whether or not it's paired with a CR.
  1402. ; The default (if no options are given) is /U, the traditional E treatment.
  1403. ; If you make /L the default, it can still be overridden on any specific
  1404. ; EDIT command as by "EDIT /U filename".
  1405. ; This choice makes no difference for normal text files with CR-LF for newline.
  1406. compile if defined(my_default_edit_options)
  1407. default_edit_options= my_default_edit_options
  1408. compile else
  1409. default_edit_options=''
  1410. compile endif
  1411.  
  1412. ; Default options to be added to the SAVE command.  Normally null, some users
  1413. ; might prefer to make it '/S' (EPM 5.51 or above).
  1414. compile if defined(my_default_save_options)
  1415. default_save_options= my_default_save_options
  1416. compile else
  1417. default_save_options=''
  1418. compile endif
  1419.  
  1420. ; In EPM you can choose one of several (well, only 2 for now) prefabricated
  1421. ; styles of mouse behavior.  You can change styles on the fly with the command
  1422. ; MOUSESTYLE or MS.  See MOUSE.E for style descriptions; brief summaries are:
  1423. ;  1: Block and line marks for programmers.
  1424. ;     Button 1 drag = block mark, button 2 drag = line.
  1425. ;     Button 1 double-click = unmark.  Button 2 double-click = word-mark.
  1426. ;  2: Character and line marks.
  1427. ;     Same as style 1, but button 1 drag = character mark rather than block.
  1428. ;  3: A marking style of point-the-corners instead of drag-paint.
  1429. ;     (Not done yet.)
  1430. compile if EPM
  1431.  compile if defined(my_MouseStyle)
  1432. MouseStyle = my_MouseStyle
  1433.  compile else
  1434. MouseStyle = 1
  1435.  compile endif
  1436.  compile if SPELL_SUPPORT = 'DYNALINK'  -- For EPM, initialize here if DYNALINK,
  1437.   compile if defined(my_ADDENDA_FILENAME)  -- so can be overridden by CONFIG info.
  1438.      ADDENDA_FILENAME= my_ADDENDA_FILENAME
  1439.   compile else
  1440.      ADDENDA_FILENAME= 'c:\lexam\lexam.adl'
  1441.   compile endif
  1442.  
  1443.   compile if defined(my_DICTIONARY_FILENAME)
  1444.      DICTIONARY_FILENAME= my_DICTIONARY_FILENAME
  1445.   compile else
  1446.      DICTIONARY_FILENAME= 'c:\lexam\us.dct'
  1447.   compile endif
  1448.  compile endif  -- SPELL_SUPPORT
  1449.  compile if WANT_EPM_SHELL
  1450.    shell_index = 0
  1451.  compile endif
  1452.  compile if WANT_CUA_MARKING = 'SWITCH'
  1453.   compile if defined(my_CUA_marking_switch)
  1454.    CUA_marking_switch = my_CUA_marking_switch
  1455.    compile if my_CUA_marking_switch
  1456.    'togglecontrol 25 1'
  1457.    compile endif
  1458.   compile else
  1459.    CUA_marking_switch = 0           -- Default is off, for standard EPM behavior.
  1460.   compile endif
  1461.  compile elseif WANT_CUA_MARKING = 1
  1462.    'togglecontrol 25 1'
  1463.  compile endif
  1464.    bitmap_present = 0
  1465.  compile if RESPECT_SCROLL_LOCK
  1466.    'togglecontrol 26 0'  -- Turn off internal support for cursor keys.
  1467.  compile endif
  1468. compile endif  -- EPM
  1469.  
  1470. ------------ Rest of this file isn't normally changed. ------------------------
  1471.  
  1472. compile if EVERSION < '4.12'
  1473. -- Ver. 4.11B:  It's important that the base keyset, edit_keys, be
  1474. -- initialized early in the start-up process, before any modules are linked.
  1475. -- Linked modules can now contain key definitions that overlay the base keyset,
  1476. -- and they need a base to overlay onto.  Don't delete this line!
  1477. keys edit_keys
  1478.  
  1479. -- Set some defaults.  In EOS2 4.12 and later, this is done in a DEFLOAD.
  1480. 'xcom tabs'    DEFAULT_TABS
  1481. 'xcom margins' DEFAULT_MARGINS
  1482. compile endif
  1483.  
  1484. compile if EVERSION >= 5
  1485. vDEFAULT_TABS    = DEFAULT_TABS
  1486. vDEFAULT_MARGINS = DEFAULT_MARGINS
  1487. vDEFAULT_AUTOSAVE= DEFAULT_AUTOSAVE
  1488.  
  1489.  compile if defined(my_APPNAME)
  1490. appname=my_APPNAME
  1491.  compile else
  1492. appname=leftstr(getpminfo(EPMINFO_EDITEXSEARCH),3)  -- Get the .ex search path
  1493.                               -- name (this should be a reliable way to get a
  1494.                               -- unique application under which to to store
  1495.                               -- data in os2.ini.  I.e. EPM (EPMPATH) would be
  1496.  compile endif                -- 'EPM', LaMail (LAMPATH) would be 'LAM'
  1497.  
  1498. ; What was the ring_menu_array_id is now the EPM_utility_array_id, to reflect
  1499. ; that it's a general-purpose array.  An array is a file, so it's cheaper to
  1500. ; use the same one whenever possible, rather than creating new ones.  We use a
  1501. ; prefix to keep indices unique.  Current indices are:
  1502. ;   menu.     -- Menu index; commented out
  1503. ;   bmi.      -- Bookmark index
  1504. ;   bmn.      -- Bookmark name
  1505. ;   dspl.     -- Dynamic spellchecking starting keyset
  1506. ;   shell_f.  -- Shell fileid
  1507. ;   shell_h.  -- Shell handle
  1508. ;   si.       -- Style index
  1509. ;   sn.       -- Style name
  1510. ;   F         -- File id for Ring_more command; not used as of EPM 5.20
  1511. do_array 1, EPM_utility_array_ID, "array.EPM"   -- Create this array.
  1512.   compile if 0  -- LAM: Delete this feature; nobody used it, and it slowed things down.
  1513. one = 1                                          -- (Value is a VAR, so have to kludge it.)
  1514. do_array 2, EPM_utility_array_ID, 'menu.0', one           -- Item 0 says there is one item.
  1515. do_array 2, EPM_utility_array_ID, 'menu.1', defaultmenu   -- Item 1 is the default menu name.
  1516.   compile endif  -- 0
  1517. zero = 0                                         -- (Value is a VAR, so have to kludge it.)
  1518. do_array 2, EPM_utility_array_ID, 'bmi.0', zero    -- Index of 0 says there are no bookmarks
  1519. do_array 2, EPM_utility_array_ID, 'si.0', zero     -- Set Style Index 0 to "no entries."
  1520. compile endif  -- EVERSION >= 5
  1521.  
  1522. compile if EXTRA_EX
  1523.  compile if defined(my_EXTRA_EX_NAME)
  1524.   'linkverify' my_EXTRA_EX_NAME
  1525.  compile else
  1526.   'linkverify EXTRA'
  1527.  compile endif
  1528. compile endif
  1529.  
  1530. compile if EVERSION >= 5
  1531.  compile if EVERSION >= '5.20'
  1532.   compile if WANT_APPLICATION_INI_FILE
  1533.    compile if EVERSION >= '6.00'
  1534. app_hini=dynalink32(ERES2_DLL, 'ERESQueryHini', gethwndc(EPMINFO_EDITCLIENT) ,2)
  1535.    compile elseif EVERSION >= '5.53'
  1536. app_hini=dynalink(ERES2_DLL, 'ERESQUERYHINI', gethwnd(EPMINFO_EDITCLIENT) ,2)
  1537.    compile else
  1538. app_hini=getpminfo(EPMINFO_HINI)
  1539.    compile endif  -- 6.00 / 5.53
  1540. if not app_hini then
  1541.    call WinMessageBox('Bogus Ini File Handle', '.ini file handle =' app_hini, 16416)
  1542. ;; 'postme inifileupdate 1'  -- Don't think this is a problem any more.
  1543. endif
  1544.   compile endif  -- WANT_APPLICATION_INI_FILE
  1545. CurrentHLPFiles = 'epm.hlp'
  1546.  compile endif  -- 5.20
  1547. ;compile if defined(my_TILDE)
  1548. ;  tilde = my_TILDE
  1549. ;compile elseif EVERSION > '5.20'
  1550. ;  tilde = '~'
  1551. ;compile else
  1552. ;if dos_version() >= 1020 then
  1553. ;   tilde = ''
  1554. ;else
  1555. ;   tilde = '~'
  1556. ;endif
  1557. ;compile endif
  1558.  compile if defined(my_FONT)
  1559.    font = my_FONT
  1560.   compile if EVERSION < 5.21
  1561.    if not my_FONT then call setfont(0, 0); endif  -- If FALSE then Togglefont
  1562.   compile endif
  1563.  compile else
  1564.    font = TRUE                         -- default font is large
  1565.  compile endif
  1566.  compile if RING_OPTIONAL
  1567.   compile if defined(my_RING_ENABLED)
  1568.     ring_enabled = my_RING_ENABLED
  1569.   compile else
  1570.     ring_enabled = 1
  1571.   compile endif
  1572.   compile if WANT_APPLICATION_INI_FILE
  1573.    compile if WPS_SUPPORT
  1574.    if wpshell_handle then
  1575. ; Key 18
  1576. ;     this_ptr = peek32(shared_mem+72, 4); -- if this_ptr = \0\0\0\0 then return; endif
  1577. ;     parse value peekz(this_ptr) with ? ring_enabled ?
  1578. compile if 0  -- LAM/JP
  1579.       ring_enabled = substr(peekz(peek32(wpshell_handle+64, 4)), 8, 1)
  1580. compile else
  1581.       ring_enabled = 1
  1582. compile endif
  1583.    else
  1584.    compile endif
  1585.     newcmd=queryprofile( app_hini, appname, INI_RINGENABLED)
  1586.     if newcmd<>'' then ring_enabled = newcmd; endif
  1587.    compile if WPS_SUPPORT
  1588.    endif  -- wpshell_handle
  1589.    compile endif
  1590.   compile endif  -- WANT_APPLICATION_INI_FILE
  1591.    if not ring_enabled then
  1592.   compile if EVERSION < '5.53'
  1593.       'togglecontrol 20 0'
  1594.   compile else
  1595.       'toggleframe 4 0'
  1596.   compile endif
  1597.    endif
  1598.  compile endif  -- RING_OPTIONAL
  1599.  compile if not DELAY_MENU_CREATION
  1600.    include 'menuacel.e'
  1601.  compile endif
  1602.  compile if WANT_DYNAMIC_PROMPTS
  1603.   compile if defined(my_MENU_PROMPT)
  1604.    menu_prompt = my_MENU_PROMPT
  1605.   compile else
  1606. ;  menu_prompt = 0       -- Default is to not have it (at least, internally).
  1607.    menu_prompt = 1       -- (Start with it on for now, to get it beta tested.)
  1608.   compile endif
  1609.  compile endif  -- DYNAMIC_PROMPTS
  1610. compile endif  -- EVERSION >= 5
  1611.  
  1612. last_append_file = ''   -- Initialize for DEFC APPEND.
  1613.  
  1614. compile if not EPM
  1615.  compile if E3
  1616. 'xcom e /n /h coms.e'
  1617. getfileid comsfileid    -- initialize comsfileid for other macros
  1618.  
  1619. -- Make sure the top ring is active.  This E command (any old file
  1620. -- would do) activates the top ring.
  1621. 'xcom e /n coms.e'; 'xcom q'
  1622.  compile else
  1623. ; 4.12:  We no longer need to load the COMS.E file here, it's done
  1624. ; automatically.  And no need to query comsfileid, it's always 0.
  1625. ; And no need to activate the top ring after loading COMS.E.  Now it's simply:
  1626. comsfileid=0
  1627.  compile endif  -- E3
  1628.  
  1629. -- Ver 3.11:  move color initializations to init_window() in WINDOW.E.
  1630. -- Much of it was repeated there anyway.
  1631. call start_screen()
  1632.  
  1633. compile else       -- EPM
  1634. ; Initialize the colors and paint the window.  (Done in WINDOW.E for non-EPM versions.)
  1635. .textcolor  = TEXTCOLOR
  1636. .markcolor  = MARKCOLOR
  1637. compile if EVERSION < '5.21'
  1638. .statuscolor  = STATUSCOLOR
  1639. .messagecolor = MESSAGECOLOR
  1640. compile else
  1641. vSTATUSCOLOR  = STATUSCOLOR
  1642. vMESSAGECOLOR = MESSAGECOLOR
  1643.  compile if EVERSION >= '5.60'
  1644. vDESKTOPCOLOR = DESKTOPCOLOR
  1645.  compile endif
  1646.  compile if defined(STATUS_TEMPLATE)
  1647.   compile if 0 -- EVERSION >= 6
  1648. 'postme setstatusline' STATUS_TEMPLATE
  1649.   compile else
  1650. 'setstatusline' STATUS_TEMPLATE
  1651.   compile endif
  1652.  compile elseif STATUSCOLOR <> 240  -- If different than the default...
  1653.  'setstatusline'    -- Just set the color
  1654.  compile endif
  1655.  compile if MESSAGECOLOR <> 252  -- If different than the default...
  1656.  'setmessageline'   -- Set the messageline color
  1657.  compile endif
  1658. compile endif  -- 5.21
  1659. compile if ENHANCED_ENTER_KEYS
  1660.  compile if ENTER_ACTION='' | ENTER_ACTION='ADDLINE'  -- The default
  1661.    enterkey=1; a_enterkey=1; s_enterkey=1; padenterkey=1; a_padenterkey=1; s_padenterkey=1
  1662.  compile elseif ENTER_ACTION='NEXTLINE'
  1663.    enterkey=2; a_enterkey=2; s_enterkey=2; padenterkey=2; a_padenterkey=2; s_padenterkey=2
  1664.  compile elseif ENTER_ACTION='ADDATEND'
  1665.    enterkey=3; a_enterkey=3; s_enterkey=3; padenterkey=3; a_padenterkey=3; s_padenterkey=3
  1666.  compile elseif ENTER_ACTION='DEPENDS'
  1667.    enterkey=4; a_enterkey=4; s_enterkey=4; padenterkey=4; a_padenterkey=4; s_padenterkey=4
  1668.  compile elseif ENTER_ACTION='DEPENDS+'
  1669.    enterkey=5; a_enterkey=5; s_enterkey=5; padenterkey=5; a_padenterkey=5; s_padenterkey=5
  1670.  compile elseif ENTER_ACTION='STREAM'
  1671.    enterkey=6; a_enterkey=6; s_enterkey=6; padenterkey=6; a_padenterkey=6; s_padenterkey=6
  1672.  compile endif
  1673.  compile if C_ENTER_ACTION='ADDLINE'
  1674.    c_enterkey=1; c_padenterkey=1;
  1675.  compile elseif C_ENTER_ACTION='' | C_ENTER_ACTION='NEXTLINE'  -- The default
  1676.    c_enterkey=2; c_padenterkey=2;
  1677.  compile elseif C_ENTER_ACTION='ADDATEND'
  1678.    c_enterkey=3; c_padenterkey=3;
  1679.  compile elseif C_ENTER_ACTION='DEPENDS'
  1680.    c_enterkey=4; c_padenterkey=4;
  1681.  compile elseif C_ENTER_ACTION='DEPENDS+'
  1682.    c_enterkey=5; c_padenterkey=5;
  1683.  compile elseif C_ENTER_ACTION='STREAM'
  1684.    c_enterkey=6; c_padenterkey=6;
  1685.  compile endif
  1686. compile endif -- ENHANCED_ENTER_KEYS
  1687.  
  1688. compile if WANT_STREAM_MODE = 'SWITCH'
  1689.  compile if defined(my_STREAM_MODE)
  1690.    stream_mode = my_STREAM_MODE
  1691.   compile if my_STREAM_MODE
  1692.    'togglecontrol 24 1'
  1693.   compile endif
  1694.  compile elseif ENTER_ACTION='STREAM'
  1695.    stream_mode = 1
  1696.    'togglecontrol 24 1'
  1697.  compile else
  1698.    stream_mode = 0
  1699.  compile endif
  1700. compile elseif WANT_STREAM_MODE = 1
  1701.    'togglecontrol 24 1'
  1702. compile endif
  1703.  
  1704. compile if EVERSION >= '5.50'
  1705.   -- default editor font
  1706.   -- .font=registerfont('Courier', 12, 0)
  1707.  compile if WANT_SYS_MONOSPACED
  1708.    default_font = registerfont('System Monospaced', SYS_MONOSPACED_SIZE, 0)
  1709.  compile else
  1710.    default_font = 1
  1711.  compile endif
  1712.  compile if DYNAMIC_CURSOR_STYLE
  1713.   compile if defined(my_CURSORDIMENSIONS)
  1714.    cursordimensions = my_CURSORDIMENSIONS
  1715.   compile elseif UNDERLINE_CURSOR
  1716.    cursordimensions = '-128.3 -128.-64'
  1717.   compile else
  1718.    cursordimensions = '-128.-128 2.-128'
  1719.   compile endif
  1720.  compile endif
  1721.    call fixup_cursor()
  1722. compile endif
  1723.  
  1724. ; repaint_window()
  1725. compile endif
  1726.  
  1727. compile if LINK_HOST_SUPPORT
  1728.  compile if HOST_SUPPORT = 'EMUL' | HOST_SUPPORT = 'E3EMUL'
  1729.   'linkverify E3EMUL'
  1730.  compile elseif HOST_SUPPORT = 'SRPI'
  1731.   'linkverify SLSRPI'
  1732.  compile else
  1733.    *** Error - LINK_HOST_SUPPORT not supported for your HOST_SUPPORT method.
  1734.  compile endif
  1735. compile endif
  1736.  
  1737. compile if MOUSE_SUPPORT = 'LINK' & EPM & not EXTRA_EX
  1738.   'linkverify MOUSE'
  1739. compile endif
  1740.  
  1741. compile if WANT_BOOKMARKS = 'LINK' & not EXTRA_EX
  1742.   'linkverify BOOKMARK'
  1743. compile endif       -- Bookmarks
  1744.  
  1745. compile if WANT_TAGS = 'LINK' /* & not EXTRA_EX */
  1746.   'linkverify TAGS'
  1747. compile endif       -- TAGs
  1748.  
  1749. compile if WANT_EBOOKIE = 'LINK'
  1750.   'linkverify BKEYS'
  1751. compile endif
  1752.  
  1753. compile if WANT_TREE = 'LINK'
  1754.   'linkverify TREE'
  1755. compile endif
  1756.  
  1757. compile if SPELL_SUPPORT = 'LINK'
  1758.  compile if EPM
  1759.   'linkverify EPMLEX'
  1760.  compile elseif EOS2
  1761.   'linkverify EOS2LEX'
  1762.  compile else
  1763.    *** Error - SPELL_SUPPORT = 'LINK' not valid for E3.
  1764.  compile endif
  1765. compile elseif SPELL_SUPPORT = 'DYNALINK'
  1766. -----------------  End of DEFINIT  ------------------------------------------
  1767. define
  1768.  compile if EPM
  1769.    LEX_EX = 'EPMLEX'
  1770.  compile elseif EOS2
  1771.    LEX_EX = 'EOS2LEX'
  1772.  compile else
  1773.    *** Error - SPELL_SUPPORT = 'DYNALINK' not valid for E3.
  1774.  compile endif
  1775.  
  1776. defc syn = link_exec(LEX_EX, 'SYN', arg(1))
  1777.  
  1778. defc proof = link_exec(LEX_EX, 'PROOF', arg(1))
  1779.  
  1780. defc proofword, verify = link_exec(LEX_EX, 'VERIFY', arg(1))
  1781.  
  1782.  compile if EPM
  1783. defc dict = link_exec(LEX_EX, 'DICT', arg(1))
  1784. defc dynaspell = link_exec(LEX_EX, 'DYNASPELL', arg(1))
  1785.  compile endif
  1786.  
  1787. compile endif       -- Spell_Support
  1788.  
  1789. compile if WANT_EBOOKIE = 'DYNALINK'
  1790. defc bookie = link_exec('bkeys', 'bookie', arg(1))
  1791. compile endif
  1792.  
  1793. compile if WANT_TREE = 'DYNALINK'
  1794. defc tree_dir = link_exec('tree', 'tree_dir', arg(1))
  1795. defc treesort = link_exec('tree', 'treesort', arg(1))
  1796. compile endif
  1797.  
  1798. compile if WANT_TAGS = 'DYNALINK'
  1799. defc findtag  = link_exec('tags', 'findtag',  arg(1))
  1800. defc tagsfile = link_exec('tags', 'tagsfile', arg(1))
  1801. defc tagscan  = link_exec('tags', 'tagscan',  arg(1))
  1802. defc poptagsdlg  = link_exec('tags', 'poptagsdlg',  arg(1))
  1803. compile endif       -- TAGs
  1804.  
  1805. -- 4.10A:  Move the compile-if here from above, simpler.
  1806. compile if EVERSION >= '4.0' & EVERSION < 5
  1807.  compile if ASK_BEFORE_LEAVING
  1808.   include 'exit.e'
  1809.  compile endif
  1810. compile endif
  1811.  
  1812. compile if 0 -- EPM & WANT_APPLICATION_INI_FILE
  1813. defc inifileupdate
  1814.    universal app_hini
  1815.    parse arg iteration .
  1816.    compile if EVERSION >= '6.00'
  1817. app_hini=dynalink32(ERES2_DLL, 'ERESQueryHini', gethwndc(EPMINFO_EDITCLIENT) ,2)
  1818.    compile elseif EVERSION >= '5.53'
  1819. app_hini=dynalink(ERES2_DLL, 'ERESQUERYHINI', gethwnd(EPMINFO_EDITCLIENT) ,2)
  1820.    compile else
  1821. app_hini=getpminfo(EPMINFO_HINI)
  1822.    compile endif  -- 6.00 / 5.53
  1823. if app_hini then
  1824.    if iteration=1 then s=''; else s='s'; endif
  1825.    sayerror 'ini file handle received as' app_hini 'after' iteration 'attempt's
  1826. elseif iteration>10 then
  1827.    call WinMessageBox('Bogus Ini File Handle', 'Giving up after' iteration 'attempts.', 16416)
  1828. else
  1829.    'postme inifileupdate' (iteration+1)
  1830. endif
  1831. compile endif  -- WANT_APPLICATION_INI_FILE
  1832.  
  1833.