Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site danews.UUCP Path: utzoo!decvax!bellcore!ulysses!burl!clyde!cbosgd!danews!lvc From: lvc@danews.UUCP (Larry Cipriani) Newsgroups: net.lang.c Subject: What ever happened to %r in printf ? Message-ID: <126@danews.UUCP> Date: Thu, 29-May-86 16:21:38 EDT Article-I.D.: danews.126 Posted: Thu May 29 16:21:38 1986 Date-Received: Fri, 30-May-86 17:46:46 EDT Distribution: na Organization: AT&T Bell Labs, Columbus OH Lines: 32 Does anyone know why the %r formatting option of printf was never documented on older UNIX systems ? It doesn't exist on the Sys 5 Rel 2 we have. This option lets you do things like: doprint("usage: %s: not found", argv[0]); and for doprint we have: doprint(fmt) char *fmt; { stuff ... printf("%r", &fmt); other stuff ... } The %r tells printf to use &fmt as the address of a printf formatting string, and to get the arguments for it off the stack. I don't know if it would work if fmt contained another %r. Can vprintf be used to produce the same result ? Thanks, -- Larry Cipriani AT&T Network Systems danews!lvc Mail responses to ihnp4!cbsck!lvc please - thanks "Nothing is worse than an itch you can never scratch."