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): use tabs for indentation in hash.h and...



details:   https://anonhg.NetBSD.org/src/rev/b9653518f952
branches:  trunk
changeset: 946318:b9653518f952
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Nov 23 17:59:21 2020 +0000

description:
make(1): use tabs for indentation in hash.h and hash.c

diffstat:

 usr.bin/make/hash.c |   6 +++---
 usr.bin/make/hash.h |  30 +++++++++++++++---------------
 2 files changed, 18 insertions(+), 18 deletions(-)

diffs (91 lines):

diff -r c6c0e9c55fb4 -r b9653518f952 usr.bin/make/hash.c
--- a/usr.bin/make/hash.c       Mon Nov 23 16:01:59 2020 +0000
+++ b/usr.bin/make/hash.c       Mon Nov 23 17:59:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash.c,v 1.57 2020/11/14 21:29:44 rillig Exp $ */
+/*     $NetBSD: hash.c,v 1.58 2020/11/23 17:59:21 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
 #include "make.h"
 
 /*     "@(#)hash.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: hash.c,v 1.57 2020/11/14 21:29:44 rillig Exp $");
+MAKE_RCSID("$NetBSD: hash.c,v 1.58 2020/11/23 17:59:21 rillig Exp $");
 
 /*
  * The ratio of # entries to # buckets at which we rebuild the table to
@@ -98,7 +98,7 @@
 unsigned int
 Hash_Hash(const char *key)
 {
-    return hash(key, NULL);
+       return hash(key, NULL);
 }
 
 static HashEntry *
diff -r c6c0e9c55fb4 -r b9653518f952 usr.bin/make/hash.h
--- a/usr.bin/make/hash.h       Mon Nov 23 16:01:59 2020 +0000
+++ b/usr.bin/make/hash.h       Mon Nov 23 17:59:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash.h,v 1.33 2020/11/14 21:29:44 rillig Exp $ */
+/*     $NetBSD: hash.h,v 1.34 2020/11/23 17:59:21 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -79,40 +79,40 @@
 
 /* A single key-value entry in the hash table. */
 typedef struct HashEntry {
-    struct HashEntry *next;    /* Used to link together all the entries
+       struct HashEntry *next; /* Used to link together all the entries
                                 * associated with the same bucket. */
-    void *value;
-    unsigned int key_hash;     /* hash value of the key */
-    char key[1];               /* key string, variable length */
+       void *value;
+       unsigned int key_hash;  /* hash value of the key */
+       char key[1];            /* key string, variable length */
 } HashEntry;
 
 /* The hash table containing the entries. */
 typedef struct HashTable {
-    HashEntry **buckets;       /* Pointers to HashEntry, one
+       HashEntry **buckets;    /* Pointers to HashEntry, one
                                 * for each bucket in the table. */
-    unsigned int bucketsSize;
-    unsigned int numEntries;   /* Number of entries in the table. */
-    unsigned int bucketsMask;  /* Used to select the bucket for a hash. */
-    unsigned int maxchain;     /* max length of chain detected */
+       unsigned int bucketsSize;
+       unsigned int numEntries; /* Number of entries in the table. */
+       unsigned int bucketsMask; /* Used to select the bucket for a hash. */
+       unsigned int maxchain;  /* max length of chain detected */
 } HashTable;
 
 /* State of an iteration over all entries in a table. */
 typedef struct HashIter {
-    HashTable *table;          /* Table being searched. */
-    unsigned int nextBucket;   /* Next bucket to check (after current). */
-    HashEntry *entry;          /* Next entry to check in current bucket. */
+       HashTable *table;       /* Table being searched. */
+       unsigned int nextBucket; /* Next bucket to check (after current). */
+       HashEntry *entry;       /* Next entry to check in current bucket. */
 } HashIter;
 
 MAKE_INLINE void *
 HashEntry_Get(HashEntry *h)
 {
-    return h->value;
+       return h->value;
 }
 
 MAKE_INLINE void
 HashEntry_Set(HashEntry *h, void *datum)
 {
-    h->value = datum;
+       h->value = datum;
 }
 
 void HashTable_Init(HashTable *);



Home | Main Index | Thread Index | Old Index