diff options
author | axel <axel@liljencrantz.se> | 2006-06-13 23:43:28 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-06-13 23:43:28 +1000 |
commit | 0361423469ec3c70d3e053ef475e2bed686b86d8 (patch) | |
tree | 676f2fefc6395bec0595e265caa912471faef1f2 /builtin_help.hdr | |
parent | 9aee2b7c9c412e9e0bb2ddc4c8f6e27af5be1de8 (diff) |
Major restructuring of the buildsystem, meaning that the documentation doesn't needlessly rebuild itself, and the size of the fish binary drops slightly
darcs-hash:20060613134328-ac50b-05ae75eb5cc081b680f38e8866fac00a679cc266.gz
Diffstat (limited to 'builtin_help.hdr')
-rw-r--r-- | builtin_help.hdr | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/builtin_help.hdr b/builtin_help.hdr index 7507fae2..c2671a5f 100644 --- a/builtin_help.hdr +++ b/builtin_help.hdr @@ -14,24 +14,28 @@ #include "config.h" #include "util.h" #include "common.h" -#include "builtin_help.h" +#include "halloc_util.h" + +static int is_help_init=0; /** Hashtable storing the help text */ static hash_table_t tbl; +static void builtin_help_init(); + char *builtin_help_get( wchar_t *cmd ) { + if( !is_help_init ) + { + builtin_help_init(); + } return (char *)hash_get( &tbl, (void *)cmd ); } -void builtin_help_destroy() -{ - hash_destroy( &tbl ); -} - - -void builtin_help_init() +static void builtin_help_init() { + is_help_init = 1; + halloc_register_function( global_context, (void (*)(void *))&hash_destroy, &tbl ); hash_init( &tbl, &hash_wcs_func, &hash_wcs_cmp ); |