summaryrefslogtreecommitdiffstats
path: root/contrib/groff/src/include/cmap.h
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-04-17 12:12:05 +0000
committerru <ru@FreeBSD.org>2001-04-17 12:12:05 +0000
commit78a36d21097dbce47cbcd4818ecd041388952f73 (patch)
tree8c20bfd611f113ea0cc691f0a026ad5ed1b43c72 /contrib/groff/src/include/cmap.h
parent3b4ec64f2874f8497458268896220e5c9c859d05 (diff)
parent0e0a0e6429c7113acf15c4c94bd5fe94c45f9e99 (diff)
downloadFreeBSD-src-78a36d21097dbce47cbcd4818ecd041388952f73.zip
FreeBSD-src-78a36d21097dbce47cbcd4818ecd041388952f73.tar.gz
This commit was generated by cvs2svn to compensate for changes in r75584,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/groff/src/include/cmap.h')
-rw-r--r--contrib/groff/src/include/cmap.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/contrib/groff/src/include/cmap.h b/contrib/groff/src/include/cmap.h
new file mode 100644
index 0000000..1537d46
--- /dev/null
+++ b/contrib/groff/src/include/cmap.h
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Written by James Clark (jjc@jclark.com)
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with groff; see the file COPYING. If not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef UCHAR_MAX
+#define UCHAR_MAX 255
+#endif
+
+enum cmap_builtin { CMAP_BUILTIN };
+
+class cmap {
+public:
+ cmap();
+ cmap(cmap_builtin);
+ int operator()(unsigned char) const;
+ unsigned char &operator[](unsigned char);
+
+ friend class cmap_init;
+private:
+ unsigned char v[UCHAR_MAX+1];
+};
+
+inline int cmap::operator()(unsigned char c) const
+{
+ return v[c];
+}
+
+inline unsigned char &cmap::operator[](unsigned char c)
+{
+ return v[c];
+}
+
+extern cmap cmlower;
+extern cmap cmupper;
+
+static class cmap_init {
+ static int initialised;
+public:
+ cmap_init();
+} _cmap_init;
OpenPOWER on IntegriCloud