Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Request comments - printx |
| Date | 2016-10-15 15:28 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <kfnmvi55jsf.fsf@x-alumni2.alumni.caltech.edu> (permalink) |
| References | <kfnh98e7nxs.fsf@x-alumni2.alumni.caltech.edu> <e6a47f0d-cf94-4a69-a82b-5d386380f74e@googlegroups.com> |
supercat@casperkitty.com writes: > On Friday, October 14, 2016 at 2:03:56 PM UTC-5, Tim Rentsch wrote: >> I am soliciting comments and suggestions for a small family of >> functions (and a few supporting macro and type definitions) which >> I have taken to calling "printx", with printx() being the >> representative function of the family. > > I would suggest that one start by defining a single unified vprintf > variant which can be used to implement vsprintf, vfprintf, vprintf, > etc. by accepting a double-indirect pointer to an output function, > and which passes that pointer to the output function itself. This > would allow e.g. vfprintf to be implemented as: [code omitted] > > Such a function could then support additional formatting options by > having it invoke the passed-in function with various negative > lengths when unknown formatting characters were encountered [most > likely, a negative length would indicate that "out_dat" will hold a > pointer to a structure describing what needs to be done]. > > Having one function combine the roles of the equivalents to fprintf, > printf, sprintf, etc. seems better than having different functions > for the different purposes. Unless I am misunderstanding you, these comments are either orthogonal to what I'm asking about or purely about implementation. Providing functions that are plug compatible with printf(), etc, is a given in the problem statement and cannot be changed. My question is about what interface and/or functionality might be provided beyond this minimal specification. Taking the general outline of printx() functions as fixed and not subject to change, do you have any comments or suggestions about additional interface and/or functionality?
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-14 12:03 -0700
Re: Request comments - printx supercat@casperkitty.com - 2016-10-14 13:06 -0700
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-15 15:28 -0700
Re: Request comments - printx supercat@casperkitty.com - 2016-10-17 10:26 -0700
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-18 08:42 -0700
Re: Request comments - printx supercat@casperkitty.com - 2016-10-20 09:12 -0700
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-22 19:23 -0700
Re: Request comments - printx Ian Collins <ian-news@hotmail.com> - 2016-10-16 17:30 +1300
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-16 00:22 -0700
Re: Request comments - printx Ian Collins <ian-news@hotmail.com> - 2016-10-16 20:37 +1300
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-17 11:22 -0700
Re: Request comments - printx BartC <bc@freeuk.com> - 2016-10-16 23:44 +0100
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-17 10:29 -0700
Re: Request comments - printx BartC <bc@freeuk.com> - 2016-10-17 18:57 +0100
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-18 08:20 -0700
Re: Request comments - printx Nick Bowler <nbowler@draconx.ca> - 2016-10-19 17:10 +0000
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-20 08:58 -0700
Re: Request comments - printx raltbos@xs4all.nl (Richard Bos) - 2016-10-23 13:37 +0000
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-23 14:16 -0700
Re: Request comments - printx Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-18 02:41 -0700
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-18 08:37 -0700
Re: Request comments - printx Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-18 08:45 -0700
Re: Request comments - printx Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-18 09:46 -0700
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-18 23:33 -0700
Request comments - printx asetofsymbols@gmail.com - 2016-10-23 00:39 -0700
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-10-23 14:08 -0700
Re: Request comments - printx Richard Heathfield <rjh@cpax.org.uk> - 2016-11-09 16:32 +0000
Re: Request comments - printx "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-10 01:03 +0800
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-11-12 17:53 -0800
Re: Request comments - printx Richard Heathfield <rjh@cpax.org.uk> - 2016-11-13 16:43 +0000
Re: Request comments - printx Tim Rentsch <txr@alumni.caltech.edu> - 2016-11-15 10:37 -0800
csiph-web