aboutsummaryrefslogtreecommitdiffstats
path: root/src/htable.h
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-02-19 03:04:39 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2012-02-19 03:08:16 +0100
commit2702a61b0e22ddcbd0b23c1765fac90fe766802a (patch)
treecb10887ccd29796673fc08bf8066c803add195a8 /src/htable.h
parent136e5bc4f7095aef80e55c5e329de5e04bd85886 (diff)
downloadcalcurse-2702a61b0e22ddcbd0b23c1765fac90fe766802a.tar.gz
calcurse-2702a61b0e22ddcbd0b23c1765fac90fe766802a.zip
Fix hash table issues with ISO C99
ISO C99 forbids unnamed structs/unions and nested functions. Move the "HTABLE_HEAD" and "HTABLE_GENERATE" parts out of the function body and place them at the very top of the file (where function definitions are allowed). Also, remove the unnamed struct from "htable.h" (which was useless anyway). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/htable.h')
-rw-r--r--src/htable.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/htable.h b/src/htable.h
index 10d04c1..efd7cac 100644
--- a/src/htable.h
+++ b/src/htable.h
@@ -69,9 +69,7 @@ struct name { \
}
#define HTABLE_ENTRY(type) \
-struct { \
- struct type *next; /* To build the bucket chain list. */ \
-}
+struct type *next /* To build the bucket chain list. */
#define HTABLE_SIZE(head) \
(sizeof (*(head)->bkts) ? sizeof ((head)->bkts) / sizeof (*(head)->bkts) : 0)