The NetBSD Project

CVS log for src/lib/libc/stdio/vsnprintf_ss.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / stdio

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 19 20:32:16 2022 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

lib: remove CONSTCOND comment

Since 2021-01-31, lint doesn't need it anymore for the common pattern of
'do ... while (0)'.

Revision 1.10.4.1 / (download) - annotate - [select for diffs], Mon Nov 3 21:22:28 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Pull up following revision(s) (requested by christos in ticket #1161):
	lib/libc/stdio/printf.3: revision 1.64 via patch
	lib/libc/stdio/vsnprintf.c: revision 1.28 via patch
	lib/libc/stdio/vsnprintf_ss.c: revision 1.13 via patch
Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX
(well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX).
Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX
(well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX).

Revision 1.12.10.1 / (download) - annotate - [select for diffs], Tue Sep 30 18:21:40 2014 UTC (8 years, 4 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Pull up following revision(s) (requested by christos in ticket #122):
	lib/libc/stdio/printf.3: revision 1.64
	lib/libc/stdio/vsnprintf.c: revision 1.28
	lib/libc/stdio/vsnprintf_ss.c: revision 1.13
Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX
(well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX).

Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 29 14:58:33 2014 UTC (8 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX
(well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX).

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:25 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.10: +17 -9 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

sync with head

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 15 18:22:31 2012 UTC (10 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, agc-symver-base, agc-symver
Branch point for: netbsd-7
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

- ansify, knf.
- no functional changes

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 13 21:13:47 2012 UTC (10 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.10: +15 -7 lines
Diff to previous 1.10 (colored)

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 17 20:54:34 2011 UTC (11 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Dec 17 15:19:48 2009 UTC (13 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.8: +4 -3 lines
Diff to previous 1.8 (colored)

PR/42466: Yasuoka Masahiko: vsnprintf_ss() causes infinite loop

Revision 1.8 / (download) - annotate - [select for diffs], Sun Oct 25 20:44:13 2009 UTC (13 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

revert some of dsl's changes to make things build on i386; he can undo what
he wants when he comes back.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Oct 24 15:20:15 2009 UTC (13 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

Remove a load of pointless casts - one that even lint doesn't bleat about.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon May 7 19:49:09 2007 UTC (15 years, 9 months ago) by pavel
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.2: +431 -24 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by manu in ticket #607):
	lib/libc/arch/i386/gen/isnanl.c: revision 1.6
	lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
	lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
	lib/libc/gdtoa/gdtoaimp.h: revision 1.6
	sys/arch/m68k/include/ieee.h: revision 1.13
	usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
	lib/libc/stdio/snprintf_ss.c: revision 1.4
	lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
	lib/libc/stdio/vfscanf.c: revision 1.38
	sys/arch/sparc/include/ieee.h: revision 1.11-1.12
	lib/libc/gdtoa/dtoa.c: revision 1.4
	lib/libc/stdio/Makefile.inc: revision 1.35
	lib/libc/stdio/fvwrite.c: revision 1.17
	lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
	lib/libc/arch/i386/gen/isinfl.c: revision 1.6
	lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
	lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
	lib/libc/stdio/vfprintf.c: revision 1.55-1.57
	lib/libc/stdio/vsnprintf_ss.c: revision 1.3
	lib/libc/stdio/vfwprintf.c: revision 1.10
	sys/arch/x86/include/ieee.h: revision 1.10
	lib/libc/gdtoa/dmisc.c: revision 1.3
	lib/libc/gdtoa/Makefile.inc: revision 1.5
	sys/arch/hppa/include/ieee.h: revision 1.10
	lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
	lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
	sys/sys/ieee754.h: revision 1.7
	lib/libc/gdtoa/gdtoa.h: revision 1.7
	include/stdio.h: revision 1.67-1.68
	lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
	lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
  efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos:  gdtoa fixes for m68k.  M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 3 22:26:55 2007 UTC (16 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, mjf-devfs2, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, christos-time_t-nbase, christos-time_t-base, christos-time_t
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

chech the correct fmt in the assertion.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 3 00:27:52 2007 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

the buffer len is called slen.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 3 00:23:01 2007 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.3: +7 -3 lines
Diff to previous 1.3 (colored)

protect buffer size from overflow.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Feb 2 23:00:28 2007 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.2: +431 -24 lines
Diff to previous 1.2 (colored)

Instead of abusing stdio to get a signal-safe version of sprintf, provide one.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Nov 22 17:23:25 2006 UTC (16 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

Don't expose _ss functions for 4.0. Requested by core.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Oct 27 19:59:58 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN

Add signal-safe versions of snprintf and vsnprintf

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>