Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pegasus.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!pegasus!hansen From: hansen@pegasus.UUCP (Tony L. Hansen) Newsgroups: net.unix-wizards Subject: Re: _print/_doprnt; curses on sys III Message-ID: <1440@pegasus.UUCP> Date: Fri, 22-Jun-84 10:36:10 EDT Article-I.D.: pegasus.1440 Posted: Fri Jun 22 10:36:10 1984 Date-Received: Wed, 27-Jun-84 01:32:20 EDT References: <948@sri-arpa.UUCP> <2036@rlgvax.UUCP> Organization: AT&T Information Systems, Lincroft NJ Lines: 28 > > It is standard System III. AT&T finally wised up to how much software > > broke when they took _doprnt away, and made it come back in System V. > Well, I looked, and "_doprnt" is back; in S5R2, they also provide the > "vprintf", "vfprintf", and "vsprintf" interfaces that were in S3 as > distributed (and which can be used instead of "_doprnt"), but were > ripped out of S5. "_doprnt" is, alas, not in every implementation of > standard I/O, so software which uses it will still break under some > implementations. Still wrong! _doprnt() is only in SOME versions of System V. I have worked with at least three different System V machines that did NOT have _doprnt() in their libc. Nor did they have _print(). The Vax version of System V DOES have _doprnt() in it for System V, but don't count on it being there forever. How to get around it? We've made extensive use of a C version of _doprnt(), as well as the v*printf() family. There is a version of v*printf() which works with _doprnt(). (Our curses uses vsprintf().) In System Vr2, v*printf() is implemented as a supported part of the stdio package and uses whatever underlying mechanism the rest of stdio uses. I wish BSD had picked up the v*printf() functions rather than documenting the _doprnt() routine. Re-implementing v*printf() would be a 15 minute job for someone who knows _doprnt() well. Tony Hansen pegasus!hansen