aboutsummaryrefslogtreecommitdiff
path: root/src/tagr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tagr.h')
-rw-r--r--src/tagr.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/tagr.h b/src/tagr.h
index b65b8d4..96035f2 100644
--- a/src/tagr.h
+++ b/src/tagr.h
@@ -97,15 +97,21 @@ int yyerror (char *s);
typedef enum { unspecified_value, numeric_value, string_value } value_type;
+union value
+{
+ double number;
+ char *string;
+};
+
+typedef void (*value_format_fn) (FILE *, union value, const char *, int);
+
typedef struct
{
value_type type;
int prec;
- union
- {
- double number;
- char *string;
- } v;
+ char *fmt;
+ value_format_fn format;
+ union value v;
} pp_value_t;
typedef struct pp_value_list
@@ -117,8 +123,11 @@ typedef struct pp_value_list
int read_symtab (pp_tab_t **tab, const char *name);
int write_symtab (pp_tab_t *tab, const char *name);
-void add_numeric_value (pp_tab_t ** ptab, const char *name, double number);
-void add_string_value (pp_tab_t ** ptab, const char *name, const char *string);
+void init_value (pp_value_t *p, value_type type, union value *v);
+pp_value_t *add_numeric_value (pp_tab_t ** ptab,
+ const char *name, double number);
+pp_value_t *add_string_value (pp_tab_t ** ptab,
+ const char *name, const char *string);
int find_value (char *name, pp_value_t * val);
void free_tab (pp_tab_t ** ptab);
int create_html (pp_tab_t * tab, char *file, char *dest);

Return to:

Send suggestions and report system problems to the System administrator.