Rev 18 released today

15 views
Skip to first unread message

Greg Field

unread,
May 1, 2018, 3:52:02 AM5/1/18
to Open/ed
Rev 18.05.01 is now available for download and use.
-G



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.

    --------------------------------------------------------------------------------

Greg Field

unread,
Jul 1, 2018, 4:34:41 AM7/1/18
to Open/ed

Rev 18.07.01 Released.
Available in download site for MacOS and Linux.
-G




Released version :
------------------

    18.07.01


New features.
-------------

    LINESZ is now 240 bytes.


Program options
---------------

    None.


Commands
--------

    NAP
    The NAP command sleep for a specified number of milliseconds.

    RETURN [ string_expression ]
    The return command optionally has an argument that is returned to the caller in %return%.
    This can now be a string expression including string functions.
    Example :
    return before(hostname(),'.')       ; rem returns the stand alone host name.

    flag NOT string
    flag ALL string

    The flag commands (TAG,LOCK,TOUCH and UNTAG,UNLOCK,UNTOUCH) have a new sub-command "NOT".
    NOT flags all lines not containing string. Also "ALL" no longer has an abbreviation.


Modes
-----


Functions
---------

    int = INTEGER ( string )
    str = STRING ( integer )

    These are "cast" functions for converting integer values to a string and vica-versa.

    int = ASCII ( string )
    str = ASCII ( integer )

    The ASCII function can be used to convert an integer less thaen 128 to a single
    character string and vica-versa.



    int = ABTOES ( integer )
    int = EBTOAS ( integer )

    These functions convert an Ascii character to Ebcdic encoded integer
    and vica versa.


    str = ABTOES ( string )
    str = EBTOAS ( string )

    These functions convert an Ascii string to Ebcdic encoded string
    and vica versa.


    str = HOSTNAME ( )
    Returns the system's fully qualified hostname.

    str = system ( 'Native OS command' , int0 )
    Executes the native O.S. comand and returns the output.

    str# = ITEM ( , , seperator )
    The 3rd argument to ITEM, the seperator character is now an integer rather than a string.

    let str# = chrep ( this , that , "string" )
    Character replace 'this' char with 'that' char in 'string'.

    let str# = chrem ( this , "string" )
    Character remove 'this' char from 'string'.

    Change FDTMOD(),FDTACC(),FDTCRE().
    If no file name argument is passed, then these default to FNAME.
    Now, if there is no FNAME a 0 is returned, rather than an error.

    FLINES()
    let int# = flines ( "filename" , [ int# ] )
    Find the number of lines in a file.

    MENU()
    The SELECT() function to do a picklist menu has been renamed MENU().

    Function    FGETLINE()
    Syntax      let int# = fgetline ( file#, str#, [int#] )
    Description Read a line of text from a file and return an End Of Line indicator.


Variables
---------

    New variables     :

    18.07.01
    New : %user.gid% the user group number. Synonym of %group.number%
    New : %user.uid% the user UID number. Synonym of %user.number%


Constants
---------

    18.07.01

    Open/ed code ENOMORE is renamed EOFILE.

    Constants returned by FGETLINE().
    %EOL_NL%   A regular line of text terminated by a NL newline character.
    %EOL_CR%   A line of text terminated by a CR carriage return character.
    %EOL_CRLF  A line of text terminated by a Carriage Return and LF line Feed.
    %EOL_NUL%  Text terminated by a NUL character in the file.
    %EOL_NONE% Text with no terminator. str# was filled to capacity.
    %EOL_EOF%  An End Of File was seen. str# is empty.
    %EOL_ERR%  An I/O error was seen. int# has the error code. str# is empty.

    The EOL_xxx constants are returned by FGETLINE().

    Escaped control character in the range ^A through ^z and ^[, ^\, ^], ^^, ^_
    These are numeric constants and can be used as integer arguments to functions.


Maths operators
---------------

    None.


Symbols
-------

    None.


Macros
------

    'who'
    who now returns the domain name and host name.

    'projsize'
    This macro reports on the size of source files in a directory.
    It counts the number of lines and demonstrates the use of the FLINES() function.


Screen mode window.
-------------------



Menus
-----




Keyboard
--------


Help.
-----



Error codes
-----------

    Note : Rev 18 error codes have had their numeric values changed slightly.
           Never hard code numeric error code values.

    ENOMORE is renamed EOFILE.


Bug fixes
---------



        18-001    Fix expand(%spaces%) still in 'b'lank. Rationalise BUFBYTES.
        18-002    Adjust variable obar size.
        18-003    locked() giving internal error on empty file.
        18-004    IDLE() not rejected as a string function.
        18-005    FUN LIST file wraps long line text already trunctd when read in.
        18-006    Fix stump MOVE was querying Continue MODE ?
        18-007    Fix GROUPNAME () was allowing abbreviation.
        18-008    Fix -x to not Warn untitled work file.
        18-009    Fix ; let int1 =' '+^J gets 32 the space. Both stop 1st token.
        18-010    Fix : gpl flines() checking EOL_NONE and continue.
        18-011    Made ECHO echo a blank line in screen mode. Back out.
        18-012    Fix : RHS CHAR() was still col,str. Made (str,col).
        18-013    FGETS() not reporting split line. Stay. OS one doesnt either.
        18-014    Fix P1 : args() & expand() need a ROME() cos expand errpro's.
        18-015    Fix : EOFILE was still in isasysvar ENOMORE.
        18-016    Fix : DELETE had incorrect args("T;n").
        18-017    Fix Linux cpuload broken. Linux iostat has changed output.

Other
-----

    --------------------------------------------------------------------------------

Greg Field

