diff options
author | harti <harti@FreeBSD.org> | 2004-12-06 08:51:34 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-12-06 08:51:34 +0000 |
commit | c06cfd7434a4b1e3c06cbaeee90172c399f6a0bb (patch) | |
tree | d1cd3a1280596e6fc16ebd0ac6aa673c1bdfabdc /usr.bin/make | |
parent | 0a293bea5cab5e7f7df39a2edaef8e0034ba0a16 (diff) | |
download | FreeBSD-src-c06cfd7434a4b1e3c06cbaeee90172c399f6a0bb.zip FreeBSD-src-c06cfd7434a4b1e3c06cbaeee90172c399f6a0bb.tar.gz |
Style: fix indentation, prototypes for functions even in comment.
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/hash.h | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/usr.bin/make/hash.h b/usr.bin/make/hash.h index 044ddf8..0e50ee2 100644 --- a/usr.bin/make/hash.h +++ b/usr.bin/make/hash.h @@ -52,34 +52,28 @@ /* * The following defines one entry in the hash table. */ - typedef struct Hash_Entry { - struct Hash_Entry *next; /* Used to link together all the - * entries associated with the same - * bucket. */ - void * clientData; /* Arbitrary piece of data associated - * with key. */ - unsigned namehash; /* hash value of key */ - char name[1]; /* key string */ + struct Hash_Entry *next; /* Link entries within same bucket. */ + void *clientData; /* Data associated with key. */ + unsigned namehash; /* hash value of key */ + char name[1]; /* key string */ } Hash_Entry; typedef struct Hash_Table { - struct Hash_Entry **bucketPtr;/* Pointers to Hash_Entry, one - * for each bucket in the table. */ - int size; /* Actual size of array. */ - int numEntries; /* Number of entries in the table. */ - int mask; /* Used to select bits for hashing. */ + struct Hash_Entry **bucketPtr; /* Buckets in the table */ + int size; /* Actual size of array. */ + int numEntries; /* Number of entries in the table. */ + int mask; /* Used to select bits for hashing. */ } Hash_Table; /* * The following structure is used by the searching routines * to record where we are in the search. */ - typedef struct Hash_Search { - Hash_Table *tablePtr; /* Table being searched. */ - int nextIndex; /* Next bucket to check (after current). */ - Hash_Entry *hashEntryPtr; /* Next entry to check in current bucket. */ + Hash_Table *tablePtr; /* Table being searched. */ + int nextIndex; /* Next bucket to check */ + Hash_Entry *hashEntryPtr; /* Next entry in current bucket */ } Hash_Search; /* @@ -87,24 +81,18 @@ typedef struct Hash_Search { */ /* - * void * Hash_GetValue(h) - * Hash_Entry *h; + * void *Hash_GetValue(const Hash_Entry *h) */ - #define Hash_GetValue(h) ((h)->clientData) /* - * Hash_SetValue(h, val); - * Hash_Entry *h; - * char *val; + * Hash_SetValue(Hash_Entry *h, void *val); */ - #define Hash_SetValue(h, val) ((h)->clientData = (val)) /* * Hash_Size(n) returns the number of words in an object of n bytes */ - #define Hash_Size(n) (((n) + sizeof(int) - 1) / sizeof(int)) void Hash_InitTable(Hash_Table *, int); |