From: Max Okumoto Date: Fri, 4 Feb 2005 21:45:36 +0000 (+0000) Subject: - Revert some white space changes, to keep us in sync with FreeBSD. X-Git-Tag: v2.0.1~8895 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/09040c8925ee853e37c8d5f6536fd4184171dc4c - Revert some white space changes, to keep us in sync with FreeBSD. - Move Buf_Clear() to end of file (why?) to keep us in sycn with FreeBSD. --- diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index 7daea4db10..1fce2609a1 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -37,7 +37,7 @@ * * @(#)arch.c 8.2 (Berkeley) 1/2/94 * $FreeBSD: src/usr.bin/make/arch.c,v 1.15.2.1 2001/02/13 03:13:57 will Exp $ - * $DragonFly: src/usr.bin/make/arch.c,v 1.30 2005/02/04 21:24:06 okumoto Exp $ + * $DragonFly: src/usr.bin/make/arch.c,v 1.31 2005/02/04 21:45:36 okumoto Exp $ */ /*- @@ -120,7 +120,8 @@ typedef struct Arch { } Arch; static struct ar_hdr *ArchStatMember(const char *, const char *, Boolean); -static FILE *ArchFindMember(const char *, const char *, struct ar_hdr *, const char *); +static FILE *ArchFindMember(const char *, const char *, struct ar_hdr *, + const char *); #if defined(__svr4__) || defined(__SVR4) || defined(__ELF__) #define SVR4ARCHIVES static int ArchSVR4Entry(Arch *, char *, size_t, FILE *); @@ -743,7 +744,8 @@ ArchSVR4Entry(Arch *ar, char *name, size_t size, FILE *arch) *----------------------------------------------------------------------- */ static FILE * -ArchFindMember(const char *archive, const char *member, struct ar_hdr *arhPtr, const char *mode) +ArchFindMember(const char *archive, const char *member, struct ar_hdr *arhPtr, + const char *mode) { FILE *arch; /* Stream to archive */ int size; /* Size of archive member */ diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c index 8fec999d21..0377602e03 100644 --- a/usr.bin/make/buf.c +++ b/usr.bin/make/buf.c @@ -39,7 +39,7 @@ * * @(#)buf.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/make/buf.c,v 1.11 1999/09/11 13:08:01 hoek Exp $ - * $DragonFly: src/usr.bin/make/buf.c,v 1.30 2005/02/04 21:24:06 okumoto Exp $ + * $DragonFly: src/usr.bin/make/buf.c,v 1.31 2005/02/04 21:45:36 okumoto Exp $ */ /* @@ -82,8 +82,8 @@ BufExpand(Buffer *bp, size_t nb) if (bp->size < len + nb + 1) { int size = bp->size + MAX(nb + 1, BUF_ADD_INC); - bp->size = size; bp->buf = erealloc(bp->buf, size); + bp->size = size; bp->end = bp->buf + len; } } @@ -190,16 +190,6 @@ Buf_ReplaceLastByte(Buffer *bp, Byte byte) } } -/** - * Clear the contents of the buffer. - */ -void -Buf_Clear(Buffer *bp) -{ - bp->end = bp->buf; - *bp->end = '\0'; -} - /** * Append characters in str to Buffer object */ @@ -248,3 +238,15 @@ Buf_StripNewlines(Buffer *bp) --ptr; } } + +/** + * Clear the contents of the buffer. + */ +void +Buf_Clear(Buffer *bp) +{ + + bp->end = bp->buf; + *bp->end = '\0'; +} + diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 6ed4439139..04ca983f60 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -37,7 +37,7 @@ * * @(#)var.c 8.3 (Berkeley) 3/19/94 * $FreeBSD: src/usr.bin/make/var.c,v 1.16.2.3 2002/02/27 14:18:57 cjc Exp $ - * $DragonFly: src/usr.bin/make/var.c,v 1.56 2005/02/04 21:16:44 okumoto Exp $ + * $DragonFly: src/usr.bin/make/var.c,v 1.57 2005/02/04 21:45:36 okumoto Exp $ */ /*- @@ -1993,5 +1993,6 @@ VarPrintVar(void *vp, void *dummy __unused) void Var_Dump(GNode *ctxt) { + Lst_ForEach(&ctxt->context, VarPrintVar, (void *)NULL); }