summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2003-11-27 02:08:07 +0000
committerMichael Jennings <mej@kainx.org>2003-11-27 02:08:07 +0000
commitffca8130486f858a5cd5cbe9d47532e01bdcacb6 (patch)
tree391e01a39d2ea650b50b3e2442092e7ac66deafa /include
parentd1253085de106b5c0f4d7f2769bdac997837c94a (diff)
downloadlibast-ffca8130486f858a5cd5cbe9d47532e01bdcacb6.tar.gz
Wed Nov 26 21:07:16 2003 Michael Jennings (mej)
Working on cleaning up namespace issues. SVN revision: 7954
Diffstat (limited to 'include')
-rw-r--r--include/libast.h169
-rw-r--r--include/libast/.cvsignore2
-rw-r--r--include/libast/sysdefs.h.in34
-rw-r--r--include/libast_internal.h20
4 files changed, 152 insertions, 73 deletions
diff --git a/include/libast.h b/include/libast.h
index 833e0f6..27d1b5c 100644
--- a/include/libast.h
+++ b/include/libast.h
@@ -830,7 +830,7 @@ extern int re_exec();
* This macro is a replacement for the libc function malloc(). It
* allocates the specified number of bytes of memory on the heap and
* returns a pointer to that memory location. This macro calls libc's
- * malloc() if memory debugging is off, and libast_malloc() if it's
+ * malloc() if memory debugging is off, and spifmem_malloc() if it's
* on.
*
* @param sz The size in bytes of the block of memory to allocate.
@@ -847,7 +847,7 @@ extern int re_exec();
* objects of type @a type (e.g., a @a type array of size @a n). The
* memory area is zeroed out prior to the pointer to it being
* returned. This macro calls libc's calloc() if memory debugging is
- * off and libast_calloc() if it's on.
+ * off and spifmem_calloc() if it's on.
*
* @param type The type of object to be allocated (e.g., int).
* @param n The number of objects to be allocated.
@@ -864,7 +864,7 @@ extern int re_exec();
* malloc() or calloc() (or, by extension, the MALLOC()/CALLOC()
* macros) and returns a pointer to the (possibly moved) memory area.
* This macro calls libc's realloc() if memory debugging is off and
- * libast_realloc() if it's on.
+ * spifmem_realloc() if it's on.
*
* @param mem The old pointer whose size will be changed.
* @param sz The new size, in bytes, to be allocated.
@@ -880,7 +880,7 @@ extern int re_exec();
* This macro is a replacement for the libc function free(). It
* returns the previously-allocated memory block pointed to by @a ptr
* to the heap. This macro calls libc's free() if memory debugging is
- * off and libast_free() if it's on. The @a ptr parameter is assigned
+ * off and spifmem_free() if it's on. The @a ptr parameter is assigned
* the value of NULL after it has been freed.
*
* @param ptr The pointer to be freed.
@@ -896,7 +896,7 @@ extern int re_exec();
* (including the trailing NUL character), copies the contents of @a s
* into the new buffer, and returns a pointer to the new copy. This
* macro calls libc's strdup() of memory debugging is off and
- * libast_strdup() if it's on.
+ * spifmem_strdup() if it's on.
*
* @param s The string to duplicate.
* @return A pointer to the newly-created copy.
@@ -927,7 +927,7 @@ extern int re_exec();
* This macro is a replacement for the Xlib function XCreatePixmap().
* It creates a pixmap of the specified size and returns an X resource
* ID for it. This macro calls Xlib's XCreatePixmap() if memory
- * debugging is off and libast_x_create_pixmap() if it's on.
+ * debugging is off and spifmem_x_create_pixmap() if it's on.
*
* @param d The X display connection.
* @param win The X drawable on whose display the pixmap will be
@@ -945,7 +945,7 @@ extern int re_exec();
*
* This macro is a replacement for the Xlib function XFreePixmap().
* It frees the specified pixmap. This macro calls Xlib's
- * XFreePixmap() if memory debugging is off and libast_x_free_pixmap()
+ * XFreePixmap() if memory debugging is off and spifmem_x_free_pixmap()
* if it's on.
*
* @param d The X display connection.
@@ -961,7 +961,7 @@ extern int re_exec();
* Imlib2 could conceivably create an image. So instead, simply use
* this macro to register the pixmaps Imlib2 creates. Then LibAST
* will be able to track them. This macro calls
- * libast_imlib_register_pixmap() if memory debugging is on and if
+ * spifmem_imlib_register_pixmap() if memory debugging is on and if
* Imlib2 support has been enabled. Otherwise, it's a NOP().
*
* @param p The Pixmap Imlib2 created.
@@ -973,7 +973,7 @@ extern int re_exec();
* Free a pixmap (and its mask) generated by Imlib2.
*
* Once an Imlib2-generated pixmap has been registered, you should
- * use this macro to free it. It calls libast_imlib_free_pixmap() if
+ * use this macro to free it. It calls spifmem_imlib_free_pixmap() if
* Imlib2 support has been enabled. Otherwise, it's a NOP().
*
* @param p The Imlib2-generated Pixmap to be freed.
@@ -999,7 +999,7 @@ extern int re_exec();
* This macro is a replacement for the Xlib function XCreateGC(). It
* creates a graphics context (GC) object and returns its X resource
* ID. This macro calls Xlib's XCreateGC() if memory debugging is
- * off and libast_x_create_gc() if it's on.
+ * off and spifmem_x_create_gc() if it's on.
*
* @param d The X display connection.
* @param win The X drawable on whose screen the GC will be created.
@@ -1017,7 +1017,7 @@ extern int re_exec();
* This macro is a replacement for the Xlib function XFreeGC(). It
* frees a previously allocated graphics context (GC) object. This
* macro calls Xlib's XFreeGC() if memory debugging is off and
- * libast_x_free_gc() if it's on.
+ * spifmem_x_free_gc() if it's on.
*
* @param d The X display connection.
* @param gc The graphics context object to free.
@@ -1089,25 +1089,25 @@ extern int re_exec();
* @ingroup DOXGRP_MEM
*/
#if (DEBUG >= DEBUG_MEM)
-# define MALLOC(sz) libast_malloc(__FILE__, __LINE__, (sz))
-# define CALLOC(type,n) libast_calloc(__FILE__, __LINE__, (n), (sizeof(type)))
-# define REALLOC(mem,sz) libast_realloc(#mem, __FILE__, __LINE__, (mem), (sz))
-# define FREE(ptr) do { libast_free(#ptr, __FILE__, __LINE__, (ptr)); (ptr) = NULL; } while (0)
-# define STRDUP(s) libast_strdup(#s, __FILE__, __LINE__, (s))
-# define MALLOC_DUMP() libast_dump_mem_tables()
-# define X_CREATE_PIXMAP(d, win, w, h, depth) libast_x_create_pixmap(__FILE__, __LINE__, (d), (win), (w), (h), (depth))
-# define X_FREE_PIXMAP(d, p) libast_x_free_pixmap(#p, __FILE__, __LINE__, (d), (p))
+# define MALLOC(sz) spifmem_malloc(__FILE__, __LINE__, (sz))
+# define CALLOC(type,n) spifmem_calloc(__FILE__, __LINE__, (n), (sizeof(type)))
+# define REALLOC(mem,sz) spifmem_realloc(#mem, __FILE__, __LINE__, (mem), (sz))
+# define FREE(ptr) do { spifmem_free(#ptr, __FILE__, __LINE__, (ptr)); (ptr) = NULL; } while (0)
+# define STRDUP(s) spifmem_strdup(#s, __FILE__, __LINE__, (s))
+# define MALLOC_DUMP() spifmem_dump_mem_tables()
+# define X_CREATE_PIXMAP(d, win, w, h, depth) spifmem_x_create_pixmap(__FILE__, __LINE__, (d), (win), (w), (h), (depth))
+# define X_FREE_PIXMAP(d, p) spifmem_x_free_pixmap(#p, __FILE__, __LINE__, (d), (p))
# if LIBAST_IMLIB2_SUPPORT
-# define IMLIB_REGISTER_PIXMAP(p) libast_imlib_register_pixmap(#p, __FILE__, __LINE__, (p))
-# define IMLIB_FREE_PIXMAP(p) libast_imlib_free_pixmap(#p, __FILE__, __LINE__, (p))
+# define IMLIB_REGISTER_PIXMAP(p) spifmem_imlib_register_pixmap(#p, __FILE__, __LINE__, (p))
+# define IMLIB_FREE_PIXMAP(p) spifmem_imlib_free_pixmap(#p, __FILE__, __LINE__, (p))
# else
# define IMLIB_REGISTER_PIXMAP(p) NOP
# define IMLIB_FREE_PIXMAP(p) NOP
# endif
-# define PIXMAP_DUMP() libast_dump_pixmap_tables()
-# define X_CREATE_GC(d, win, f, gcv) libast_x_create_gc(__FILE__, __LINE__, (d), (win), (f), (gcv))
-# define X_FREE_GC(d, gc) libast_x_free_gc(#gc, __FILE__, __LINE__, (d), (gc))
-# define GC_DUMP() libast_dump_gc_tables()
+# define PIXMAP_DUMP() spifmem_dump_pixmap_tables()
+# define X_CREATE_GC(d, win, f, gcv) spifmem_x_create_gc(__FILE__, __LINE__, (d), (win), (f), (gcv))
+# define X_FREE_GC(d, gc) spifmem_x_free_gc(#gc, __FILE__, __LINE__, (d), (gc))
+# define GC_DUMP() spifmem_dump_gc_tables()
# define MALLOC_MOD 25
# define REALLOC_MOD 25
# define CALLOC_MOD 25
@@ -1282,16 +1282,16 @@ extern int re_exec();
* @see @link DOXGRP_CONF Configuration File Parser @endlink
* @ingroup DOXGRP_CONF
*/
-#define CONF_BEGIN_CHAR '\001'
+#define SPIFCONF_BEGIN_CHAR '\001'
/**
* Special flag character string.
*
- * This is the string representation of CONF_BEGIN_CHAR.
+ * This is the string representation of SPIFCONF_BEGIN_CHAR.
*
* @see @link DOXGRP_CONF Configuration File Parser @endlink
* @ingroup DOXGRP_CONF
*/
-#define CONF_BEGIN_STRING "\001"
+#define SPIFCONF_BEGIN_STRING "\001"
/**
* Special flag character.
*
@@ -1301,16 +1301,16 @@ extern int re_exec();
* @see @link DOXGRP_CONF Configuration File Parser @endlink
* @ingroup DOXGRP_CONF
*/
-#define CONF_END_CHAR '\002'
+#define SPIFCONF_END_CHAR '\002'
/**
* Special flag character string.
*
- * This is the string representation of CONF_END_CHAR.
+ * This is the string representation of SPIFCONF_END_CHAR.
*
* @see @link DOXGRP_CONF Configuration File Parser @endlink
* @ingroup DOXGRP_CONF
*/
-#define CONF_END_STRING "\002"
+#define SPIFCONF_END_STRING "\002"
/**
* Compares boolean option value to allowed true values.
@@ -1376,7 +1376,7 @@ extern int re_exec();
* @see @link DOXGRP_CONF_FSS File State Stack @endlink
* @ingroup DOXGRP_CONF_FSS
*/
-#define file_push(f, p, o, l, fl) conf_register_fstate(f, p, o, l, fl)
+#define file_push(f, p, o, l, fl) spifconf_register_fstate(f, p, o, l, fl)
/**
* Pop a state structure off the stack.
*
@@ -1626,7 +1626,7 @@ typedef void * (*ctx_handler_t)(char *, void *);
* @see @link DOXGRP_CONF Configuration File Parser @endlink
* @ingroup DOXGRP_CONF
*/
-typedef char * (*conf_func_ptr_t) (char *);
+typedef char * (*spifconf_func_ptr_t) (char *);
extern fstate_t *fstate;
extern unsigned char fstate_idx;
@@ -2586,26 +2586,26 @@ extern void fatal_error(const char *fmt, ...);
extern unsigned int DEBUG_LEVEL;
/* mem.c */
-extern void memrec_init(void);
-extern void *libast_malloc(const char *, unsigned long, size_t);
-extern void *libast_realloc(const char *, const char *, unsigned long, void *, size_t);
-extern void *libast_calloc(const char *, unsigned long, size_t, size_t);
-extern void libast_free(const char *, const char *, unsigned long, void *);
-extern char *libast_strdup(const char *, const char *, unsigned long, const char *);
-extern void libast_dump_mem_tables(void);
+extern void spifmem_init(void);
+extern void *spifmem_malloc(const char *, unsigned long, size_t);
+extern void *spifmem_realloc(const char *, const char *, unsigned long, void *, size_t);
+extern void *spifmem_calloc(const char *, unsigned long, size_t, size_t);
+extern void spifmem_free(const char *, const char *, unsigned long, void *);
+extern char *spifmem_strdup(const char *, const char *, unsigned long, const char *);
+extern void spifmem_dump_mem_tables(void);
#if LIBAST_X11_SUPPORT
-extern Pixmap libast_x_create_pixmap(const char *, unsigned long, Display *, Drawable, unsigned int, unsigned int, unsigned int);
-extern void libast_x_free_pixmap(const char *, const char *, unsigned long, Display *, Pixmap);
+extern Pixmap spifmem_x_create_pixmap(const char *, unsigned long, Display *, Drawable, unsigned int, unsigned int, unsigned int);
+extern void spifmem_x_free_pixmap(const char *, const char *, unsigned long, Display *, Pixmap);
# if LIBAST_IMLIB2_SUPPORT
-extern void libast_imlib_register_pixmap(const char *var, const char *filename, unsigned long line, Pixmap p);
-extern void libast_imlib_free_pixmap(const char *var, const char *filename, unsigned long line, Pixmap p);
+extern void spifmem_imlib_register_pixmap(const char *var, const char *filename, unsigned long line, Pixmap p);
+extern void spifmem_imlib_free_pixmap(const char *var, const char *filename, unsigned long line, Pixmap p);
# endif
-extern void libast_dump_pixmap_tables(void);
-extern GC libast_x_create_gc(const char *, unsigned long, Display *, Drawable, unsigned long, XGCValues *);
-extern void libast_x_free_gc(const char *, const char *, unsigned long, Display *, GC);
-extern void libast_dump_gc_tables(void);
+extern void spifmem_dump_pixmap_tables(void);
+extern GC spifmem_x_create_gc(const char *, unsigned long, Display *, Drawable, unsigned long, XGCValues *);
+extern void spifmem_x_free_gc(const char *, const char *, unsigned long, Display *, GC);
+extern void spifmem_dump_gc_tables(void);
#endif
-extern void free_array(void *, size_t);
+extern void spiftool_free_array(void *, size_t);
/* file.c */
extern int libast_temp_file(char *, size_t);
@@ -2664,20 +2664,69 @@ extern int snprintf(char *str, size_t count, const char *fmt, ...);
#endif
/* conf.c */
-extern void conf_init_subsystem(void);
-extern unsigned char conf_register_context(char *name, ctx_handler_t handler);
-extern unsigned char conf_register_fstate(FILE *fp, char *path, char *outfile, unsigned long line, unsigned char flags);
-extern unsigned char conf_register_builtin(char *name, conf_func_ptr_t ptr);
-extern unsigned char conf_register_context_state(unsigned char ctx_id);
-extern void conf_free_subsystem(void);
-extern char *shell_expand(char *);
-extern char *conf_find_file(const char *file, const char *dir, const char *pathlist);
-extern FILE *open_config_file(char *name);
-extern void conf_parse_line(FILE *fp, char *buff);
-extern char *conf_parse(char *conf_name, const char *dir, const char *path);
+extern void spifconf_init_subsystem(void);
+extern unsigned char spifconf_register_context(char *name, ctx_handler_t handler);
+extern unsigned char spifconf_register_fstate(FILE *fp, char *path, char *outfile, unsigned long line, unsigned char flags);
+extern unsigned char spifconf_register_builtin(char *name, spifconf_func_ptr_t ptr);
+extern unsigned char spifconf_register_context_state(unsigned char ctx_id);
+extern void spifconf_free_subsystem(void);
+extern char *spifconf_shell_expand(char *);
+extern char *spifconf_find_file(const char *file, const char *dir, const char *pathlist);
+extern FILE *spifconf_open_file(char *name);
+extern void spifconf_parse_line(FILE *fp, char *buff);
+extern char *spifconf_parse(char *conf_name, const char *dir, const char *path);
/* options.c */
extern void spifopt_parse(int, char **);
extern void spifopt_usage(void);
+
+/* Do we, or do we not, pollute the namespace like we used to? */
+#if LIBAST_COMPAT_05_API
+/* The application must have defined this. */
+/* conf.c */
+# define CONF_BEGIN_CHAR SPIFCONF_BEGIN_CHAR
+# define CONF_END_CHAR SPIFCONF_END_CHAR
+# define CONF_BEGIN_STRING SPIFCONF_BEGIN_STRING
+# define CONF_END_STRING SPIFCONF_END_STRING
+typedef spifconf_func_ptr_t conf_func_ptr_t;
+static void (*conf_init_subsystem)(void) = spifconf_init_subsystem;
+static unsigned char (*conf_register_context)(char *, ctx_handler_t) = spifconf_register_context;
+static unsigned char (*conf_register_fstate)(FILE *, char *, char *, unsigned long, unsigned char) = spifconf_register_fstate;
+static unsigned char (*conf_register_builtin)(char *, conf_func_ptr_t) = spifconf_register_builtin;
+static unsigned char (*conf_register_context_state)(unsigned char) = spifconf_register_context_state;
+static void (*conf_free_subsystem)(void) = spifconf_free_subsystem;
+static char *(*shell_expand)(char *) = spifconf_shell_expand;
+static char *(*conf_find_file)(const char *, const char *, const char *) = spifconf_find_file;
+static FILE *(*open_config_file)(char *) = spifconf_open_file;
+static void (*conf_parse_line)(FILE *, char *) = spifconf_parse_line;
+static char *(*conf_parse)(char *, const char *, const char *) = spifconf_parse;
+
+/* mem.c */
+static void (*memrec_init)(void) = spifmem_init;
+static void *(*libast_malloc)(const char *, unsigned long, size_t) = spifmem_malloc;
+static void *(*libast_realloc)(const char *, const char *, unsigned long, void *, size_t) = spifmem_realloc;
+static void *(*libast_calloc)(const char *, unsigned long, size_t, size_t) = spifmem_calloc;
+static void (*libast_free)(const char *, const char *, unsigned long, void *) = spifmem_free;
+static char *(*libast_strdup)(const char *, const char *, unsigned long, const char *) = spifmem_strdup;
+static void (*libast_dump_mem_tables)(void) = spifmem_dump_mem_tables;
+# if LIBAST_X11_SUPPORT
+static Pixmap (*libast_x_create_pixmap)(const char *, unsigned long, Display *, Drawable,
+ unsigned int, unsigned int, unsigned int) = spifmem_x_create_pixmap;
+static void (*libast_x_free_pixmap)(const char *, const char *, unsigned long, Display *, Pixmap) = spifmem_x_free_pixmap;
+# if LIBAST_IMLIB2_SUPPORT
+static void (*libast_imlib_register_pixmap)(const char *, const char *, unsigned long, Pixmap) = spifmem_imlib_register_pixmap;
+static void (*libast_imlib_free_pixmap)(const char *, const char *, unsigned long, Pixmap) = spifmem_imlib_free_pixmap;
+# endif
+static void (*libast_dump_pixmap_tables)(void) = spifmem_dump_pixmap_tables;
+static GC (*libast_x_create_gc)(const char *, unsigned long, Display *, Drawable,
+ unsigned long, XGCValues *) = spifmem_x_create_gc;
+static void (*libast_x_free_gc)(const char *, const char *, unsigned long, Display *, GC) = spifmem_x_free_gc;
+static void (*libast_dump_gc_tables)(void) = spifmem_dump_gc_tables;
+#endif
+static void (*free_array)(void *, size_t) = spiftool_free_array;
+
+
+#endif /* LIBAST_COMPAT_05_API */
+
#endif /* _LIBAST_H_ */
diff --git a/include/libast/.cvsignore b/include/libast/.cvsignore
index 69836b0..42562c4 100644
--- a/include/libast/.cvsignore
+++ b/include/libast/.cvsignore
@@ -1,3 +1,5 @@
Makefile
Makefile.in
types.h
+stamp-h*
+sysdefs.h
diff --git a/include/libast/sysdefs.h.in b/include/libast/sysdefs.h.in
index 046b56f..e57b672 100644
--- a/include/libast/sysdefs.h.in
+++ b/include/libast/sysdefs.h.in
@@ -53,30 +53,52 @@
# endif
#endif
+/* The LibAST version string. */
#ifndef LIBAST_VERSION
# define LIBAST_VERSION 0
#endif
+
+/* Support for the X Window system. */
#ifndef LIBAST_X11_SUPPORT
# define LIBAST_X11_SUPPORT 0
#endif
+
+/* Support for the Imlib2 image library. */
#ifndef LIBAST_IMLIB2_SUPPORT
# define LIBAST_IMLIB2_SUPPORT 0
#endif
+
+/* Support for MMX instructions. */
#ifndef LIBAST_MMX_SUPPORT
# define LIBAST_MMX_SUPPORT 0
#endif
+
+/* Regexp's based on Perl's PCRE, or... */
#ifndef LIBAST_REGEXP_SUPPORT_PCRE
# define LIBAST_REGEXP_SUPPORT_PCRE 0
#endif
+
+/* ...standard POSIX regexp support, or... */
#ifndef LIBAST_REGEXP_SUPPORT_POSIX
# define LIBAST_REGEXP_SUPPORT_POSIX 0
#endif
+
+/* ...BSD-style regexp support. */
#ifndef LIBAST_REGEXP_SUPPORT_BSD
# define LIBAST_REGEXP_SUPPORT_BSD 0
#endif
+
+/* Support for backquote execution in config files. */
#ifndef ALLOW_BACKQUOTE_EXEC
# define ALLOW_BACKQUOTE_EXEC 0
#endif
+
+/* App-definable; requests 0.5 API compatibility (pollutes namespace). */
+#ifndef LIBAST_COMPAT_05_API
+# define LIBAST_COMPAT_05_API 0
+#endif
+
+/* A bunch of security checks. */
#ifndef HAVE_RLIMIT_MEMLOCK
# define HAVE_RLIMIT_MEMLOCK 0
#endif
@@ -95,6 +117,8 @@
#ifndef HAVE_VSNPRINTF_BUG
# define HAVE_VSNPRINTF_BUG 0
#endif
+
+/* Sizes of basic variables. */
#ifndef SIZEOF_CHAR
# define SIZEOF_CHAR 0
#endif
@@ -110,6 +134,8 @@
#ifndef SIZEOF_SHORT
# define SIZEOF_SHORT 0
#endif
+
+/* Substitutes for some non-standard functions. */
#ifndef HAVE_MEMMEM
# define HAVE_MEMMEM 0
#endif
@@ -119,9 +145,6 @@
#ifndef HAVE_PUTENV
# define HAVE_PUTENV 0
#endif
-#ifndef HAVE_SNPRINTF
-# define HAVE_SNPRINTF 0
-#endif
#ifndef HAVE_STRCASECHR
# define HAVE_STRCASECHR 0
#endif
@@ -143,9 +166,14 @@
#ifndef HAVE_USLEEP
# define HAVE_USLEEP 0
#endif
+#ifndef HAVE_SNPRINTF
+# define HAVE_SNPRINTF 0
+#endif
#ifndef HAVE_VSNPRINTF
# define HAVE_VSNPRINTF 0
#endif
+
+/* Header checks used in libast.h */
#ifndef TIME_WITH_SYS_TIME
# define TIME_WITH_SYS_TIME 0
#endif
diff --git a/include/libast_internal.h b/include/libast_internal.h
index fdcfee7..c98a0e9 100644
--- a/include/libast_internal.h
+++ b/include/libast_internal.h
@@ -189,7 +189,7 @@ typedef struct memrec_t_struct {
*
* @param ctx The context ID for the new context.
*/
-#define ctx_push(ctx) conf_register_context_state(ctx)
+#define ctx_push(ctx) spifconf_register_context_state(ctx)
/**
* Pops a context structure off the stack. Pops a context structure
* off the stack.
@@ -262,7 +262,7 @@ typedef struct memrec_t_struct {
name = get_word(idx, buff); \
ctx_name_to_id(id, name, i); \
ctx_push(id); \
- state = (*ctx_id_to_func(id))(CONF_BEGIN_STRING, ctx_peek_last_state()); \
+ state = (*ctx_id_to_func(id))(SPIFCONF_BEGIN_STRING, ctx_peek_last_state()); \
ctx_poke_state(state); \
FREE(name); \
} while (0)
@@ -270,14 +270,14 @@ typedef struct memrec_t_struct {
* Convenience macro for ending a context.
*
* This macro simplifies the ending of a context. The context handler
- * for the context is called with CONF_END_STRING. The old context is
+ * for the context is called with SPIFCONF_END_STRING. The old context is
* then popped off the stack, and the returned state is saved for the
* parent context.
*
*/
#define ctx_end() do { \
if (ctx_get_depth()) { \
- state = (*ctx_id_to_func(id))(CONF_END_STRING, ctx_peek_state()); \
+ state = (*ctx_id_to_func(id))(SPIFCONF_END_STRING, ctx_peek_state()); \
ctx_poke_state(NULL); \
ctx_pop(); \
id = ctx_peek_id(); \
@@ -356,7 +356,7 @@ typedef struct ctx_state_t_struct {
* @see @link DOXGRP_CONF_CTX Context Handling @endlink
* @ingroup DOXGRP_CONF_CTX
*/
-typedef struct conf_func_t_struct {
+typedef struct spifconf_func_t_struct {
/**
* Function name.
*
@@ -369,8 +369,8 @@ typedef struct conf_func_t_struct {
*
* Pointer to the handler for the built-in function.
*/
- conf_func_ptr_t ptr;
-} conf_func_t;
+ spifconf_func_ptr_t ptr;
+} spifconf_func_t;
/**
* Linked list for user-defined config file variables.
@@ -383,7 +383,7 @@ typedef struct conf_func_t_struct {
* @see @link DOXGRP_CONF_CTX Context Handling @endlink, builtin_get(), builtin_put()
* @ingroup DOXGRP_CONF_CTX
*/
-typedef struct conf_var_t_struct {
+typedef struct spifconf_var_t_struct {
/**
* Variable name.
*
@@ -403,8 +403,8 @@ typedef struct conf_var_t_struct {
*
* Pointer to the next variable in the list.
*/
- struct conf_var_t_struct *next;
-} conf_var_t;
+ struct spifconf_var_t_struct *next;
+} spifconf_var_t;