lib/snprintf.c


Log

Author Commit Date CI Message
Bruno Haible dac3bbf9 2008-03-30T15:18:13 Use module 'EOVERFLOW' rather than defining an EOVERFLOW replacement in the C code.
Bruno Haible e0a39772 2007-03-08T03:24:38 Whitespace change.
Bruno Haible 3f868c07 2007-02-21T02:19:34 snprintf.h is replaced with <stdio.h>.
Paul Eggert 0632e115 2006-09-13T22:38:14 * _fpending.c: Include <config.h> unconditionally, since we no longer worry about uses that don't define HAVE_CONFIG_H. * acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c: * basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c: * canonicalize.c, chdir-long.c, chdir-safer.c, chown.c: * cloexec.c, close-stream.c, closeout.c, creat-safer.c: * cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c: * dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c: * exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c: * file-type.c, fileblocks.c, filemode.c, filenamecat.c: * fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c: * ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c: * getcwd.c, getdate.y, getdomainname.c, getgroups.c: * gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c: * getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c: * gettime.c, gettimeofday.c, getugroups.c, getusershell.c: * glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c: * human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c: * isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c: * malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c: * memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c: * mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c: * mountlist.c, nanosleep.c, obstack.c, open-safer.c: * openat-die.c, openat.c, pagealign_alloc.c, physmem.c: * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c: * quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c: * realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c: * same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c: * sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c: * stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c: * strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c: * timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c: * utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c: * xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c: * xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c: * xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Likewise.
Paul Eggert 892cd865 2006-08-11T17:47:58 Fix typo in previous checkin: len -> lenbuf.
Paul Eggert 897f4d06 2006-08-11T17:42:19 * snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when LEN is smaller than SIZE. Suggested by Bruno Haible. Also, help the compiler to keep LEN in a register.
Paul Eggert 7e421d1c 2006-08-10T19:32:38 * modules/snprintf (Depends-on): Remove minmax. (Maintainer): Add self. * lib/.cppi-disable: Add snprintf.h, socket_.h. * lib/snprintf.c: Include <errno.h> and <limits.h>. (EOVERFLOW): Define if the system does not. Do not include "minmax.h"; it wasn't used. (snprintf): Don't assume size_t promotes to an unsigned type. Fix bug when generated string was too long for the buffer: the buffer's contents are supposed to be the initial prefix of the output. Don't assume vasnprintf returns EOVERFLOW if the size exceeds INT_MAX; do the check ourselves.
Paul Eggert 267a39ba 2005-05-14T06:03:57 *** empty log message ***
Bruno Haible f5200a50 2004-10-07T16:15:22 Avoid a memory allocation when possible.
Paul Eggert f239ee68 2004-10-01T18:54:53 Remove comments as to why each header is needed.
Bruno Haible 6dc8b58f 2004-10-01T13:27:20 Another fix to snprintf().
Bruno Haible edafda53 2004-10-01T10:26:52 Fixes, mostly from Simon Josefsson.
Bruno Haible 5006cb17 2004-10-01T10:12:23 Ensure memcpy is declared.
Paul Eggert d6fa94ab 2004-09-30T23:29:25 New snprintf module from Simon Josefsson.