home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / dosutils / toddy4.arj / TODDY.DOC < prev   
Encoding:
Text File  |  1991-09-03  |  47.7 KB  |  1,011 lines

  1.  
  2.  
  3.  
  4.                                       Toddy
  5.                             A DOS Command Line Editor
  6.  
  7.                                        by
  8.  
  9.                                    Eric Tauck
  10.                                1304 Deerpass Road
  11.                                 Marengo, IL 60152
  12.                                       U.S.A
  13.  
  14.                              Compuserve: 72457,1557
  15.                        Internet: 72457.1557@compuserve.com
  16.                          CircuitNet: Software Conference
  17.  
  18.         Toddy is a terminate and stay resident (TSR) utility that im-
  19.         proves the entry and editing of DOS commands, saves commands for
  20.         later retrieval, and provides resident macros that work like
  21.         simple batch files.  Only certain programs that use DOS for
  22.         input, like COMMAND.COM or DEBUG.COM, will be affected by Toddy.
  23.         Toddy will work on any PC compatible running DOS 2.0 or greater.
  24.  
  25.         Toddy may be used and distributed freely.  The most recent ver-
  26.         sion of the Toddy is available on 5.25" or 3.5" disk by sending
  27.         $10 to the address above.  The WASM compatible source code is
  28.         available for $25.  The source code is for personal use and may
  29.         not be distributed.
  30.  
  31.                              DISCLAIMER OF WARRANTY
  32.  
  33.         THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
  34.         WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
  35.         WARRANTIES WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS
  36.         HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
  37.         PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
  38.  
  39.         GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
  40.         THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
  41.         THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY
  42.         LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
  43.         REPLACEMENT OR REFUND OF PURCHASE PRICE.
  44.  
  45.                                   Installation
  46.                                   ------------
  47.  
  48.         Toddy is installed by running it from the command line.  The
  49.         features of Toddy are available upon installation.  Toddy is
  50.         usually installed from the AUTOEXEC.BAT file when the computer is
  51.         booted up.  If you get the message "Multiplex number in use by
  52.         another program" when you try to install Toddy, see the /M switch
  53.         described in the Switch Descriptions section.
  54.  
  55.         Toddy uses a minimum of 3456 bytes of memory, and 4048 bytes in
  56.         it's default configuration.  The memory consumption increases
  57.         according to the size of the command history (/HS) and macro data
  58.         areas (/MS and /MN).  If you don't use the command history, you
  59.  
  60.  
  61.  
  62.         can conserve memory by setting the history size to zero (/HS0).
  63.         If you don't use macros, you can conserve memory by setting the
  64.         macro table size and macro nest to zero (/MS0 and /MN0 respec-
  65.         tively).  The total bytes used by the /HS and /MS must be less
  66.         than about 54000.
  67.  
  68.         The appearance of Toddy (i.e. the colors and cursor types) can be
  69.         set with the /AT, /AC, /AE, /TE, /TI, /TO, /TX, /TC, and /TC
  70.         switches.  By default, Toddy sets all the attributes (colors) to
  71.         7 and does not modify the cursor type.
  72.  
  73.         Macros can be loaded before or after installation.  Macros can be
  74.         loaded automatically as part of the TODDY.COM file, loaded from a
  75.         separate text file, or defined on the command line when Toddy is
  76.         installed.
  77.  
  78.         Once installed, Toddy may be disabled with the /D switch and
  79.         enabled with the /E switch.  These switches might be useful if an
  80.         application seems to conflict with Toddy.  Toddy may also be
  81.         removed from memory with the uninstall switch (/U).
  82.  
  83.         The end of this document contains a list of version changes and
  84.         some additional notes on using and configuring Toddy.
  85.  
  86.                                      Editing
  87.                                      -------
  88.  
  89.         Toddy's enhanced editing commands are available immediately upon
  90.         installation.  When entering a DOS command, the right and left
  91.         arrow keys can be used to move the cursor non-destructively.
  92.         Past commands can be retrieved by pressing the up and down arrow
  93.         keys, or by typing a few letters and searching for a matching
  94.         command with the Tab key.  You can quickly and easily enter the
  95.         name of an existing file by typing part of the name and pressing
  96.         F9 until the entire name is displayed.  The standard DOS editing
  97.         keys may also be used.
  98.  
  99.         In the next table and throughout the rest of this document, a
  100.         "Ctrl-" to the immediate left of a keystroke or letter refers to
  101.         that keystroke pressed with the CONTROL key held down.  Similar-
  102.         ly, an "Alt-" next to a keystroke refers to the keystroke pressed
  103.         with the ALT key held down.  A complete list of editing commands
  104.         follows:
  105.  
  106.           Left              move cursor left
  107.           Right             move cursor right
  108.           Home              move cursor to first column
  109.           End               move cursor to last column
  110.           Ctrl-Left         move cursor to previous word
  111.           Ctrl-Right        move cursor to next word
  112.  
  113.           Delete            delete character under the cursor
  114.           Backspace         delete character to the left of the cursor
  115.           Ctrl-Backspace    delete word to the left of the cursor
  116.           Ctrl-Home         delete all characters left of the cursor
  117.  
  118.  
  119.  
  120.           Ctrl-End          delete all characters right of the cursor
  121.           Escape            delete all characters on the line
  122.  
  123.           Up                older history line
  124.           PgUp              oldest history line
  125.           Down              newer history line
  126.           PgDn              newest history line (last line saved)
  127.           Tab               search for matching history line
  128.           Alt-F7            delete all history lines
  129.  
  130.           F9                replace field with matching file name
  131.           F10               replace/append field with matching file name
  132.  
  133.           Enter             accept input
  134.           Ctrl-Enter        accept input without any processing
  135.  
  136.           Insert            toggle insert mode
  137.  
  138.           Ctrl-L            delete word to the left of the cursor
  139.           Ctrl-R            delete word to the right of the cursor
  140.           Ctrl-D            delete current history line
  141.           Ctrl-K            copy current line to history then clear line
  142.           Ctrl-V            enter a control character
  143.  
  144.           F1                copy next character from the template
  145.           F2                copy template characters up to the next key
  146.           F3                copy remaining characters from the template
  147.           F4                skip template characters up to the next key
  148.           F5                copy current input to the template
  149.           F6                insert EOF character
  150.  
  151.         To enter control characters normally interpreted by DOS or Toddy,
  152.         press Ctrl-V and then the letter.  For instance, press Ctrl-VC to
  153.         enter Ctrl-C.  Besides the control keys listed above (Ctrl-L,
  154.         Ctrl-R, Ctrl-D, Ctrl-K, and Ctrl-V), some other codes that can
  155.         only be entered using Ctrl-V might include: Ctrl-C (break),
  156.         Ctrl-M (enter), Ctrl-P (toggle line printer echo) and Ctrl-S
  157.         (pause display).  Note that Toddy does not allow the NUL code
  158.         (Ctrl-@) to be entered.
  159.  
  160.         The file name completion feature lets you quickly enter the name
  161.         of an existing file.  Just type the first few letters of the file
  162.         name and press F9.  The first file matching those letters will
  163.         replace the letters.  Pressing F9 again will replace the first
  164.         matching file with the next matching file.  If there are no more
  165.         matching files, pressing F9 will do nothing.  F10 works similarly
  166.         to F9, except matching files are appended to previous matches
  167.         (rather than replacing previous matches).  The initial search
  168.         pattern may include wildcard characters and may or may not in-
  169.         clude a file name extension.
  170.  
  171.                                  Command History
  172.                                  ---------------
  173.  
  174.         Every time you execute a DOS command, the command is copied to
  175.  
  176.  
  177.  
  178.         the command history for later retrieval.  If there isn't enough
  179.         room because of previously saved commands, Toddy will delete the
  180.         oldest command or commands to make room.  You can prevent a
  181.         command from being saved to the command history by pressing
  182.         Ctrl-Enter, instead of Enter, to run the command.  You can copy a
  183.         command to the command history without running it by pressing F5
  184.         or Ctrl-K.  The up arrow key will retrieve the last command.
  185.         Repeatedly pressing the up arrow key will retrieve progressively
  186.         older commands.  The down arrow key retrieves newer commands (the
  187.         opposite of the up arrow key).  Other keys for scrolling through
  188.         the command history are listed in the Editing section above.
  189.  
  190.         Commands are not saved to the command history if they are identi-
  191.         cal to the last command.  Also, Toddy can be configured to pre-
  192.         vent other types of commands from being saved.  See the descrip-
  193.         tions of the /HU, /HA, and /HM switches in the Switch Descrip-
  194.         tions section.  The command history may be written to a file or
  195.         loaded from a file with the /HW and /HR switches.  The current
  196.         history can be locked, freed (unlocked), or cleared with the /HL,
  197.         /HF, and /HC switches.  When the history is locked, commands are
  198.         no longer copied to it.
  199.  
  200.         The command history can be searched by matching the beginning
  201.         characters.  For instance, if you recently entered a long command
  202.         like:
  203.  
  204.           tcc -v -ms zorro init.obj graflib.lib extra.lib
  205.  
  206.         you can search for this line by typing the first few characters,
  207.         "tcc" for instance, and then pressing the Tab key.  If there is
  208.         more than one saved command that begins with "tcc", repeatedly
  209.         pressing Tab will find each occurrence.  If there are no more
  210.         occurrences, the display will not change.
  211.  
  212.                                 Chained Commands
  213.                                 ----------------
  214.  
  215.         Multiple commands can be entered on a single line by using the
  216.         "chain" character.  The default chain character is Ctrl-T, but
  217.         may be changed with the /CC switch.  If the chain character was
  218.         defined to be the caret (^), the command "arce files1^arce
  219.         files2" will run the two consecutive commands "arce files1" and
  220.         "arce files2".  Any number of chained commands may be entered on
  221.         a single line.  Macros (described later) can also contain chained
  222.         commands.
  223.  
  224.         To cancel sequence of executing chained commands, press Ctrl-
  225.         Break.  Pressing Ctrl-Break will usually interrupt chained com-
  226.         mands even if you are inside an application.
  227.  
  228.                                      Macros
  229.                                      ------
  230.  
  231.         A macro is a user defined command that's automatically replaced
  232.         by a single command or multiple commands chained together.
  233.  
  234.  
  235.  
  236.         Macros behave very much like small batch files.  Some advantages
  237.         of macros over batch files are that macros are executed faster
  238.         (because they're stored in memory, not on disk), macros generally
  239.         use less disk space (because multiple macros can be stored in a
  240.         single file), macros can be defined or redefined on the fly, and
  241.         macros can have any name (for example you could have a macro
  242.         called DIR, but not a batch file).  Some possible uses for macros
  243.         are renaming commands (like defining D to execute a DIR) and
  244.         applying default arguments to commands (for instance automatical-
  245.         ly applying the /W switch to all DIR commands).  Note that macros
  246.         will NOT work in batch files.  Macros are defined with the /MD
  247.         and /ME switches and cleared with the /MU, /MF, and /MC switches.
  248.         Macros can also be defined using the syntax:
  249.  
  250.           TODDY macro=text
  251.  
  252.         where "macro" is the name of the macro and all characters after
  253.         the equal sign are what the macro should be replaced with.  This
  254.         second syntax for defining macros is equivalent to the /MD
  255.         switch.  You can also load and save macros to files with the /MR
  256.         and /MW switches.  Use the /ML switch to list the currently
  257.         defined macros.  Some simple macros might be:
  258.  
  259.           TODDY d=dir
  260.           TODDY dir=dir /w
  261.           TODDY /md'clear'del *.obj^del *.lst^del *.map' /cc94
  262.  
  263.         The first example above makes D act like a DIR command.  The next
  264.         example automatically applies the /W switch to all DIR commands.
  265.         The last example creates a CLEAR command to delete all OBJ, LST,
  266.         and MAP files from the current directory.  Note that the first
  267.         two examples use one format for defining macros and the third
  268.         example uses the other format.
  269.  
  270.         Macros can access command line arguments similarly to batch
  271.         files.  The first nine arguments are retrieved using the parame-
  272.         ters $1 to $9 and the next 26 arguments can be retrieved using
  273.         the parameters $A to $Z.  The special parameter $* returns all
  274.         arguments starting after the largest previously retrieved argu-
  275.         ment.  For instance, if you referred to $B in your macro, a $*
  276.         will return all arguments starting with $C.  The character indi-
  277.         cating a parameter, a dollar sign by default, can be changed with
  278.         the /CP switch.
  279.  
  280.         A more useful definition of the DIR macro above would use a
  281.         parameter as follows:
  282.  
  283.           TODDY dir=dir $1 /w
  284.  
  285.         With this macro definition, a DIR without arguments would act
  286.         like "DIR /W", and a "DIR *.COM" would act like "DIR *.COM /W".
  287.         Another example:
  288.  
  289.           TODDY tcc=tcc -v $* userlib.lib
  290.  
  291.  
  292.  
  293.         This macro replaces TCC with one that automatically specifies
  294.         multiple command line arguments.  If you ran "tcc -O zipper",
  295.         you'd actually be running "tcc -v -O zipper userlib.lib".
  296.  
  297.         Macro arguments are defined as sequences of characters separated
  298.         by spaces, so there's no way retrieve an argument that contains
  299.         spaces.  This is might be a problem when defining a macro that
  300.         runs a program like GREP (which could have a quoted string con-
  301.         taining spaces).  For instance, in the command:
  302.  
  303.           GREP "a string" *.doc
  304.  
  305.           parameter $1 is replaced by: "a
  306.           parameter $2 is replaced by: string"
  307.           parameter $3 is replaced by: *.doc
  308.  
  309.         The $* parameter is considered to be a single argument when
  310.         referenced by a nested macro, even though it's replaced by multi-
  311.         ple arguments.  For instance, if you define:
  312.  
  313.           TODDY echo1=echo $3
  314.           TODDY echo2=echo1 A $* B
  315.  
  316.         ECHO2 will call ECHO1, which will echo the third argument of
  317.         ECHO2; so running ECHO2 will always echo a B, no matter what
  318.         arguments you use.
  319.  
  320.         Macros may be defined multiple times.  The most recent definition
  321.         always take precedence.  A macro may also call another macro.  If
  322.         a macro calls a macro of the same name, the most recent defini-
  323.         tion (prior to the calling macro) will be called.  For instance,
  324.         if the following macros were defined:
  325.  
  326.           TODDY dir=dir $* /w
  327.           TODDY /cc94 dir=cls^dir $*
  328.  
  329.         a DIR command will call the second macro (because it's the most
  330.         recent definition).  This macro clears the screen (with CLS) and
  331.         calls DIR.  Since DIR has an earlier definition (the first
  332.         macro), it's also called as a macro.  The net effect of running a
  333.         DIR command after defining these two macros is to clear the
  334.         screen and perform a DOS DIR command with the /W switch.
  335.  
  336.         If a command is preceded by the "literal character", it is not
  337.         interpreted as a macro.  The literal character is undefined by
  338.         default, but can be defined with the /CL switch.  If the literal
  339.         character is defined to be an exclamation mark, running "!DIR"
  340.         will execute the standard DOS directory command regardless of any
  341.         previous DIR macro definitions.
  342.  
  343.         You can run a command without any macro processing (or any other
  344.         kind of processing) by pressing Ctrl-Enter instead of Enter.
  345.         This feature is useful when defining macros from the DOS command
  346.         line (rather than loading them from a separate file or defining
  347.         them in a batch file).  For instance, if you had defined the
  348.  
  349.  
  350.  
  351.         chain character to be the caret, you could not normally define
  352.         the following macro from the DOS command line:
  353.  
  354.           TODDY d=cls^dir
  355.  
  356.         Because of the chain character, Toddy will interpret the above
  357.         command as two separate commands:  "TODDY d=cls" and "dir".
  358.         However, if you run this command by pressing Ctrl-Enter (rather
  359.         than Enter), Toddy will not interpret the caret as a chain char-
  360.         acter.  A similar restriction applies to the special DOS charac-
  361.         ters: less than (<), greater than (>), and pipe (|).  None of
  362.         these characters can be used on the DOS command line or in a
  363.         batch file as part of a macro definition, because DOS will inter-
  364.         pret and absorb these characters.  You can only use those charac-
  365.         ters in a macro definition if you store the macro in a separate
  366.         file and load the file with the /MR switch.
  367.  
  368.         Toddy beeps and cancels the currently running macro if: 1.
  369.         there's an error processing a macro parameter; 2. the macros are
  370.         nested too deeply; or 3. the macro expansion is too long.  Note
  371.         that macro parameters are processed similarly to nested macros
  372.         and count towards the maximum macro nest level.  If you get a
  373.         beep, you could try increasing the maximum nest level with the
  374.         /MN switch before looking for errors in your macro definitions.
  375.         Another potential problem is circular macro references.  For
  376.         instance:
  377.  
  378.           TODDY a=b
  379.           TODDY b=c
  380.           TODDY c=a
  381.  
  382.         You will always get an error if you try to run one of the three
  383.         macros defined above, because these macros continuously call each
  384.         other until the macro nest level is exceeded.
  385.  
  386.                                     Switches
  387.                                     --------
  388.  
  389.         Switches take affect when Toddy is installed or can be passed to
  390.         an already resident Toddy by running Toddy again.  Switches may
  391.         be written to the executable file TODDY.COM with the /W switch.
  392.         When switches are written to the executable file, they automati-
  393.         cally take effect when Toddy is installed.  A list of the Toddy
  394.         command line switches are displayed to the screen by running:
  395.  
  396.           TODDY /?
  397.  
  398.         In the switch descriptions of the following sections, a "d" de-
  399.         notes a decimal digit, an "x" denotes a hexadecimal digit, and an
  400.         "'s'" denotes a string in quotes.  The number of decimal or
  401.         hexadecimal digits only serve as a general reference to the
  402.         magnitude of the number -- in most cases fewer digits are al-
  403.         lowed.
  404.  
  405.  
  406.  
  407.                                  Switch Summary
  408.                                  --------------
  409.  
  410.         Installation:
  411.  
  412.           /Q           quiet mode
  413.           /V           verbose mode
  414.           /E           enable Toddy
  415.           /D           disable Toddy
  416.           /W           write switches
  417.           /U           uninstall Toddy
  418.  
  419.         Attributes (colors):
  420.  
  421.           /ATxx        text attribute
  422.           /ACxx        cursor attribute
  423.           /AExx        end attribute
  424.  
  425.         Cursor Type:
  426.  
  427.           /TC          use custom cursor
  428.           /TS          use system cursor
  429.           /TExxxx      entry cursor type
  430.           /TIxxxx      insert cursor type
  431.           /TOxxxx      overwrite cursor type
  432.           /TXxxxx      exit cursor type
  433.  
  434.         Characters:
  435.  
  436.           /CLddd       literal character
  437.           /CPddd       parameter character
  438.           /CCddd       chain character
  439.  
  440.         Insert Mode:
  441.  
  442.           /II          select insert mode
  443.           /IO          select overwrite mode
  444.           /IR          reset insert
  445.           /IP          preserve insert
  446.  
  447.         History:
  448.  
  449.           /HSddddd     command history size
  450.           /HMddd       minimum command length
  451.           /HU          save unique commands
  452.           /HA          save all commands
  453.           /HL          lock history
  454.           /HF          free history
  455.           /HRfile      read history from file
  456.           /HWfile      write history to file
  457.           /HC          clear history
  458.  
  459.         Macros:
  460.  
  461.           /MSddddd     macro table size
  462.  
  463.  
  464.  
  465.           /MNddd       maximum macro nest
  466.           /MD's's'     define macro
  467.           /ME's's'     exchange (replace) macro
  468.           /MU's'       undefine macro
  469.           /MF's'       forget macro
  470.           /MC          clear all macros
  471.           /ML          list macros
  472.           /MR          read macros from file
  473.           /MW          write macros to file
  474.  
  475.         Miscellaneous:
  476.  
  477.           /A           display memory allocations
  478.           /BSddd       set input buffer size
  479.           /FTxx        file name completion types
  480.           /Mddd        multiplex number
  481.           /UI          uppercase ignored
  482.           /US          uppercase significant
  483.  
  484.                                Switch Descriptions
  485.                                -------------------
  486.  
  487.         /A        Display memory allocations.  The first three numbers
  488.                   displayed are: the memory allocated for the command
  489.                   history, macro table, and file name completion.  The
  490.                   last three numbers are: the total allocated memory
  491.                   (usually the sum of the first three numbers), the
  492.                   memory used by macro definitions, and the amount of
  493.                   available memory.  All available memory can be used for
  494.                   macros.  Whatever memory isn't used by macros is used
  495.                   for the command history (or the file name completion
  496.                   commands if needed).  See the Notes section for more
  497.                   information on memory usage.
  498.  
  499.         /ACxx     Set the attribute of the character under the cursor.
  500.                   The first digit of the attribute byte is the background
  501.                   color and the second digit is the foreground color.
  502.                   Color values of 0 to 7 correspond to black, blue, green
  503.                   cyan, red, magenta, brown, and white.  Adding 8 to the
  504.                   lower nibble makes the foreground color brighter.
  505.                   Adding 8 to the upper nibble makes the foreground
  506.                   blink.  The default is /AC7 (white on black).
  507.  
  508.         /AExx     Set the attribute of the blanks following the text.
  509.                   The /AC switch describes attribute bytes.  The default
  510.                   is /AE7.
  511.  
  512.         /ATxx     Set the attribute of the text.  The /AC switch de-
  513.                   scribes attribute bytes.  The default is /AT7.
  514.  
  515.  
  516.  
  517.         /BSddd    Set the input buffer size.  If this switch is used,
  518.                   Toddy will only process input when the specified number
  519.                   of characters are requested.  To restrict Toddy to DOS
  520.                   commands, use /BS128 for COMMAND.COM and /BS255 for
  521.                   4DOS and NDOS.
  522.  
  523.         /CCddd    Define the chain character.  The chain character is
  524.                   used to specify multiple commands on single line or in
  525.                   a macro.  The number is the ASCII value of the charac-
  526.                   ter.  The chain character cannot be a space.  The
  527.                   default is /CC20 (Ctrl-T).  Chain characters are de-
  528.                   scribed in the Chained Commands section.
  529.  
  530.         /CLddd    Define the literal character.  A literal character
  531.                   forces Toddy to pass a command directly to DOS without
  532.                   interpreting it as a macro.  The number is the ASCII
  533.                   value of the character.  The literal character cannot
  534.                   be a space.  The default is /CL0 (no literal character
  535.                   defined).  Literal characters are described in the
  536.                   Macros section.
  537.  
  538.         /CPddd    Define the parameter character.  This is the character
  539.                   used to specify parameters within macros.  The number
  540.                   is the ASCII value of the character.  The parameter
  541.                   character cannot be a space.  The default is /CP36 (a
  542.                   dollar sign).  Macro parameters are described in the
  543.                   Macros section.
  544.  
  545.         /D        Disable the resident Toddy.  All command input will be
  546.                   performed by DOS as if Toddy wasn't installed.
  547.  
  548.         /E        Enable the resident Toddy.  This switch undoes the
  549.                   effect of the disable switch, /D.
  550.  
  551.         /FTxx     Select the file types for file name completion.  This
  552.                   switch allows you to specify what types of files will
  553.                   be matched by the file name completion commands (F9 and
  554.                   F10).  The possible values are: 00 = normal file, 02 =
  555.                   hidden files, 04 = system files, and 10 = directories.
  556.                   Add the hexadecimal values together to combine types.
  557.                   /FT10 (00 + 10) finds all normal files and directories.
  558.                   /FT06 (00 + 02 + 04) finds all normal, hidden, and
  559.                   system files. /FT16 (00 + 02 + 04 + 10) finds all files
  560.                   and directories.  The default is /FT00 (find normal
  561.                   files only).
  562.  
  563.         /HA       Save all commands to the command history.  This switch
  564.                   undoes the effects of the /HU switch.  This is the
  565.                   default.
  566.  
  567.         /HC       Clear command history.  All saved commands are deleted.
  568.                   If you want to save a sequence of DOS commands as a
  569.                   batch file (with the /HW switch), you could use this
  570.                   switch to first clear any previously saved commands.
  571.                   You can also clear the command history by pressing
  572.  
  573.  
  574.  
  575.                   Alt-F7.
  576.  
  577.         /HF       Free the command history.  Commands will be saved to
  578.                   the command history normally.  This switch undoes the
  579.                   effects of the /HL switch.
  580.  
  581.         /HL       Lock the command history.  This switch prevents further
  582.                   commands from being saved to the command history.
  583.                   Unlock the history with the /HF switch.
  584.  
  585.         /HMddd    Set the minimum command length.  All commands that are
  586.                   shorter than this value are not saved to the command
  587.                   history.  This switch is useful if you don't want to
  588.                   save trivial commands like DIR or CLS.  The default is
  589.                   /HM0 (all commands are saved).
  590.  
  591.         /HRfile   Read the command history from a file.  Each line of the
  592.                   specified file is added to the command history.  If the
  593.                   command history is not large enough, older lines are
  594.                   deleted to make room.  The normal criteria for saving
  595.                   commands (like minimum length) are not used.  The file
  596.                   may be created from scratch or be a previously saved
  597.                   history.  The file must a standard text file.
  598.  
  599.         /HSddddd  Set the command history size.  The command history size
  600.                   is the number of bytes reserved for saving commands.
  601.                   If you don't use the command history, you can conserve
  602.                   memory by setting the size to 0 with /HS0.  The default
  603.                   is /HS256.
  604.  
  605.         /HU       Save unique commands only.  Toddy will scan the command
  606.                   history and only save a command if it's different than
  607.                   all the other saved commands.  This switch is useful if
  608.                   you primarily retrieve past commands by searching
  609.                   rather than scrolling up or down the history.  This
  610.                   switch has the opposite effect of the /HA switch.
  611.  
  612.         /HWfile   Write the command history to a file.  All commands
  613.                   stored in the command history are written to the speci-
  614.                   fied file.  The commands are saved as a standard text
  615.                   file.  This switch can be used to run a sequence of DOS
  616.                   commands and then save them as a batch file.
  617.  
  618.         /II       Select insert mode for editing.  This is the default
  619.                   mode.
  620.  
  621.         /IO       Select overwrite mode for editing.
  622.  
  623.         /IP       Preserve the insert/overwrite mode between commands.
  624.                   The insert or overwrite mode is preserved from the last
  625.                   time a command was entered.  This switch has the oppo-
  626.                   site effect of the /IR switch.
  627.  
  628.         /IR       Reset the insert/overwrite mode between commands.  Each
  629.                   time a command is entered, the mode will be set to
  630.  
  631.  
  632.  
  633.                   insert or overwrite (depending on the current mode when
  634.                   this switch is used).  This switch has the opposite
  635.                   effect of the /IP switch.  This is the default.
  636.  
  637.         /Mddd     Set the multiplex number.  If you get the message
  638.                   "Multiplex number in use by another program" when you
  639.                   try to install Toddy, you can change the multiplex
  640.                   number with the /M switch.  The multiplex number should
  641.                   be in the range 192 to 255.  The default is /M215.
  642.  
  643.         /MC       Clear all macro definitions.  This switch can be used
  644.                   to delete all currently defined macros, or to ignore
  645.                   any macros saved to TODDY.COM during installation.
  646.  
  647.         /MD's's'  Define a macro.  This parameter uses two fields, the
  648.                   macro name and the replacement text.  The first charac-
  649.                   ter after the /MD is the definition delimiter.  Though
  650.                   this delimiter is usually a quote (or double quote), it
  651.                   can be any character not used in the macro or replace-
  652.                   ment text.  There are three delimiters: one at the
  653.                   start of the macro name, one separating the macro name
  654.                   from the replacement text, and one at the end of the
  655.                   replacement text.  The macro name can be any sequence
  656.                   of characters as long as it doesn't contain any spaces.
  657.                   The replacement text can contain any sequence of char-
  658.                   acters.  Note: this switch does not remove any previous
  659.                   definitions of the macro.  Use the /ME switch to re-
  660.                   place the most recent definition of a macro.  Macros
  661.                   are described in the Macros section.
  662.  
  663.         /ME's's'  Exchange a macro.  This switch replaces the most recent
  664.                   definition of a macro, which is equivalent to undefin-
  665.                   ing then defining a macro.  The syntax and usage are
  666.                   identical to the /MD switch.
  667.  
  668.         /MF's'    Forget a macro.  This switch clears all definitions of
  669.                   a macro (not just the most recent definition).  The
  670.                   macro name is delimited similarly to the macro defini-
  671.                   tion switch (/MD), except there is no replacement text.
  672.                   Use the /MU switch to clear only the most recent defi-
  673.                   nition.
  674.  
  675.         /ML       List macros.  All currently defined macros will be
  676.                   displayed.
  677.  
  678.         /MNddd    Set maximum macro nest level.  A nest level is used
  679.                   when a macro calls another macro OR when a macro ac-
  680.                   cesses a parameter.  If the maximum nest level is
  681.                   reached while running a macro, Toddy will beep and
  682.                   abort the macro.  Toddy requires 8 bytes of memory for
  683.                   each nest level.  If you don't use macros, you can
  684.                   conserve memory by setting the nest level to 0 with
  685.                   /MN0.  The default is /MN10.
  686.  
  687.         /MRfile   Read macros from a file.  The file must be a standard
  688.  
  689.  
  690.  
  691.                   text file.  The file may be created by the user or by
  692.                   saving macros with the /MW switch.  Each line of the
  693.                   file contains a single macro definition.  The macros
  694.                   must be defined in the form:
  695.  
  696.                     macro=text
  697.  
  698.                   where "macro" is the name of the macro and "text" is
  699.                   the replacement text for the macro.  All characters
  700.                   after the first equals sign become part of the macro
  701.                   text.
  702.  
  703.         /MSddddd  Set the macro table size.  The macro table size is the
  704.                   number of bytes reserved for macro definitions.  If you
  705.                   don't use macros, you can conserve memory by setting
  706.                   the table size to 0 with /MS0.  The default is /MS256.
  707.  
  708.         /MU's'    Undefine a macro.  This switch clears the most recent
  709.                   definition of a macro.  The macro name is delimited
  710.                   similarly to the macro definition switch (/MD), except
  711.                   there is no replacement text.  Note that a macro may
  712.                   have multiple definitions and this switch only clears
  713.                   the newest.  Use the /MF switch to clear all defini-
  714.                   tions of a macro.
  715.  
  716.         /MWfile   Write macros to a file.  All currently defined macros
  717.                   are written to the specified file.  The file is a
  718.                   standard text file with one macro definition per line.
  719.                   Macros saved with this switch can be loaded with the
  720.                   /MR switch.
  721.  
  722.         /Q        Enable quiet mode.  When Toddy is in quiet mode, the
  723.                   regular confirmation messages are suppressed -- only
  724.                   error messages are displayed.  If quiet mode is saved
  725.                   (i.e. "TODDY /Q /W"), Toddy's banner will also be
  726.                   suppressed.
  727.  
  728.         /TC       Use the custom cursor type defined with the /TE, /TI,
  729.                   and /TO switches.  The /TE, /TI, and /TO switches auto
  730.                   matically set this switch.
  731.  
  732.  
  733.  
  734.         /TExxxx   Set the entry cursor type.  This switch sets both the
  735.                   insert and overwrite cursor types.  This switch should
  736.                   be used instead of, but not with, the /TI and /TO
  737.                   switches.  The cursor type is the size and shape of the
  738.                   blinking cursor blob.  The first byte of this two byte
  739.                   value is the top scan line number and the second byte
  740.                   is the bottom scan line number.  The scan lines for CGA
  741.                   are numbered 00 to 07, for EGA adapters it's 00 to 0D,
  742.                   and for VGA adapters it's 00 to 0E.  The default cursor
  743.                   is usually the bottom two scan lines (i.e. 0607 for
  744.                   CGA, 0C0D for EGA, and 0D0E for VGA).  You can make a
  745.                   big blinking blob on most adapters with 000F.  You can
  746.                   turn off the blinking cursor entirely on most adapters
  747.                   with value of 2000.
  748.  
  749.         /TIxxxx   Set the insert cursor type.  This is the cursor type
  750.                   used when in insert mode.  The /TE switch describes how
  751.                   to set the cursor type.
  752.  
  753.         /TOxxxx   Set the overwrite cursor type.  This is the cursor type
  754.                   used when in overwrite mode.  The /TE switch describes
  755.                   how to set the cursor type.
  756.  
  757.         /TS       Use system cursor (i.e. don't make any changes to it).
  758.                   This switch turns off all the custom cursor settings.
  759.                   This is the default.
  760.  
  761.         /TXxxxx   Set exit cursor type.  This is the cursor type to use
  762.                   when Toddy has finished inputting a line.  Generally,
  763.                   this switch is used to restore the cursor after setting
  764.                   it with the other cursor switches.  For this and the
  765.                   other cursor switches, if no cursor is specified, the
  766.                   current system cursor will be used (i.e. this switch
  767.                   usually isn't necessary).
  768.  
  769.         /U        Uninstall Toddy.  This switch removes Toddy from memo-
  770.                   ry.  It may not be possible to uninstall Toddy if
  771.                   another TSR has been loaded after Toddy.
  772.  
  773.         /UI       Uppercase letters are ignored.  This switch undoes the
  774.                   effects of the /UI switch and is the default state.
  775.  
  776.         /US       Uppercase letters are significant.  If this switch is
  777.                   specified, Toddy will treat uppercase and lowercase
  778.                   letters as being different.  For instance, if you
  779.                   define a macro called "DIR" and ran the command "dir",
  780.                   the macro will NOT be run.  This switch also affects
  781.                   command history operations, like searches and saving
  782.                   unique commands (the /HU switch).  Note that DOS is NOT
  783.                   case-sensitive -- this switch only affects Toddy.
  784.  
  785.         /V        Enable verbose mode.  This switch undoes the effects of
  786.                   the /Q switch.
  787.  
  788.         /W        Write current settings to TODDY.COM.  All switches and
  789.  
  790.  
  791.  
  792.                   macros will be written the executable file TODDY.COM.
  793.                   The settings will be the new defaults the next time
  794.                   Toddy is installed.  A macro definition may be removed
  795.                   from TODDY.COM by undefining the macro and rewriting
  796.                   the settings.  If you are running DOS 2.X, TODDY.COM
  797.                   must be in the current directory when using this
  798.                   switch.
  799.  
  800.                                          Examples
  801.                                          --------
  802.  
  803.         TODDY
  804.  
  805.           Install Toddy using the default switches.
  806.  
  807.         TODDY /hs10000 /ms100 /to000f
  808.  
  809.           Install Toddy with a 10000 byte command history, 100 byte macro
  810.           area, and set the cursor scan lines to a big blinking blob
  811.           whenever overwrite mode is in effect.
  812.  
  813.         TODDY /at1F /ac4F /ae1F /te2000
  814.  
  815.           Set the colors to a uniform bright white on blue with a red
  816.           block cursor.  The blinking cursor is turned off for each
  817.           input.
  818.  
  819.         TODDY /hs1000 /hm6 /w
  820.  
  821.           Write the /HS1000 and /HM6 switches to TODDY.COM so they don't
  822.           need to be specified the next time Toddy is installed.
  823.  
  824.         TODDY /md'dir'dir $* /w' /md'del'move $1 c:\trashcan' /cl33
  825.  
  826.           Define two macros and set the literal character to an exclama-
  827.           tion mark.  The first macro appends the /W parameter to all DIR
  828.           commands.  The second macro makes the DEL command move files to
  829.           be deleted to a directory called TRASHCAN, where they can be
  830.           later retrieved if you change your mind about the deletion.
  831.           With the definition of the literal character, !DEL performs a
  832.           regular and permanent delete.  The DEL macro requires a MOVE
  833.           utility, which isn't usually included with DOS, but is avail-
  834.           able on many BBS's and online services.
  835.  
  836.         TODDY /u
  837.  
  838.           Remove Toddy from memory.
  839.  
  840.  
  841.  
  842.                                   Version Changes
  843.                                   ---------------
  844.  
  845.         Version 2.00
  846.  
  847.           First public release.
  848.  
  849.         Version 2.01
  850.  
  851.           Several command line switches renamed.
  852.  
  853.         Version 2.10
  854.  
  855.           Ctrl-Break implemented and mouse support removed to conserve
  856.           memory.
  857.  
  858.         Version 2.11
  859.  
  860.           Search command made case-insensitive.
  861.  
  862.         Version 2.20
  863.  
  864.           Cursor switches expanded.
  865.  
  866.         Version 3.00
  867.  
  868.           Complete rewrite.  New features include chained commands and
  869.           macros.  Other changes include: most command line switches
  870.           renamed, switches are automatically passed to a resident Toddy
  871.           (no /RS needed), default values changed, several editing keys
  872.           changed, delimiters for move word left and right changed, and
  873.           history search improved.
  874.  
  875.         Version 4.00
  876.  
  877.           Many new features added: macros and the command history may be
  878.           saved and loaded from a file, control characters can be en-
  879.           tered, Ctrl-Break cancels chained commands and macros, DOS
  880.           editing keys supported, file name completion, and more.  Other
  881.           changes include: several editing keys changed, alternate syntax
  882.           for defining macros, switches must start with a slash (/),
  883.           macro parameter syntax slightly changed.
  884.  
  885.                                       Notes
  886.                                       -----
  887.  
  888.         Toddy performs the same function as the DOSKEY utility provided
  889.         with DOS version 5.  The two programs are somewhat macro and
  890.         keystroke compatible, but the command line switches are totally
  891.         different.  By and large, Toddy has a more features than DOSKEY
  892.         but uses less memory.  One significant feature of DOSKEY that's
  893.         absent from Toddy is the command to display the contents of the
  894.         command history and select a past command by line number.
  895.  
  896.         Toddy will work with 4DOS (and the version of 4DOS licensed to
  897.  
  898.  
  899.  
  900.         Peter Norton Computing called NDOS) if the /L1 parameter is set
  901.         with the SETDOS command.  When Toddy is installed under 4DOS,
  902.         many of 4DOS' features are still available, including aliases and
  903.         multiple commands.  Toddy is somewhat redundant when using 4DOS,
  904.         since most of the features of Toddy are available through 4DOS.
  905.         Note that if you use /BS switch, the setting for 4DOS must be
  906.         /BS255.
  907.  
  908.         You may have some trouble using redirected input with programs
  909.         like DEBUG and EDLIN when Toddy is installed.  If Toddy receives
  910.         a redirected text file, Toddy will interpret both the carriage
  911.         return and linefeed, which are at the end of every text line, as
  912.         the ENTER key.  If effect, you'll get two ENTER's after every
  913.         line.  To fix this problem, temporarily disable Toddy or use the
  914.         /BS switch.  Redirected input is frequently used to assemble
  915.         small programs using the DEBUG program.
  916.  
  917.         The memory allocated with the /HS and /MS switches is assigned to
  918.         a common pool.  If you allocate memory to the command history but
  919.         no memory to the macro table, you will still be able to define
  920.         macros, though this will leave you with less than the allocated
  921.         amount of history space.  The /A switch displays the current
  922.         memory allocations.  All available memory may be used for macros,
  923.         and whatever memory is left over is used for the command history.
  924.  
  925.         The third number displayed by the /A switch is the memory re-
  926.         quired by the file name completion commands (F9 and F10).  There
  927.         must be at least that many bytes free to use these commands.
  928.         When the file name completion commands are used, the size of
  929.         command history may adjusted downward by deleting the oldest
  930.         entries.  The DOS template commands (F1 to F4) use the most
  931.         recent command line stored in the command history, so if you plan
  932.         on using these keys, you should make sure that there is enough
  933.         history space (i.e. enough free space) to hold at least one
  934.         command line.
  935.  
  936.         Before Toddy is installed, all available memory is allocated to
  937.         the memory pool.  If you run "TODDY /A" before installing Toddy,
  938.         the total allocated memory will usually be larger than the sum of
  939.         the first three numbers.
  940.  
  941.         Each command of a chained command is displayed as it is executed.
  942.         Only the final form of the command is displayed (that is, after
  943.         all macros have been processed).  To see the see final form of
  944.         the first command, precede the chained commands with the chain
  945.         character.  For instance, if you defined the following macro:
  946.  
  947.           TODDY d=dir
  948.  
  949.         when you run the "d" macro, you will not see the DIR command,
  950.         just the results of the DIR.  If you wish to see the actual DIR,
  951.         assuming the chain character is a caret, define the macro as:
  952.  
  953.           TODDY d=^dir
  954.  
  955.  
  956.  
  957.         If you have saved macros to TODDY.COM (using the /W switch), use
  958.         the /MC switch to install Toddy without those macro definitions.
  959.         It may be necessary use the /MC switch to install Toddy with a
  960.         macro and history size of zero if you have saved macros in this
  961.         manner.
  962.  
  963.          ----------------end-of-author's-documentation---------------
  964.  
  965.                          Software Library Information:
  966.  
  967.                     This disk copy provided as a service of
  968.  
  969.                            Public (software) Library
  970.  
  971.          We are not the authors of this program, nor are we associated
  972.          with the author in any way other than as a distributor of the
  973.          program in accordance with the author's terms of distribution.
  974.  
  975.          Please direct shareware payments and specific questions about
  976.          this program to the author of the program, whose name appears
  977.          elsewhere in  this documentation. If you have trouble getting
  978.          in touch with the author,  we will do whatever we can to help
  979.          you with your questions. All programs have been tested and do
  980.          run.  To report problems,  please use the form that is in the
  981.          file PROBLEM.DOC on many of our disks or in other written for-
  982.          mat with screen printouts, if possible.  PsL cannot debug pro-
  983.          programs over the telephone, though we can answer questions.
  984.  
  985.          Disks in the PsL are updated  monthly,  so if you did not get
  986.          this disk directly from the PsL, you should be aware that the
  987.          files in this set may no longer be the current versions. Also,
  988.          if you got this disk from another vendor and are having prob-
  989.          lems,  be aware that  some files may have become corrupted or
  990.          lost by that vendor. Get a current, working disk from PsL.
  991.  
  992.          For a copy of the latest monthly software library newsletter
  993.          and a list of the 3,000+ disks in the library, call or write
  994.  
  995.                            Public (software) Library
  996.                                P.O.Box 35705 - F
  997.                             Houston, TX 77235-5705
  998.  
  999.                                  Orders only:
  1000.                                 1-800-2424-PSL
  1001.                               MC/Visa/AmEx/Discover
  1002.  
  1003.                           Outside of U.S. or in Texas
  1004.                           or for general information,
  1005.                               Call 1-713-524-6394
  1006.  
  1007.                           PsL also has an outstanding
  1008.                           catalog for the Macintosh.
  1009.  
  1010.  
  1011.