home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
emxtutor.zip
/
emxsrcd1.zip
/
emx
/
src
/
doc
/
emxbsd.src
< prev
next >
Wrap
Text File
|
1998-12-21
|
5KB
|
168 lines
■text
===============================================================================
emxbsd.doc emx 0.9d BSD LIBRARIES INFORMATION 21-Dec-1998
===============================================================================
■endtext
■title BSD Libraries Information
■format bold emx
■format tty bsd.a bsd.lib curses.a curses.lib termcap.a termcap.lib
■format tty db.a db.lib btermcap.a btermcap.lib
■format tty -lbsd -lcurses -ltermcap -lbtermcap -ldb
■format tty heapsort() random() strsep() dbopen()
■if text
■h= Table of Contents
■toc
■endif
■h1 Introduction to BSD Libraries Information
■ipf
:font facename=Helv size=24x14.:hp2.BSD Libraries Information
:ehp2.
:font facename=default size=0x0.
:p.
■endipf
BSD curses has been ported to emx by Kai Uwe Rommel.
As BSD curses has a few bugs, you might want to use PD curses
instead:
■example
ftp-os2.cdrom.com: /pub/os2/dev16/pdcurs21.zip
ftp.leo.org: /pub/comp/os/os2/libraries/pdcurs21.zip
■endexample
The BSD database library provides B-tree and hashing access methods
for files.
The emx C library is complemented by the BSD C library: The
heapsort(), random() and strsep() functions are in the libraries
bsd.a and bsd.lib.
■ipfminitoc
■h1 bsd.a and bsd.lib
■index bsd.a
■index bsd.lib
■index heapsort()
■index initstate()
■index random()
■index setstate()
■index srandom()
■index strsep()
■keyword bsd.a
■keyword bsd.lib
■keyword heapsort()
■keyword initstate()
■keyword random()
■keyword setstate()
■keyword srandom()
■keyword strsep()
bsd.a and bsd.lib contain the following functions:
■example
heapsort()
initstate()
random()
setstate()
srandom()
strsep()
■endexample
Use -lbsd to link with this library. You have to obey the BSD
license, see ■tt{/emx/doc/COPYING.BSD}.
You'll find manual pages in ■tt{/emx/bsd/man}.
■h1 btermcap.a and btermcap.lib
■index btermcap.a
■index btermcap.lib
■keyword btermcap.a
■keyword btermcap.lib
The BSD termcap library provides functions for using display
terminals in a terminal-independent manner. You have to obey the
BSD license, see ■tt{/emx/doc/COPYING.BSD}.
See ■tt{/emx/bsd/man/termcap.3} and ■tt{/emx/bsd/man/termcap.5} for
more information on BSD termcap.
emx comes with both the GNU and the BSD termcap libraries. By
default, the GNU termcap library is used. To switch to the BSD
termcap library, replace `■tt{gnu}' in ■tt{/emx/include/termcap.h}
with `■tt{bsd}' and use -lbtermcap instead of -ltermcap.
■h1 curses.a and curses.lib
■index curses.a
■index curses.lib
■keyword curses.a
■keyword curses.lib
The BSD curses library provides functions for updating screens. You
have to obey the BSD license, see ■tt{/emx/doc/COPYING.BSD}. In
addition to curses.a or curses.lib (-lcurses), you have to link with
a termcap library. You can use either the BSD termcap library
(-lbtermcap) or the GNU termcap library (-ltermcap). If you use the
GNU termcap library, you have to obey the GNU General Public
License, see ■tt{/emx/doc/COPYING}.
See ■tt{/emx/bsd/man/curses.3} for a short list of library
functions. See the the files in ■tt{/emx/bsd/curses/doc} for a
complete manual (you might want to use ■tt{groff} for formatting).
Use `■tt{-lcurses -lbtermcap}' for linking programs that use BSD
curses.
Here's how to compile and run a sample program:
■typewriter
cd \emx\samples ■break
copy \emx\bsd\curses\doc\twinkle1.c ■break
[■sl{use an editor to remove the first 33 lines of twinkle1.c}] ■break
gcc twinkle1.c -lcurses -lbtermcap
twinkle1
■endtypewriter
Note: ■tt{twinkle1.c} is the only complete program in
■tt{/emx/bsd/curses/doc}.
■h1 db.a and db.lib
■index db.a
■index db.lib
■index dbopen()
The BSD database library provides B-tree and hashing access methods
for files. Note that this version of that library is obsolete and
has some bugs which cannot be fixed without changing the file
formats.
Use the dbopen() function to open or create a database
file. See ■tt{dbopen.3}, ■tt{btree.3}, ■tt{hash.3}, ■tt{recno.3},
and ■tt{mpool.3} in ■tt{/emx/bsd/man} for details. Use the -ldb
option to link with the BSD database library. You have to obey the
BSD license, see ■tt{/emx/doc/COPYING.BSD}.
Here's how to compile and run a sample program:
■example
cd \emx\samples
dmake wordref.exe
wordref -- Show how to run the sample program
wordref add \emx\doc\*.doc -- This will take quite a while and 6 MByte
wordref find database
■endexample
Type `■tt{wordref clear}' to delete the database.
■text
--------------------------- END OF EMXBSD.DOC ------------------------------
■endtext