212 lines
7.1 KiB
Plaintext
212 lines
7.1 KiB
Plaintext
Compiling this package requires a fair bit of knowledge about your system.
|
|
There are no automatic configuration programmes or prepared configuration
|
|
files for different type of systems. You will need to edit the Makefile
|
|
to specify things like which compiler to use and any options it needs.
|
|
The file config.h needs to be edited to reflect the system you are
|
|
using and to enable and/or disable certain features.
|
|
|
|
Defines in config.h
|
|
===================
|
|
|
|
USE_ANSIC
|
|
|
|
Normally this will be defined automaticly if __STDC__ is defined, but
|
|
if your compile isn't truly ANSI C compliant you may need to undefine this.
|
|
|
|
USE_TERMIO
|
|
|
|
Define this if your system uses the termio tty driver. System III and
|
|
System V use termio.
|
|
|
|
USE_SGTTY
|
|
|
|
Define this if your system uses the "sgtty" tty driver. V7 Unix and BSD
|
|
use sgtty.
|
|
|
|
USE_WINSZ
|
|
|
|
If you defined USE_SGTTY you can define this if your system supports
|
|
SIGWINSZ and the accompaning ioctls. If this is defined the library
|
|
will get number of columns and lines from the tty driver not the
|
|
terminal description. BSD 4.3 supports SIGWINSZ. This will also work
|
|
if USE_TERMIO is defined on some hybrid System V machines such as Release 4.
|
|
|
|
Do not define both USE_TERMIO and USE_SGTTY. If your system supports both
|
|
you'd probably be better of defining USE_TERMIO. If your system supports
|
|
neither termio or sgtty you can leave USE_TERMIO and USE_SGTTY undefined,
|
|
but this is only recommended for use with micomputers.
|
|
|
|
USE_STRINGS
|
|
|
|
If you define this then the header file <strings.h> will be included
|
|
and BSD type string library assumed (index instead of strchr), otherwise
|
|
<string.h> will included. If you have a BSD type system define this.
|
|
If you have an ANSI C, System III, or System V type of system leave it
|
|
undefined.
|
|
|
|
USE_MYBSEARCH
|
|
|
|
If your system's C library doesn't include bsearch, define this.
|
|
Most System V systems have bsearch. However even your C library has this
|
|
function you still may want to define USE_MYBSEARCH, see USE_SHORT_BSEARCH
|
|
below. ("MYBSEARCH" is misnomer, I didn't write this routine.)
|
|
|
|
USE_SHORT_BSEARCH
|
|
|
|
If you define USE_MYBSEARCH you can define this so that the bsearch
|
|
routine that library uses the type short instead of size_t (usually long)
|
|
for it's arguments. This results a large speedup on 68000 based machines
|
|
and possibly a significant speedup on others as well. However on some CPU's
|
|
defining this will only make things slower.
|
|
|
|
USE_MYSTRTOK
|
|
|
|
If your system's C library doesn't include strtok, define this.
|
|
Most ANSI C, System III, and System V systems have this.
|
|
|
|
USE_MYQSORT
|
|
|
|
If your system's C library doesn't include qsort, define this.
|
|
All most all systems should have this function, if it doesn't complain
|
|
to your vendor. The qsort routine comes from the GNU Emacs distribution.
|
|
|
|
USE_MYMKDIR
|
|
|
|
Define this if your system doesn't have the mkdir library function call.
|
|
My routine simply calls the system command mkdir, you may have to
|
|
edit mkdir.c if the pathname of that command isn't "/bin/mkdir".
|
|
|
|
USE_MEMORY
|
|
|
|
If your system has a <memory.h> header define this. If USE_MEMORY
|
|
is not defined bcopy will used instead of memcpy.
|
|
|
|
USE_SMALLMEM
|
|
|
|
Use you can define use this to save some memory, but it doesn't
|
|
save much at moment, and will only slow the library down.
|
|
|
|
USE_FAKE_STDIO
|
|
|
|
If you define this then the library won't use the real stdio but a
|
|
fake one instead. This is for compatiblity with termcap and vi which
|
|
don't use stdio.
|
|
|
|
USE_DOPRNT
|
|
|
|
If you don't have a vfprintf function, but you have a _doprnt function
|
|
define this. If you don't have either than you can compile the library
|
|
but not the support programmes. System V has vfprintf and most Unixes
|
|
have a _doprnt (but probably not documented). BSD has released a freely
|
|
distributable vfprintf for BSD Unixes.
|
|
|
|
USE_UPBC_KLUDGE
|
|
|
|
Define this if you want the library's tgoto to work like termcap's tgoto
|
|
and avoid putting ^D, and \n into an output string by using the cursor up
|
|
and backspace strings.
|
|
|
|
USE_EXTERN_UPBC
|
|
|
|
If you defined USE_UPBC_KLUDGE you can define this so tgoto will,
|
|
like termcap's tgoto, get the cursor up and backspace strings from the
|
|
externs UP and BC instead from the library's internal record.
|
|
|
|
USE_LITOUT_KLUDGE
|
|
|
|
Don't define this. It's another kludge for tgoto.
|
|
|
|
If neither USE_UPBC_KLUDGE or USE_LITOUT_KLUDGE is defined then tgoto
|
|
won't worry about putting ^D, and \n in a string.
|
|
|
|
USE_PROTOTYPES
|
|
|
|
Define this if your compiler supports ANSI C style prototypes.
|
|
|
|
USE_STDLIB
|
|
|
|
Define this if your system has an <stdlib.h> header.
|
|
|
|
USE_STDARG
|
|
|
|
Define this if your system has an <stdarg.h> header. If this isn't
|
|
defined <varargs.h> will be included instead.
|
|
|
|
USE_STDDEF
|
|
|
|
Define this if your system has an <stddef.h> header. If this isn't
|
|
defined <sys/types.h> will be included instead.
|
|
|
|
typedef char *anyptr;
|
|
|
|
You should change the typedef to a type that any pointer can be assigned
|
|
to or from. ANSI C compilers can use "typedef void *anyptr", most
|
|
other compilers should use "typedef char *anyptr".
|
|
|
|
#define mysize_t unsigned
|
|
|
|
"mysize_t" needs to defined as the type of the size of an object, or
|
|
the type of the sizeof operator. Traditional usage is "unsigned", for
|
|
ANSI C you should define mysize_t as "size_t".
|
|
|
|
TERMCAPFILE
|
|
|
|
Define this to a string containing the default termcap file(s) to look
|
|
for terminal descriptions in. Multiple filenames should be seperated
|
|
by spaces and environment variables can be specfied by prefixing them
|
|
with dolar signs ($). eg:
|
|
#define TERMCAPFILE "$TERMCAPFILE $HOME/.termcap /etc/termcap"
|
|
|
|
TERMINFOSRC
|
|
|
|
Define this to a string containing the default terminfo source file to
|
|
look for terminal descriptions in.
|
|
|
|
TERMINFODIR
|
|
|
|
Define this as the directory containing the default terminfo database,
|
|
usually "/usr/lib/terminfo".
|
|
|
|
Any of TERMCAPFILE, TERMINFOSRC or TERMINFODIR can be left undefined.
|
|
|
|
|
|
defs.h
|
|
======
|
|
|
|
You may also need to edit defs.h and change the definitions of MAX_BUF,
|
|
MAX_LINE, and MAX_NAME. Unless you are seriously starved for memory I
|
|
don't recomend making them smaller.
|
|
|
|
|
|
cap_list
|
|
========
|
|
|
|
You can add new capabilities to the file cap_list. You must provide
|
|
a type, terminfo variable name, terminfo capname, and termcap name for
|
|
all capabilities and you must make sure they are all unique.
|
|
|
|
|
|
Making in the library
|
|
=====================
|
|
|
|
Once you've configured the package you can just type "make" and it
|
|
will build the library and the "term.h" header. You can enter
|
|
"make all" to make the library and the support programmes, tconv,
|
|
cap2info, tic, clear, tput and tset. If you want a profiled library
|
|
you can enter "make profiled". You can remove all the intermediate
|
|
files with "make clean". "make spotless" will remove the target
|
|
files as well.
|
|
|
|
|
|
Installing the library
|
|
======================
|
|
|
|
As for installing it, that's up to you. Depending on how much you
|
|
plan to use the libraries and whether or not you have termcap and/or
|
|
terminfo already you can install them "standard" places (ie. /usr/lib,
|
|
/usr/include, /usr/bin), in local directories, or just leave them in
|
|
the source directory. However if you are compiling programmes that
|
|
use terminfo and linking it with this library you must make sure that
|
|
this library's term.h file is included in your programme and not the
|
|
system supplied one.
|