This is John Chambers' C debug package. See V.d for details. This is a collection of tools that are useful in finding out what's going wrong in C programs. It is especially useful in portability testing, since its tests won't compile or run correctly unless you have gotten the configuration stuff right.
The sh subdirectory has an Unshar script that may be useful if you received this in shar format and don't have unshar. It strips away email headers and feeds the rest of each file to sh for unpacking.
eval `hostype -cshe`
Alternatively, run "hostype -cshe" and add its output to your .login
file. If you are using a different shell, look at hostype to see what
option you should use.
After you have a local.h file, type:
make all
and it should all compile. This will also build a Vtest program that
is for testing the package itself. Depending on debug level, Vtest
generates all sorts of output, some of it pretty strange-looking at
first. You will have to examine the program to see whether the output
is correct. This is intentional; in examining Vtest, you will see
how pieces of this debug package are used. You should read V.d
before running Vtest.
The "make" command without args will build only libV.a, which is what you need (along with V.h and local.h) to use this package.
This is a simple trick that allows us to strip out the debug stuff with a single-line change in the Makefile. We feed these files to the b-c script, which is actually just a call of sed that either enables a ':' line or blanks it out, depending on the character in column 2. It's simple to build everything with all the debugging enabled, and then recompile with the higher-level debug stuff deleted once you trust that it is reliable.
It's a good idea to run the test programs that are included here. If you do, they'll tell you a lot about things that will break other programs, and fixing them here probably means fixing them in any programs that use the V package
You must have perl (4 or 5) to run the automated tests. Type:
make test
This will use the Test program, which will in turn run all the
programs in the test/prog directory, and report on their success or
failure. The Test script is a tool that you might want to examing; it
is quite useful in building automated (regression) tests for other
programs.
If you don't have perl (and for some silly reason can't get it), you can run the test scripts yourself. Their output should be compared with the source code, to see if it is correct. Samples of correct output are in test/stdout/* and test/stderr/*. Since some of the details of the tests' output will vary from system to system, you should examine the output to see if the minor differences are relevant.
Note that several of the tests do things that intentionally produce failures; they will warn you of the errors, and you can check to see that the correct errors actually occur.
Recommended test commands if you don't have perl:
Vtest Vtest %d4 setenv D_Vtest 4Vtest.out; Vtest memtest %d2
errno handling
One of the real pains in Unix is the crappy support for errno. This debug packages builds a pair of files, err.h and err.b, that provide a more useful interface to errno than the usual sys_errlist[]. However, getting it built correctly is a portability hassle. The errnotbl perl script does the job by reading from the system's table of error codes, mnemonics and messages.
Unfortuntaely, this table is kept in several different places and formats by various vendors. On some, the "man 2 intro" command gets it; on others, you need "man 2 errno"; on yet others, neither of these works, but /usr/include/sys/errno.h contains the messages in comments. We can handle any of these three. But you may need to edit the errnotbl script and tell it which of the three $pat patterns to use. You may also need to edit the Makefile, and modify the call of errnotbl to do the right thing. Alternatively, you may have received a version that has some *_err.h and *_err.b files for a similar system to yours. You can use these, though the result may not be quite right for your system. Sorry that it can't be done any better than this. If you find a way to improve it, let me know.
Name Last modified Size Description
Parent Directory 20-Apr-2004 11:54 -
Configure 13-Apr-2004 15:11 9k
Darwin_local.h 13-Apr-2004 16:31 1k
FREEBSD_local.h 28-Sep-2006 10:04 1k
Lc.sh 24-Mar-2004 14:32 1k
Linux_local.h 13-Apr-2004 12:43 1k
Make 09-Mar-2000 12:09 1k
Makefile 13-Apr-2004 10:04 53k
Rm 10-Nov-1994 21:35 1k
Sdiff 12-Jun-1998 08:54 1k
SunOS_local.h 17-Dec-2003 15:08 1k
V.README 11-Sep-2003 10:22 5k
V.d 11-Sep-2003 10:34 28k
V.h 23-Dec-2003 10:30 38k
V.html 06-Dec-1999 11:58 31k
V_A_UC.h 17-Dec-2003 15:08 1k
V_D_UC.h 17-Dec-2003 15:08 1k
V_M_UC.h 06-Dec-1999 12:32 1k
V_S_UC.h 06-Dec-1999 12:32 1k
V_X_UC.h 06-Dec-1999 12:32 1k
V___lc.h 06-Dec-1999 12:32 1k
V_s_lc.h 06-Dec-1999 12:32 1k
V_t_lc.h 06-Dec-1999 12:32 1k
V_x_lc.h 06-Dec-1999 12:32 1k
Vcaller.b 06-Dec-1999 12:11 1k
Vcaller.c 04-Dec-2000 17:29 1k
Vchklog.b 05-Jun-2000 00:00 1k
Vchklog.c 04-Dec-2000 17:29 1k
Vdmsg.b 17-Oct-2002 15:30 3k
Vdmsg.c 17-Oct-2002 15:30 3k
Vinit.b 11-Apr-2002 10:14 7k
Vinit.c 09-Oct-2002 15:03 6k
Vnewlog.b 06-Dec-1999 11:58 1k
Vnewlog.c 04-Dec-2000 17:29 1k
Vopt.b 24-Jan-2003 10:50 6k
Vopt.c 28-Sep-2006 10:07 5k
Vpmsg.b 29-Mar-2000 11:25 1k
Vpmsg.c 04-Dec-2000 17:29 1k
Vsmsg.b 06-Dec-1999 11:58 1k
Vsmsg.c 04-Dec-2000 17:29 1k
Vtest 28-Sep-2006 23:06 59k
Vtest.b 11-Sep-2003 18:48 7k
Vtest.c 23-Sep-2003 19:46 5k
Vvmsg.b 29-Mar-2000 11:25 2k
Vvmsg.c 04-Dec-2000 17:29 1k
abbr.h 17-Dec-2003 15:08 4k
aix_errno.h 17-Dec-2003 15:08 8k
aix_local.h 17-Dec-2003 15:08 7k
backup.b 05-Jun-2000 00:00 9k
backup.c 04-Dec-2000 17:28 8k
backup.d 06-Dec-1999 11:58 5k
binaddr.b 11-Sep-2003 18:48 3k
binaddr.c 11-Sep-2003 18:48 3k
bzero.b 11-Sep-2003 18:15 1k
csfd.pid 11-Apr-1997 17:12 1k
da.h 17-Dec-2003 15:08 1k
daMsg.b 11-Sep-2003 09:59 2k
daOpen.b 11-Sep-2003 09:59 2k
daPrsPath.b 11-Sep-2003 09:59 2k
daRead.b 11-Sep-2003 10:11 1k
daSrvrLink.b 11-Sep-2003 09:59 1k
daSrvrOpen.b 11-Sep-2003 09:59 1k
dbg.d 11-Sep-2003 10:34 28k
default.mk 18-Jan-1995 13:20 1k
dmp.h 17-Dec-2003 15:08 3k
dmp_ascd.b 11-Sep-2003 18:48 2k
dmp_ascd.c 11-Sep-2003 18:49 2k
dmp_data.b 06-Dec-1999 11:58 1k
dmp_data.c 04-Dec-2000 17:29 1k
dmp_he.b 05-Jun-2000 00:00 1k
dmp_he.c 04-Dec-2000 17:29 1k
dmp_hexd.b 11-Sep-2003 18:48 6k
dmp_hexd.c 11-Sep-2003 18:49 5k
dmp_hexout.b 05-Jun-2000 00:00 2k
dmp_hexout.c 04-Dec-2000 17:29 2k
dmpstat.b 11-Sep-2003 18:48 3k
dmpstat.c 11-Sep-2003 18:49 3k
doc/ 27-Jan-2007 03:43 -
err.b 13-Mar-2002 21:12 4k
err.c 13-Mar-2002 21:12 4k
err.h 17-Dec-2003 15:08 1k
err_ultrix.b 17-Apr-1998 14:08 1k
errnotbl 11-Apr-1997 17:11 5k
exit.h 17-Dec-2003 15:08 1k
extern.h 17-Dec-2003 15:08 3k
foo 06-Dec-1999 11:58 1k
foo.b 05-Jun-2000 00:00 1k
foo1.b 05-Jun-2000 00:00 1k
freetest1 28-Sep-2006 23:06 54k
freetest1.b 06-Dec-1999 11:58 1k
freetest1.c 29-Nov-2002 20:43 1k
freetest2 28-Sep-2006 23:06 54k
freetest2.b 06-Dec-1999 11:58 1k
freetest2.c 29-Nov-2002 20:43 1k
gsharkit 17-Dec-2003 15:08 0k
hi.c 15-May-2003 08:20 1k
kendy_Linux_local.h 22-Feb-2002 21:47 1k
libV_version.c 26-Mar-2004 09:38 1k
linux_local.h 06-Dec-1999 12:32 7k
local.mk 26-Nov-2002 22:41 1k
make_message.b 29-May-2003 10:05 2k
man/ 27-Jan-2007 03:43 -
mem.b 11-Sep-2003 18:48 29k
mem.c 11-Sep-2003 18:49 28k
mem.d 11-Apr-2003 11:33 6k
mem.h 11-Sep-2003 18:48 7k
memchunk.b 15-Mar-2002 15:25 25k
memchunk.d 06-Dec-1999 11:58 6k
memchunk.h 23-Dec-2003 11:02 6k
memtest 28-Sep-2006 23:06 58k
memtest.b 11-Sep-2003 18:48 4k
memtest.c 23-Sep-2003 19:46 3k
minrand.b 08-Dec-1999 17:39 3k
minrand.c 08-Dec-1999 17:39 3k
minrand.h 17-Dec-2003 15:08 1k
nbio.b 11-Sep-2003 10:11 1k
nbio.c 11-Sep-2003 10:12 1k
osf1_local.h 17-Dec-2003 15:08 7k
pi.c 15-May-2003 08:21 1k
pl/ 27-Jan-2007 03:44 -
sh.esix4/ 13-Apr-2004 11:49 -
sh.osf1/ 13-Apr-2004 11:49 -
sh.sun4/ 13-Apr-2004 11:49 -
sh/ 27-Jan-2007 04:23 -
srvr.h 17-Dec-2003 15:08 1k
str.d 08-Mar-2002 14:07 11k
str.h 03-Jun-2003 09:47 20k
str_appscm.b 11-Sep-2003 10:03 2k
str_appscm.c 11-Sep-2003 10:03 2k
str_bldstr.b 11-Sep-2003 10:03 1k
str_bldstr.c 11-Sep-2003 10:03 1k
str_chksm.b 11-Sep-2003 10:03 2k
str_chksm.c 11-Sep-2003 10:03 2k
str_cmpssm.b 11-Sep-2003 10:03 3k
str_cmpssm.c 11-Sep-2003 10:03 3k
str_data.b 11-Sep-2003 10:03 1k
str_data.c 11-Sep-2003 10:03 1k
str_dupscm.b 11-Sep-2003 10:03 3k
str_dupscm.c 11-Sep-2003 10:03 3k
str_dupssm.b 11-Sep-2003 10:03 2k
str_dupssm.c 11-Sep-2003 10:03 2k
str_minstr.b 11-Sep-2003 10:03 2k
str_minstr.c 11-Sep-2003 10:03 1k
str_misc.b 11-Sep-2003 10:03 4k
str_misc.c 11-Sep-2003 10:03 3k
str_npad.b 11-Sep-2003 10:03 1k
str_npad.c 11-Sep-2003 10:03 1k
str_ntrim.b 11-Sep-2003 10:03 1k
str_ntrim.c 11-Sep-2003 10:03 1k
str_trim.b 11-Sep-2003 10:03 2k
str_trim.c 11-Sep-2003 10:03 2k
str_zapsm.b 11-Sep-2003 10:03 1k
str_zapsm.c 11-Sep-2003 10:03 1k
strnlen.b 28-Mar-2000 12:04 1k
strnlen.c 28-Mar-2000 12:04 1k
strtest 28-Sep-2006 23:06 59k
strtest.b 06-Dec-1999 12:09 2k
strtest.c 29-Nov-2002 20:43 2k
strtok.b 11-Sep-2003 10:11 1k
strtok.c 11-Sep-2003 10:12 1k
symaddr.b 05-Jun-2000 00:00 4k
symaddr.c 04-Dec-2000 17:29 4k
sys.h 11-Sep-2003 18:48 6k
sys_ctype.h 07-Jan-2003 13:00 1k
sys_dir.h 17-Dec-2003 15:08 2k
sys_errno.h 24-Mar-2004 15:00 1k
sys_fcntl.h 17-Dec-2003 15:08 1k
sys_file.h 17-Dec-2003 15:08 1k
sys_if.h 13-Apr-2004 10:02 1k
sys_in.h 13-Apr-2004 15:41 1k
sys_in_systm.h 17-Dec-2003 15:08 1k
sys_ip.h 13-Apr-2004 10:02 1k
sys_malloc.h 28-Sep-2006 23:05 1k
sys_netdb.h 17-Dec-2003 15:08 1k
sys_param.h 17-Dec-2003 15:08 1k
sys_pcb.h 13-Apr-2004 12:16 1k
sys_pthreads.h 17-Dec-2003 15:08 1k
sys_resource.h 17-Dec-2003 15:08 1k
sys_select.h 28-Sep-2006 23:31 1k
sys_signal.h 17-Dec-2003 15:08 1k
sys_socket.h 17-Dec-2003 15:23 1k
sys_stat.h 17-Dec-2003 15:08 1k
sys_stdio.h 28-Sep-2006 10:12 2k
sys_stdlib.h 17-Dec-2003 15:08 1k
sys_string.h 17-Dec-2003 16:07 1k
sys_tcp.h 17-Dec-2003 15:08 1k
sys_time.h 07-Jan-2003 13:00 3k
sys_types.h 24-Mar-2004 14:41 2k
sys_udp.h 17-Dec-2003 15:08 1k
sys_utsname.h 17-Dec-2003 15:08 1k
sys_varargs.h 13-Apr-2004 12:38 1k
sys_wait.h 17-Dec-2003 15:08 1k
tarkit 11-Apr-1997 17:12 0k
test/ 13-Apr-2004 11:50 -
tests 23-Dec-2003 10:34 0k
tnd3_local.h 17-Dec-2003 15:08 4k
trimtest 28-Sep-2006 23:06 55k
trimtest.b 08-May-2002 15:48 1k
trimtest.c 08-May-2002 15:48 1k
trllian_local.h 13-Apr-2004 10:02 1k
v_accept.b 06-Dec-1999 12:09 1k
v_accept.c 04-Dec-2000 17:28 1k
v_alarm.b 06-Dec-1999 12:09 1k
v_alarm.c 04-Dec-2000 17:28 1k
v_bcmp.b 05-Jun-2000 00:00 1k
v_bcmp.c 04-Dec-2000 17:28 1k
v_bcopy.b 13-Apr-2004 15:08 2k
v_bcopy.c 13-Apr-2004 15:09 1k
v_bind.b 05-Jun-2000 00:00 1k
v_bind.c 04-Dec-2000 17:28 1k
v_bindap.b 11-Sep-2003 10:11 1k
v_bindap.c 11-Sep-2003 10:12 1k
v_bshift.b 06-Dec-1999 12:09 1k
v_bshift.c 04-Dec-2000 17:28 1k
v_buf.b 06-Dec-1999 12:09 2k
v_buf.c 04-Dec-2000 17:28 2k
v_bzero.b 15-Mar-2002 15:26 1k
v_bzero.c 15-Mar-2002 15:26 1k
v_close.b 11-Sep-2003 10:11 1k
v_close.c 11-Sep-2003 10:12 1k
v_connect.b 11-Sep-2003 10:05 1k
v_connect.c 11-Sep-2003 10:06 1k
v_data.b 29-Nov-2002 20:43 5k
v_data.c 29-Nov-2002 20:43 5k
v_dsp.b 13-Jan-2003 18:06 4k
v_dsp.c 13-Jan-2003 18:06 4k
v_dsyslog.b 11-Sep-2003 10:11 1k
v_dumpv.b 06-Dec-1999 12:09 1k
v_dumpv.c 04-Dec-2000 17:28 1k
v_dup.b 06-Dec-1999 12:09 1k
v_dup.c 09-Oct-2002 15:02 1k
v_dup2.b 11-Sep-2003 10:11 2k
v_dup2.c 11-Sep-2003 10:12 2k
v_encodei.b 06-Dec-1999 11:45 1k
v_encodei.c 04-Dec-2000 17:29 1k
v_execv.b 06-Dec-1999 12:09 1k
v_execv.c 04-Dec-2000 17:29 1k
v_execve.b 06-Dec-1999 12:09 1k
v_execve.c 04-Dec-2000 17:29 1k
v_execvp.b 06-Dec-1999 12:09 1k
v_execvp.c 04-Dec-2000 17:29 1k
v_exit.b 06-Dec-1999 12:09 1k
v_exit.c 04-Dec-2000 17:29 1k
v_fclose.b 11-Sep-2003 10:11 1k
v_fclose.c 11-Sep-2003 10:12 1k
v_fcntl.b 11-Sep-2003 10:11 3k
v_fcntl.c 11-Sep-2003 10:11 3k
v_fct.b 06-Dec-1999 12:09 1k
v_fct.c 11-Sep-2003 10:02 1k
v_fdopen.b 11-Sep-2003 10:11 1k
v_fdopen.c 11-Sep-2003 10:12 1k
v_fgets.b 11-Sep-2003 10:11 1k
v_fgets.c 11-Sep-2003 10:12 1k
v_filnam.b 06-Dec-1999 11:58 1k
v_filnam.c 04-Dec-2000 17:29 1k
v_findenv.b 05-Jun-2000 00:00 1k
v_findenv.c 04-Dec-2000 17:29 1k
v_fopen.b 11-Sep-2003 10:11 1k
v_fopen.c 11-Sep-2003 10:11 1k
v_fork.b 06-Dec-1999 12:09 1k
v_fork.c 04-Dec-2000 17:29 1k
v_fread.b 11-Sep-2003 10:11 1k
v_fread.c 11-Sep-2003 10:12 1k
v_free.b 11-Sep-2003 10:03 1k
v_free.c 11-Sep-2003 10:03 1k
v_fstat.b 11-Sep-2003 10:11 1k
v_fstat.c 11-Sep-2003 10:12 1k
v_fwrite.b 11-Sep-2003 10:11 1k
v_fwrite.c 11-Sep-2003 10:11 1k
v_getenv.b 05-Jun-2000 00:00 1k
v_getenv.c 04-Dec-2000 17:29 1k
v_getsockopt.b 11-Sep-2003 10:11 1k
v_getsockopt.c 11-Sep-2003 10:12 1k
v_gettod.b 11-Sep-2003 17:55 1k
v_gettod.c 11-Sep-2003 17:55 1k
v_ghba.b 05-Jun-2000 00:00 1k
v_ghba.c 04-Dec-2000 17:29 1k
v_ghbn.b 20-Sep-2005 16:48 4k
v_ghbn.c 05-Apr-2006 15:38 4k
v_index.b 05-Jun-2000 00:00 1k
v_index.c 04-Dec-2000 17:29 1k
v_inet_ntoa.b 05-Jun-2000 00:00 1k
v_inet_ntoa.c 04-Dec-2000 17:29 1k
v_ioctl.b 11-Sep-2003 18:48 1k
v_ioctl.c 11-Sep-2003 18:48 1k
v_ipdot.b 05-Jun-2000 00:00 2k
v_ipdot.c 04-Dec-2000 17:29 2k
v_kill.b 06-Dec-1999 12:09 1k
v_kill.c 09-Oct-2002 15:02 1k
v_lastfld.b 06-Dec-1999 12:09 1k
v_lastfld.c 04-Dec-2000 17:29 1k
v_link.b 06-Dec-1999 12:09 1k
v_link.c 09-Oct-2002 15:02 1k
v_listen.b 06-Dec-1999 12:09 1k
v_listen.c 04-Dec-2000 17:29 1k
v_lseek.b 06-Dec-1999 11:45 1k
v_lseek.c 11-Sep-2003 10:02 1k
v_lstat.b 11-Sep-2003 10:11 1k
v_malloc.b 11-Sep-2003 10:03 2k
v_malloc.c 11-Sep-2003 10:03 2k
v_misc.b 29-Nov-2002 20:52 6k
v_misc.c 29-Nov-2002 20:52 6k
v_mknod.b 06-Dec-1999 12:09 1k
v_mknod.c 04-Dec-2000 17:29 1k
v_newfile.b 11-Sep-2003 10:11 3k
v_newfile.c 11-Sep-2003 10:11 3k
v_open.b 11-Sep-2003 10:11 1k
v_open.c 11-Sep-2003 10:11 1k
v_pipe.b 06-Dec-1999 12:09 3k
v_pipe.c 04-Dec-2000 17:29 3k
v_poll.b 11-Sep-2003 17:43 1k
v_poll.c 11-Sep-2003 17:43 1k
v_pthreads.b 06-Dec-1999 11:58 1k
v_pthreads.c 04-Dec-2000 17:29 1k
v_putenv.b 05-Jun-2000 00:00 1k
v_putenv.c 04-Dec-2000 17:29 1k
v_read.b 11-Sep-2003 10:11 1k
v_read.c 11-Sep-2003 10:12 1k
v_realloc.b 11-Sep-2003 10:03 1k
v_realloc.c 11-Sep-2003 10:03 1k
v_recv.b 11-Sep-2003 10:11 1k
v_recv.c 11-Sep-2003 10:12 1k
v_recvfr.b 11-Sep-2003 10:11 1k
v_recvfr.c 11-Sep-2003 10:12 1k
v_rename.b 08-Oct-2002 16:23 5k
v_rename.c 09-Oct-2002 15:03 4k
v_seek.b 11-Sep-2003 10:11 1k
v_seek.c 11-Sep-2003 10:12 1k
v_select.b 11-Sep-2003 10:05 2k
v_select.c 11-Sep-2003 10:06 1k
v_send.b 11-Sep-2003 10:11 1k
v_send.c 11-Sep-2003 10:11 1k
v_sendto.b 11-Sep-2003 10:11 1k
v_sendto.c 11-Sep-2003 10:11 1k
v_setpgrp.b 06-Dec-1999 12:09 1k
v_setpgrp.c 09-Oct-2002 15:03 1k
v_setsockopt.b 11-Sep-2003 10:11 1k
v_setsockopt.c 11-Sep-2003 10:11 1k
v_sigaction.b 11-Sep-2003 18:48 1k
v_sigaction.c 24-Mar-2004 13:40 1k
v_signal.b 11-Sep-2003 10:11 1k
v_signal.c 11-Sep-2003 10:11 1k
v_sleep.b 11-Sep-2003 10:05 1k
v_sleep.c 11-Sep-2003 10:06 1k
v_socket.b 05-Jun-2000 00:00 1k
v_socket.c 04-Dec-2000 17:29 1k
v_stat.b 11-Sep-2003 10:11 1k
v_stat.c 11-Sep-2003 10:11 1k
v_strdup.b 11-Sep-2003 10:03 1k
v_strdup.c 11-Sep-2003 10:03 1k
v_strlen.b 11-Sep-2003 10:11 1k
v_strlen.c 11-Sep-2003 10:12 1k
v_system.b 06-Dec-1999 12:09 1k
v_system.c 04-Dec-2000 17:29 1k
v_tell.b 11-Sep-2003 10:11 1k
v_tell.c 11-Sep-2003 10:12 1k
v_time.b 06-Dec-1999 12:09 2k
v_time.c 04-Dec-2000 17:29 2k
v_uname.b 06-Dec-1999 12:09 1k
v_uname.c 04-Dec-2000 17:29 1k
v_unlink.b 06-Dec-1999 12:09 1k
v_unlink.c 09-Oct-2002 15:03 1k
v_utime.b 11-Sep-2003 10:11 1k
v_utime.c 11-Sep-2003 10:12 1k
v_wait.b 06-Dec-1999 12:09 1k
v_wait.c 04-Dec-2000 17:29 1k
v_wait3.b 11-Sep-2003 10:11 1k
v_wait3.c 11-Sep-2003 10:12 1k
v_write.b 11-Sep-2003 10:11 2k
v_write.c 11-Sep-2003 10:11 2k
v_wwrite.b 11-Sep-2003 10:11 2k
v_wwrite.c 11-Sep-2003 10:11 2k
verbose.h 23-Dec-2003 10:30 38k
xenix_local.h 17-Dec-2003 15:08 3k
This is John Chambers' C debug package. See V.d for details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To build things here: make clean make make test If this all works, the *.h and libV.a files should be linked into your build directory. Or you can set up the appropriate search paths to point to this directory. There is also an "install" entry that you can change to point to wherever you'd like things installed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The sh subdirectory has an Unshar script that may be useful if you don't have unshar; it strips away email headers and feeds the rest of each file to sh for unpacking. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You will have to create a local.h file before things will compile. If you are on one of the systems for which a foo_local.h file is included, you can probably get things to compile first if you use the hostype script to set up your environment. For csh users, the command is: eval `hostype -cshe` Alternatively, pick one of the local.h files and make it into one for your system. Then just type: make all and it should all compile. This will also build a Vtest program that is for testing the package itself. Depending on debug level, Vtest generates all sorts of output, some of it pretty strange-looking at first. You will have to examine the program to see whether the output is correct. This is intentional; in examining Vtest, you will see how pieces of this debug package are used. You should read V.d before running Vtest. The "make" command without args will build only libV.a, which is what you need (along with V.h and local.h) to use this package. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Testing It's a good idea to run the test programs that are included here. If you do, they'll tell you a lot about things that will break other programs, and fixing them here probably means fixing them in any programs that use the V package You must have perl (4 or 5) to run the automated tests. Type: make test This will use the Test program, which will in turn run all the programs in the test/prog directory, and report on their success or failure. The Test script is a tool that you might want to examing; it is quite useful in building automated (regression) tests for other programs. If you don't have perl (and for some silly reason can't get it), you can run the test scripts yourself. Their output should be compared with the source code, to see if it is correct. Samples of correct output are in test/stdout/* and test/stderr/*. Since some of the details of the tests' output will vary from system to system, you should examine the output to see if the minor differences are relevant. Note that several of the tests do things that intentionally produce failures; they will warn you of the errors, and you can check to see that the correct errors actually occur. Recommended test commands: Vtest Vtest %d4 setenv D_Vtest 4Vtest.out; Vtest memtest %d2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - errno handling One of the real pains in Unix is the crappy support for errno. This debug packages builds a pair of files, err.h and err.b, that provide a more useful interface to errno than the usual sys_errlist[]. However, getting it built correctly is a portability hassle. The errnotbl perl script does the job by reading from the system's table of error codes, mnemonics and messages. Unfortuntaely, this table is kept in several different places and formats by various vendors. On some, the "man 2 intro" command gets it; on others, you need "man 2 errno"; on yet others, neither of these works, but /usr/include/sys/errno.h contains the messages in comments. We can handle any of these three. But you need to edit the errnotbl script and tell it which of the three $pat patterns to use. You also need to edit the Makefile, and modify the call of errnotbl to do the right thing. Alternatively, you may have received a version that has some *_err.h and *_err.b files for a similar system to yours. You can use these, though the result may not be quite right for your system. Sorry that it can't be done any better than this. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Upper/lower case There are now some unix-like systems that do caseless matching in the file system. One such culprit is Apple's OSX. This led to a change in the names of some files, mostly the V_*.h header files that define debug macros for single letters. On such systems, we can't have both V_a.h and V_A.h, because they will be mapped to the same file. So these header files were renamed to have "_UC" and "_lc" in their names. Similarly, you should try to avoid introducing new files whose names are the same as existing files except for case. This applies only to file names. So far we haven't had any C compiler writers stupid enough to do something so user-hostile. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -