                           _____  ___    ____
                          / ___/ / __/  / _  >
                         / __/  / <__  / </ /
                        <____/ <____/ <____/

  ECO is an enhanced version of the ECHO command, written by Lattice C 5.04
  Note that "eco" means "echo" in the Italian language.
  This is version 3.40! It is provided in two versions:

  ECO     less than 3K
  ECOX    more than 8K

  ECOX has the same features of ECO plus those marked by # in the
  present file. Hereinafter ECO is used for both ECO and ECOX.
  Have fun!

                              Dr.Dario de Judicibus - Rome (ITALY)

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Version:  3.40
 Date:     1st April 1990

 Format:   Eco <string>
 Template: ECO " "
 Purpose:  To display the argument given.

 Syntax:   string needs double quotes only if there are semicolons ";",
           or redirectioning operators ">" and "<" in the string.
           Echo has no options but use escape sequences to allow
           different display formats. The escape character is
           backslash (\).

           Help:

           ?         without the escape character, if first of line
           \h        anywhere in string

           Special Characters:

           \\        display escape character (\)
           \q        display double quotes (")
           \?        display a question mark (?)

           Cursor sequences:

           \n        Line Feed + Carriage Return (newline)
           \f        Carriage Return (first column)
           \t        Horizontal Tab
           \v        Vertical Tab
           \(x,y)    Cursor position at row <x> and/or column <y>
           \c        Clear from current position to the end of screen
           \C        Home and clear the whole screen
           \H        Home

           Text styles:

           \p        plain (normal) style (works as \d)
           \i        italic
           \b        bold
           \u        underscore
           \r        reverse

           Text colors:

           \0 to \3  Foreground colours 0 to 3
           \4 to \7  Background colours 0 to 3
           \d        Back to default colours\style

   #       Variables:
   #
   #       \[vx..vx] where vx are:
   #
   #                 vx  Date                 vx  Time
   #
   #                 d1  YYMMDD               t1  HHMMSS
   #                 d2  MM/DD/YY             t2  HH:MM:SS
   #                 d3  MM-DD-YY             t3  HHMMSSCC
   #                 d4  MMM DD, YYYY         t4  HH:MM:SS.CC
   #                 d5  Month DD, YYYY       t5  HH:MM
   #                 d6  DD MMM YY            t6  HH:MM:SS AM/PM
   #                 d7  DD MMM YYYY          t7  HH:MM AM/PM
   #
   #                 vx  Day of Week          vx  Path
   #
   #                 w1  DDD                  p   CurrentDir
   #                 w2  DayOfWeek
   #
   #       Delays:
   #
   #       \W        Wait until the user presses ENTER
   #       \Dx       Wait for "x" seconds
   #
   #       Environment:
   #
   #       \{evar}   where evar is an environment variable (ENV:)
   #
   #       \$cmd$    where cmd is any command you wish to issue while
   #                 eco is running

           Others:

           \?        To get a short help
           \x..      Display an HEX character ".." (e.g. \x45 = "E")
           \s        No auto \n at the end of string (sequence) (§)

           (§)  Note: this sequence works only if appended at the end
                      of the string, otherwise it is ignored.

 Notes:    Use ECO ? to get the help. If the first character of string
           is a question mark, the help is displayed and the rest of
           string is ignored. If you wish to echo a string beginning with
           a question mark, you have to way:

           ECO "? This string begins with a question mark."

           ECO \? This string begins with a question mark, too.

           If you wish to display the help within your text, just use
           \h as follows:

           ECO "The help of ECO is:\n\h\nNice, isn't it?"

           NOW BOTH ECO AND ECOX ARE PURE! That is you can make them
           resident by

           RESIDENT ECO (or ECOX)

           No PURE option is necessary, unless you copied or unarchived
           the programs in such a way to loose the PURE bit.

 Examples: [both ECO and ECOX features]

           let's suppose that colors are:

           0 --> Grey;  1 --> White;  2 --> Black;  3 --> Red;

           the sequence

           Echo "\6\C\(5,10) Heeelp!  \(10) \d\c"

           1) Set the background to Black
           2) Clear the screen and put the cursor on top-left corner
           3) Position the cursor at row 5, column 10
           4) Write " Heeelp! "
           5) Put the cursor at the first column of row 10
           6) Reset the background to the default (Grey)
           7) Clear the screen from current position to the bottom line

           Note that the sequences \C\6 and \6\C have different effects:
           the first former the whole screen and display the new background
           only for the output string, the latter set the background and,
           clearing the screen, fill it with the selected color.

           By using the \(..;..) sequence, you can create CLI macro which
           write always on the same line, so that it's possible to change
           continuosly a counter in a prompt as well as when you format a
           diskette. However, in that case, is better you clear the screen
           by using \C to avoid side effects on old output lines. If you
           don't want to clear the screen, use the \v (vertical tab)
           sequence, which allows you to go up one line.

           You may want to use the ECO command to make passwords invisible
           while typing in, as follows:

           ECO Enter your password:\x9B0 p\0\4\n
           --- get the password here ---
           ECO \x9B p
           IF WARN
             ECO \1Wrong password
           ELSE
             ECO \3You got it!\1
           ENDIF

           where the sequence "\x9b0 p" ["\9b p"] is used to make the cursor
           invisible [visible].

           By ECO you may stop for user pressing ENTER, as follows:

           ECO "Here are... a lot of lines"
           ECO "Press ENTER to continue...\W"
           ECO "Here are... a lot of lines again"

           or just delay for a predefined number of seconds (1 to 9):

           ECO "Now wait two seconds\D2 and go ahead..."

           You can include environment (ENV:) variables in your text by
           using the \{..} sequence. Let's suppose you did the following:

           SETENV bye "Hello, world!"

           Then you get the variable string as follows:

           ECO "\2\{bye}\d That's all, folk!"

           You can also issue commands while ECO is running. For instance,
           the following line will display the name and the content of the
           current directory:

           ECO "Current dir is \2\[p]\1 and its content is:\n\$dir$"

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Compile &
 Link ECO: To compile and link ECO you have three way:

           «1»  lmk -f eco.lmk
           «2»  rx doeco
           «3»  execute eco.c

           To compile and link ECOX you have three way:

           «1»  lmk ecox -f eco.lmk
           «2»  rx doeco EXTRA
           «3»  execute eco.c (see below)

           Only mode «1» is complete and automatic. Mode «2» does assume
           that eco.sym has been already generated. If not, you have to do
           that by issuing

           LC -ph -oeco.sym ecohdr.c

           Mode «3» assumes eco.sym as mode «2». Furthermore, to generate
           ECOX, you have to delete the semicolon character in front of two
           statements in the eco.c header lines, and add the same character
           two the equivalent lines used to generate ECO.

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Package:  ECO.ZOO (or LZH) contains the following files:

            ---p-rwed 90-04-01 17:49:16    7     3268 eco
            ---p-rwed 90-04-01 17:51:16   20     9424 ecox
            -----rwed 90-04-01 17:48:00   29    13752 eco.c
            -----rwed 90-04-01 17:24:56    1      310 ecohdr.c
            -----rwed 90-04-01 17:25:12   49    23511 eco.sym
            -----rwed 90-04-01 18:05:10   20     9449 eco.hlp
            -----rwed 90-04-01 17:24:45    2      584 eco.lmk
            --s------ 90-04-01 17:54:30    4     1807 eco.me
            -----rwed 90-04-01 17:25:01    3     1126 doeco.rexx

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Problems: I didn't find any wait to reset the text style WITHOUT resetting
           colours too. Hence \p works as \d, rather than restoring the
           style only.

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Author:   Dario de Judicibus
 Address:  via Canton 101
           I 00144 Roma (Italia)
 Phone:    (+39-6) 68.88.765 (evening only local time)

 E-Mail:   SAM Link  (+39-6) 423.322   Userid 244
           MC Link   (+39-6) 418.0440  Userid MC2120
           ARGO      (+39-6) 519.1770  Userid Dario de Judicibus

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