unread,
Jul 1, 2018, 6:26:23 AM7/1/18
to Open/ed
Correction

    int = ASTOEB ( integer )    /* Name correction. */
    int = EBTOAS ( integer )

    These functions convert an Ascii character to Ebcdic encoded integer
    and vica versa.


    str = STRASTOEB ( string )  /* Name correction. */
    str = STREBTOAS ( string )  /* Name correction. */

Greg Field

unread,
Aug 1, 2018, 12:00:06 AM8/1/18
to Open/ed

Released version :
------------------

    18.08.01


New features.
-------------

    User database functions.


Program options
---------------

    None.


Commands
--------



Modes
-----


Functions
---------

        Functions               GETPWENT,GETPWNAM,GETPWUID,...
        Description             Get entries from the password table.


        Function    GETPWNAM()
        Syntax      let str# = getpwnam ( "name" [ , int0 ] )
        Description Get a password entry for user 'name'.

        Function    GETPWUID()
        Syntax      let str# = getpwuid ( uid [ , int0 ] )
        Description Get a password entry for user 'uid' ID number.

        Function    ENDPWENT()
        Syntax      let int# = endpwent ( [ int0 ] )
        Description "Close" the password table.

        Function    SETPWENT()
        Syntax      let int# = setpwent ( [ int0 ] )
        Description "Open" the password table.

        Function    REWPWENT()
        Syntax      let int# = rewpwent ( [ int0 ] )
        Description "Rewind" the password table.

        Function    GETPWENT()
        Syntax      let str# = getpwent ( [ int0 ] )
        Description Return the next sequential entry from the password table.



        Functions               GETGRENT,GETGRNAM,GETGRUID,...
        Description             Get entries from the group table.

        Function    GETGRNAM()
        Syntax      let str# = getgrnam ( "name" [ , int0 ] )
        Description Get a group entry for user 'name'.

        Function    GETGRUID()
        Syntax      let str# = getgrgid ( gid [ , int0 ] )
        Description Get a group entry for group 'gid' GID number.

        Function    ENDGRENT()
        Syntax      let int# = endgrent ( [ int0 ] )
        Description "Close" the group table.

        Function    SETGRENT()
        Syntax      let int# = setgrent ( [ int0 ] )
        Description "Open" the group table.

        Function    REWGRENT()
        Syntax      let int# = rewgrent ( [ int0 ] )
        Description "Rewind" the group table.

        Function    GETGRENT()
        Syntax      let str# = getgrent ( [ int0 ] )
        Description Return the next sequential entry from the group table.


    str# = ITEM  ( , , separator )     separator defaults to ','
    str# = FIELD ( , , separator )     separator defaults to ':'
    str# = LINE  ( , , separator )     separator defaults to '^J'

    The ITEM() function now has 2 sister functions FIELD() and LINE().
    The only difference is the _default_ value of separator.

    Note that from 18.07.01
    the 3rd argument to ITEM, the separator character is now an integer rather than a string.


Variables
---------

    New variables     :


Constants
---------


Maths operators
---------------

    None.


Symbols
-------

    None.


Macros
------

   ingroup.ned macro to demonstrate user DB functions.


Screen mode window.
-------------------



Menus
-----




Keyboard
--------


Help.
-----



Error codes
-----------

    Note : Rev 18 error codes have had their numeric values changed slightly.
           Never hard code numeric error code values.

    ENOMORE is renamed EOFILE.


Bug fixes
---------

    18.08.01

        18-018   18.07.04 Add 3+3 pwent functions to X-checks in intfun() and stringfun().
        18-019   18.07.04 Add 3+3 grent functions to X-checks in intfun() and stringfun().

Other
-----

Message has been deleted

Greg Field

unread,
Dec 1, 2018, 2:28:55 AM12/1/18
to ope...@googlegroups.com
A new version for Rev 18 was released today : 18.12.01.
It has two important bug fixes.

18-020   18.11.08 Fix introduced bug Delete 999 count ignored.
18-021   18.11.29 Fix rewritten strshift. Was mem faulting on big count.+-

The first was accidentally introduced in the last rev. It causes the integer for a DELETE command to be ignored.

The second may have been around for a long time. The code that does shifting of text had a serious bug where a large 'count' , either positive or negative would cause a 'memory fault' program abort. The bug would mostly effect the SHIFT command but also effect insert and delete character in screen mode.

The low level shifting code has been rewritten and included in this rev.

Because of the seriousness of the bug, all older versions have been removed.

-Greg.





Released version :
------------------

    18.12.01


New features.
-------------

    Two important bugs fixed. See below.
    Major rewrite of code to shift text for bug 18-021.


Program options
---------------

    None.


Commands
--------

    The RETURN command may now have an unquoted integer value.


Modes
-----


Functions
---------

    The STRALL () function is renamed to STRCOUNT().

        Function    STRCOUNT()
        Syntax      let int# = strcount ( "find_string" , "in_this_string" )
        Description Return the count of "find_string" in "this_string".



Variables
---------

    New variables     :


Constants
---------

    ECONFIG     "Compile time configuration error".


Maths operators
---------------

    None.


Symbols
-------

    None.


Macros
------

   None.


Screen mode window.
-------------------



Menus
-----




Keyboard
--------


Help.
-----



Error codes
-----------

    Note : Rev 18 error codes have had their numeric values changed slightly.
           Never hard code numeric error code values.

    ECONFIG     "Compile time configuration error".


Bug fixes
---------

    18.12.01

        18-020   18.11.08 Fix introduced bug Delete 999 count ignored.
        18-021   18.11.29 Fix rewritten strshift. Was mem faulting on big count.+-

Other
--------

Reply all
Reply to author
Forward
0 new messages