Rev. 21 Open/ed released today

7 views
Skip to first unread message

Greg Field

unread,
May 1, 2021, 3:52:00 AM5/1/21
to Open/ed

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

    21.05.01


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

    ARGS() and TOKENS() functions. TOKENS data type.

    HISTORY command.

    PROCSTATUS re-written.

    SHOWEOL mode to display a graphic at EOL in text.

    ( EOL is End Of Line ).

    INTEGER array size declaration may be an integer expression.

        Example : INTEGER foobar [ %EOL_MAX% + 1 ] = 0
        (See the bufcpy.ned macro for an example).

    LPRINT mode for controlling output to printers.

    The DELETE command (in line mode) has been changed to finish on the following line.
    Before now it finished on the previous line.


Discussion
----------

    The big changes are done : gstrings (R19) and Arm architecture (R20).

    This rev is back to snack size new features.

    ARGS()/TOKENS() is a powerfull text parser and a valuable addition. It is
    the parser Open/ed itself is using. There may be more key options in the
    future.

    HISTORY is a handy feature long overdue. It allows editing and re-use of
    previous command lines.

    The PROCSTATUS (PS) command and its help file is re-written.

    There is a significant low level change to the DELETE command. In line mode the DELETE command
    now finishes on the following line, rather than the previous line. This will effect macros
    using the delete command. Screen mode delete line with ^D does not change as this already
    finished on the following line. Any macro doing ...

        d;n

    needs to have the NEXT removed.

    The window pager is extended to several commands including PROCSTAT.
    This means that the few commands that used line mode as output, and was not formatted for
    screen mode, have bee updated to run tidily in screen mode. Such as PS (PROCSTAT).

    An extra mode called LPRINT ( or just lp or lpr) has been added to give more control over
    output that goes to the line printer. This includes the LP command and FUN LP and MAC LP
    for printing out reports on function keys and macros respectivly.

    It takes an argument of SCREEN or FILE so these reports can be redirected to the
    screen or saved to a file. It also takes PRINTER for printing and NONE to disable
    printing. The default is NONE (disabled) so you can not accidentally start a line
    printer print out. When you do want a print out, remember to enable mode LPRINT.

    The bufcpy.ned macro is added to the sample macros directory. The intention of this
    macro is demonstrating :

    1. The new FPUTLINE() function.
    2. That FPUTLINE() and FGETLINE() whilst intended for text lines, can be used to read near binary file.
    3. That INTEGER arrays can now have a count size that is an integer expression.
    4. Showing how to _declare_ an array size with %EOL_MAX% + 1.


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

    No change.



Commands
--------

    New
    ---

    TOKENS  declares a tokens buffer instance variable for TOKENS().

    Echo %tokens_var% returns the full buffer written to the TOKENS variable. ( TK_FULL ).

    Assigned with LET tokens_var = "string"

        See help TOKENS


    HISTORY list and re-use of previous command lines.

        See help history


    Changes
    -------

    PROCSTATUS command rewritten.

        See help procstat

    Several commands have better screen mode reporting.

    * PROCSTAT
    * WHICH
    * PSYMBOLS
    * HIST LIST+HELP
    * PATH LIST

    FUN LPFILE is removed. Its functionality is now part of LPRINT mode.


Abbreviations
-------------

    HELP abbreviation changes from H to HE.
    HISTORY abbreviation is H.

    Note that "SIGNAL" is a synonym of the KILL command.



Modes
-----

    HISTORY mode

        See help history_mode

    SHOWEOL mode

        Displays the EOL in screen mode.
        See help showeol_mode

    LPRINT mode

        Diverts a print out to screen or file.
        Default is disabled so there is no accidental print outs.
        See help lprint_mode

    Mode MACHERE is removed. Its functionality is now part of the PATH command.

    PATH command was introduced in rev. 20.


