Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!ll-xn!mit-eddie!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: "%#s"? Message-ID: <1039@cresswell.quintus.UUCP> Date: 31 May 88 05:38:43 GMT References: <1988May28.222450.2680@utzoo.uucp> <19166@watmath.waterloo.edu> Organization: Quintus Computer Systems, Mountain View, CA Lines: 12 Posted: Mon May 30 22:38:43 1988 In article <19166@watmath.waterloo.edu>, rbutterworth@watmath.waterloo.edu (Ray Butterworth) writes: > Perhaps %#s and %#c can be added in future updates to the language. In the mean-time, why not post sources for a spr_str(char *buffer, int width, int places, char *source) function equivalent to sprintf(buffer, "%#*.*s", width, places, source) so that we can try the idea out? I suggest width < 0 means the equivalent of "%#.*s" and places < 0 means the equivalent of "%#*s". {spr_str(buf, width, 1, &c) can serve for sprintf(buf, "%#*c", width, c).} When we have some prior art going, we can ask for it to be added to printf.