home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
OS2UTIL.ZIP
/
README.1ST
< prev
next >
Wrap
Text File
|
1990-05-21
|
14KB
|
447 lines
README.1ST May 21, 1990 Page 1
╔═══════════════════════════════════════════════════════╗
║ OS/2 UTILITIES ║
║ Version 2.0 ║
║ ║
║ This product is not public domain. It is ║
║ distributed under a Share Wear License. You ║
║ are encouraged to distribute this software in ║
║ entirety, but this software may not be ║
║ distributed except in its original form ║
║ accompanied with this message. Violation of this ║
║ agreement could result in criminal prosecution ║
║ as well as civil liability If you like this ║
║ software and find it to be of value, a nominal ║
║ contribution of $5 is appreciated. For $20, ║
║ users will be supported and informed of updates. ║
║ For $25 users will be informed of changes in the ║
║ source code and the code will be made available ║
║ to them. These utilities are different than some ║
║ in that most of the source code is provided. ║
║ Providing the source code insures the user of ║
║ virus and bacterium free code. Your financial ║
║ support of this package will insure continued ║
║ updates and improvements of this code as well ║
║ as development of other packages that contain ║
║ full source code in the future. Again, you are ║
║ encouraged to distribute these utilities. ║
║ ║
║ All of the programs included (and source code) ║
║ were developed on a Compaq 386/20 using the ║
║ Microsoft C compiler version 5.1 with OS/2 ║
║ v1.0 and 1.1 . ║
║ ║
║ All of these programs will run with the ║
║ presentation manager. ║
║ ║
║ I hope you find these utilities useful and ║
║ informative. ║
║ ║
║ Copyright (c) 1990 Marcusfilm Limited ║
║ ║
║ Mark Graham ║
║ Marcusfilm Limited ║
║ 1476 Drake Avenue ║
║ Burlingame, CA 94010-4704 ║
╚═══════════════════════════════════════════════════════╝
README.1ST May 21, 1990 Page 2
These utilities are for use with OS/2. Some of them may work in DOS if you
BIND them using the bind program. Where problems arise in binding, they will
be noted.
Summary:
Program Function
AC.EXE Area Code Finder. Gives area codes for states, or specific
state location for area code. Covers all of North America.
(source code: AC.C)
CAT.EXE Unix lookalike concatenate function (source code: CAT.C)
DU.EXE Returns size of directory for all directories on specified
drive (source code: DU.C)
HEX.EXE Converts hexadecimal integers to decimal integers (source
code: HEX.C)
LF.EXE Locate file: finds location on all files on drive matching the file
specification (source code: LF.C)
MB.EXE Returns remain RAM available in bytes and megabytes (source code:
MB.C)
MES.EXE Leaves a block message on the screen. The more lines per screen you
computer is set up to handle, the longer message you can leave.
(source code: MES.C)
NO.EXE Exception handler. Based on popular DOS program.
(source code: NO.C)
RMD.EXE Remove directory and all subdirectories beneath the specified one.
This one actually works (source code: RMD.C). If you bind this
program, in DOS, the directory cannot have any subdirectories.
This program was formally named DD.EXE, it was renamed RMD.EXE
to avoid accidentally confusion with the DOS command CD .
RN.EXE Rename directory. (Can also be used to rename file.) (source code:
RN.C)
SC.EXE Screen color. Sets screen color. You may need to install the
ANSI driver: ANSI.EXE . (source code: SC.C)
SIZE.EXE Gives actual files size, diskette file size and hard drive file
size of file spec. Very useful for determining how much space
taken up in a directory. (source code: SIZE.C)
README.1ST May 21, 1990 Page 3
SM.EXE Set mode to either 25, 43, or 50 lines per screen (depending on
your video card) (source code: SM.C)
WFRE.EXE Gives total disk space, space available, space used and
percent in a wide format (source file: WFRE.C)
OS2ASY.C Asynch Utilities for OS/2. These utilities need to be compiled
OS2ASY.H under the module (small, medium, large) that you are using
in a specific program.
Example: cc /AS /c os2asy.c for small
cc /AM /c os2asy.c for medium
cc /AL /c os2asy.c for large
Then you need to link the resulting .obj file with your prog,
so it can call the asynch routines.
Example: link your_prog+os2asy;
Fourteen (14) routines are included:
port_open,
port_close,
port_close_all,
send_line,
send_asy,
asy_chr,
asyget,
asy_stream,
inqsize,
asy_get,
fasy_get,
rdch,
flushib,
flushob
README.1ST May 21, 1990 Page 4
Description:
AC.EXE Area Code Finder
format: ac xxx [xxx [xxx ... ] ]
where xxx is either an area code or a state.
example:
ac 415
CA California area code.
415 San Francisco.
ac CA
CA California area codes.
209 Fresno.
213 Los Angeles.
408 San Jose.
415 San Francisco.
510 Oakland.
619 San Diego.
707 Santa Rose.
714 Orange.
805 Bakersfield.
818 Pasedena.
916 Sacramento.
To get a list of all area codes, enter: ac *
CAT.EXE Unix lookalike concatenate program.
Concatenates all input files, and outputs them to stdio.
format: cat infile [ infile [ infile [ .... ] ] ]
DU.EXE Prints a list of all directories and subdirectories with
the amount of file storage they occupy.
format: du [drive specifier]
README.1ST May 21, 1990 Page 5
HEX.EXE Hex to Dec converter.
format: hex hex-number [hex-number] [hex-number] . . .
example:
hex 4df 8ef ffffffff 0 2135f
4df h = 1247
8ef h = 2287
ffffffff h = 4294967295
0 h = 0
2135 h = 136031
The designator 'h' refers to the hexadecimal number.
LF.EXE Return all locations of file matching the file spec.
format: lf [d:] [file spec] [/Switches]
Switches
/E Display .EXE type
examples:
lf - find all files on the disk
lf me.* - find all me.* files
lf ? - print help message
lf prog.? /e - find all prog.? files with their type
Important: This program is just a shell to make use of
the OS/2 WHERE.EXE program. YOU MUST HAVE THE WHERE
PROGRAM IN YOUR PATH OR THIS PROGRAM WILL FAIL.
IF YOU ARE USING LF WITH THE PM, YOU MUST CHANGE WHERE
TO A PM PROGRAM. (markexe /pmvio where.exe)
MB.EXE Available Ram
format: mb
example: mb
memory available: 536544 bytes = 0.511688 MB
README.1ST May 21, 1990 Page 6
MES.EXE Displays message on the screen in big block letters.
ALL ASCII characters from space (32) through tilde (~, 126)
may be used. Later releases may contain ASCII 0 through 31.
format: MES message
example:
mes Gone to Doctor
Displays 'Gone to Doctor' on screen in big block letters.
Note: The more lines per screen you have available
(EGA 43, VGA 50), the longer the message you
can display. MES word wraps the last line.
NO.EXE OS/2 version of the popular DOS utility NO. Exception
handler. Allows the user to omit exceptions.
format: NO filespec command [parameters]
example:
no *.obj copy *.* a:
Copies everything but the .obj files to the a: drive.
no *.exe no *.com dir
gives a directory of everything, but the executables.
RMD.EXE Remove directory.
format: rmd directory name.
Removes the specified directory, all files in that
directory (normal, hidden, read-only, system), all
directories beneath the specified directory and all file
beneath the specified directory. If you bind this program,
in DOS, the directory can have no subdirectories.
This program was named DD in version 1.0 of these utilities,
and renamed to avoid confusion with the DOS command CD .
RN.EXE Rename directory. Renames the specified directory to a new name.
format: rn oldname newname
README.1ST May 21, 1990 Page 7
SC.EXE Screen colors. Allows the user to set both foreground and
background screen colors.
format: SC [BRIGHT | BOLD] [COLOR [ON [COLOR] ] ]
example: sc bright cyan on blue
sets the foreground color to bright cyan
and the background color to dark blue.
COLOR OPTIONS:
BLACK
RED
GREEN
BLUE
YELLOW
CYAN
MAGENTA
WHITE
SIZE.EXE Return the actual file size, the size when saved on
diskette and the size when stored on hard drive.
format: size [filespec]
example: SIZE *.EXE
SIZE Vers 1.0 - Jan. 1990 - OS/2 Version
183815 bytes in 14 files(s)
188416 bytes required on 3½" diskette(s)
192512 bytes required on 5¼" diskette(s)
200704 bytes required on fixed disk
SIZE
SIZE Vers 1.0 - Jan. 1990 - OS/2 Version
267744 bytes in 31 files(s)
276992 bytes required on 3½ diskette(s)
285696 bytes required on 5¼ diskette(s)
299008 bytes required on fixed disk
SM.EXE Set lines per screen mode.
format: sm [25 | 43 | 50]
NOTE: You will only be able to set a mode of 43 lines
per screen if you have an EGA monitor and
graphics card.
You will only be able to set a mode of 50 lines
per screen if you have a VGA monitor and
graphics card.
README.1ST May 21, 1990 Page 8
WFRE.EXE Print free space on disk in wide format
format: wfre [drive:]
example: wfre
Drive total bytes bytes used available capacity cluster size
C: 4266188 34193408 8468480 80.15% 2048
ASYNCH COMMUNICATIONS FUNCTIONS:
The following twelve (12) C callable rountine are provided.
port_open(int port)
opens comm port.
comm port number; range 1-2; (if you have more, it should work,
not tested for greater than 2 ports.
must change MAX_PORTS in os2asy.h to
appropriate number.)
port_close(port)
closed comm port.
comm port number; range 1-2.
port_close_all(void)
closes ALL comm ports.
currently set up for just comm 1 and comm 2.
send_line(int port, char *str)
sends a line of data to the comm port.
maximum length of str is 255 chars.
send_asy(int port, char *str)
sends a line of data to the comm port with a carriage return tacked on
the end.
the same restrictions of send_line apply to send_asy.
README.1ST May 21, 1990 Page 9
asy_chr(int port, char chr)
sends a single character to the comm port.
asyget(int port)
recieve a string from the comm port.
the string MUST be terminated by a line feed, and the data is
placed in a global variable appropriate to the port.
this routine is best not called directly. it is better to use
either asy_get or fasy_get (explained in succeeding text).
asy_stream(int port, int chrs, char *string, long time_limit)
receive chrs number of bytes from the com port. this routine is useful
is receiving a certain number of characters from the com port, where
the number of characters needed is know before the call to asy_stream
is made. if the needed string has no known terminator, asy_stream is
superior to asy_get or asyget. if the input queue does not have at least
chr characters with in the time limit (in ticks, 18.2/sec), the routine
return with an error.
inqsize(int port)
return the size of the input queue.
asy_get(int port, char *string)
receives a string from the comm port and places it in the passed string.
this routine call asyget, so the sent string must terminate in a line feed.
this routine also delays ¼ second before getting the data. this is sometimes
necessary for timing. if you do not want to delay ¼ second, see fasy_get.
fasy_get(int port, char *string)
same as asy_get, except routine does NOT delay at all before getting data.
rdch(int port, char *chr, int cnt, int *numread)
read cnt characters from the comm port. numread is the actual number of
characters read.
README.1ST May 21, 1990 Page 10
flushib(int port)
flush the input buffer.
flushob(int port)
flush the output buffer.