Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): indent buf.h with tabs instead of spaces



details:   https://anonhg.NetBSD.org/src/rev/5d007cd85470
branches:  trunk
changeset: 946690:5d007cd85470
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 06 11:00:56 2020 +0000

description:
make(1): indent buf.h with tabs instead of spaces

diffstat:

 usr.bin/make/buf.h |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (57 lines):

diff -r e3f2f1997196 -r 5d007cd85470 usr.bin/make/buf.h
--- a/usr.bin/make/buf.h        Sun Dec 06 10:49:02 2020 +0000
+++ b/usr.bin/make/buf.h        Sun Dec 06 11:00:56 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.36 2020/11/10 00:32:12 rillig Exp $  */
+/*     $NetBSD: buf.h,v 1.37 2020/12/06 11:00:56 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -81,9 +81,9 @@
 
 /* An automatically growing null-terminated buffer of characters. */
 typedef struct Buffer {
-    size_t cap;                /* Allocated size of the buffer, including the null */
-    size_t len;                /* Number of bytes in buffer, excluding the null */
-    char *data;                /* The buffer itself (always null-terminated) */
+       size_t cap;     /* Allocated size of the buffer, including the null */
+       size_t len;     /* Number of bytes in buffer, excluding the null */
+       char *data;     /* The buffer itself (always null-terminated) */
 } Buffer;
 
 /* If we aren't on NetBSD, __predict_false() might not be defined. */
@@ -97,25 +97,25 @@
 MAKE_INLINE void
 Buf_AddByte(Buffer *buf, char byte)
 {
-    size_t old_len = buf->len++;
-    char *end;
-    if (__predict_false(old_len + 1 >= buf->cap))
-       Buf_Expand_1(buf);
-    end = buf->data + old_len;
-    end[0] = byte;
-    end[1] = '\0';
+       size_t old_len = buf->len++;
+       char *end;
+       if (__predict_false(old_len + 1 >= buf->cap))
+               Buf_Expand_1(buf);
+       end = buf->data + old_len;
+       end[0] = byte;
+       end[1] = '\0';
 }
 
 MAKE_INLINE size_t
 Buf_Len(const Buffer *buf)
 {
-    return buf->len;
+       return buf->len;
 }
 
 MAKE_INLINE Boolean
 Buf_EndsWith(const Buffer *buf, char ch)
 {
-    return buf->len > 0 && buf->data[buf->len - 1] == ch;
+       return buf->len > 0 && buf->data[buf->len - 1] == ch;
 }
 
 void Buf_AddBytes(Buffer *, const char *, size_t);



Home | Main Index | Thread Index | Old Index