home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cenvi23.zip / CENVI.DOC < prev    next >
Text File  |  1996-02-20  |  64KB  |  1,209 lines

  1.                       CEnvi Demo Manual, Chapter 1:
  2.                        CEnvi Unregistered Shareware
  3.  
  4.                            CEnvi version 2.11
  5.                             20 February 1996
  6.  
  7.                  Copyright 1993, Nombas, All Rights Reserved.
  8.           Published by Nombas, 64 Salem Street, MEDFORD MA 02155 USA
  9.           
  10.              VOICE (617) 391-6595     EMAIL: nombas@nombas.com
  11.              BBS   (617) 391-3718     WWW: http://www.nombas.com
  12.              FAX   (617) 391-3842
  13.  
  14.          Thank you for trying this shareware version of CEnvi from Nombas.
  15.  
  16.                           _______
  17.                      ____|__     |                (R)
  18.                   --|       |    |-------------------
  19.                     |   ____|__  |  Association of
  20.                     |  |       |_|  Shareware
  21.                     |__|   o   |    Professionals
  22.                   -----|   |   |---------------------
  23.                        |___|___|    MEMBER
  24.  
  25.  
  26. 1.  CEnvi Unregistered Shareware
  27.  
  28. 1.1.  Introduction to Cmm and CEnvi
  29.  
  30.           Cmm (C minus minus) is 'C' for the rest of us.  CEnvi runs Cmm
  31.           programs in the DOS, Windows, OS/2, etc... environments.
  32.           Together, CEnvi and Cmm make the power and flexibility of the C
  33.           programming language part of every computer user's environment,
  34.           without the hardware, time, and programmer resources needed for
  35.           developing full-blown C programs.
  36.  
  37.           With CEnvi and Cmm, anyone can take control of their computer
  38.           environment.  C is not just for programming nerds anymore.  CEnvi
  39.           utilites, macros, batch files, and scripts can quickly be
  40.           created, shared, and modified among all computer users,
  41.           professional and amateur alike.
  42.  
  43.           CEnvi can be incorporated at a pace that is comfortable to you:
  44.           you may only want to use CEnvi code set up by a more experienced
  45.           user, you may want to enhance existing batch files with a line or
  46.           two of CEnvi code, or you may write complete utilities using
  47.           CEnvi.
  48.  
  49. 1.2.  CEnvi unregistered shareware version
  50.  
  51.           This package is the unregistered shareware version of CEnvi.
  52.           Nombas provides this unregistered shareware version of CEnvi so
  53.           that you can try the program for a 30 days before deciding whether
  54.           to buy.  If, after 30 Days of using using this product, you
  55.           think CEnvi will be useful to you and/or your organization then
  56.           use the registration form at the end of this document (or see the
  57.           file: REGISTER.DOC) to register CEnvi.
  58.  
  59. 1.2.1   Why you should register
  60.  
  61.           If you register, then you will receive:
  62.             *The latest version of CEnvi for all supported platforms
  63.               (currently DOS, OS/2, and Windows, with NT support expected
  64.               soon) without the annoying "Please Register" reminder.
  65.             *The CEnvi user's manual (almost 100 pages, including a
  66.               description of the Cmm programming language, a tutorial for
  67.               those who have never programmed, and descriptions and
  68.               examples of the nearly 150 functions included in the CEnvi
  69.               library).
  70.             */BIND option for creating standalone executables from Cmm
  71.               scripts for your own personal use.
  72.             *Support from Nombas and CEnvi/Cmm users through
  73.               CompuServe (72212,1622), internet (bsn@world.std.com), the
  74.               cenvi-cmm e-mail mailing list (cenvi-cmm@world.std.com), and
  75.               the Nombas BBS (617-391-6595).
  76.             *Access to the growing list of CEnvi utilities and libraries
  77.               (some of which are included in this unregistered shareware
  78.               package, and others are contributed by Nombas and CEnvi/Cmm
  79.               users to the electronic locations described above).
  80.             *Discounts for additional registered version of CEnvi to use
  81.               within your organization.
  82.  
  83. 1.2.2   How to register
  84.  
  85.           See the REGISTER.DOC document that is included with this package
  86.           (and is also duplicated at the end of this document), to purchase
  87.           a registered version of CEnvi.
  88.  
  89. 1.3.  Installing CEnvi, documents, and sample files
  90.  
  91. 1.3.1   Installing CEnvi for DOS
  92.  
  93.           Create a directory to install CEnvi for DOS in(we recommend 
  94.           CENVIDOS). UNZIP cenvidos.zip into the directory you created. CEnvi 
  95.           for DOS includes two executables. CEnvid.exe is a regular DOS
  96.           program. CEnvid32.exe is a 32 bit DOS version. It is useful if you
  97.           find that the regular DOS version of CEnvi is running out of
  98.           memory.
  99.           
  100.           The first time you run CEnvi for DOS, it will run the Cmm 
  101.           installation script. The installation script does 2 things if you
  102.           choose. It creates a CMMPATH environment variable pointing to the 
  103.           directory you chose and adds the CEnvi path to the DOS PATH.
  104.           
  105.  
  106. 1.3.2   Installing CEnvi for Windows
  107.  
  108.           Create a directory to install CEnvi for Windows in(we recommend 
  109.           CENVIWIN). UNZIP cenviwin.zip into the directory you created. CEnvi 
  110.           for Windows includes two executables. CEnviw.exe is a Windows
  111.           program that is both a Cmm interpreter and a Windows Command line
  112.           and servewin.com allows windows to control DOS sessions.
  113.                     
  114.           The first time you run CEnvi for Windows from program manager, it
  115.           will run the Cmm installation script. The installation script will
  116.           set up CEnvi for Windows Properly. For Windows, install will add
  117.           the CMMPATH profile value in WIN.INI (in the [CEnvi] section), and
  118.           will also add the CMM file extension to the [Extensions] section
  119.           in WIN.INI.It will create a CEnvi program group containing CEnvi
  120.           for Windows, and a few sample Cmm utilities.
  121.           
  122. 1.3.3   Installing CEnvi For OS/2
  123.  
  124.           Create a directory to install CEnvi for OS/2 in(we recommend 
  125.           CENVIOS2). UNZIP cenvios2.zip into the directory you created. CEnvi 
  126.           for OS/2 includes two executables. CEnvi2.exe is a OS/2 program.
  127.           CEnvi2PM.exe is used by CEnvi2.exe to make presentation manager
  128.           calls. It must be in the current directory or in the search 
  129.           path for many of the Os/2 samples to work correctly.
  130.                     
  131.           The first time you run CEnvi for OS/2, it will run the Cmm 
  132.           installation script. The installation script will set up CEnvi for
  133.           OS/2 Properly. The installation script does 2 things if you
  134.           choose. It creates a CMMPATH environment variable pointing to the 
  135.           directory you chose and adds the CEnvi path to the DOS PATH.
  136.                     
  137. 1.3.4   4DOS and 4OS2 users - .cmm executable extension
  138.  
  139.           4DOS and 4OS2 users can directly execute .cmm files by
  140.           associating the .cmm file extension with your CEnvi executable.
  141.           Assuming the CEnvi.exe is in the c:\CENVID directory, then a 4DOS
  142.           user would want to add this line to AUTOEXEC.BAT:
  143.               SET .cmm=C:\CENVID\CEnvi.exe
  144.  
  145. 1.4.  Removing CEnvi unregistered shareware
  146.  
  147.           If, after testing CEnvi for a few weeks, you choose not to
  148.           register this version of CEnvi, then you should remove the
  149.           program from your computer.  (Also please consider telling Nombas
  150.           why CEnvi did not suit your needs; we need such feedback if we
  151.           are to improve the product.)
  152.  
  153.           For all operating systems, the first step for removing CEnvi is
  154.           to delete all the CEnvi files and the directory that you copied
  155.           the files to.  The next step depends on your operating system:
  156.  
  157. 1.4.1   DOS de-installation
  158.  
  159.           Install.cmm made two changes to C:\AUTOEXEC.BAT: the directory
  160.           that CEnvi was in will have been added to your PATH statement,
  161.           and the CMMPATH environment variable will have been added.  To
  162.           de-install CEnvi you must remove the CEnvi directory from the
  163.           PATH statement and you must also delete the "SET CMMPATH=..."
  164.           line.
  165.  
  166. 1.4.2   OS/2 de-installation
  167.  
  168.           Install.cmm made two changes to C:\CONFIG.SYS: the directory that
  169.           CEnvi was in will have been added to your PATH statement, and the
  170.           CMMPATH environment variable will have been added.  To de-install
  171.           CEnvi you must remove the CEnvi directory from the PATH statement
  172.           and you must also delete the "SET CMMPATH=..." line.
  173.  
  174. 1.4.3   Windows de-installation
  175.  
  176.           Install.cmm made two changes to WIN.INI: the CMM profile
  177.           extension was added and the CMMPATH profile string was created.
  178.           To de-install CEnvi you must edit WIN.INI (with NOTEPAD.EXE for
  179.           example) and remove from the [Extensions] section a line similar
  180.           to this:
  181.                CMM=C:\CENVI\CENVI.EXE ^.CMM
  182.           and also remove these line (or lines much like these) from
  183.           WIN.INI:
  184.                [CEnvi]
  185.                CMMPATH=E:\NOMBAS\CENVI\EXAMPLES.WIN
  186.  
  187. 1.5.  Using this package
  188.  
  189. 1.5.1   Unregistered CEnvi shareware executable
  190.  
  191.           The executables in this package, are identical to
  192.           the registered versions of CEnvi at the time this package was
  193.           created with one exception: this unregistered shareware version
  194.           will occasionally put up a screen to remind you to register your
  195.           copy of CEnvi (see the bottom of this document or REGISTER.DOC).
  196.           Nombas has spent, and will continue to spend, time and resources
  197.           developing and supporting CEnvi and Cmm.  Without your honest
  198.           support Nombas cannot improve and support CEnvi (and pay
  199.           mortgage, feed the kids, pay the doctor, etc...).
  200.  
  201.           It is likely that months have elapsed since this shareware
  202.           package has been put together (see date at the top of this file).
  203.           If so, then the version of CEnvi you receive will be an updated
  204.           version of this one.  At the time of this release, incremental
  205.           improvements have been planned in memory use, speed of execution,
  206.           debugging tools, developer tools, and documentation.
  207.  
  208. 1.5.2   Example programs
  209.  
  210.           The following example programs are included with this shareware
  211.           version of CEnvi.  Those files with a batch extension (.BAT for
  212.           DOS and .CMD for OS/2) can be run by invoking the batch file
  213.           directly.  Those files with the CEnvi source file extension
  214.           (.CMM) are invoked by executing CEnvi with the file name as the
  215.           first argument (e.g. CENVI FranTick.cmm).  Files with different
  216.           (e.g., *.LIB, *.H, *.DAT) are files used by CEnvi some of the
  217.           example programs.
  218.  
  219.           Many of the files will provide help for how to use them if they
  220.           are invoked with "/?" as the only parameter.
  221.  
  222.           All of these example files are here for you to view, study,
  223.           experiment with, and alter for your own use.  The Nombas BBS will
  224.           continue to gather CEnvi and Cmm example files created by Nombas
  225.           or uploaded by CEnvi and Cmm users; so registered users will have
  226.           a large library to choose from (maybe some other CEnvi user has
  227.           already solved your need, or perhaps their need is close to yours
  228.           and you will only have to make small modifications to someone
  229.           else's uploaded CEnvi program). 
  230.  
  231. 1.5.3   DOS example files:
  232.             *AllDirs.bat: Perform a command in this directory and all
  233.               sub-directories
  234.             *AllFiles.bat: Perform a command on all files matching a given
  235.               file specification
  236.             *Ascii.bat: Display the ascii character table
  237.             *BatLoops.bat: Examples of various methods CEnvi can use to
  238.               allow looping within batch files
  239.             *BattMem.cmm: Show values stored in a PC's battery-protected
  240.               memory
  241.             *CDfind.bat: Change to directory based on name search
  242.             *CmdCount.bat: Repeat DOS command Count times
  243.             *CmmEdit.cmm: VERY simple text editor; developed step-by-step
  244.               in the tutorial chapter of the CEnvi User Manual.
  245.             *DelOld.bat: Delete files older than specified age
  246.             *DelTree.bat: Delete a directory tree
  247.             *DirDiff.cmm: Compare two directory listings for differences
  248.             *DirStat.bat: Extract specific fields from a DOS "DIR" listing
  249.             *DiskFree.bat: Display free space on a disk drive
  250.             *DoList.cmm: Perform action on every element of a list
  251.             *DosTime.bat: Show time according to computer's internal clock
  252.             *EnviAsk.bat: Prompt and receive user input with many options
  253.             *EnviAsks.bat: Many examples of user input using EnviAsk.bat
  254.               and GetUKey.cmm
  255.             *EnvSort.bat: Sort environment variables alphabetically
  256.             *ErrLev.bat: Execute a command and set the ERRLEV value as the
  257.               return code, which makes ERRORLEVEL a variable
  258.             *Fibonacc.cmm: Two methods for generating the Fibonacci
  259.               sequence
  260.             *FileFind.bat: Wildcard search for files on current drive or on
  261.               all drives
  262.             *Find#.cmm: Extract a number from wordy output; used by
  263.               DirStat.bat
  264.             *FloppyIn.bat: Check if a floppy is in drive A: or B:
  265.             *FranTick.cmm: Animated tick who drank too much coffee
  266.             *GetUKey.cmm: Display a choice prompt and then set an
  267.               environment variable based on user's selection
  268.             *Hello.cmm: My first Cmm program. Used to begin the Cmm
  269.               tutorial.
  270.             *HexDump.bat: Display hexadecimal dump of a file
  271.             *Install.cmm: Install this version of CEnvi.
  272.             *Int16.bat: Display key code from keyboard interrupt 16 hex
  273.             *IsDay_1.bat: One method to check if it is a specific day of
  274.               the week
  275.             *IsDay_2.bat: Another method to check if it's a specific day of
  276.               the week
  277.             *IsItFri.bat: Is it Friday?
  278.             *KbdBuf.bat: Alter the size of the keyboard buffer
  279.             *KbdRate.bat: Alter the typematic rate of the keyboard
  280.             *KeyCode.bat: Display keycode of any key pressed
  281.             *KeyState.bat: Get or set the state of the NumLock, CapsLock,
  282.               or Insert keys
  283.             *KeyStuff.bat: Stuff characters into the keyboard buffer
  284.             *MemBlock.bat: Trace through DOS's allocated memory blocks
  285.             *Message.bat: Display very important message in box on screen
  286.             *Mouse.bat: Demonstrate reading a mouse's position and state
  287.             *MultiDir.bat: DOS's "DIR" command allowing multiple file
  288.               specifications
  289.             *NumLock.bat: Set the NumLock key on
  290.             *OneADay.bat: Perform any command(s) no more than once per day
  291.             *OptParms.lib: Library of routines for parsing the optional
  292.               parameters for executing a program. #included in other files
  293.             *OS2Sessn.cmm: Execute sessions from DOS under OS/2
  294.             *PathAdd.bat: Add a directory to your PATH environment
  295.               variable.
  296.             *PathDel.bat: Remove a directory from your PATH environment
  297.               variable
  298.             *PathStak.bat: Multi-level save or restore of current drive and
  299.               directory so that you can change drives and directories and
  300.               still return to this one
  301.             *PathSubs.bat: Use DOS's SUBST command to shorten your PATH
  302.               environment variable so that more paths can be fit with DOS'
  303.               127-byte limit
  304.             *Primes.bat: Demonstrate automatic array allocation for
  305.               calculating prime numbers
  306.             *Print.cmm: Copy file to printer, treating printer as a file
  307.             *PrmptDay.bat: Change command-line-prompt to display today's
  308.               date
  309.             *Quote.bat: Choose a "profound" quote at random
  310.             *REBOOT_1.BAT: One method to reboot your computer
  311.             *REBOOT_2.BAT: Another method to reboot your computer
  312.             *Redirect.bat: Demonstrate how to redirect standard output,
  313.               input, and errors while running any command
  314.             *Restrict.cmm: Allow a limited subset of DOS commands
  315.             *RunTime.bat: Rudimentary scheme for executing a command at a
  316.               certain time of day.
  317.             *Scrandom.bat: Use Screen.lib to draw randomly colored squares
  318.               around the screen
  319.             *Screen.lib: Library, #included in other files, for screen
  320.               output: colors, boxes, lines, etc...
  321.             *ScrnSave.bat: Use Screen.lib to save screen to a file
  322.             *SortLen.bat: Sort any file based on line length
  323.             *Sound.bat: Play a frequency for a given time period
  324.             *Tee.cmm: Save screen output to a file while it is being
  325.               displayed on the screen
  326.             *ValidDir.bat: Verify if a directory is valid
  327.             *VLabel.bat: Read or set disk volume label
  328.             *Wait.bat: Pause and do not return for specified number of
  329.               seconds
  330.             *Which.bat: Find in PATH which command is executed
  331.             *WinClip.cmm: Utility to access Windows clipboard from DOS
  332.             *WinClib.lib: Function to access Windows clipboard from DOS
  333.             *WinIni.lib: Modify Windows INI files from plain DOS
  334.             *WinShell.bat: Start windows with a specific shell.  Run
  335.               Windows for a single program.
  336.  
  337. 1.5.4   OS/2 example files:
  338.  
  339.           For many of these functions, you must ensure that CEnvi2PM.exe is
  340.           accessible (in the current directory or in a directory in the
  341.           search PATH).  CEnvi2PM.exe is a small program used transparently
  342.           by CEnvi.exe when the PMxxxxx() calls are used to PM-specific
  343.           functions.
  344.             *AllDirs.cmd: Perform a command in this directory and all
  345.               sub-directories
  346.             *AllFiles.cmd: Perform a command on all files matching a given
  347.               file specification
  348.             *AltHome.cmd: Switch OS/2 session between windowed and
  349.               full-screen, much like ALT-HOME works in DOS sessions
  350.             *BarClock.cmd: Display time in title bar of active window
  351.             *BatLoops.cmd: Examples of various methods CEnvi can use to
  352.               allow looping within batch files
  353.             *BckGrnd.cmd: Specify a new file as your desktop background
  354.               image
  355.             *Bouncy.cmd: Start a bouncy OS/2 Command Window. This
  356.               demonstrates moving windows and silliness.
  357.             *CDfind.cmd: Change to directory based on name search
  358.             *CEnviSet.cmd: This file can be used instead of CEnvi.exe if
  359.               you are using environment variables as Cmm variables and need
  360.               them to be changed in the current OS/2 environment.
  361.             *ClipBrd.cmd: Get or modify clipboard text
  362.             *ClipBrd.lib: Library of routines for reading from or writing
  363.               to the clipboard
  364.             *CmmEdit.cmm: VERY simple text editor; developed step-by-step
  365.               in the tutorial chapter of the CEnvi User Manual.
  366.             *Comm.lib: Serial communications routines
  367.             *DelOld.cmd: Delete files older than specified age
  368.             *DelTree.cmd: Delete a directory tree
  369.             *DeskLock.cmd: Lock or unlock desktop
  370.             *DevIOCtl.lib: Function library for OS/2's DosDevIOCTL
  371.               functions
  372.             *DirDiff.cmm: Compare two directory listings for differences
  373.             *DiskFree.cmd: Display free space on a disk drive
  374.             *DlgCtrl.lib: Library of routines for interactive with PM
  375.               dialog boxes and other windows with sub-windows - this
  376.               library is only in its early stages
  377.             *DoFiles.cmd: Perform any command on a list of files selected
  378.               from a file dialog box
  379.             *DoList.cmd: Perform action on every element of a list
  380.             *DoMenu.cmd: Execute any menu selection of a PM application,
  381.               based on the name of the window and the menu text
  382.             *DOS.cmd: Perform DOS command from an OS/2 session, with the
  383.               option to "see" output of the command; mirrors OS2.BAT
  384.             *DosCalls.lib: Example library of "wrapper" function calls to
  385.               OS/2 API calls in the DosCalls library.  This file is
  386.               "#include"ed in many of the other example files.
  387.             *DropMany.cmd: Drag many files for single launch of program
  388.               object
  389.             *DumpIni.cmd: Display profile settings from a .INI file; uses
  390.               Profile.lib
  391.             *EditCmd.cmd: Use PM's file dialog (via FileDlg.lib) to select
  392.               a *.cmd file to edit.
  393.             *EnvSort.cmd: Sort environment variables alphabetically
  394.             *ErrLev.cmd: Execute a command and set the ERRLEV value as the
  395.               return code, which makes ERRORLEVEL a variable
  396.             *ExamineW.cmd: Display lots of data about any PM window on the
  397.               desktop, and sub-windows (this file in early stages)
  398.             *Fibonacc.cmm: Two methods for generating the Fibonacci
  399.               sequence
  400.             *FileDlg.lib: A simple interface to the WinFileDlg() PM
  401.               function.  This library file is #include'd in some of the
  402.               other CEnvi sample files.
  403.             *FileFind.cmd: Wildcard search for files on current drive or on
  404.               all drives
  405.             *FileIO.lib: Function to interface directly with OS/2's File IO
  406.             *Find#.cmm: Extract a number from wordy output; used by
  407.               DirStat.bat
  408.             *FranTick.cmm: Animated tick who drank too much coffee
  409.             *FSSlave.cmm: Control full screen OS/2 session from
  410.               TEXTBOSS.LIB
  411.             *GetUKey.cmd: Display a choice prompt and then set an
  412.               environment variable based on user's selection 
  413.             *GiveMem.lib: Library of routines for shareing memory with
  414.               other applications whose memory is otherwise "protected"
  415.             *Hello.cmm: My first Cmm program. Used to begin the Cmm
  416.               tutorial.
  417.             *HexDump.cmd: Display hexadecimal dump of a file
  418.             *HideTask.cmd: Hide task from the Task List window
  419.             *IDLE.cmd: Change process priority to run a CEnvi program only
  420.               during system idle time.
  421.             *IdleProg.cmd: Execute a program in the background; i.e., run
  422.               only during system idle time.
  423.             *Install.cmm: Install this version of CEnvi.
  424.             *IsItFri.cmd: Is it Friday?
  425.             *IsRun.cmd: Is process XXXXX running?
  426.             *KbdRate.cmd: Alter the typematic rate of the keyboard; in many
  427.               cases faster than OS/2 Keyboard tool can set it
  428.             *KeyCode.cmd: Display keycode of any key pressed
  429.             *KeyGhost.cmd: Sample for using KeyPush.lib to determine if
  430.               CEnvi is worth the price of registration.
  431.             *KeyPush.cmd: Send keystroke commands directly to a window by
  432.               window title; a quick interface into KeyPush.lib
  433.             *KeyPush.lib: Library of routines for sending keystrokes to PM
  434.               or Windowed applications.
  435.             *KeyState.cmd: Get or set the state of the NumLock, CapsLock,
  436.               or Insert keys for current session or for the whole WPS
  437.             *Kill.cmd: Terminate a running process by Process ID, Window
  438.               title, full name, or partial name
  439.             *MenuCtrl.lib: Library of routines for interactive with PM
  440.               menus
  441.             *MsgBox.lib: A wrapper library for the PM WinMessageBox()
  442.               function.  This file is #include'd in other CEnvi sample
  443.               files.
  444.             *MsgBoxes.cmd: Show various message box types using the
  445.               function in MsgBox.lib.
  446.             *NamePipe.lib: Library for OS/2 Named Pipes
  447.             *NoTitleB.cmd: Remove selected elements of a window title bar
  448.             *NumLock.cmd: Turn on NUMLOCK key once, or maintain NUMLOCK ON.
  449.               A shadow of NumLock.cmd can be put in startup folder to
  450.               default computer to NumLock ON. "NumLock 1000" will check
  451.               every second to make sure that NUMLOCK is still set.
  452.             *ObjSet.cmd: Alter WPS object and folder settings
  453.             *OneADay.cmd: Perform any command(s) no more than once per day
  454.             *OnTop.cmd: Float window to top of all other windows
  455.             *OptParms.lib: Library of routines for parsing the optional
  456.               parameters for executing a program. #included in other files
  457.             *OS2.bat: Perform OS/2 command from a DOS session, with the
  458.               option to "see" output of the command; mirrors DOS.CMD.  Note
  459.               that this requires CEnvi for DOS
  460.             *OS2Time.cmd: Show time according to computer's internal clock
  461.             *OS2Wait.bat: CEnvi for DOS tool to suspend DOS session for
  462.               specified interval
  463.             *Parents.cmd: Show hierarchical list of ancestor's process ID's
  464.               and names
  465.             *PathAdd.cmd: Add a directory to your PATH environment
  466.               variable.
  467.             *PathDel.cmd: Remove a directory from your PATH environment
  468.               variable
  469.             *PathStak.cmd: Multi-level save or restore of current drive and
  470.               directory so that you can change drives and directories and
  471.               still return to this one
  472.             *PMdll.lib: Example library of "wrapper" routines to function
  473.               in the PM DLL (Presentatiom Manager Dynamic Link Library).
  474.               This file is "#include"ed in many of the other example files.
  475.             *Print.cmm: Copy file to printer, treating printer as a file
  476.             *PrmptDay.cmd: Change command-line-prompt to display today's
  477.               date
  478.             *ProcList.cmd: Show list of all running processes; their names
  479.               and ID's
  480.             *Profile.lib: Function library for accessing Profiles; i.e.
  481.               .INI files
  482.             *Quote.cmd: Choose a text-mode "profound" quote at random
  483.             *QuotePM.cmd: Choose a PM-mode "profound" quote at random
  484.             *RndBckgr.cmd: Randomly select desktop background, at specified
  485.               interval, from a list of graphic file specifications
  486.             *RunTime.cmd: Rudimentary scheme for executing a command at a
  487.               certain time of day.
  488.             *ScanCode.lib: Retrieve keyboard scan codes for ascii
  489.               characters
  490.             *ServeOS2.com: DOS TSR to work with TextBoss.lib for complete
  491.               keyboard control of DOS sessions
  492.             *Session.cmd: Replace OS/2's START command for greater control
  493.               of starting sessions, including name, position, font,
  494.               notebook settings, etc...
  495.             *Sessions.cmd: batch file to demonstarte various uses of
  496.               Session.cmd
  497.             *ShutDown.cmd: Automated shutdown or reboot of OS/2 system
  498.             *SortLen.cmd: Sort any file based on line length
  499.             *Sound.cmd: Play a frequency for a given time period
  500.             *Switch.cmd: Switch foreground application to another process
  501.               base on process ID, full name, or partial name
  502.             *SysInfo.cmd: Display system configuration parameters
  503.             *TempFldr.cmd: Open folder temporarily, to automatically close
  504.               when it no longer has focus; good for menus
  505.             *Terminal.cmd: A VERY basic terminal program; demonstrates
  506.               COMM.LIB
  507.             *TextBoss.lib: Library of routines to interactively windowed
  508.               DOS or OS/2 applications: can work with ServeOS2.com
  509.             *TextEcho.cmd: Demonstrate TextBoss.lib by shadowing a DOS or
  510.               OS/2 box from an OS/2 box
  511.             *TextWin.cmd: GET/PUT text from/to a windowed DOS or OS/2
  512.               session
  513.             *Threads.cmd: Display list of all threads in all running
  514.               processes
  515.             *UnHang.cmm: Monitor your system to detect OS/2 "hangs", where
  516.               the workplace shell stops responding, then kill or otherwise
  517.               handle the application that is causing the problem
  518.             *ValidDir.cmd: Verify if a directory is valid
  519.             *Wait.cmd: Pause and do not return for specified number of
  520.               seconds
  521.             *Which.cmd: Find in PATH which command is executed
  522.             *WinList.cmd: Display list of all PM windows
  523.             *WinMsg.lib: Routines to send or post messages to PM windows
  524.             *WinSet.cmd: Set the position, size, state, etc... of a PM
  525.               Window
  526.             *WinSpawn.cmd: Pass simple commands to Windows session running
  527.               WinSpawn.cmm
  528.             *WinSpawn.cmm: Run in Windows session from CEnvi for Windows to
  529.               receive commands from WinSpawn.lib
  530.             *WinSpawn.lib: WinSpawn() function to send commands to Windows
  531.               session running CEnvi for Windows and WinSpawn.cmm
  532.             *WinTools.cmd: Demonstrate many of the capabilities of
  533.               WinTools.lib
  534.             *WinTools.lib: Library of routines for manipulating PM windows
  535.               by name or by handle
  536.             *WIN_Boss.lib: work with CEnvi for Windows' ServeOS2.cmm
  537.               program to all full control of Windows applications from an
  538.               OS/2 script
  539.             *WPFolder.cmd: Open a desktop folder for any specified
  540.               directory and optionally switch to that window
  541.  
  542. 1.5.5   Windows example files:
  543.  
  544.           The following CEnvi source programs can be run by associating the
  545.           .cmm file extension with CEnvi.exe.  This can be done by using
  546.           the File Manager: select one of these .cmm files then choose
  547.           File/Association and select the full path to CEnvi.exe.  After
  548.           this, you can run any of these exmple files simply by
  549.           double-clicking on it.
  550.             *AddItem.cmm: Add Group and Item to Program Manager
  551.             *AllSave.cmm: Select SAVE option on all windows
  552.             *Ascii.cmm: Display the ascii character table
  553.             *BarClock.cmm: Display current time in title of active window
  554.             *BattMem.cmm: Show values stored in a PC's battery-protected
  555.               memory
  556.             *BMP.lib: Routines for reading and displaying .BMP files
  557.             *BmpView.cmm: Demonstrate the BMP.LIB routines by reading any
  558.               number of .BMP files and displaying them
  559.             *BootEd1.cmm: Start NotePad to edit c:\AutoExec.bat and
  560.               C:\Config.sys using Windows DLL's.
  561.             *BootEd2.cmm: Start NotePad to edit c:\AutoExec.bat and
  562.               C:\Config.sys using CEnvi's spawn() function.
  563.             *BugHunt.cmm: Example for using the ClipBrd.lib routines.
  564.               Constantly scan clipboard for "bug" in clipboard text
  565.             *ClipBrd.lib: Library of routines for reading from or writing
  566.               to the Windows clipboard
  567.             *ClipSort.cmm: Sort text in-place within the clipboard
  568.             *CmmEdit.cmm: VERY simple text editor; developed step-by-step
  569.               in the tutorial chapter of the CEnvi User Manual.
  570.             *CmmGroup.cmm: Create a CEnvi Programs group in Presentation
  571.               Manager with all of the .CMM files in it
  572.             *Comm.lib: Simplified function interface into Windows' serial
  573.               communication routines
  574.             *DDE.lib: Library of common routines and definitions for
  575.               Dynamic Data Exchange (DDE)
  576.             *DDEcli.cmm: Sample DDE client; works with DDEsrv.cmm
  577.             *DDEcli.lib: Library of routines for a DDE client
  578.             *DDEdir.cmm: Show directory listing of all DDE servers
  579.             *DDEsrv.cmm: Sample DDE server; works with DDEcli.cmm
  580.             *DDEsrv.lib: Library of routines for a DDE server
  581.             *DelOld.cmm: Delete files older than specified age
  582.             *DirDiff.cmm: Compare two directory listings for differences
  583.             *DlgCtrl.lib: Library of routines for interactive with Windows
  584.               dialog boxes and other windows with sub-window
  585.             *DosTime.cmm: Show time according to computer's internal clock
  586.             *DOS_BOSS.LIB: Functions for sending keystrokes to and reading
  587.               data from DOS sessions
  588.             *DOS_ECHO.CMM: Demonstrate DOS_BOSS.LIB by echoing text to/from
  589.               DOS session
  590.             *DOS_LOOK.CMM: Use DOS_BOSS.LIB to look at contents of a DOS
  591.               window
  592.             *Dropper.cmm: Perform command for all files Drag-&-Dropped to
  593.               this tool
  594.             *ExamineW.cmd: Display lots of data about any active window and
  595.               its sub-windows
  596.             *ExitWin.cmm: Exit Windows; options to save files, force
  597.               applications to quit, restart Windows, and reboot computer
  598.             *Fibonacc.cmm: Two methods for generating the Fibonacci
  599.               sequence
  600.             *FranTick.cmm: Animated tick who drank too much coffee
  601.             *FullScrn.cmm: Run any command started in maximized window
  602.             *GDI.cmm: Demonstrate some of Windows' graphics functions from
  603.               GDI.lib
  604.             *GDI.lib: Library of a few of Windows' graphics routines
  605.             *GloblMem.lib: Functions to work with Windows' global memory
  606.               resources
  607.             *Hello.cmm: My first Cmm program. Used to begin the Cmm
  608.               tutorial.
  609.             *HexDump.cmm: Display hexadecimal dump of a file
  610.             *Icon.lib: Functions for setting minimized icon
  611.             *IconMany.cmm: Show all of the icons in Program Manager
  612.             *Icons.cmm: Minimize all windows.  Demonstrate PostMessage()
  613.               from Message.lib.
  614.             *IdleTime.cmm: "ScreenSaver" - Show clock if computer is idle
  615.             *InputBox.cmm: Demonstrate uses of the InputBox() routine in
  616.               InputBox.lib
  617.             *InputBox.lib: InputBox() function to allow for a dialog-like
  618.               box for user input
  619.             *Install.cmm: Install this version of CEnvi.
  620.             *KeyCode.cmm: Display keycodes returned by getch().
  621.             *KeyGhost.cmm: Demonstrate how to use KeyPush.lib to control
  622.               other applications.
  623.             *KeyPush.lib: Library of routines created for passing
  624.               keystrokes to a window with the current focus.
  625.             *KillDOS.cmm: Force DOS window to close
  626.             *MenuCtrl.lib: Library of routines for interactive with menus
  627.             *MenuNot.cmm: Disable or delete a menu item
  628.             *Message.lib: Wrapper for Windows' PostMessage() and
  629.               SendMessage() function to send commands to windows.
  630.             *MsgBox.lib: A wrapper library for Windows' MessageBox()
  631.               function.  This file is #include'd in other CEnvi sample
  632.               files.
  633.             *MsgBoxes.cmm: Show various message box types using the
  634.               function in MsgBox.lib.
  635.             *MyCal.cmm: Start/menu/position calendar
  636.             *NumLock.cmm: Set the NUMLOCK key ON
  637.             *OneProg.cmm: Run one and only one program until it exits
  638.             *OnTop.cmm: Float window to top of all other windows
  639.             *OpenCmm.cmm: Use Windows' common dialog (via PickFile.lib) to
  640.               select a *.cmm file to edit.
  641.             *OptParms.lib: Library of routines for parsing the optional
  642.               parameters for executing a program. #included in other files
  643.             *OS2Sessn.cmm: Execute sessions from Windows under OS/2
  644.             *PGroups.cmm: list all of the groups and items Program Manager;
  645.               uses ProgMan.lig
  646.             *PickFile.lib: A simple interface to the GetOpenFileName()
  647.               function in the Windows Common Dialog DLL.  This library file
  648.               is #include'd in some of the other CEnvi sample files.
  649.             *PMButt.cmm: Replace Program Manager with a tiny button in
  650.               upper-left corner for access to all PM items
  651.             *PMCorner.cmm: Minimize Program Manager and then move its icon
  652.               to the lower-right corner of the screen.
  653.             *PongTime.cmm: Bounce the Windows clock mini-app around
  654.             *Print.cmm: Copy file to printer, treating printer as a file
  655.             *Profile.lib: Function library for accessing Profiles; i.e.
  656.               .INI files
  657.             *ProgMan.lib: Library of routines using DDE to communication
  658.               with Program Manager
  659.             *Quote.cmm: Choose a "profound" quote at random
  660.             *RebootNT.cmm: Reboot from Windows NT
  661.             *RndWalls.cmm: Random wallpaper selection at timed intervals
  662.             *RunAgain.cmm: Repeatedly run command at specified interval
  663.             *RunTime.cmm: Schedule a command to execute at a specified hour
  664.               and minute.
  665.             *SafeFMan.cmm: File Manager with dangerous menu options removed
  666.             *SaveScrn.cmm: Start screen saver now
  667.             *ServeOS2.cmm: Work with CEnvi for OS/2 and WIN_BOSS.LIB to
  668.               control Windows sessions from OS/2
  669.             *ServeWIN.com: DOS TSR to work with DOS_BOSS.LIB for complete
  670.               keyboard control of DOS sessions
  671.             *TaskButt: Task Manager replacement; 1-click access to tasks
  672.             *Terminal.cmm: A simple terminal program; demonstrate some of
  673.               the functions in COMM.lib
  674.             *WhoRYou.cmm: Design and implement a dialog box using CEnvi's
  675.               MakeWindow() and DoWindows() functions
  676.             *WinBeep.cmm: Call Windows' MessageBeep() function.
  677.             *Window.lib: A few functions and many defined values useful for
  678.               CEnvi's MakeWindow(), BreakWindow(), and DoWindows()
  679.               functions
  680.             *WinExec.lib: A wrapper library for Windows' WinExec()
  681.               function.  This file is #include'd in other CEnvi sample
  682.               files.
  683.             *WinExecs.cmm: Demonstration of Windows' WinExec() function
  684.               using the wrapper from WinExec.lib.
  685.             *WinList.cmm: Show a list of all Windows, their handles, and
  686.               their children.
  687.             *WinMsg.cmm: Demonstrate how to make a window, and show all the
  688.               messages that go to that window
  689.             *WinRun.bat: Run Windows commands from DOS session; client to
  690.               work with WinRun.cmm
  691.             *WinRun.cmm: Run Windows commands from DOS session; server for
  692.               WinRun.bat
  693.             *WinShell.bat: Start windows with a specific shell.  Run
  694.               Windows for a single program.  This use CENVI.EXE for DOS.
  695.             *WinTools.cmm: Demonstrate many of the capabilities of
  696.               WinTools.lib
  697.             *WinTools.lib: Library of routines for directly manipulating
  698.               windows by name or by handle
  699.             *WinUtil.lib: A small selection of utilities that may be
  700.               #include'd in CEnvi code to get simple access to Windows DLL
  701.               functions.
  702.  
  703. 1.6.  CEnvi - A Cmm Interpreter
  704.  
  705.           This section describes the CEnvi program, and describes the
  706.           various methods for use CEnvi.exe to execute Cmm programs.
  707.  
  708. 1.6.1   What is CEnvi?
  709.  
  710.           CEnvi is the first application to implement the Cmm programming
  711.           language.  CEnvi is a Command-line version of a Cmm interpreter,
  712.           and it can use Environment variables as if they were global Cmm
  713.           variables.  CEnvi contains a reasonable facsimile of the standard
  714.           C library, and can link at runtime to external Cmm libraries.
  715.  
  716.           The "Envi" and the "C" in CEnvi reflects the envy that computer
  717.           professionals often feel when they are working on a computer that
  718.           does not have a complete C programming environment.  "Envi" also
  719.           refers to the environment variables that CEnvi attempts to work
  720.           with as if they were regular Cmm variables.
  721.  
  722.           Like all implementations for Cmm, CEnvi is portable between
  723.           operating systems.  It is currently testing under DOS, OS/2, and
  724.           Windows, and other OS ports are in the works. NT and Presentation
  725.           manager are currently available in beta form.
  726.  
  727. 1.6.2   Environment Variables
  728.  
  729.           Variables in all UPPERCASE letters are taken from the environment
  730.           variables.  Environment variables are treated like other
  731.           variables except that they don't need quotes around them to
  732.           default to being strings if they don't match another type.
  733.  
  734.           In the source code, the only difference between a variable and an
  735.           environment variable is that environment variables are all
  736.           UPPER_CASE letters.  When an environment variable is first used,
  737.           it is read from the environment block and some assumptions are
  738.           made about what kind of variable it is; this can lead to problems.
  739.           When I=666 is interpreted as the number 666 when really it maybe
  740.           should have been the string "666".  Before the program exits, all
  741.           environment variables used by the code are then written to the
  742.           environment block.
  743.  
  744.           In some implementations (CEnvi for DOS, for example) the
  745.           environment variables remain changed even after the Cmm
  746.           interpreter exits.  In other cases, special kludges must be added
  747.           to alter a parent process' environment variables (see ESet() for
  748.           OS/2).
  749.  
  750. 1.6.3   Special Environment Variables
  751.  
  752.           These environment variables affect where CEnvi looks for source
  753.           files:
  754.             *CMMPATH: This environment will be checked for directories to
  755.               search for include files if the include file is not in the
  756.               current directory.  For Windows, this value may come from the
  757.               CMMPATH profile value in WIN.INI (in the [CEnvi] section).
  758.             *PATH: Batch-file source files (see below) will be searched in
  759.               these directories if not found in the current directory.
  760.             *CENVI_ESET: In those environment for which CEnvi cannot
  761.               covertly alter the environment variables of the command
  762.               interpreter (e.g., OS/2), this environment variable specifies
  763.               a file name.  CEnvi will write the strings necessary for the
  764.               command interpreter to set environment variables as altered
  765.               by your Cmm code.  See the description of ESet() for more
  766.               information about this command.
  767.  
  768. 1.6.4   Executing Code as command-line Input Parameters
  769.  
  770.           If a Cmm program is very short, then it can be executed wholly
  771.           from the command line.  For example, here is the famous hello
  772.           world program executed from the cli prompt:
  773.               CEnvid main() { printf("Hello world!"); }
  774.           which can be written more conisely under Cmm rules as:
  775.               CEnvid printf("Hello world!")
  776.  
  777.           You may have to keep in mind bahavior of the cli when inputting
  778.           code.  It is sometimes necessary to put quotes around code to
  779.           keep symbols from being interpreted by the cli, as in this
  780.           example:
  781.               CEnvid "for(i=0;i<10;i++) printf("%d\n",i)"
  782.           where the quotes are necessary to prevent the cli from
  783.           interpreting the "<" as file redirection.
  784.  
  785.           Also, in batch files (DOS, OS/2) you need to remember that "%"
  786.           has special meaning for the batch file processor, so the
  787.           above line in a batch would have to be written as:
  788.               CEnvid "for(i=0;i<10;i++) printf("%%d\n",i)"
  789.  
  790. 1.6.5   Executing *.CMM Source File Code
  791.  
  792.           A file with the extension ".CMM", if the file name is given as
  793.           the first parameter to CEnvi.exe, is considered by CEnvi to be
  794.           pure CMM source code.  This file with the .CMM extension is
  795.           expected to be a plain Cmm source file, just as a C compiler
  796.           expects a file with the .C extension to be C source code.  CEnvi
  797.           will check the current directory for the .CMM file, and then
  798.           check directories in the PATH environment variable.  Any
  799.           arguments passed to CEnvi.exe after the .CMM source name are
  800.           given to the main(argc,argv) function in the source, if there is
  801.           one.  So the hellow.cmm program can look identical to the
  802.           hellow.c program, and when you run CEnvi.exe hellow.cmm you get
  803.           the same output.  If you run
  804.               CEnvi.exe FOO.CMM One Two Three
  805.           the main function in FOO.CMM would get argc=4 and
  806.           argv[0]="FOO.CMM" and argv[3]="THREE".
  807.  
  808.           This means that if you were to have an executable FOO.EXE
  809.           that is similar to FOO.CMM, then "FOO.EXE" is interchangeable
  810.           with "CENVI FOO.CMM", i.e.,
  811.               FOO.EXE arg1 arg2 arg3
  812.           is the same as:
  813.               CENVI FOO.CMM arg1 arg2 arg3
  814.  
  815.           In OS/2 or Windows or other environments where file extensions
  816.           can be associated with programs, you may want to associate the
  817.           .CMM extension with CEnvi.exe, so that double-clicking on
  818.           HELLOW.CMM will act identically to double-clicking on the
  819.           compiled-and-linked HELLOW.EXE. In any of the CEnvi shells,
  820.           CEnvi scripts can be launched from the command line by simply
  821.           typing in their name.
  822.  
  823. 1.6.6   Running CEnvi from a Batch-File
  824.  
  825.           The most convenient method for executing Cmm source code from the
  826.           DOS or OS/2 command line is to use a batch file. If the first
  827.           argument to CEnvi is the name of a batch file, then CEnvi reads
  828.           that batch file and accepts as source all the code between the
  829.           lines "GOTO CENVI_EXIT" and ":CENVI_EXIT", and passes the command
  830.           line arguments to main(argc,argv).  This is very similar to
  831.           executing:
  832.               CEnvi.exe #include'foo,bat,,GOTO CENVI_EXIT,:CENVI_EXIT'
  833.           except that the '#include' statement is handled automatically by
  834.           CEnvi, and the rest of the command-line arguments are passed to
  835.           main().
  836.  
  837.           Note that ".bat" is the DOS version of the batch file name
  838.           extension.  This name is different for different operating
  839.           systems.
  840.  
  841.           In this way, a batch file can be run exactly like a .EXE file,
  842.           and the command arguments are passed to main in the same way.  If
  843.           the full path of the batch file is not supplied, then CENvi will
  844.           look in the current directory and then in directories in the
  845.           PATH.
  846.  
  847.           Here is an example of an OS/2 batch file that expects any number
  848.           (up to 9) of integers and sets the SUM environment variable to
  849.           the values added together.  (It calls CEnviSet instead of CEnvi
  850.           directly in order to set the environment variable.)
  851.  
  852.               @echo off
  853.               REM *********************************************************
  854.               REM *** SUM.CMD - Use CEnvi to sum lots of numbers together,*
  855.               REM ***           setting the SUM environment variable to   *
  856.               REM ***           the result of adding all the numbers.     *
  857.               REM *********************************************************
  858.               call CEnviSet %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
  859.               GOTO CENVI_EXIT
  860.  
  861.               main(argc,argv)
  862.               {
  863.                 SUM = 0;
  864.                 for ( i = 1; i < argc; i++ )
  865.                 SUM += atoi(argv[i])
  866.               }
  867.  
  868.               :CENVI_EXIT
  869.  
  870. 1.6.7   EXTPROC: *.CMD Source file (For OS/2)
  871.  
  872.           Under the OS/2 command processor, you can define an external
  873.           processor to process a batch (*.cmd) file if the first statement
  874.           is EXTPROC.  EXTPROC is followed by the name of the processor,
  875.           which in this case will be "CEnvi".  This is an example file,
  876.           ARGS.CMD, of a program to display all input parameters:
  877.  
  878.               EXTPROC CEnvi
  879.  
  880.               main(argc,argv)
  881.               {
  882.                 for ( i = 0; i < argc; i++ )
  883.                 printf("Input argument %d = \%s\n",i,argv[i]);
  884.               }
  885.  
  886. 1.6.8   Running CEnvi from a REXX-File (For OS/2)
  887.  
  888.           Similar to the running CEnvi from a Batch-File described above, 
  889.           if the first argument to CEnvi is the name of a REXX source file,
  890.           then CEnvi automatically executes the code between 
  891.           "SIGNAL CENVI_EXIT" and "CENVI_EXIT:".  This example Rexx file for
  892.           OS/2 behaves the same as the previous batch program example
  893.           (CEnviSet.cmd is an OS/2 batch file that helps run Cmm files if
  894.           environment variables need to be altered--see ESet in the OS2Lib
  895.           appendix):
  896.  
  897.               /***********************************************************
  898.                *** SUM.CMD - Use CEnvi to sum lots of numbers together,***
  899.                ***           setting the SUM environment variable to   ***
  900.                ***           the result of adding all the numbers.     ***
  901.                ***********************************************************/
  902.               'call CEnviSet %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9'
  903.               SIGNAL CENVI_EXIT
  904.  
  905.               main(argc,argv)
  906.               {
  907.                 SUM = 0;
  908.                 for ( i = 1; i < argc; i++ )
  909.                 SUM += atoi(argv[i])
  910.               }
  911.  
  912.               CENVI_EXIT:
  913.  
  914. 1.6.9   CMM File Association and Drag-and-Drop (OS/2)
  915.  
  916.           You can associate CEnvi.exe with .cmm files through the settings
  917.           notebook of CEnvi.exe.  This lets you executed any CEnvi *.cmm
  918.           file simply by double-clicking its icon in the desktop.
  919.  
  920.           A Cmm program can be set up as a Workplace Shell program that
  921.           accepts drag and drop.  To do this, drag a program template out
  922.           of the templates folder and place it on the desktop where you
  923.           want your Cmm program to run from.  In program settings for this
  924.           program object set the program name to the path and file
  925.           specification for CEnvi.exe (e.g., "C:\CMM\CEnvi.exe").  Set
  926.           Parameters to the full source and file name of the Cmm file
  927.           (e.g., "C:\CMM\CZIP.cmm").  Then rename the program object to
  928.           whatever you want (e.g., "CZIP").  Then whenever you drag a file
  929.           onto that object then the filename will be the second argument to
  930.           main().
  931.  
  932. 1.6.10  CMM File Association and Drag-and-Drop (Windows)
  933.  
  934.           You can associate Cmm files with CEnvi.exe by using the File
  935.           Manager: select a .cmm file then choose File/Association and
  936.           select the full path to CEnvi.exe.  After this, you can run any
  937.           of *.cmm program simply by double-clicking on it.
  938.  
  939. 1.6.11  /BIND= Create Stand-Alone Cmm Executables
  940.  
  941.           The CEnvi /BIND option allows you to create stand-alone,
  942.           royalty-free executables from your Cmm code.  The result of /BIND
  943.           is a binary executable file that operates the same as if CEnvi
  944.           were invoked as an interpreter, except that CEnvi.exe is not
  945.           needed to execute the bound file, because CEnvi.exe and your Cmm
  946.           code are bound together in the created executable.
  947.  
  948.           The following example creates an executable named HELLOW.EXE that
  949.           would print "Hello world!".
  950.               CEnvi /BIND=HELLOW printf("Hello world!");
  951.  
  952.           As another example, you could create a stand-alone editor, which
  953.           we'll call CMMEDIT.EXE, from the result of the CEnvi tutorial
  954.           with the following command:
  955.  
  956.               CEnvi /BIND=CMMEDIT.EXE CMMEDIT.CMM
  957.  
  958.           Now running "CMMEDIT.EXE C:\AUTOEXEC.BAT" from the command line
  959.           would be identical to executing "CENVI.EXE CMMEDIT.CMM
  960.           C:\AUTOEXEC.BAT".
  961.  
  962. 1.6.12  /BIND for OS/2 and CEnvi2PM.EXE
  963.  
  964.           When you /BIND Cmm source code that contains calls to
  965.           PMDynamicLink(), or other PMxxx() calls that invoke CEnvi2PM.exe,
  966.           the resulting executable will still require CEnvi2PM.exe.  So
  967.           users running the bound executable will still need CEnvi2PM.exe
  968.           in a directory of their search path.  CEnvi2PM.exe may be
  969.           distributed royalty-free.
  970.  
  971. 1.6.13  /BIND for Windows
  972.  
  973.           The simplest method for using /BIND in Windows is to execute
  974.           CEnvi.exe, and then to enter the /BIND statement and Cmm source
  975.           name from the CEnvi command prompt.  For example, to turn
  976.           WhoRYou.cmm into the stand-alone WhoRYou.exe, you would execute
  977.           CEnvi.exe and then enter the following at the CEnvi "Code:"
  978.           prompt:
  979.  
  980.               Code: /BIND=WhoRYou WhoRYou.cmm
  981.  
  982. ----------------------------- FILE LIST -----------------------------------
  983.  
  984. The CEnvi Unregistered Shareware package includes all the files
  985. in the following lists.  You are not permitted to upload or otherwise transfer
  986. copies of any unregistered version of CEnvi that do not include all of the
  987. files in these lists. If you want to upload a CEnvi sharware version to a
  988. BBS, you may consider calling the Nombas BBS to download the latest shareware
  989. zip files.
  990.  
  991. --------------- CENVIW.zip Contains the following files -------------------
  992.  
  993. CENVIW.EXE:   CEnvi shareware executable for Windows
  994. SERVEWIN.COM: Allows CEnvi for Windows to control DOS Boxes
  995. CENVI.DOC:    CEnvi Shareware Manual, Chapter 1: CEnvi Unregistered Shareware
  996. CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial
  997. CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C
  998.               Programmers
  999. CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library
  1000. LICENSE.DOC:  CEnvi Unregistered Shareware License Agreement
  1001. README.DOC:   Introductory file. Read this first for quick intallation.
  1002. REGISTER.DOC: CEnvi registration form
  1003. INSTALL.CMM:  Cmm source file for installing this shareware version
  1004.  
  1005. *.CMM, *.CMD, *.BAT, *.LIB: Many sample programs using CEnvi for Windows.
  1006.   See CENVI.DOC for a complete list.
  1007.  
  1008. ----------------- CENVID.zip Contains the following files -----------------
  1009.  
  1010. CENVID.EXE:   CEnvi shareware executable for DOS
  1011. CENVID32.EXE: CEnvi shareware 32 Bit executable for DOS
  1012. CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial
  1013. CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C
  1014.               Programmers
  1015. CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library
  1016. LICENSE.DOC:  CEnvi Unregistered Shareware License Agreement
  1017. README.DOC:   Introductory file. Read this first for quick intallation.
  1018. REGISTER.DOC: CEnvi registration form
  1019. INSTALL.CMM:  Cmm source file for installing this shareware version
  1020.  
  1021. *.CMM, *.CMD, *.BAT, *.LIB: Many sample programs using CEnvi for DOS.
  1022.   See CENVI.DOC for a complete list.
  1023.  
  1024.  
  1025. ------------------CENVI2.zip Contains the following files -----------------
  1026.  
  1027. CENVI2.EXE:   CEnvi shareware executable for OS/2
  1028. CENVI2PM.EXE: Gateway program, executed transparently by CEnvi, for access
  1029.               to PM-dependent system calls (OS/2 version only).
  1030. CENVI.DOC:    CEnvi Shareware Manual, Chapter 1: CEnvi Unregistered Shareware
  1031. CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial
  1032. CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C
  1033.               Programmers
  1034. CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library
  1035. LICENSE.DOC:  CEnvi Unregistered Shareware License Agreement
  1036. README.DOC:   Introductory file. Read this first for quick intallation.
  1037. REGISTER.DOC: CEnvi registration form
  1038. INSTALL.CMM:  Cmm source file for installing this shareware version
  1039.  
  1040. *.CMM, *.CMD, *.BAT, *.LIB: Many sample programs using CEnvi for OS/2.
  1041.   See CENVI.DOC for a complete list.
  1042.  
  1043. -------------------------- REGISTRATION --------------------------------
  1044.  
  1045. This is a shareware release  Please register.  As a registered CEnvi user
  1046. you will receive the following benefits:
  1047.  
  1048. *The latest version of CEnvi for all supported platforms (currently DOS,
  1049.   OS/2, Windows, and NT).
  1050.   
  1051. *The CEnvi user's manual--about 200 pages, including a description of the
  1052.   Cmm programming language and a tutorial for those who have never programmed,
  1053.   and descriptions and examples of the over 150 functions included in the
  1054.   CEnvi library).
  1055.   
  1056. */BIND option for creating standalone executables from Cmm scripts for you
  1057.   own personal use.
  1058.   
  1059. *Ssupport from Nombas and CEnvi/Cmm users through CompuServe
  1060.   (72212,1622), internet (nombas@nobmas.com), the cenvi-cmm e-mail mailing
  1061.   list (cenvi-cmm@world.std.com), phone (617-391-6595), the Nombas BBS
  1062.   (617-391-3718), or Compuserve in PCUTIL forum 3.
  1063.   
  1064. *Access to the growing list of CEnvi utilities and libraries (some of which
  1065.   are included in this unregistered shareware package, and others are
  1066.   contributed by Nombas and CEnvi/Cmm users to the electronic locations
  1067.   described above). Available on the Nombas BBS, from internet via
  1068.   anonymous ftp at ftp.std.com in the /vendors/CEnvi-Cmm directory, or in
  1069.   CompuServe in PCUTIL library 3 (search on CEnvi, Cmm, CENV, & CNV).
  1070.  
  1071. There are four ways to register CEnvi version 2.11:
  1072.  
  1073. ************************************************************************
  1074. ****** REGISTRATION METHOD 1: CENVI MAIL-IN/FAX REGISTRATION FORM ******
  1075. ************************************************************************
  1076. Please fill out and mail in or fax this form, along with payment.
  1077.  
  1078. Name: _________________________________________________________________
  1079.  
  1080. Company: ______________________________ Position: _____________________
  1081.  
  1082. Address: ______________________________________________________________
  1083.  
  1084. _______________________________________________________________________
  1085.  
  1086. ______________________________________________________________________
  1087.  
  1088. Country: _________________________   (add ZIP code if applicable)
  1089.  
  1090. Phone: ___________________________  EMail: ______________________________
  1091.  
  1092.  
  1093. CEnvi Single-user License & Manual .. Quantity _____ x $69.00 = $ _________
  1094. License fee for additional CEnvi users at your
  1095. organization (does not include additional manual
  1096. or diskettes)... Additional simultaneous users _____ x $39.00 = $ _________
  1097. 10-User License .. 2 media & manual.. Quantity ____ x $299.00 = $ _________
  1098. 50-User License .. 2 media & manual.. Quantity ____ x $899.00 = $ _________
  1099.  
  1100. Additional CEnvi Manuals ............ Quantity _____ x $15.00 = $ _________
  1101. Shipping outside USA, Canada, or Mexico  $4.00 ................ $ _________
  1102.                                                        Subtotal $ _________
  1103. Massachusetts residents please add 5% sales tax ............... $ _________
  1104. Check handling fee IF CHECK NOT DRAWN ON A U.S. BANK . $30.00 = $ _________
  1105.  
  1106.                                                           Total $ _________
  1107.  
  1108. Include a check or money order for this total, IN U.S. FUNDS AND DRAWN ON A
  1109. U.S. BANK (if not drawn on U.S. bank then add the $30 handling fee),
  1110. payable to Nombas, or supply the following credit card payment information.
  1111.  
  1112. Credit card orders (circle one): MasterCard / Visa / American Express
  1113.  
  1114.     Card Number _____________________________________  Expires ____________
  1115.  
  1116.     Exact name on card (print) ____________________________________________
  1117.  
  1118.     Signature (REQUIRED) __________________________________________________
  1119.  
  1120. Mail this form, along with payment or credit information, to:
  1121.                Nombas
  1122.                64 Salem St.
  1123.                MEDFORD MA 02155   USA
  1124. or fax to:
  1125.                Nombas
  1126.                (617) 391-3842
  1127.  
  1128.  
  1129. ***************************************************************************
  1130. ******** REGISTRATION METHOD 2: COMPUSERVE ELECTRONIC REGISTRATION ********
  1131. ***************************************************************************
  1132. CompuServe members may register directly through the CompuServe
  1133. Registration Service.  To use this service enter GO SWREG at your CI$
  1134. prompt.  Registration ID is 1354 for CEnvi for DOS, 1355 for CEnvi for
  1135. OS/2, and 1356 for CEnvi for Windows (you only need to register ONE
  1136. version).  Nombas will immediately be informed of your registration, and
  1137. the CEnvi registration fee will automatically be added to your CompuServe
  1138. bill.
  1139.  
  1140.  
  1141. ***************************************************************************
  1142. ************ REGISTRATION METHOD 3: Public (software) Library *************
  1143. ***************************************************************************
  1144. CREDIT CARD ORDERS ONLY -
  1145.  
  1146. You can order with MC, Visa, Amex, or Discover from Public (software)
  1147. Library by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398
  1148. or by CIS EMail to 71355,470. You can also mail credit card orders to PsL
  1149. at P.O.Box 35705, Houston, TX 77235-5705.
  1150.  
  1151. THE ABOVE NUMBERS ARE FOR ORDERS ONLY.
  1152.  
  1153. Any questions about the status of the shipment of the order, refunds,
  1154. registration options, product details, technical support, volume discounts,
  1155. dealer pricing, site licenses, etc., must be directed to Nombas (see phone
  1156. number and addresses below).
  1157.  
  1158. To insure that you get the latest version, PsL will notify Nombas the day
  1159. of your order and we will ship the product directly to you.
  1160.  
  1161. CEnvi (all versions) is PsL product #11069.
  1162.  
  1163.  
  1164. ***************************************************************************
  1165. ************** REGISTRATION METHOD 4: KDL (Germany) Library ***************
  1166. ***************************************************************************
  1167.  
  1168. Registration and instructions may be found through KDL-Registration Service
  1169. in Germany:
  1170.  
  1171. fax number:
  1172.     * for German customers only:    089-895626-99
  1173.     * for international customers: ++49-895626-99
  1174.  
  1175. phone number: 
  1176.     * for German customers only:    089-895626-50
  1177.     * international customers:    ++49-89-895626-50
  1178.  
  1179. Normally we do not take any orders by phone, but this number can be used to
  1180. request our registration form and our general registration rules.
  1181.  
  1182. Email-adresses:
  1183.     * INTERNET:100347.2627@compuserve.com
  1184.     * INTERNET:regservice@kellydata.de
  1185.  
  1186. The second number is available in March 1996, but should be used from that time
  1187. on.
  1188.     
  1189. Mail.adress:    KDL-Registrierungsservice
  1190.         Norbert M. Burkhard
  1191.         Lena-Christ-Str.: 50
  1192.         82152 Martinsried  / Munich
  1193.         Germany
  1194.  
  1195. ***************************************************************************
  1196. Thank you for trying this shareware copy of CEnvi.  Mail inquires and other
  1197. correspondences to:
  1198.      Nombas
  1199.      64 Salem Street
  1200.      Medford, MA  02155   USA
  1201.  
  1202. Nombas may also be contacted at:
  1203.      Phone:      (617)391-6595
  1204.      Internet:   nombas@nombas.com
  1205.      WEB:        http://www/nombas.com
  1206.      CompuServe: 72212,1622
  1207.      BBS:        (617)391-3718
  1208.      Fax:        (617)391-3842
  1209.