No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / groff / src / include / cmap.h
blob73b9c92942ca5e8ee38bd1e6356957e66142c96e
1 /* $NetBSD$ */
3 // -*- C++ -*-
4 /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
5 Written by James Clark (jjc@jclark.com)
7 This file is part of groff.
9 groff is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2, or (at your option) any later
12 version.
14 groff is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License along
20 with groff; see the file COPYING. If not, write to the Free Software
21 Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
23 #ifndef UCHAR_MAX
24 #define UCHAR_MAX 255
25 #endif
27 enum cmap_builtin { CMAP_BUILTIN };
29 class cmap {
30 public:
31 cmap();
32 cmap(cmap_builtin);
33 int operator()(unsigned char) const;
34 unsigned char &operator[](unsigned char);
36 friend class cmap_init;
37 private:
38 unsigned char v[UCHAR_MAX+1];
41 inline int cmap::operator()(unsigned char c) const
43 return v[c];
46 inline unsigned char &cmap::operator[](unsigned char c)
48 return v[c];
51 extern cmap cmlower;
52 extern cmap cmupper;
54 static class cmap_init {
55 static int initialised;
56 public:
57 cmap_init();
58 } _cmap_init;