diff options
author | Calvin Morrison <calvin@pobox.com> | 2023-04-05 14:13:39 -0400 |
---|---|---|
committer | Calvin Morrison <calvin@pobox.com> | 2023-04-05 14:13:39 -0400 |
commit | 835e373b3eeaabcd0621ed6798ab500f37982fae (patch) | |
tree | dfa16b0e2e1b4956b38f693220eac4e607802133 /xpdf/NameToCharCode.h |
Diffstat (limited to 'xpdf/NameToCharCode.h')
-rw-r--r-- | xpdf/NameToCharCode.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/xpdf/NameToCharCode.h b/xpdf/NameToCharCode.h new file mode 100644 index 0000000..6548133 --- /dev/null +++ b/xpdf/NameToCharCode.h @@ -0,0 +1,42 @@ +//======================================================================== +// +// NameToCharCode.h +// +// Copyright 2001-2003 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef NAMETOCHARCODE_H +#define NAMETOCHARCODE_H + +#include <aconf.h> + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "CharTypes.h" + +struct NameToCharCodeEntry; + +//------------------------------------------------------------------------ + +class NameToCharCode { +public: + + NameToCharCode(); + ~NameToCharCode(); + + void add(const char *name, CharCode c); + CharCode lookup(const char *name); + +private: + + int hash(const char *name); + + NameToCharCodeEntry *tab; + int size; + int len; +}; + +#endif |