Functions
---------

    New
    ---


    Function      ARGS()
    Syntax        let str1 = ARGS   ( key_string , int_value , int_code ) )
                  let int1 = ARGS   ( key_string , int_value , int_code ) )
    Description   An eqivalent of TOKENS() for the arguments passed to a macro or subroutine.


    Function      TOKENS()
    Syntax        let str1 = TOKENS ( tokens_var , key_string , int_value , int_code ) )
                  let int1 = TOKENS ( tokens_var , key_string , int_value , int_code ) )
    Description   Parse the tokens in a TOKENS variable.


    Function      GETPIDS()
    Syntax        let str# = getpids ( int_uid , str_progname , int_flags , char_separator )
    Description   A list of pids that match specs.

    Function      GETPROCINFO()
    Syntax        let str# = getprocinfo ( int_pid , 'fields' )
    Description   Get information on a process.

    Function      FPUTLINE()
    Syntax        let int# = fputline ( fil#, str# , [int#] , [ eol ] , [ dts ] )
    Description   Write a line of text to a file with choice of EOL.
                  Mate of FGETLINE().

    Changes
    -------

    None.


Variables
---------

    New variable types :
        TOKENS named variables. These are used by the TOKENS() function.

    New variables :

        %path%
        %args%
        %history.name%  %history.open%  %history.lines%.

    Removed variables :

        None.


Constants
---------

    Add :
        %TOKENS_MAX% is the largest size of a TOKENS variable.

        %EBADTOKVAR% An error code for "Bad TOKENS variable".

        %EOL_MAX% is the largest number that an EOL constant can be.

    Change
        %STR_MAX% renamed to %STRING_MAX%



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

    None.


Symbols
-------

    No change.


Macros
------

    Add sendsig.ned to public macros.
    Add sigusrc and sigusrq.
    Add bufcpy.ned to demonstrate FGETLINE() and FPUTLINE() and EOL codes.


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

   MODE SHOWEOL displays the EOL in text.


WHEN conditions
---------------

   WHEN LAST_UNTAG / LUNTAG seconds command arguments ...

    An extra WHEN condition has been added : LAST_UNTAG or LUNTAG.
    This condition is activated when MODE AUTOUNTAG is on and the lst tagged line
    is untagged.

    Example :
        WHEN LUNTAG 5 bob

    bob is a macro which calls the "bob" script which compiles the current source file.
    When the errror is corrected and 5 seconds have passed with no activity, a compile is
    automatially started and any new or remaining errors can be started on.


Menus
-----

   No change.


Keyboard
--------

   No change.

Help.
-----

    PROCSTATUS help rewritten.

    Document that SIGnal is a synonym for KILL.


Scripts
-------

   The setup script will ask if you want mode SHOWEOL.


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

    EBADTOKVAR      "Bad TOKENS variable"

    EDISABLED       "Mode disabled"


Bug fixes
---------

    21.04.26

    21-001   gstrdonly() was reversing its sense. Fix and renamed gswriteok().

    21-002   gsset () does not have write permission.  *11.

    21-003   Make DEL delete trailing spaces at EOL.

    21-004   ICHAR is adding 1 space at EOL.

    21-005   SHOWEOL <return> not doing dim video attribute.

    21-006   Passing 2+ args as %args% is parsed as one token.
             This may have to be accepted as 'thats how it works'.

    21-007   QUESTION() overwrites cc position. Moved below or above.

    21-008   Swap command bus errors when in verbose mode.



Source code Stats
-----------------

    Version : 21.04.26    Mon 26 Apr 2021 23:00

    ned     size is 90150 lines, 3M bytes, averaging 40 bytes per line.

    gstlib  size is 12176 lines, 421K bytes, averaging 34 bytes per line.

    curwin  size is 6314 lines, 236K bytes, averaging 37 bytes per line.

    gpl     size is 10366 lines, 318K bytes, averaging 30 bytes per line.

    include size is 4531 lines, 205K bytes, averaging 45 bytes per line.

                123927 lines.

                  6853 additional lines.

Other
-----


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

Reply all
Reply to author
Forward
0 new messages