[comp.sys.3b1] vfprintf

amir@ms.uky.edu (Amir Sadr) (06/06/91)

I am trying to compile the TeX previewer which I recently got from the OSU
UNIXpc archives and I am having difficulties.  The program uses vfprintf()
which is not in any of the libraries on 3.51 software.  Can someone post
or mail me a copy of this routine?  Thank you-
-- 
- Amir Sadr,  Dept. of Computer Science          amir@ms.uky.edu
- University of Kentucky                         amir@UKMA.BITNET
- Lexington,  KY 40506-0027                      [rutgers,uunet]!ukma!amir
--

dnichols@ceilidh.beartrack.com (DoN Nichols) (06/07/91)

In article <1991Jun6.030111.6761@ms.uky.edu> amir@ms.uky.edu (Amir Sadr) writes:
>I am trying to compile the TeX previewer which I recently got from the OSU
>UNIXpc archives and I am having difficulties.  The program uses vfprintf()
>which is not in any of the libraries on 3.51 software.  Can someone post
>or mail me a copy of this routine?  Thank you-

	It is in /lib/libc.a, just not in the shared libs.  If you want to
link with the shared libs, and don't have ccc yet (The most recent version
was recently posted in comp.sources.3b1), you can get it from /lib/libc.a by:

ar -xv /lib/libc.a vfprintf.o

You should extract it in the directory for the program in question, and
modify the makefile to include it in the list of objects to be linked, or
make a local lib with ar, including it, and anything else that's missing
from shlib and present in libc.a, and mention the lib in your final compile
line (The one which does the linking.)  There may be other routines in there
which should be included.  If so, ld(1) will tell you about what is missing.

	Here's the result of:

	ar -tv /lib/libc.a | grep 'print'

rw-r--r--     0/     0    436 Apr 18 23:29 1987 printf.o
rw-r--r--     0/     0    398 Apr 18 23:29 1987 fprintf.o
rw-r--r--     0/     0    422 Apr 18 23:29 1987 sprintf.o
rw-r--r--     0/     0    426 Apr 18 23:30 1987 vfprintf.o
rw-r--r--     0/     0    486 Apr 18 23:29 1987 vprintf.o
rw-r--r--     0/     0    414 Apr 18 23:29 1987 vsprintf.o


	There are more elegant ways of dealing with this, but this will work
for this program.  The more elegant ways will provide a fix for future
programs as well.  The above-mentioned 'ccc' is one example.

	Good Luck
		DoN.
-- 
Donald Nichols (DoN.)		| Voice (Days):	(703) 664-1585
D&D Data			| Voice (Eves):	(703) 938-4564
Disclaimer: from here - None	| Email:     <dnichols@ceilidh.beartrack.com>
	--- Black Holes are where God is dividing by zero ---

thad@public.BTR.COM (Thaddeus P. Floryan) (06/07/91)

In article <1991Jun6.030111.6761@ms.uky.edu> amir@ms.uky.edu (Amir Sadr) writes:
>I am trying to compile the TeX previewer which I recently got from the OSU
>UNIXpc archives and I am having difficulties.  The program uses vfprintf()
>which is not in any of the libraries on 3.51 software.
>[...]

I disagree.  vfprintf() is in the normal library; it is NOT in the shared lib.

To wit:

thadlabs ksh 1443/1444> ar -tv /lib/libc.a vfprintf.o
rw-r--r--     0/     0    426 Apr 18 20:30 1987 vfprintf.o
thadlabs ksh 1443/1444> grep -in print /lib/shlib.ifile
205:printf = _tbase + 0x39c;
206:fprintf = _tbase + 0x3a2;
207:sprintf = _tbase + 0x3a8;
332:wprintf = _tbase + 0x696;
333:printw = _tbase + 0x69c;
381:eprintf = _tbase + 0x7bc;
thadlabs ksh 1443/1444> 

There are instructions (perhaps in the osu-cis archives) for building a new
shared lib containing the several functions missing in the shared lib.

To use those functions (not in the shared lib), one simple method is to
extract them from /lib/libc.a and load them explicitly with one's objects.

Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]

amir@ms.uky.edu (Amir Sadr) (06/07/91)

In article <2968@public.BTR.COM> thad@public.BTR.COM (Thaddeus P. Floryan) writes:
>In article <1991Jun6.030111.6761@ms.uky.edu> amir@ms.uky.edu (Amir Sadr) writes:
>>I am trying to compile the TeX previewer which I recently got from the OSU
>>UNIXpc archives and I am having difficulties.  The program uses vfprintf()
>>which is not in any of the libraries on 3.51 software.
>>[...]
>
>I disagree.  vfprintf() is in the normal library; it is NOT in the shared lib.
>

You are absolutely right.  I realized this after looking around more
carefully and in fact the makefile that was packed with tex3b1 has a
a rule in it that extracts vfprintf from the archive.  It was commented
out and I really didn't bother to look at the make carefully either.
Thanks again to all who sent mail and/or responded.  The program has
since been compiled.

P.S.  Now, can anyone point me to a good site that has decent fonts?
-- 
- Amir Sadr,  Dept. of Computer Science          amir@ms.uky.edu
- University of Kentucky                         amir@UKMA.BITNET
- Lexington,  KY 40506-0027                      [rutgers,uunet]!ukma!amir
--