Rev. 22 released today.

1 view
Skip to first unread message

Greg Field

unread,
Sep 2, 2022, 10:57:16 PM9/2/22
to Open/ed
Released version :
------------------

    22.09.01


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

    When ALARM start stop command arguments

    ALERT n Text of message.

    let int# = ALERT ( 'key' , alarm_number )
    let str# = ALERT ( 'key' , alarm_number )

    Klist filename

    TIMER  name  value

    UNTIL and ENDUNTIL

Discussion
----------

    The predominant new feature is alarms. These allow an action to be taken at a
    specified time each day. The ALERT command works with alarms.

        Condition : ALARM
        Synonym   : None

        Syntax :
        WHEN   ALARM  number start_time stop_time command  arg1 arg2 arg3 ...


    When the time reaches the range between 'start_time' and 'stop_time',
    execute the specified command or macro with optional arguments.

    'number' specifies one of the 8 alarms available from 1 to 8.
    'command' must be an alphabetic command or macro name.

    An alarm is actioned once every 24 hour day and repeated each day. An alarm
    will only be actioned within the start and stop time specified, including
    the start time but not the stop time. As with other WHEN conditions, Open/ed
    must be in screen mode to take the action.

    Times are specified as :

        A 4 or 6 digit integer, HHMM or HHMMSS using 1300 to 2359 for p.m.  or
        A colon separated HH:MM or HH:MM:SS with a trailing am or pm.

    Alarms work well with the ALERT command which can be linked to an individual alarm.

        Command             ALERT
        Description         Report a message linked to an alarm.
        Abbreviation        ALE
        Synonym             None
        Syntax              alert n Text of message.
        Block pointer       Not used.

    ALERT displays a message similarly to the ECHO command.
    It is designed to work with a WHEN ALARM n action.

    The first argument 'n' is an alarm number.

    The second argument is the text of the message.

    By default, ALERT does a pop up of the message which must be acknowledged
    with a key or mouse click. The key pressed is stored in the alarm data.

    If you do a MODE ALERT TIMER in your begin macro, then the ALERT will time
    out if not acknowlegded and display in a different Open/ed session for the same user.

    This will continue until the ALERT is acknowledged or the alarm stop time
    is reached. This maximises the chances of seeing the ALERT.

    The default ALERT timer is 10 seconds but this can be changed with TIMER ALERT tenths.
    The time is specified in tenths of a second.
    TIMER is another new command for Rev. 22.

    This process works provided alarms are "shared". For this Open/ed must be
    able to write to your %home%/OpenEd directory and you must not be root user.

    The alarm number argument 'n' must match the appropriate alarm.

    A number of new functions, variables and constants help the alarm facility.

    Split lines
    ----- -----

    Split lines are now re-appended when a SAVE or FILE is done.
    If a file on disk has one line which is 2 and a1/2 times LINESZ, then this is
    read into Open/ed as 3 lines. If this is saved, it is written back as 1 long line.



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

    ned -print linesz becomes
    ned -print LINESZ

    OPENED_OPT ="Verbose"
        Sets verbose mode earlier than -verbose flag.


Commands
--------

    New
    ---

    WHEN ALARM n stop start action args.
            See discussion.

    ALERT n text of message.
            See discussion.

    KLIST filename
            A pager to examine external files.

    TIMER option value
            Change micro timers for screen mode.

    DBEFORE Delete lines.
            DBEFORE is the same as the DELETE command but it finishes on the line
            before the deleted line.

    UNTIL and ENDUNTIL
            An UNTIL loop is isentical to a while loop except that the sense of the
            condition is reversed. The loop executes if the test is _false_.

    Changes
    -------

    TAG OVERSIZE now defaults to the right most visible column on screen.



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

    No change.




Modes
-----

    Mode ALERT

        Control ALERT command action.
        Set MODE ALERT TIMER  for multi window alarm/alert functionality.
        Help is included in MESSAGE_MODE.

    Mode ECHO

        Control ECHO command action.
        Set MODE ECHO TIMER  for multi window alarm/alert functionality.
        Help is included in MESSAGE_MODE.

    Mode EXEC is renamed
    Mode SHOWEXEC


