2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: common.h /main/6 1996/07/31 13:34:28 cde-hp $ */
25 Copyright (c) 1987, 1988, 1989 Hewlett-Packard Co.
28 /* Common.h contains definitions common to programs BUILD, ELTDEF, and PARSER.
29 Its purpose is to insure that limits, such as the maximum length of an SGML
30 name, are the same for all programs.
35 /* White-space characters */
40 /* Maximum length of a default parameter value */
43 /* Maximum length of an element name */
46 /* M_NONNAME, M_NMSTART, M_NAMECHAR, and M_DIGIT are used to indicate
47 which characters can appear within element names*/
53 /* Number of characters in the character set */
54 #define M_CHARSETLEN 256
56 /* Structure for entities */
57 typedef struct m_entity M_ENTITY ;
60 unsigned char wheredef ;
63 #if defined(BUILDEXTERN) || defined(ELTEXTERN)
67 #if ! defined(BUILDEXTERN)
72 /* Declarations for character types */
75 /* Must be same type as EOF */
81 #define m_ischar(x) ((int) (x) >= 0 && (int) (x) < M_CHARSETLEN)
82 #define m_cttype(x) (m_ischar(x) ? m_ctarray[x].type : M_NONNAME)
83 #define m_ctupper(x) (m_ischar(x) ? m_ctarray[x].upper : x)
84 #define m_ctlower(x) (m_ischar(x) ? m_ctarray[x].lower : x)
85 #define m_ctdigit(x) (m_ischar(x) ? m_ctarray[x].type == M_DIGIT : FALSE)