From 835e373b3eeaabcd0621ed6798ab500f37982fae Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Wed, 5 Apr 2023 14:13:39 -0400 Subject: xpdf-no-select-disable --- xpdf/NameToCharCode.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 xpdf/NameToCharCode.h (limited to 'xpdf/NameToCharCode.h') 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 + +#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 -- cgit v1.2.3