The NetBSD Project

CVS log for src/usr.bin/make/buf.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Tue Apr 24 20:26:58 2012 UTC (2 years, 6 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, 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, dholland-make-base, agc-symver-base, agc-symver, HEAD
Changes since 1.24: +44 -3 lines
Diff to previous 1.24 (colored)

Var* are generally very liberal with memory, with the expectation
that none of it persists for long.
This isn't always true - for example a long running .for loop.

Buf_DestroyCompact() is used by Var_Subst(), rather than Buf_Destroy().
If it looks like we can save BUF_COMPACT_LIMIT (128) or more bytes,
call realloc.  This can reduce memory consumption by about 20%
Setting BUF_COMPACT_LIMIT to 0 dissables this.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:37 2009 UTC (5 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base4, 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, netbsd-6, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.23: +48 -128 lines
Diff to previous 1.23 (colored)

Change 'Buffer' so that it is the actual struct, not a pointer to it.
Saves having to malloc/free a fixed size structure.
Buf_Init() now takes ptr to Buffer to initialiase.
Change Buf_Destroy() to return ptr to string when not freed.
Remove large number of casts to (Byte) and (Byte *) - 'Byte' is 'char' here.
Buf_AddByte[s] guarantees that the data is 0 termininated, so never add '\0'.
Keep 'count' not 'left' and 'inPtr', code is simplier with only one update.
Fix fallou, no functional change.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Dec 20 18:08:24 2008 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.22: +13 -18 lines
Diff to previous 1.22 (colored)

A lot of code assumes that the pointer returned by Buf_GetAll() is malloced.
Replace Buf_Discard() with Buf_Empty() since the former might leave the
'outPtr != buffer' and the only caller wanted all the data discared.
Remove 'outPtr' now that it always equals 'buffer'.
The assumption about Buf_GetAll()is now guaranteed by design.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 6 22:09:21 2008 UTC (6 years ago) by joerg
Branch: MAIN
CVS Tags: 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-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
Changes since 1.21: +6 -6 lines
Diff to previous 1.21 (colored)

Don't use emalloc and friends directly, but call them consistently
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.

This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (6 years, 8 months 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, mjf-devfs2-base, mjf-devfs2, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Changes since 1.20: +10 -12 lines
Diff to previous 1.20 (colored)

back all changes out until I fix it properly.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (6 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.19: +15 -13 lines
Diff to previous 1.19 (colored)

- use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4

Revision 1.19 / (download) - annotate - [select for diffs], Mon Aug 8 16:42:54 2005 UTC (9 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, 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, netbsd-4, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-base, matt-armv6, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

From Max Okumoto:
- Remove casts to NULL.
- Remove space between cast and object.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Aug 5 00:53:18 2005 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored)

More KNF cleanups from Max Okumoto

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 25 22:55:58 2005 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.16: +9 -9 lines
Diff to previous 1.16 (colored)

Whitespace KNF cleanup from Max Okumoto

Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 16 15:11:52 2005 UTC (9 years, 8 months ago) by christos
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.15: +5 -5 lines
Diff to previous 1.15 (colored)

PR/29203, PR/29204: Max Okumoto: KNF changes to make [no functional changes]

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 7 00:04:38 2004 UTC (10 years, 5 months ago) by ross
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

Simplify build, no functional changes.

Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.14 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:48 2003 UTC (11 years, 2 months ago) by agc
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.13: +34 -3 lines
Diff to previous 1.13 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:55 2002 UTC (12 years, 4 months ago) by wiz
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.12: +22 -26 lines
Diff to previous 1.12 (colored)

Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Sep 15 04:16:31 1999 UTC (15 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.11: +5 -169 lines
Diff to previous 1.11 (colored)

Nuke Buf_{G,Ung}etByte{,s}(), since they aren't used, and make BufExpand do
power-of-2 allocation.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 28 03:31:00 1997 UTC (17 years, 1 month ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Changes since 1.10: +6 -2 lines
Diff to previous 1.10 (colored)

wrap #include <sys/cdefs.h>, __RCSID(...) stuff in #ifndef MAKE_BOOTSTRAP

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jul 1 21:17:08 1997 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

Add WARNS=1
RCSID police

Revision 1.9 / (download) - annotate - [select for diffs], Tue Dec 31 17:53:21 1996 UTC (17 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Use only integral types in procedure arguments.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:00 1996 UTC (17 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.7: +33 -8 lines
Diff to previous 1.7 (colored)

- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Mar 29 02:17:13 1996 UTC (18 years, 7 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Added erealloc() function that calls enomem() if the allocation fails
(this is like the existing emalloc() function).  Changed all realloc()
calls to erealloc().

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 14 15:18:51 1995 UTC (19 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.5: +7 -2 lines
Diff to previous 1.5 (colored)

- $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 6 22:45:19 1994 UTC (20 years, 4 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Fixes from Christos Zoulas, who used purify, objectcenter and testcenter
to find memory leaks and illegal memory accesses.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Mar 5 00:34:34 1994 UTC (20 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.3: +11 -13 lines
Diff to previous 1.3 (colored)

fixes/improvements from Christos Zoulas <christos@deshaw.com>.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jan 13 21:01:42 1994 UTC (20 years, 9 months ago) by jtc
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored)

Include appropriate header files to bring prototypes into scope.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:11:55 1993 UTC (21 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

Add RCS identifiers.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (21 years, 7 months ago) by cgd
Branch: MAIN

Initial revision

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>