Rev 18.05.01 is now available for download and use.
Released version :
------------------
18.05.01
New features.
-------------
1. Enhanced Screen mode editing.
1.1 MODE TAB SHIFT.
1.2 MODE BTAB SHIFT. (matches TAB).
1.3 MODE TABFOLLOW.
1.4 MODE KEEPBLOCK.
1.5 Enhanced MODE SCREEN_RETURN
1.6 SCREEN MODES command for pop up window to control screen edit modes.
1.7 New Status Active widget for flipping modes KB, SR, TAB, BTAB.
( KB = KEEPBLOCK, SR = Screen_Return mode).
2. Enhanced OOPS.
OOPS now works on CUT/CUB, DOV/DOB, SWL/SWB, and single line DUP and COPY.
Mode TAB and BTAB.
------------------
MODE TAB has been enhanced to have several new sub-options.
In particular you can have the TAB key shift text :
- Before the cursor.
- After the cursor.
- All text on the line.
- Like a word processor.
Also MODE BTAB works the same way for the <shift>+<tab> key except
text is left shifted.
MODE BTAB MACRO now executes key_btab.ned.
MODE TABFOLLOW sets whether the cursor follows shifted text.
MODE VERBOSE gives helpfull messages on why a tab shift failed.
The new SCREEN MODES command gives a pop up window for setting these modes.
Mode SCREEN_RETURN has additional sub-options.
MODE TAB SHIFT recognises and actions a block of text lines.
If you have a highlighted block of text and do a tab shift, then it is done
on all lines in the block. Use mode KEEPBLOCK with this.
MODE KEEPBLOCK keeps a block of text after a block command.
Enhanced OOPS.
--------------
OOPS support now added for CUT, CUB, DOV, DOB, SWL, SWB.
OOPS added for DUP and COPY when it is a single line.
NUL terminated lines
--------------------
When Open/ed reads lines longer than LINESZ, they are split across 2 or more lines
in the work file. Because SAVing the work file would change the nature of the original
file, Open/ed will not allow the work file to be saved to its original name on disk.
A similar feature has been added for lines that contain or end in a NUL character,
without a new line terminating character. For example suppose the disk file has
abc{NUL}{NUL}def{NUL}
This would be read (or loaded) into Open/ed as 3 lines. "abc" and "def" are considered
lines and the second NUL with no intervening text is also considered an empty line.
The NUL terminated lines are read in as individual lines, with the NUL terminator
discarded. These lines then act the same as any other line. If the work file was SAVed
it would be ...
abc{NL}
{NL}
def{NL}
This would corrupt the nature of the original file, from a binary type of file, to
a text file.
To protect from this happening, if Open/ed sees these, it will act in a similar manner to
split lines : locking all text lines and not allowing you to SAVE (or FILE) over the
original file name.
NUL terminated lines are different to the two .null. lines at the top and bottom of the
work file. These are always created in the work file and discarded when saving.
The number of NUL terminated lines read in is available in the %total.nuls% variable.
Program options
---------------
-print now prints the new code EOPENED = 255.
EOPENED is a generic error code used by a macro EXIT command for when
the actual error code is > 255.
Open/ed running in -x mode does not display the notice file.
Open/ed now stops if the file to be edited is not found, is a directory, or is in use.
Commands
--------
SCREEN MODES as explained above.
MODE DISPLAY in now MODE PRINT with the same sub-options.
Except MODE PRINT ASCII RAW has been added so non printing characters
can be forcibly printed.
The EXIT command can now do EXIT %EFINUSE%.
The DISPLAY command is removed. Use MODE PRINT.
BLOCK [ AT string ] [ TO string | count ]
Does a FROM and TO using command arguments.
UNBLOCK clears the FROM and TO pointers.
BOX [ AT string ] [ TO string | count ]
Locks all lines other than the specified range.
UNBOX clears a box by unlocking all lines.
CUT now ends on the second line. The new line becomes the current line.
Flag commands UN/TAG,UN/TOUCH etc now have sub options BLOCK and UNBLOCKED.
Old BOX command now named DRAW.
FROM and TO now has mode VERBOSE messages.
BUMP command to increment decimal numbers in text.
The MAP command now supports :
CTRL-x where x is A to Z except -Q -S -V -Y -Z.
Also CTRL-[, CTRL-\, CTRL-], CTRL-^, and CTRL-_.
RNFIND and RNLOCATE
These commands Find or LOCATE up the file, in reverse direction, looking
for the line that does not contain the string.
FIND(*) The 4 FIND commands now take * to mean the current column.
UN/TOUCH UN/TAG UN/LOCK count.
These commands have a new sub-option. An integer indicates to flag this
many lines starting at the current line.
UNMAP ALL. Unmap has a new sub-command to unmap all.
Modes
-----
MODE TAB enhanced.
MODE BTAB the same as MODE TAB but for Back tab.
MODE TABFOLLOW as explained.
MODE DISPLAY is now MODE PRINT.
MODE LOCKBOLD and LOCKUNDER are now LOCKATTRIB type.
MODE TAGBOLD is now TAGATTRIB type.
MODE SCREEN_RETURN has a new sub-option of HOMe.
MODE SCREEN_RETURN NEXt also positions to column 1.
There is no longer an abbreviation for CUT in mode screen_return CUT.
All SCREEN_RETURN sub-options are 3 characters.
Functions
---------
STRNEQ () for testing if 2 strings are not equal.
SUBSTR () has been re-written for both LHS and RHS.
VISIBLE () : Is a line visible on the current page.
STRALL () counts then number of times one string is in another.
TEMPFILE() has a small chance of a security breach. It has been un-documented
and is not supported. Use TEMPOPEN ().
LOCKED() to test if a range of lines is locked.
Rename COUNT () to SIZE () the size of an array.
FOPEN() and TEMPOPEN() have a new flag 'u'.
This unlinks the file as soon as it is opened. If there are no other links on the
file, this is akin to automatically deleting the file when it is closed.
UNLINK() function to unlink a file.
NUMERIC() function to test if a string is numeric.
The AREtype () functions test a string to see if all characters are a certain type.
ARESPACE ( string )
All characters are spaces ^040.
AREALPHA ( string )
All characters are letters, either upper or lower case.
AREALNUM ( string )
All characters are letters or decimal digits.
AREUPPER ( string )
All characters are upper case letters.
ARELOWER ( string )
All characters are lower case letters.
AREDIGIT ( string )
All characters are decimal digits.
AREXDIGIT ( string )
All characters are hexadecimal digits, 0-9,A-F,a-f.
AREPUNCT ( string )
All characters are punctuation characters.
041 ! 042 " 043 # 044 $ 045 %
046 & 047 ' 050 ( 051 ) 052 *
053 + 054 , 055 - 056 . 057 /
072 : 073 ; 074 < 075 = 076 >
077 ? 100 @ 133 [ 134 \ 135 ]
136 ^ 137 _ 140 175 } 176 '
The defaults for functions that assume %text% may have changed.
Some functions, notably CHAR() now default to %text.full%.
ISAMAC ( name )
Returns true if name string is a macro.
Variables
---------
New variables : %page.first%, %page.last%, %page.size%.
Line number of first and last and lines per page.
%fill.name% is the file name of deleted FILL text. Mode TEMPLE must be on for this to be available.
%text.full%
%text% contains the current line text with trailing spaces
discarded. %text.full% retains trailing spaces.
%total.nuls%
The total number of NUL terminated lines when the work file
was read in or in LOADed files.
Renamed variables : %blanks% the full blank line variable is now %spaces%.
Removed variables : %disp.mode% is removed. Use : let int# = mode ( 'PRINT' )
Constants
---------
New : EOPENED Generic error code for EXIT command when Open/ed code is > 255.
EXIT may still use codes up to 255. More of these now supported.
Change : Ecode numbers have changed, shifting down to 200.
Change : %expire% now has 0000000 for non beta test versions of Open/ed.
This may effect macro code.
rem This is how you used to test for an expired version.
if ( %expire% < %today% ) )
echo This Open/ed beta test version has expired !
endif
rem This is how you test now.
if ( %expire% && ( %expire% < %today% ) )
echo This Open/ed beta test version has expired !
endif
rem This tests for a beta testing version. Much simpler.
if ( %expire% )
echo This Open/ed is a beta test version.
endif
New : ENOTREG not a regular text file.
Returned when you try to edit a directory, device file, pipe etc.
Change : The %DISPLAY_xxx% constants are now %PRINT_xxx%.
Use and compare with let int# = mode ('print' )
New : Constants including the ECODES can now be used as array subscripts.
Maths operators
---------------
None.
Symbols
-------
None.
Macros
------
'postcompile' updated so if no compile errors, it looks for grep listing 'grep.glist'.
'key_stab.ned' is now 'key_btab.ned'.
'sleepwalk' now calls cleansave.
'cleansave' tidies up sleepwalk save files by removing those older than 1 week.
Screen mode window.
-------------------
New clickable mnemonic switches have been added to MODE STATUS ACTIVE
for the modes KEEPBLOCK, SCREEN_RETURN, TAB and BTAB.
New code for when the screen window re-sizes.
The option bar now grows or shrinks on larger or smaller screens.
Menus
-----
mOdes menu for screen modes.
File/ now has Totals and SAve as ...
File / Save does not allow entry of a file name.
Block/ now has Fill,Block,LPrint and unblock.
Block/ now has block DELETE to delete lines. This is not availble as a command.
Edit/increment is now Edit/bump.
Option bar for menus now dynamically resizes for larger windows.
Keyboard
--------
Some other keys have been updated in screen mode.
Use the MAP command to action these.
KEY_BEG FROM
KEY_CLEAR ZAP
KEY_CLOSE QUIT
KEY_COPY COPY
KEY_END TO
KEY_FIND Screen mode locate.
KEY_MARK Does a growing FROM/TO action.
KEY_MOVE MOVE
KEY_PRINT LPRINT
KEY_REDO XEQ
KEY_RESTART INIT
KEY_SAVE SAVE
KEY_UNDO OOPS
KEY_SLEFT Position to column 1 in line.
KEY_SRIGHT Position to last column in line.
KEY_SOPTIONS Screen edit modes pop-up window.
Shift left and shift right appear to work on many keyboards.
Help.
-----
Add "error" entry for the error code constants.
Old BOX command help is now "draw" help.
New help files for BOX/UNBOX and BLOCK/UNBOCK.
TEMPFILE() is now un-documented and un-supported.
The help for the COUNT, INPROMPT and PROMPT commands is now in MODE.
The help files RFIND, NFIND and RNFIND are incorporated into FIND.
The help files RLOCATE, NLOCATE and RNLOCATE are incorporated into LOCATE.
The "function" help page has had unnecessary Abbrev and Synonyms removed.
Error codes
-----------
Add : EBADLIST : Unable to determine TAG LIST file type.
Add : ENOTREG : Unable to edit a directory, pipe, fifo etc.
Add : EOPENED Generic error code for EXIT command when Open/ed code is > 255.
Note : Rev 18 error codes have had their numeric values changed slightly.
Never hard code numeric error code values.
Bug fixes
---------
Fix : DX was sometimes getting garbage into the XEQ command line.
Fix : NEXTTAB() returns 0 if no tab.
Fix : UNLOAD rejecting hex filenames such as 'bad' and filename 'to'.
Fix : Check for split lines in all places before SAVE.
Fix : FILL unloading locked lines then double loading them back.
Fix : 'count' is a LHS reserved variable name. It can not be a named variable.
Fix : The top right screen page location is reserved for the scrollbar, not the option bar.
Fix : TAG LIST when CLIST handles files with <5 colons better.
Fix : DUNload will not delete locked lines.
Fix : temp files are now only created with mkstemp() avoiding security races.
Fix : F-key file is read only message now appears correctly.
Fix : Invalid key 2 passed to winsave ().
Fix : CHAR() returning Ascii characters on .null. line.
Fix : -execute string was not being executed when ned *many files.
Fix : CHANGE/GLOBAL shortens line leaving junk on right of screen page.
Fix : "macro;next;*" executes macro only once. 18.04.08.
Fix : Top-right T in scroll bar was not executing top on small screens.
Fix : Permission denied making logfile while LPrinting in RO directory.
Fix : ECODES could be declared as INTEGER variables.
Other
-----
A CUT now ends on the second line. The newly inserted line becomes the current line.
This includes the CUT sub-option to mode screen_return CUT.
CUB is unchanged.
%expire% is now 0 or 000000 for supported versions of Open/ed.
if ( %expire% && ( %expire > %TODAY% ) )
echo This beta test Open/ed version has expired. Download a new version.
endif
%expire% is now a boolean test for if this is a beta-test version of Open/ed.
All production versions have a value of 0 and will test false.
There is a tab stop at column 1 in the default tab stops.
All temp files now created safely with mkstemp().
TAG LIST when CLIST now handles lines with < 5 colons.
Open/ed now exits immediatly if your file name is not a regular file.
--------------------------------------------------------------------------------