detok 1.0.2 merge git-svn-id: svn://coreboot.org/openbios/fcode-utils@103 f158a5a8-5612-0410-a976-696ce0be7e32
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/detok/addfcodes.h b/detok/addfcodes.h
index 80d8586..7d07f9a 100644
--- a/detok/addfcodes.h
+++ b/detok/addfcodes.h
@@ -39,6 +39,16 @@
/* ************************************************************************** *
*
+ * Global Variables Exported
+ *
+ **************************************************************************** */
+
+/* For "special function" identification */
+extern u16 *double_lit_code;
+
+
+/* ************************************************************************** *
+ *
* Function Prototypes / Functions Exported:
*
**************************************************************************** */
diff --git a/detok/detok.h b/detok/detok.h
index ba8c5b6..5616634 100644
--- a/detok/detok.h
+++ b/detok/detok.h
@@ -35,10 +35,28 @@
#include "types.h"
+/* Structure of an entry in a token-table
+ * Consists of:
+ * (1) Name of the token
+ * (2) FCode of the token
+ * (3) Link-pointer to previous entry.
+ */
+
+typedef struct token {
+ char *name;
+ u16 fcode;
+ struct token *prev;
+} token_t;
+
+/* Macro for creating an entry in a token-table data-array */
+#define TOKEN_ENTRY(num, name) { name, (u16)num, (token_t *)NULL }
+
+
/* Prototypes for functions exported from
* detok.c decode.c printformats.c pcihdr.c and dictionary.c
*/
+void link_token(token_t *curr_token);
void add_token(u16 number, char *name);
void init_dictionary(void);
void reset_dictionary(void);