diff options
author | Xin LI <delphij@FreeBSD.org> | 2014-02-28 19:18:07 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2014-02-28 19:18:07 +0000 |
commit | a0044ffc69cfe39a3b0b2d208e0952254555afc6 (patch) | |
tree | 7b2d708d03277cdd2560e9ce6572bdafc2e58bab /include/tic.h | |
parent | 4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a (diff) |
Redo import of ncurses 5.9 (stripped).vendor/ncurses/5.9-20110404_stripped
Notes
Notes:
svn path=/vendor/ncurses/dist/; revision=262617
svn path=/vendor/ncurses/5.9-20110404_stripped/; revision=262631; tag=vendor/ncurses/5.9-20110404_stripped
Diffstat (limited to 'include/tic.h')
-rw-r--r-- | include/tic.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/include/tic.h b/include/tic.h index 4e10399356c1..4f3a21c22b3f 100644 --- a/include/tic.h +++ b/include/tic.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -33,7 +33,7 @@ ****************************************************************************/ /* - * $Id: tic.h,v 1.62 2007/08/11 16:12:43 tom Exp $ + * $Id: tic.h,v 1.65 2009/08/08 17:52:46 tom Exp $ * tic.h - Global variables and structures for the terminfo * compiler. */ @@ -183,6 +183,8 @@ extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[]; #endif +typedef short HashValue; + /* * The file comp_captab.c contains an array of these structures, one * per possible capability. These are indexed by a hash table array of @@ -193,10 +195,21 @@ struct name_table_entry { const char *nte_name; /* name to hash on */ int nte_type; /* BOOLEAN, NUMBER or STRING */ - short nte_index; /* index of associated variable in its array */ - short nte_link; /* index in table of next hash, or -1 */ + HashValue nte_index; /* index of associated variable in its array */ + HashValue nte_link; /* index in table of next hash, or -1 */ }; + /* + * Use this structure to hide differences between terminfo and termcap + * tables. + */ +typedef struct { + unsigned table_size; + const HashValue *table_data; + HashValue (*hash_of)(const char *); + int (*compare_names)(const char *, const char *); +} HashData; + struct alias { const char *from; @@ -205,7 +218,8 @@ struct alias }; extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool); -extern NCURSES_EXPORT(const short *) _nc_get_hash_table (bool); +extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool); +extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool); extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool); #define NOTFOUND ((struct name_table_entry *) 0) @@ -244,9 +258,9 @@ extern NCURSES_EXPORT(char *) _nc_rootname (char *); /* comp_hash.c: name lookup */ extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry - (const char *, const short *); + (const char *, const HashValue *); extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry - (const char *, int, const struct name_table_entry *); + (const char *, int, bool); /* comp_scan.c: lexical analysis */ extern NCURSES_EXPORT(int) _nc_get_token (bool); |