_print/_doprnt; curses on sys III

Toby Harness toby at gargoyle.UChicago.UUCP
Fri Jun 15 09:05:01 AEST 1984


I am moving some code from a VAX/750 (4.2bsd) to a HP9000 (mostly(!) sys III),
and have discovered that in /lib/libc.a _doprnt has been replaced with _print.
Is this a HP mod or standard sys III?  Does anyone (hplabs??) know how _print
is supposed to work (e.g. type and ordering of arguments)?  We have only
binary from HP on this, and of course _print isn`t documented anywhere.  We
do have source for 4.2bsd and v7.  The problem first came up in curses, but
_doprnt is also used in csh and a couple of other places I can`t recall right
now.  The piece of curses code in question is (from _sprintw in printw.c):

...
char 	*fmt;
int	*args; {

	FILE	junk;
	char	buf[512];

	junk._flag = _IOWRT + _IOSTRG;
	junk._prt = buf;
	junk._cnt = 32767;
	_doprnt(fmt, arg, &junk);
	...

I don`t know, but doesn`t this strike some of you as UGLY?  (comments?)

With a work-around that can`t handle varargs (and that I have too much self
respect to post here) I have curses working just fine on the HP9000 (incl.
Mark Davoren`s recent scroll fixes).  If anyone (with 4.2bsd source, alas)
is interrest in a "#ifdef SYSIII" version of curses, I will be happy to 
send it to him/her, but only *after* I get an answer about _print.

Toby Harness		Ogburn/Stouffer Center, University of Chicago
			...inhp4!gargoyle!sam!toby



More information about the Comp.unix.wizards mailing list