www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/09/18:32:19

Message-Id: <199906092232.WAA19202@out5.ibm.net>
From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Wed, 9 Jun 1999 18:32:05 -0400
MIME-Version: 1.0
Subject: Re: {v,}snprintf.c ???
In-reply-to: <199906092004.QAA18356@mccoy2.ECE.McGill.CA>
References: <375EB600 DOT 979DA70D AT cyberoptics DOT com> from "Eric Rudd" at Jun 9, 99 01:44:16 pm
X-mailer: Pegasus Mail for Win32 (v3.11)
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

>   I was playing with djgpp this afternoon and notice snprintf()
> was missing.  It's not ANSI  not even POSIX, I beleive. But more and
> more apps use it because of the security that it provides, sprintf() and
> vsprintf() provide no buffer checks.
> 

> stdio.h:
> int vsnprintf(char *s, size_t n, const char *format, va_list ap);
> int snprintf(char *s, size_t n, const char *format, ...);

Both are in the ANSI C9X draft so I would consider them ANSI.


--- 
Mark Elbrecht, snowball3 AT bigfoot DOT com
http://snowball.frogspace.net/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019