Functions
---------

    New
    ---


    Function      ALARM ()
    Syntax        let str1 = ALARM  ( key_string , int_alarm , int_code ) )
                  let int1 = A:ARM  ( key_string , int_alarm , int_code ) )

    Description   Return data about the alarm system.

                  let int# = alarm ( 'users'   )
                             alarm ( 'shared'  )
                             alarm ( 'cached'  )
                             alarm ( 'status'  , 1-8 )
                             alarm ( 'response', 1-8 )
                             alarm ( 'start'   , 1-8 )
                             alarm ( 'stop'    , 1-8 )
                             alarm ( 'missed'  , 1-8 )

                  let str# = alarm ( 'command' , 1-8 )
                             alarm ( 'args'    , 1-8 )

    int# = LOOKUP ( 'Comand' )
    str# = UNLOOK (  number  )

            Converts a command string to a number and vica versa.

    int# = DECIMALTIME ( void )

            Return the current time in the 24 hour form HHMMSS.

    int# = PARSETIJME  ( string )

            Parse a string looking for time. Return as decimal time.

    int# = DIFFTIME    ( time1 , time0 )

            Calculate the difference between 2 epoch times in seconds.

    int# = MIDNIGHT ( )

            Return the epoch time as at last midnight.

    int# = ISMOUSE ( int )

            Return true is the integer keystroke is a mouse click.


    Changes
    -------

    Function    STRCHANGE() now has an integer version which returns the number of
                changes made. This can be used as a boolean as 0 is no change.


Variables
---------

    New variables :

        %alarms.active%
        %alarms.shared%
        %alarms.cached%
        %alarms.cache.time%
        %alarms.cache.file%
        %alarms.control.file%

        %at.bottom%     Boolean. The current line is the bottom null line.
        %at.top%        Boolean. The current line is the top null line.

    Removed variables :

        None.

    Changed variables :

        %line.type%
            Was     %TEXT_LINE% or %NULL_LINE%
            Now     %TEXT_LINE% or %NULL_TOP% or %NULL_BOTTOM%.

Constants
---------

    New constnts :

        %MAX_ALARMS%
        %ALARM_OFF%
        %ALARM_ON%
        %ALARM_DONE%
        %MOUSE_1CLICK1%
        %MOUSE_2CLICK1%
        %MOUSE_3CLICK1%

    Change
        %STR_MAX% renamed to %STRING_MAX%

        %NULL_LINE% removed and replaced with %NULL_TOP% and %NULL_BOTTOM%.
        These are values for %line.type%.


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

    None.


Symbols
-------

    No change.


Macros
------

    Rename sigusrc and sigusrq as sigusrone and sigusrtwo.
    These are sample only. Add your own versions to your own macro directory.


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

   No change.


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

    When ALARM ...

Menus
-----

   No change.


Keyboard
--------

   No change.

Help.
-----

    New entries for WHEN ALARM, ALERT, TIMER, KLIST.
    WHILE now includes UNTIL and ENDUNTIL.


Scripts
-------

    No change.


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

    No change.


Bug fixes
---------

    22-001 TAG OVER now has defaults for column.
    22-002 Input file of oneline<EOF> is not loaded. gs/fgetline() issue.
    22-003 EOL graphic shows past eol in col1 when scroll right of page.
    22-004 Split message is not cleared when next message over writes it.
    22-005 ALIGN not working. Was goto-ing alert_command.
    22-006 Change GETPIDS ( , , prog , ) to default nul for all progs.
           and default to -1 for all uid's.
    22-007 RANGE ( %min%, fun(x), %max% ) get "MAX is not a function" error.
           fun(x) was skipping comma but not reporting to intexpr().
           Add ed.comma being if skipany() saw a comma. value 0 or ','.
    22-008 ISTRING still giving error message.
           nedset () : istring : Did not gshift. 'first' 30 is after 'last' 10.
    22-009 DELETE finish on next introduced "L str;d;*" bug skipping lines.
           The next'ed line is not seen by Locate/find forward.
    22-010 ALERT y,x origin is not optimised. Starts at current cursor. 22.08.20.
    22-011 arg is a reserved word. Remove from reserved list.



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

          Version : 22.07.02    Wed 06 Jul 2022 22:00:39

    ned     is 92981 lines,   3M bytes, averaging 40 bytes per line.
    gstlib  is 12187 lines, 422K bytes, averaging 34 bytes per line.
    shmlib  is  1053 lines,  34K bytes, averaging 32 bytes per line.
    curwin  is  5835 lines, 219K bytes, averaging 37 bytes per line.
    gpl     is 11620 lines, 358K bytes, averaging 30 bytes per line.
    include is  4620 lines, 209K bytes, averaging 45 bytes per line.

    Open/ed is 128296 lines, 5M bytes, averaging 39 bytes per line.

                  4369 additional lines.

Other
-----


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



Reply all
Reply to author
Forward
0 new messages