Reviewed and Revised April 2024
xcall MIAMEX, MX_GETOPTIONS, options1 {,options2}
xcall MIAMEX, MX_SETOPTIONS, options1 {,options2}
MX_GETOPTIONS (MIAMEX 59) returns a bitmap field indicating which options1/options2 have been set, MX_SETPOPTIONS (MIAMEX 60) allows you to set those same option flags on the fly.
This function has both a subroutine and a print tab implementation.
Parameters
option1 (Bitmap 32 bits) [in for SET, out for GET]
Individual on/off options, referenced by the symbols GOP_xxx in the Options 1 table below
option2 (Bitmap 32 bits) [in for SET, out for GET]
Optional second bank of on/off options, referenced by the symbols GOP2_xxx in the Options 2 table below
Comments
These are the same options that are defined in the A-Shell initialization file miame.ini; see OPTIONSsp for the full listing. They may also be set by SET.LIT.
When the flag in the tables below has an equivalent OPTIONS setting, it is listed in the table's last column.
When setting options2 values, you cannot avoid also setting the options1 values. So you should always first retrieve the current options with MX_GETPTIONS, then set or clear the desired flags in the options1 and options2 variables, then update the flags with MX_SETOPTIONS.
An example follows the second table below.
Options1 Symbol |
Value |
Description |
OPTIONS= |
---|---|---|---|
GOP_CRNL |
&h00000001 |
Force CRNL line terminators |
|
GOP_EXTFIO |
&h00000002 |
Extended file I/O options |
|
GOP_AS400 |
&h00000004 |
AS400 telnet mode (strip 8s and 11s) |
|
GOP_LATIN1 |
&h00000008 |
Latin1 character set |
|
GOP_OEM |
&h00000010 |
Set internally for OEM fonts |
|
GOP_EFFUSR |
&h00000020 |
Use effective rather than login user |
|
GOP_AMOSRUNSBR |
&h00000040 |
Execute AMOSxs in-process |
|
GOP_BRKALC |
&h00000080 |
Prefill random file allocations with ]]] |
|
GOP_HEXDEC |
&h00000100 |
"Hexadecade" dates |
|
GOP_NOLEADFF |
&h00000200 |
Strip leading formfeeds from print files |
|
GOP_NOAUTOXLT |
&h00000400 |
Defeat certain auto F-key translations |
|
GOP_NTTS |
&h00000800 |
Force Windows Terminal Server mode |
|
GOP_FPROUND |
&h00001000 |
Round floating point results to 48 bits |
|
GOP_FLDEMU |
&h00002000 |
Emulate field terminal (Windows) |
|
GOP_EXITWAIT |
&h00004000 |
Forces wait for confirmation before closing session launched with –e |
|
GOP_ABSLOOKUP |
&h00008000 |
Return absolute value in LOOKUP |
|
GOP_QCLOSE |
&h00010000 |
Close qflock between accesses |
|
GOP_QBUFFER |
&h00020000 |
Normal qflock buffering |
|
GOP_LOCALCOPIES |
&h00040000 |
Implement multiple spool copies via multiple submissions |
|
GOP_SHLPATH |
&h00080000 |
Special search path for SHL |
|
GOP_AUTOCCON |
&h00100000 |
Auto-enable Ctrl+C at start of each program |
|
GOP_RAWTABS |
&h00200000 |
Raw tab output to terminal |
|
GOP_XABORT |
&h00400000 |
Allow X out of window |
|
GOP_NOXABORT |
&h00800000 |
Disable OK in X abort dialog |
|
GOP_STRICT |
&h01000000 |
Strict AMOS compatibility |
|
GOP_NUMPAD_COMMA |
&h02000000 |
Treat decimal point on Windows numpad as comma |
|
GOP_AUTOX |
&h04000000 |
Allow auto expansion of ISAM and memo files |
|
GOP_IDXLOK |
&h08000000 |
Lock entire ISAM IDX during update |
|
GOP_MMAPTIME |
&h10000000 |
Force update of modify time of mmaped files every minute |
|
GOP_AUTO_MEMOPEN |
&h20000000 |
Check user memory when opening file; open in memory if present |
|
GOP_STR0 |
&h40000000 |
Retain leading zero in str(x) for values between -1 and 1 |
|
GOP_NOJOBMAP |
&h80000000 |
(Unix) prevent jobtbl from being memory mapped |
|
Definition file: ashell.def |
|
Options2 Symbol |
Value |
Description |
OPTIONS= |
---|---|---|---|
GOP2_NOPSDLG |
&h00000001 |
Disable the print screen (Ctrl+P) dialog and just print directly; see PRINTER system parameter. |
|
GOP2_NODELSYS |
&h00000002 |
Do not delete jobtbl.sys and qflock.sys files on exit, ever. |
|
GOP2_GUISPCINDENT |
&h00000008 |
Activate "intelligent" GUI indenting. |
|
GOP2_AUTOTPRINT |
&h00000010 |
Treat PRINT statements as TPRINT. |
|
GOP2_AUTODLGSTATE |
&h00000020 |
Automatically sets MBF2_DLGSTATE option when a dialog is created via AUI_CONTROL. |
|
GOP2_FSPECNATIVE |
&h00000040 |
Treat some AMOS-illegal specs as native. |
|
GOP2_NOINSTRX_PCP |
&h00000080 |
Disable precompiled regex patterns in INSTR(pos, subj, pattern, flags), i.e. treat even single-character patterns as literal rather than as pre-compiled pattern indices. |
|
GOP2_EFS_OUT_AMOS |
&h00000100 |
Auto encrypt output files opened with AMOS specs; requires EFS. |
|
GOP2_EFS_OUT_HOST |
&h00000200 |
Auto encrypt output files opened with native/host specs; requires EFS. |
|
GOP2_EFS_ALLOCATE |
&h00000400 |
Auto encrypt on allocate; requires EFS. |
|
GOP2_EFS_ALCINDEX |
&h00000800 |
Auto encrypt on ALLOCATE’INDEXED; requires EFS. |
|
GOP2_INI_AV |
&h00001000 |
VUE looks for ini.av instead of ini.vue. |
|
GOP2_SBX_RUNDIR |
&h00002000 |
Search for SBX in same directory as RUN first. |
|
GOP2_NOSPOOL |
&h00004000 |
Disable spooling. |
|
GOP2_NOCAPTURE |
&h00008000 |
Disable screen capture (Ctrl+P). |
|
GOP2_MSYNC_MAP |
&h00010000 |
Sync entire map on write to memory mapped file. |
|
GOP2_MSYNC_PAGE |
&h00020000 |
Sync page on write to memory mapped file. |
|
GOP2_NTTS |
&h00040000 |
Variation of NTTS. |
|
GOP2_SEQLOK |
&h00080000 |
Sequential file locking (Unix). |
|
GOP2_LONGDIR |
&h00100000 |
Use long (10.4) directory format (DIR/L). |
|
GOP2_ISAMDISAM |
&h00200000 |
Emulate ISAM w/ DISAM. |
|
GOP2_MANIFEST |
&h00400000 |
Look for mft files. |
|
GOP2_3DTAB |
&h00800000 |
Allow TAB(X,Y,Z). |
|
GOP2_AUTOX_RAN |
&h01000000 |
Auto-expand "random" files, record by record as needed. |
|
GOP2_RCDIMX |
&h02000000 |
COMPIL /RC allows DIMX. |
|
GOP2_TCPNODELAY |
&h04000000 |
(ATS only) Set TCP "No Delay" option (i.e. disable the "Nagle algorithm"). |
|
GOP2_NOWHEEL |
&h20000000 |
Disable mousewheel scrolling. |
|
GOP2_XTAUTOFILTER |
&h40000000 |
Enable XTREE auto-filter. |
|
Definition file: ashell.def |
|
Example
To set the GOP2_RUNDIR flag and clear the GOP_ABSLOOKUP flag (and then restore the original settings), use code similar to the following:
MAP1 options1,b,4
MAP1 options2,b,4
MAP1 save'options1,b,4
MAP1 save'options2,b,4
xcall MIAMEX, MX_GETOPTIONS, options1, options2 ! retrieve current options
save'options1 = options1 ! save original settings for later restore
save options2 = options2
! NOTE: when setting/clearing flags, use logical operators and/or/not rather
! than +/-; otherwise be careful not to add a flag that is already set
! or subtract one that is already clear!!
options1 = options1 and not GOP_ABSLOOKUP ! clear GOP_ABSLOOKUP flag
options2 = options2 or GOP2_RUNDIR ! set GOP2_RUNDIR flag
xcall MIAMEX, MX_SETOPTIONS, options1, options2 ! update options
! Later, to restore the original options:
xcall MIAMEX, MX_SETOPTIONS, save'options1, save'options2
See Also
History
2023 December, A-Shell 7.0.1753: Add GOP2_NOINSTRX_PCP