home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / OS2UTIL.ZIP / README.1ST < prev    next >
Text File  |  1990-05-21  |  14KB  |  447 lines

  1.      README.1ST    May 21, 1990             Page 1
  2.  
  3.  
  4.      ╔═══════════════════════════════════════════════════════╗
  5.      ║                    OS/2 UTILITIES                     ║
  6.      ║               Version 2.0                 ║
  7.      ║                                                       ║
  8.      ║    This product is not public domain. It is           ║
  9.      ║    distributed under a Share Wear License. You        ║
  10.      ║    are encouraged to distribute this software in      ║
  11.      ║    entirety, but this software may not be             ║
  12.      ║    distributed except in its original form            ║
  13.      ║    accompanied with this message. Violation of this   ║
  14.      ║    agreement could result in criminal prosecution     ║
  15.      ║    as well as civil liability If you like this        ║
  16.      ║    software and find it to be of value, a nominal     ║
  17.      ║    contribution of $5 is appreciated. For $20,        ║
  18.      ║    users will be supported and informed of updates.   ║
  19.      ║    For $25 users will be informed of changes in the   ║
  20.      ║    source code and the code will be made available    ║
  21.      ║    to them. These utilities are different than some   ║
  22.      ║    in that most of the source code is provided.       ║
  23.      ║    Providing the source code insures the user of      ║
  24.      ║    virus and bacterium free code. Your financial      ║
  25.      ║    support of this package will insure continued      ║
  26.      ║    updates and improvements of this code as well      ║
  27.      ║    as development of other packages that contain      ║
  28.      ║    full source code in the future. Again, you are     ║
  29.      ║    encouraged to distribute these utilities.          ║
  30.      ║                                                       ║
  31.      ║    All of the programs included (and source code)     ║
  32.      ║    were developed on a Compaq 386/20 using the        ║
  33.      ║    Microsoft C compiler version 5.1 with OS/2         ║
  34.      ║    v1.0 and 1.1 .                                     ║
  35.      ║                                                       ║
  36.      ║    All of these programs will run with the            ║
  37.      ║    presentation  manager.                             ║
  38.      ║                                                       ║
  39.      ║    I hope you find these utilities useful and         ║
  40.      ║    informative.                                       ║
  41.      ║                                                       ║
  42.      ║      Copyright (c) 1990 Marcusfilm Limited          ║
  43.      ║                                                       ║
  44.      ║    Mark Graham                                        ║
  45.      ║    Marcusfilm Limited                                 ║
  46.      ║    1476 Drake Avenue                                  ║
  47.      ║    Burlingame, CA 94010-4704                          ║
  48.      ╚═══════════════════════════════════════════════════════╝
  49.  
  50. README.1ST    May 21, 1990                Page 2
  51.  
  52.  
  53. These utilities are for use with OS/2. Some of them may work in DOS if you
  54. BIND them using the bind program. Where problems arise in binding, they will
  55. be noted.
  56.  
  57. Summary:
  58.  
  59. Program    Function
  60.  
  61. AC.EXE       Area Code Finder. Gives area codes for states, or specific
  62.        state location for area code. Covers all of North America.
  63.        (source code: AC.C)
  64.  
  65. CAT.EXE    Unix lookalike concatenate function (source code: CAT.C)
  66.  
  67. DU.EXE       Returns size of directory for all directories on specified
  68.        drive (source code: DU.C)
  69.  
  70. HEX.EXE    Converts hexadecimal integers to decimal integers (source
  71.        code: HEX.C)
  72.  
  73. LF.EXE     Locate file: finds location on all files on drive matching the file
  74.        specification (source code: LF.C)
  75.  
  76. MB.EXE       Returns remain RAM available in bytes and megabytes (source code:
  77.        MB.C)
  78.  
  79. MES.EXE    Leaves a block message on the screen. The more lines per screen you
  80.            computer is set up to handle, the longer message you can leave.
  81.        (source code: MES.C)
  82.  
  83. NO.EXE     Exception handler. Based on popular DOS program.
  84.        (source code: NO.C)
  85.  
  86. RMD.EXE    Remove directory and all subdirectories beneath the specified one.
  87.        This one actually works (source code: RMD.C). If you bind this
  88.        program, in DOS, the directory cannot have any subdirectories.
  89.        This program was formally named DD.EXE, it was renamed RMD.EXE
  90.        to avoid accidentally confusion with the DOS command CD .
  91.  
  92. RN.EXE       Rename directory. (Can also be used to rename file.) (source code:
  93.            RN.C)
  94.  
  95. SC.EXE     Screen color. Sets screen color. You may need to install the
  96.            ANSI driver: ANSI.EXE . (source code: SC.C)
  97.  
  98. SIZE.EXE   Gives actual files size, diskette file size and hard drive file
  99.            size of file spec. Very useful for determining how much space
  100.            taken up in a directory. (source code: SIZE.C)
  101.  
  102. README.1ST    May 21, 1990                Page 3
  103.  
  104. SM.EXE       Set mode to either 25, 43, or 50 lines per screen (depending on
  105.            your video card) (source code: SM.C)
  106.  
  107. WFRE.EXE   Gives total disk space, space available, space used and
  108.            percent in a wide format (source file: WFRE.C)
  109.  
  110. OS2ASY.C   Asynch Utilities for OS/2. These utilities need to be compiled
  111. OS2ASY.H   under the module (small, medium, large) that you are using
  112.        in a specific program.
  113.  
  114.        Example: cc /AS /c os2asy.c        for small
  115.             cc /AM /c os2asy.c        for medium
  116.             cc /AL /c os2asy.c        for large
  117.  
  118.        Then you need to link the resulting .obj file with your prog,
  119.        so it can call the asynch routines.
  120.  
  121.        Example: link your_prog+os2asy;
  122.  
  123.        Fourteen (14) routines are included:
  124.        port_open,
  125.        port_close,
  126.        port_close_all,
  127.        send_line,
  128.        send_asy,
  129.        asy_chr,
  130.        asyget,
  131.        asy_stream,
  132.        inqsize,
  133.        asy_get,
  134.        fasy_get,
  135.        rdch,
  136.        flushib,
  137.        flushob
  138.  
  139.  
  140. README.1ST    May 21, 1990                Page 4
  141.  
  142. Description:
  143.  
  144. AC.EXE       Area Code Finder
  145.  
  146.        format: ac xxx [xxx [xxx ... ] ]
  147.        where xxx is either an area code or a state.
  148.  
  149.        example:
  150.         ac 415
  151.  
  152.         CA  California area code.
  153.             415 San Francisco.
  154.  
  155.         ac CA
  156.  
  157.         CA  California area codes.
  158.             209 Fresno.
  159.             213 Los Angeles.
  160.             408 San Jose.
  161.             415 San Francisco.
  162.             510 Oakland.
  163.             619 San Diego.
  164.             707 Santa Rose.
  165.             714 Orange.
  166.             805 Bakersfield.
  167.             818 Pasedena.
  168.             916 Sacramento.
  169.  
  170.        To get a list of all area codes, enter: ac *
  171.  
  172. CAT.EXE    Unix lookalike concatenate program.
  173.  
  174.        Concatenates all input files, and outputs them to stdio.
  175.  
  176.        format: cat infile [ infile [ infile [ .... ] ] ]
  177.  
  178. DU.EXE       Prints a list of all directories and subdirectories with
  179.        the amount of file storage they occupy.
  180.  
  181.        format: du [drive specifier]
  182.  
  183. README.1ST    May 21, 1990                Page 5
  184.  
  185. HEX.EXE    Hex to Dec converter.
  186.  
  187.            format: hex hex-number [hex-number] [hex-number] . . .
  188.  
  189.            example:
  190.                 hex 4df 8ef ffffffff 0 2135f
  191.  
  192.                 4df h = 1247
  193.                 8ef h = 2287
  194.                 ffffffff h = 4294967295
  195.                 0 h = 0
  196.                 2135 h = 136031
  197.  
  198.            The designator 'h' refers to the hexadecimal number.
  199.  
  200. LF.EXE     Return all locations of file matching the file spec.
  201.  
  202.            format: lf [d:] [file spec] [/Switches]
  203.  
  204.            Switches
  205.            /E    Display .EXE type
  206.  
  207.            examples:
  208.  
  209.            lf              - find all files on the disk
  210.            lf me.*         - find all me.* files
  211.            lf ?            - print help message
  212.            lf prog.? /e    - find all prog.? files with their type
  213.  
  214.            Important: This program is just a shell to make use of
  215.            the OS/2 WHERE.EXE program. YOU MUST HAVE THE WHERE
  216.        PROGRAM IN YOUR PATH OR THIS PROGRAM WILL FAIL.
  217.  
  218.        IF YOU ARE USING LF WITH THE PM, YOU MUST CHANGE WHERE
  219.        TO A PM PROGRAM. (markexe /pmvio where.exe)
  220.  
  221.  
  222.  
  223. MB.EXE       Available Ram
  224.  
  225.        format: mb
  226.  
  227.        example: mb
  228.             memory available: 536544 bytes = 0.511688 MB
  229.  
  230. README.1ST    May 21, 1990                Page 6
  231.  
  232. MES.EXE    Displays message on the screen in big block letters.
  233.  
  234.            ALL ASCII characters from space (32) through tilde (~, 126)
  235.            may be used. Later releases may contain ASCII 0 through 31.
  236.  
  237.            format:    MES message
  238.  
  239.            example:
  240.             mes Gone to Doctor
  241.  
  242.            Displays 'Gone to Doctor' on screen in big block letters.
  243.  
  244.            Note:     The more lines per screen you have available
  245.                      (EGA 43, VGA 50), the longer the message you
  246.                      can display. MES word wraps the last line.
  247.  
  248. NO.EXE     OS/2 version of the popular DOS utility NO. Exception
  249.            handler. Allows the user to omit exceptions.
  250.  
  251.            format:    NO filespec command [parameters]
  252.  
  253.            example:
  254.                 no *.obj copy *.* a:
  255.                        Copies everything but the .obj files to the a: drive.
  256.                 no *.exe no *.com dir
  257.                        gives a directory of everything, but the executables.
  258.  
  259. RMD.EXE    Remove directory.
  260.  
  261.        format: rmd directory name.
  262.  
  263.        Removes the specified directory, all files in that
  264.            directory (normal, hidden, read-only, system), all
  265.            directories beneath the specified directory and all file
  266.            beneath the specified directory. If you bind this program,
  267.            in DOS, the directory can have no subdirectories.
  268.  
  269.        This program was named DD in version 1.0 of these utilities,
  270.        and renamed to avoid confusion with the DOS command CD .
  271.  
  272. RN.EXE       Rename directory. Renames the specified directory to a new name.
  273.  
  274.            format:    rn oldname newname
  275.  
  276. README.1ST    May 21, 1990                Page 7
  277.  
  278. SC.EXE       Screen colors. Allows the user to set both foreground and
  279.            background screen colors.
  280.  
  281.            format:    SC [BRIGHT | BOLD] [COLOR [ON [COLOR] ] ]
  282.  
  283.            example:    sc bright cyan on blue
  284.                             sets the foreground color to bright cyan
  285.                             and the background color to dark blue.
  286.            COLOR OPTIONS:
  287.             BLACK
  288.             RED
  289.             GREEN
  290.             BLUE
  291.             YELLOW
  292.             CYAN
  293.             MAGENTA
  294.             WHITE
  295.  
  296.  
  297. SIZE.EXE   Return the actual file size, the size when saved on
  298.        diskette and the size when stored  on hard drive.
  299.  
  300.            format:    size [filespec]
  301.  
  302.            example:    SIZE *.EXE
  303.  
  304.         SIZE Vers 1.0 - Jan. 1990 - OS/2 Version
  305.  
  306.           183815 bytes in   14 files(s)
  307.           188416 bytes required on 3½" diskette(s)
  308.           192512 bytes required on 5¼" diskette(s)
  309.           200704 bytes required on fixed disk
  310.  
  311.  
  312.                 SIZE
  313.  
  314.         SIZE Vers 1.0 - Jan. 1990 - OS/2 Version
  315.  
  316.           267744 bytes in   31 files(s)
  317.           276992 bytes required on 3½ diskette(s)
  318.           285696 bytes required on 5¼ diskette(s)
  319.           299008 bytes required on fixed disk
  320.  
  321.  
  322. SM.EXE     Set lines per screen mode.
  323.  
  324.            format:    sm [25 | 43 | 50]
  325.  
  326.            NOTE:    You will only be able to set a mode of 43 lines
  327.                     per screen if you have an EGA monitor and
  328.                     graphics card.
  329.  
  330.                     You will only be able to set a mode of 50 lines
  331.                     per screen if you have a VGA monitor and
  332.                     graphics card.
  333.  
  334. README.1ST    May 21, 1990                Page 8
  335.  
  336. WFRE.EXE   Print free space on disk in wide format
  337.  
  338.            format:    wfre [drive:]
  339.  
  340.            example:    wfre
  341.  
  342. Drive  total bytes  bytes used  available  capacity  cluster size
  343.   C:      4266188     34193408    8468480    80.15%          2048
  344.  
  345.  
  346. ASYNCH COMMUNICATIONS FUNCTIONS:
  347.  
  348. The following twelve (12) C callable rountine are provided.
  349.  
  350. port_open(int port)
  351.  
  352. opens comm port.
  353. comm port number; range 1-2; (if you have more, it should work,
  354.                   not tested for greater than 2 ports.
  355.                   must change MAX_PORTS in os2asy.h to
  356.                   appropriate number.)
  357.  
  358.  
  359. port_close(port)
  360.  
  361. closed comm port.
  362. comm port number; range 1-2.
  363.  
  364.  
  365. port_close_all(void)
  366.  
  367. closes ALL comm ports.
  368. currently set up for just comm 1 and comm 2.
  369.  
  370.  
  371. send_line(int port, char *str)
  372.  
  373. sends a line of data to the comm port.
  374. maximum length of str is 255 chars.
  375.  
  376.  
  377. send_asy(int port, char *str)
  378.  
  379. sends a line of data to the comm port with a carriage return tacked on
  380. the end.
  381. the same restrictions of send_line apply to send_asy.
  382.  
  383.  
  384. README.1ST    May 21, 1990                Page 9
  385.  
  386. asy_chr(int port, char chr)
  387.  
  388. sends a single character to the comm port.
  389.  
  390.  
  391. asyget(int port)
  392.  
  393. recieve a string from the comm port.
  394.  
  395. the string MUST be terminated by a line feed, and the data is
  396. placed in a global variable appropriate to the port.
  397.  
  398. this routine is best not called directly. it is better to use
  399. either asy_get or fasy_get (explained in succeeding text).
  400.  
  401.  
  402. asy_stream(int port, int chrs, char *string, long time_limit)
  403.  
  404. receive chrs number of bytes from the com port. this routine is useful
  405. is receiving a certain number of characters from the com port, where
  406. the number of characters needed is know before the call to asy_stream
  407. is made. if the needed string has no known terminator, asy_stream is
  408. superior to asy_get or asyget. if the input queue does not have at least
  409. chr characters with in the time limit (in ticks, 18.2/sec), the routine
  410. return with an error.
  411.  
  412. inqsize(int port)
  413.  
  414. return the size of the input queue.
  415.  
  416.  
  417. asy_get(int port, char *string)
  418.  
  419. receives a string from the comm port and places it in the passed string.
  420. this routine call asyget, so the sent string must terminate in a line feed.
  421. this routine also delays ¼ second before getting the data. this is sometimes
  422. necessary for timing. if you do not want to delay ¼ second, see fasy_get.
  423.  
  424.  
  425. fasy_get(int port, char *string)
  426.  
  427. same as asy_get, except routine does NOT delay at all before getting data.
  428.  
  429.  
  430. rdch(int port, char *chr, int cnt, int *numread)
  431.  
  432. read cnt characters from the comm port. numread is the actual number of
  433. characters read.
  434.  
  435. README.1ST    May 21, 1990                Page 10
  436.  
  437.  
  438. flushib(int port)
  439.  
  440. flush the input buffer.
  441.  
  442.  
  443. flushob(int port)
  444.  
  445. flush the output buffer.
  446. 
  447.