The NetBSD Project

CVS log for src/lib/libc/gen/humanize_number.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.14.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:18 2012 UTC (2 years, 6 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.14: +25 -11 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

sync with head

Revision 1.14.24.1 / (download) - annotate - [select for diffs], Mon Mar 19 23:24:58 2012 UTC (2 years, 7 months ago) by riz
Branch: netbsd-6
CVS Tags: 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
Changes since 1.14: +17 -5 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Pull up following revision(s) (requested by dholland in ticket #129):
	lib/libc/gen/humanize_number.c: revision 1.16
PR/44097: Yamamoto Takashi: Prevent overflow.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Mar 17 20:01:14 2012 UTC (2 years, 7 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, netbsd-7, agc-symver-base, agc-symver, HEAD
Changes since 1.15: +17 -5 lines
Diff to previous 1.15 (colored)

PR/44097: Yamamoto Takashi: Prevent overflow.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Mar 13 21:13:36 2012 UTC (2 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.14: +10 -8 lines
Diff to previous 1.14 (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.13.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:15 2008 UTC (6 years, 5 months ago) by yamt
Branch: yamt-pf42
Changes since 1.13: +2 -9 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

sync with head.

Revision 1.14.8.2 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:00 2008 UTC (6 years, 5 months ago) by martin
Branch: christos-time_t
Changes since 1.14.8.1: +147 -0 lines
Diff to previous 1.14.8.1 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.14.8.1, Mon Apr 28 20:22:59 2008 UTC (6 years, 5 months ago) by martin
Branch: christos-time_t
Changes since 1.14: +0 -147 lines
FILE REMOVED

file humanize_number.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000

Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 28 20:22:59 2008 UTC (6 years, 5 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-6-base, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, 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-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, matt-premerge-20091211, 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-premerge-20101231, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, christos-time_t-nbase, christos-time_t-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, netbsd-6, christos-time_t
Changes since 1.13: +2 -9 lines
Diff to previous 1.13 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:34:06 2008 UTC (6 years, 9 months ago) by matt
Branch: matt-armv6
Changes since 1.12: +2 -3 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

sync with HEAD

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Sun Jan 6 05:00:42 2008 UTC (6 years, 9 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.11: +8 -3 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Catch up to netbsd-4.0 release.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Dec 14 17:26:19 2007 UTC (6 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: yamt-pf42
Changes since 1.12: +2 -3 lines
Diff to previous 1.12 (colored)

- add dehumanize_number
- decls for humanize_number and dehumanize_number are in stdlib.h

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Sun Nov 25 09:38:17 2007 UTC (6 years, 11 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.11: +8 -3 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Pull up following revision(s) (requested by simonb in ticket #992):
	lib/libc/gen/humanize_number.c: revision 1.12
Fix a bug that humanize_number() produces "1000" where it should be "1.0G"
or "1.0M".  The bug reported by Greg Troxel.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Mar 13 02:52:10 2007 UTC (7 years, 7 months ago) by enami
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: matt-armv6
Changes since 1.11: +8 -3 lines
Diff to previous 1.11 (colored)

Fix a bug that humanize_number() produces "1000" where it should be "1.0G"
or "1.0M".  The bug reported by Greg Troxel.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 8 21:08:56 2006 UTC (8 years, 4 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-4-base, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored)

Use PRId64 instead of a cast to long long and %lld to print an int64_t.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 13 01:44:09 2005 UTC (9 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.9: +4 -6 lines
Diff to previous 1.9 (colored)

compat core reorg.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Feb 9 21:35:46 2005 UTC (9 years, 8 months ago) by kleink
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
  fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
  uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 27 01:56:24 2004 UTC (10 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.7: +52 -59 lines
Diff to previous 1.7 (colored)

- Honor the HN_NOSPACE flag (i.e., don't put a space if specified,
and put space if not specified).
- There was a test which didn't count the suffixlen.  Fix it.
- Make the code a bit easier to read.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 12 09:21:20 2004 UTC (10 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Print 10450000 as 10M instead of 10.0M (more greater value such as
10500000 is printed as 10M).

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jul 12 09:14:07 2004 UTC (10 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.5: +2 -7 lines
Diff to previous 1.5 (colored)

No need to set divisor twice.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Dec 26 11:30:36 2003 UTC (10 years, 10 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.4: +20 -11 lines
Diff to previous 1.4 (colored)

Don't ever add a ".0" to a single digit number.

XXX: Should (for example) 1024 be 1.0K or 1K when the HN_DECIMAL flag
     is passed?  Should there be a separate option that says "use the
     HN_DECIMAL behaviour unless we are exactly equal to the suffix"?

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Dec 10 06:25:49 2002 UTC (11 years, 10 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.1.2.3: +7 -5 lines
Diff to previous 1.1.2.3 (colored) next main 1.2 (colored)

Sync with HEAD.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 11 18:00:43 2002 UTC (11 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.3: +7 -5 lines
Diff to previous 1.3 (colored)

Fix signed/unsigned comparison warnings.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Fri Oct 18 02:15:56 2002 UTC (12 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.2: +19 -7 lines
Diff to previous 1.1.2.2 (colored)

Catch up to -current.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Sep 27 18:37:45 2002 UTC (12 years ago) by drochner
Branch: MAIN
Changes since 1.2: +19 -7 lines
Diff to previous 1.2 (colored)

SI prefixes apply to decimal multiplies only. For binary (2^n) multiplies
the most "officially looking" is IEC 60027-2, ie "Ki", "Mi", ...,
which is not too popular, and which would require more code changes.
So stick with the traditional capital "K" for (divisor==1024), and use
the SI "k" otherwise (ie (divisor==1000)).

Revision 1.2 / (download) - annotate - [select for diffs], Thu Sep 26 15:08:00 2002 UTC (12 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

Kilo abbreviation is a small k (PR 18408).

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Aug 27 23:49:31 2002 UTC (12 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.1: +140 -0 lines
Diff to previous 1.1.2.1 (colored)

Catch up to -current.

Revision 1.1.2.1, Thu Aug 22 17:24:10 2002 UTC (12 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1: +0 -140 lines
FILE REMOVED

file humanize_number.c was added on branch nathanw_sa on 2002-08-27 23:49:31 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Thu Aug 22 17:24:10 2002 UTC (12 years, 2 months ago) by abs
Branch: MAIN
Branch point for: nathanw_sa

Move humanize_number(3) from libutil to libc as per discussion on tech-misc
Revert minor number bump on libutil (with note to skip it next update), and
bump libc.

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>