summaryrefslogtreecommitdiffstats
path: root/generic/regguts.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-22 14:38:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-22 14:38:18 (GMT)
commite2baf98d42baad64a19da5ec35136b0bc81ff7f5 (patch)
treead295d0aad96e6a4b66a5e78612a42fb71fafc5b /generic/regguts.h
parentae6d91316afca4d7295521163352757b570d0e85 (diff)
downloadtcl-e2baf98d42baad64a19da5ec35136b0bc81ff7f5.zip
tcl-e2baf98d42baad64a19da5ec35136b0bc81ff7f5.tar.gz
tcl-e2baf98d42baad64a19da5ec35136b0bc81ff7f5.tar.bz2
Eliminate some usage of VOID and its variants.
Remove unnecessary #undef's
Diffstat (limited to 'generic/regguts.h')
-rw-r--r--generic/regguts.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/generic/regguts.h b/generic/regguts.h
index 67f9625..b877087 100644
--- a/generic/regguts.h
+++ b/generic/regguts.h
@@ -49,41 +49,15 @@
#include <assert.h>
#endif
-/* voids */
-#ifndef VOID
-#define VOID void /* for function return values */
-#endif
-#ifndef DISCARD
-#define DISCARD void /* for throwing values away */
-#endif
-#ifndef PVOID
-#define PVOID void * /* generic pointer */
-#endif
-#ifndef VS
-#define VS(x) ((void*)(x)) /* cast something to generic ptr */
-#endif
-#ifndef NOPARMS
-#define NOPARMS void /* for empty parm lists */
-#endif
-
-/* function-pointer declarator */
-#ifndef FUNCPTR
-#if __STDC__ >= 1
-#define FUNCPTR(name, args) (*name)args
-#else
-#define FUNCPTR(name, args) (*name)()
-#endif
-#endif
-
/* memory allocation */
#ifndef MALLOC
#define MALLOC(n) malloc(n)
#endif
#ifndef REALLOC
-#define REALLOC(p, n) realloc(VS(p), n)
+#define REALLOC(p, n) realloc((void*)(p), n)
#endif
#ifndef FREE
-#define FREE(p) free(VS(p))
+#define FREE(p) free((void*)(p))
#endif
/* want size of a char in bits, and max value in bounded quantifiers */
@@ -366,7 +340,7 @@ struct subre {
*/
struct fns {
- void FUNCPTR(free, (regex_t *));
+ void (*free)(regex_t *);
};
/*
@@ -383,7 +357,7 @@ struct guts {
struct cnfa search; /* for fast preliminary search */
int ntree;
struct colormap cmap;
- int FUNCPTR(compare, (const chr *, const chr *, size_t));
+ int (*compare) (const chr *, const chr *, size_t);
struct subre *lacons; /* lookahead-constraint vector */
int nlacons; /* size of lacons */
};