From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,b4b4daa7e9e8f4a3,start X-Google-Attributes: gidfc89c,public X-Google-Thread: 10c665,b4b4daa7e9e8f4a3,start X-Google-Attributes: gid10c665,public X-Google-Thread: fee84,b4b4daa7e9e8f4a3,start X-Google-Attributes: gidfee84,public X-Google-Thread: 10663e,b4b4daa7e9e8f4a3,start X-Google-Attributes: gid10663e,public From: Ollivier.Robert@eurocontrol.fr (Ollivier Robert) Subject: Re: snprintf() or vsnprintf() ? Date: 1996/11/05 Message-ID: <55npkr$4al@polaris.eurocontrol.fr>#1/1 X-Deja-AN: 194646429 references: <55nhh2$dd8$2@metro.atlanta.com> organization: Eurocontrol EEC, Bretigny, France newsgroups: comp.unix.unixware.misc,comp.unix.osf.osf1,comp.unix.sys5.r4,comp.unix.programmer x-newsposter: Pnews 4.0-test46 (31 Oct 96) [courtesy cc of this posting sent to cited author via email] In article <55nhh2$dd8$2@metro.atlanta.com>, Curt Smith wrote: > new'ish libc function; snprintf(). Philosophically similar to the string > functions; strnxxx(), where you pass in the size of the recipient buffer. > Does anyone know of availability from Unix OEMs or GNU/SFS places > implimentations of sprintf and vsprintf that support the "n" varient? There is one reasonnably portable in Mutt's source. It is an enhanced version of Patrick Powell's one, posted in Bugtraq last year. The enhancement is for "%N.Ms" support. Some UNIX system already have it like all the *BSD, Linux, HP-UX (with a security patch I think). See below for pointers. -- Ollivier ROBERT -=- Eurocontrol EEC/TS -=- Ollivier.Robert@eurocontrol.fr Mutt: faster, smaller & better than Elm.