dthelp: merge duplicate headers

This commit is contained in:
Chase
2025-12-06 18:42:26 -05:00
committed by Jon Trulson
parent 44a8e2bb4f
commit 61ed7ad39c
88 changed files with 61 additions and 8679 deletions

View File

@@ -16,8 +16,9 @@ HELPUTILSRC = $(HELPTAG)/util
HELPBUILDSRC = $(HELPTAG)/build
HELPUTILLIB = $(HELPTAG)/util/libutil.a
AM_CPPFLAGS = -I. -I$(HELPUTILSRC) -I$(HELPTAGSRC) -I$(HELPBUILDSRC) \
-I$(HELPELTDEFSRC)
AM_CPPFLAGS = -DPASS1 -I../eltdef -I../helptag -I../util -I../build \
-I../../include/helptag -I../../include/util -I../../include/build \
-I../../include/eltdef -I../../include/parser
dthelp_htag1_SOURCES = parser.c actutil.c \
closent.c code.c cyclent.c dcurelt.c \

View File

@@ -1,155 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: charconv.h /main/3 1995/11/08 10:15:14 rswiston $ */
EXTERN M_WCHAR pc8_to_r8 [256]
#if defined(DEFINE)
= {
'\000','\001','\002','\003','\004','\005','\006','\007','\010','\011',
'\012','\013','\014','\015','\016','\017','\020','\021','\022','\023',
'\024','\025','\026','\027','\030','\031','\032','\033','\034','\035',
'\036','\037','\040','\041','\042','\043','\044','\045','\046','\047',
'\050','\051','\052','\053','\054','\055','\056','\057','\060','\061',
'\062','\063','\064','\065','\066','\067','\070','\071','\072','\073',
'\074','\075','\076','\077','\100','\101','\102','\103','\104','\105',
'\106','\107','\110','\111','\112','\113','\114','\115','\116','\117',
'\120','\121','\122','\123','\124','\125','\126','\127','\130','\131',
'\132','\133','\134','\135','\136','\137','\140','\141','\142','\143',
'\144','\145','\146','\147','\150','\151','\152','\153','\154','\155',
'\156','\157','\160','\161','\162','\163','\164','\165','\166','\167',
'\170','\171','\172','\173','\174','\175','\176','\177','\264','\317',
'\305','\300','\314','\310','\324','\265','\301','\315','\311','\335',
'\321','\331','\330','\320','\334','\327','\323','\302','\316','\312',
'\303','\313','\357','\332','\333','\277','\273','\274','\120','\276',
'\304','\325','\306','\307','\267','\266','\371','\372','\271','\055',
'\052','\370','\367','\270','\373','\375','\374','\374','\374','\174',
'\053','\043','\053','\053','\043','\043','\174','\043','\043','\053',
'\043','\053','\053','\053','\053','\053','\055','\053','\043','\053',
'\043','\043','\043','\043','\043','\075','\043','\043','\053','\043',
'\053','\053','\043','\043','\053','\053','\043','\053','\053','\374',
'\374','\374','\374','\374','\052','\336','\052','\052','\052','\052',
'\363','\052','\052','\052','\052','\052','\052','\326','\052','\052',
'\052','\376','\052','\052','\174','\174','\057','\176','\263','\362',
'\362','\052','\052','\052','\374','\377'
}
#endif
;
EXTERN M_WCHAR pc8dn_to_r8 [256]
#if defined(DEFINE)
= {
'\000','\001','\002','\003','\004','\005','\006','\007','\010','\011',
'\012','\013','\014','\015','\016','\017','\020','\021','\022','\023',
'\024','\025','\026','\027','\030','\031','\032','\033','\034','\035',
'\036','\037','\040','\041','\042','\043','\044','\045','\046','\047',
'\050','\051','\052','\053','\054','\055','\056','\057','\060','\061',
'\062','\063','\064','\065','\066','\067','\070','\071','\072','\073',
'\074','\075','\076','\077','\100','\101','\102','\103','\104','\105',
'\106','\107','\110','\111','\112','\113','\114','\115','\116','\117',
'\120','\121','\122','\123','\124','\125','\126','\127','\130','\131',
'\132','\133','\134','\135','\136','\137','\140','\141','\142','\143',
'\144','\145','\146','\147','\150','\151','\152','\153','\154','\155',
'\156','\157','\160','\161','\162','\163','\164','\165','\166','\167',
'\170','\171','\172','\173','\174','\175','\176','\177','\264','\317',
'\305','\300','\314','\310','\324','\265','\301','\315','\311','\335',
'\321','\331','\330','\320','\334','\327','\323','\302','\316','\312',
'\303','\313','\357','\332','\333','\326','\273','\322','\114','\154',
'\304','\325','\306','\307','\267','\266','\352','\351','\271','\342',
'\341','\154','\156','\270','\052','\272','\374','\374','\374','\174',
'\053','\043','\053','\053','\043','\043','\174','\043','\043','\053',
'\043','\053','\053','\053','\053','\053','\055','\053','\043','\053',
'\043','\043','\043','\043','\043','\075','\043','\043','\053','\043',
'\053','\053','\043','\043','\053','\053','\043','\053','\053','\374',
'\374','\374','\374','\374','\052','\336','\052','\052','\052','\052',
'\363','\052','\052','\052','\052','\052','\052','\326','\052','\052',
'\052','\376','\052','\052','\174','\174','\057','\176','\263','\362',
'\362','\052','\052','\052','\374','\377'
}
#endif
;
EXTERN M_WCHAR r8_to_pc8 [256]
#if defined(DEFINE)
= {
'\000','\001','\002','\003','\004','\005','\006','\007','\010','\011',
'\012','\013','\014','\015','\016','\017','\020','\021','\022','\023',
'\024','\025','\026','\027','\030','\031','\032','\033','\034','\035',
'\036','\037','\040','\041','\042','\043','\044','\045','\046','\047',
'\050','\051','\052','\053','\054','\055','\056','\057','\060','\061',
'\062','\063','\064','\065','\066','\067','\070','\071','\072','\073',
'\074','\075','\076','\077','\100','\101','\102','\103','\104','\105',
'\106','\107','\110','\111','\112','\113','\114','\115','\116','\117',
'\120','\121','\122','\123','\124','\125','\126','\127','\130','\131',
'\132','\133','\134','\135','\136','\137','\140','\141','\142','\143',
'\144','\145','\146','\147','\150','\151','\152','\153','\154','\155',
'\156','\157','\160','\161','\162','\163','\164','\165','\166','\167',
'\170','\171','\172','\173','\174','\175','\176','\177','\200','\201',
'\202','\203','\204','\205','\206','\207','\210','\211','\212','\213',
'\214','\215','\216','\217','\220','\221','\222','\223','\224','\225',
'\226','\227','\230','\231','\232','\233','\234','\235','\236','\237',
'\040','\101','\101','\105','\105','\105','\111','\111','\047','\140',
'\136','\042','\176','\125','\125','\234','\055','\131','\171','\370',
'\200','\207','\245','\244','\255','\250','\052','\234','\235','\052',
'\237','\233','\203','\210','\223','\226','\240','\202','\242','\243',
'\205','\212','\225','\227','\204','\211','\224','\201','\217','\214',
'\117','\222','\206','\241','\355','\221','\216','\215','\231','\232',
'\220','\213','\341','\117','\101','\101','\141','\104','\144','\111',
'\111','\117','\117','\117','\157','\123','\163','\125','\131','\230',
'\052','\052','\372','\346','\052','\052','\304','\254','\253','\246',
'\247','\256','\376','\257','\361','\040'
}
#endif
;
EXTERN M_WCHAR r8_to_pc8dn [256]
#if defined(DEFINE)
= {
'\000','\001','\002','\003','\004','\005','\006','\007','\010','\011',
'\012','\013','\014','\015','\016','\017','\020','\021','\022','\023',
'\024','\025','\026','\027','\030','\031','\032','\033','\034','\035',
'\036','\037','\040','\041','\042','\043','\044','\045','\046','\047',
'\050','\051','\052','\053','\054','\055','\056','\057','\060','\061',
'\062','\063','\064','\065','\066','\067','\070','\071','\072','\073',
'\074','\075','\076','\077','\100','\101','\102','\103','\104','\105',
'\106','\107','\110','\111','\112','\113','\114','\115','\116','\117',
'\120','\121','\122','\123','\124','\125','\126','\127','\130','\131',
'\132','\133','\134','\135','\136','\137','\140','\141','\142','\143',
'\144','\145','\146','\147','\150','\151','\152','\153','\154','\155',
'\156','\157','\160','\161','\162','\163','\164','\165','\166','\167',
'\170','\171','\172','\173','\174','\175','\176','\177','\200','\201',
'\202','\203','\204','\205','\206','\207','\210','\211','\212','\213',
'\214','\215','\216','\217','\220','\221','\222','\223','\224','\225',
'\226','\227','\230','\231','\232','\233','\234','\235','\236','\237',
'\040','\101','\101','\105','\105','\105','\111','\111','\047','\140',
'\136','\042','\176','\125','\125','\234','\055','\131','\171','\370',
'\200','\207','\245','\244','\255','\250','\257','\234','\131','\052',
'\146','\143','\203','\210','\223','\226','\240','\202','\242','\243',
'\205','\212','\225','\227','\204','\211','\224','\201','\217','\214',
'\235','\222','\206','\241','\233','\221','\216','\215','\231','\232',
'\220','\213','\341','\117','\101','\252','\251','\104','\144','\111',
'\111','\117','\117','\247','\246','\123','\163','\125','\131','\230',
'\052','\052','\372','\346','\052','\052','\304','\052','\052','\052',
'\052','\074','\376','\076','\361','\040'
}
#endif
;

View File

@@ -1,460 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: parser.h /main/3 1995/11/08 10:23:43 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Parser.h allocates global variables for PARSER */
#if defined(M_PARDEF)
#define M_PAREXTERN
#define M_PARINIT(a) = a
#else
#define M_PAREXTERN extern
#define M_PARINIT(a)
#endif
#include "common.h"
/* Stack of open entities and line number in each external file */
#define M_ENTLVL 16 /* Maximum number of open entities */
M_PAREXTERN M_ENTITY *m_opene[M_ENTLVL] ;
M_PAREXTERN int m_eopencnt M_PARINIT(0) ;
M_PAREXTERN void *m_sysent[M_ENTLVL + 1] ;
#define M_FIRSTLINE 1
M_PAREXTERN int m_line[M_ENTLVL + 1] M_PARINIT({M_FIRSTLINE}) ;
M_PAREXTERN int m_sysecnt M_PARINIT(0) ;
/* Possible states of a line -- no SGML characters yet processed, SGML
characters processed but no data character or contextual end tag,
data character or contextual end tag (i.e., end tag of a proper
subelement) has occurred. Note that linestat is stacked with each
element. If an element contains a line that
* is neither its first nor last line
* contains data characters within an included element
the status of the line should be M_SOMETHING not M_DCORCET because the data
characters belong to the inner element rather than the outer one.
Also note that "M_DCORCET" originally stood for "data character or contextual
end tag" when the Standard used the term "contextual element" to mean
an element allowed by a model rather than an inclusion and when
the rules for ignoring RE's referred to the occurrence of end tags of
such elements rather than the entire elements. Now the acronym can be
interpreted as "data character or contextual element".
*/
#define M_NOTHING 0
#define M_SOMETHING 1
#define M_DCORCET 2
/* Definitions for parse stack. The primary data structure of PARSER
is a stack containing one entry for each open element. Each entry
on the stack is described in an m_parse structure. Entries for
element's whose content is defined by a content model have a
pointer to a stack of open FSAs. These FSA stacks do not describe
the actual automata (which are coded in the data structures
generated by BUILD, but rather the current state in the active
automata. An element's FSA stack will have one entry for the
content model and an additional entry for each active and-group.
*/
typedef struct m_parse M_PARSE ;
typedef struct m_openfsa M_OPENFSA ;
typedef struct m_andlist M_ANDLIST ;
struct m_parse {
/* Pointer to preceding entry on stack */
M_PARSE *oldtop ;
/* Identifier of element this entry represents */
M_ELEMENT element ;
/* Pointer to table of parameter pointers for this instance of this
element */
M_WCHAR **param ;
/* Pointer to stack of open FSAs for this element */
M_OPENFSA *fsastack ;
/* For RCDATA elements to indicate the nesting level
of entities when the element opened, since net and etago
delimiters are not recognized except in the same entity
as the element began. */
int thisent ;
/* TRUE iff the element's start-tag ended with a NET so that a NET
is expected to end the element */
LOGICAL neednet ;
/* Has a Record End occurred in the element's content? */
LOGICAL firstre ;
/* Flag that indicates whether the element is contextual, i.e.,
whether it occurred because it was allowed in context by a
content model, or it was allowed by an inclusion exception or
occurred by error. (The term "contextual subelement" was used
in the Draft International Standard in the same sense as
"proper subelement" in the International Standard.) */
LOGICAL contextual ;
/* Whether character data is currently being processed. */
LOGICAL intext ;
/* Line status. Indicates whether anything has occurred after
the start-tag or most recent Record Start in this element */
char linestat ;
/* Flag indicating whether or not a Record End (carriage return)
has been scanned and is being held to see if there is more
content in the element. If there is, the RE will be processed
as a data character, otherwise it will be discarded. */
LOGICAL holdre ;
/* Pointer to the element's short reference map. The value is NULL
if there is no map. */
int *map ;
/* Index in actions for processing text characters encountered
in this element, and pointer to stack location where parameters
should be retrieved. */
int cdcase ;
M_PARSE *cdparam ;
/* Index in actions for processing processing instructions
encountered in this element, and pointer to stack location where
parameters should be retrieved. */
int picase ;
M_PARSE *piparam ;
/* Index in actions for processing start- and end-strings
encountered in this element, and pointer to stack location where
parameters should be retrieved. */
int stccase ;
M_PARSE *stparam ;
/* Pointer to name of input file in which the current element
began (NULL if primary input file). */
M_WCHAR *file ;
/* Line number where the current element began. */
int line ;
/* Interface-defined pointer stored on the stack */
void *ifdata ;
} ;
struct m_openfsa {
/* Pointer to preceding entry on FSA stack */
M_OPENFSA *oldtop ;
/* Current state in this FSA */
M_STATE current ;
/* Identifier of set of and-groups being processed and pointer to list of
and-groups that have occurred within this set. */
M_ANDGROUP andgroup ;
M_ANDLIST *usedand ;
} ;
struct m_andlist {
M_ANDGROUP group ;
M_ANDLIST *next ;
} ;
extern M_OPENFSA m_botfsa ;
/* Bottom marker of parse stack */
M_PAREXTERN M_PARSE m_stackbot
#if defined(M_PARDEF)
= {
/* M_PARSE *oldtop ;*/ NULL,
/* M_ELEMENT element ;*/ M_NULLVAL,
/* M_WCHAR **param ;*/ NULL,
/* M_OPENFSA *fsastack ;*/ &m_botfsa,
/* int thisent ;*/ 0,
/* LOGICAL neednet ;*/ FALSE,
/* LOGICAL firstre ; */ FALSE,
/* LOGICAL contextual ;*/ TRUE,
/* LOGICAL intext ;*/ FALSE,
/* int linestat ;*/ M_NOTHING,
/* LOGICAL holdre ;*/ FALSE,
/* int *map ;*/ NULL,
/* int cdcase ;*/ 1,
/* M_PARSE *cdparam ;*/ &m_stackbot,
/* int picase ;*/ 1,
/* M_PARSE *piparam ;*/ &m_stackbot,
/* int stccase ;*/ 1,
/* M_PARSE *stparam ;*/ &m_stackbot,
/* M_WCHAR *file ;*/ NULL,
/* int line ;*/ M_FIRSTLINE,
/* void *ifdata ;*/ NULL,
}
#endif
;
M_PAREXTERN M_OPENFSA m_botfsa
#if defined(M_PARDEF)
= {
/* M_OPENFSA *oldtop ;*/ NULL,
/* M_STATE current ;*/ 1,
/* M_ANDGROUP andgroup ;*/ M_NULLVAL,
/* M_ANDGROUP *usedand ;*/ NULL,
}
#endif
;
/* Index of current top of parse stack */
M_PAREXTERN M_PARSE *m_stacktop M_PARINIT(&m_stackbot) ;
/* Pointer to stack location where parameters for current code
segment are defined. Used for inherited code segments (text-code,
pi-code, string-code) */
M_PAREXTERN M_PARSE *m_stackpar ;
/* Type of characters */
typedef char M_HOLDTYPE ;
#if defined(M_PARDEF)
#include "chartype.h"
#else
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
#endif
/* Indicates a start tag is allowed by an inclusion exception */
#define M_NONCONTEXTUAL 2
/* Character used to delimit parameter names in start and end strings
entered as data to ELTDEF */
#define M_ESCAPECHAR '@'
/* Pointer to name of element */
#define m_nameofelt(x) &m_ename[m_element[x - 1].enptr]
/* Status of characters as read from input stream */
#define M_EE 0
#define M_NORMAL 1
#define M_CDCHAR 2
#define M_ENTNORMAL 3
/* State transition network generated by CONTEXT */
#include "sparse.h"
/* Maximum length of a sequence of blanks in a short reference delimiter */
#define M_BSEQLEN 100
/* #defines used in recognition of short reference delimiters */
#if defined(M_PARDEF)
#define M_HOLDSIZ M_MAXSR + M_BSEQLEN * M_MAXSEQ + 1
#else
#define M_HOLDSIZ
#endif
#define M_REGCHAR 1
#define M_SEQCHAR 2
#define M_BSCHAR 3
#define M_WSCHAR 4
#define M_RSCHAR 5
/* Number of allowable tokens to display after a syntax error */
#define M_EXPLIMIT 5
/* Status of T option output */
#define M_TOPTSTARTTAG 0
#define M_WHITESPACE 1
#define M_OTHER 2
/* Maximum length of processing instruction (not in a PI entity) */
#define M_PILEN 240
/* Storage for a name token just read by the scanner; and for a name read
while parsing parameters */
M_PAREXTERN M_WCHAR m_name[M_NAMELEN + 1] ;
M_PAREXTERN M_WCHAR m_saveatt[M_NAMELEN + 1] ;
/* M_curcon is current state of FSA that controls parser; m_prevcon is the
value of m_curcon before last character was scanned; m_token is the token
type returned by last call to scanner; and
m_scanval is index of element name just read within tag delimiters */
M_PAREXTERN int m_curcon M_PARINIT(PREAMBLE) ;
M_PAREXTERN int m_prevcon ;
M_PAREXTERN int m_token ;
M_PAREXTERN int m_scanval ;
/* Declarations for tentative list of omitted tags when checking for tag
MINimization */
typedef struct m_min M_MIN ;
struct m_min {
int val ;
M_MIN *next ;
} ;
M_PAREXTERN M_MIN *m_minstart ;
M_PAREXTERN M_MIN *m_minend ;
M_PAREXTERN M_MIN **m_nextms ;
M_PAREXTERN M_MIN **m_nextme ;
/* Count of the number of open elements expecting to be terminated with
a NET */
M_PAREXTERN int m_netlevel M_PARINIT(0) ;
/* Count of errors that have occurred */
M_PAREXTERN int m_errcnt M_PARINIT(0) ;
#define M_ERRLIM 100
M_PAREXTERN int m_errlim M_PARINIT(M_ERRLIM) ;
M_PAREXTERN int m_expcount ;
M_PAREXTERN LOGICAL m_errexit M_PARINIT(FALSE) ;
/* Flag to indicate whether processing of the text has begun */
M_PAREXTERN LOGICAL m_start M_PARINIT(FALSE) ;
/* Flag indicates whether current start tag is terminated by End-tag
indicator or by tag-close delimiter (or start of another tag) */
M_PAREXTERN LOGICAL m_scannet ;
/* Storage for literals */
M_PAREXTERN M_WCHAR m_literal[M_LITLEN + 1] ;
/* Buffer for sequence of white space that has been read before it is
determined whether or not the white space is significant */
#define M_WSPACELEN 100
M_PAREXTERN int m_wspace[M_WSPACELEN] ;
M_PAREXTERN int m_wscount M_PARINIT(0) ;
M_PAREXTERN int m_maxws M_PARINIT(0) ;
M_PAREXTERN int m_wsused ;
/* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/
M_PAREXTERN
M_WCHAR *m_poccur[
#if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1
#endif
] ;
/* Index of a particular parameter within the parameter list for a given
element */
M_PAREXTERN int m_psave ;
/* Index of a particular parameter within the list of all parameters for all
elements */
M_PAREXTERN int m_ppsave ;
/* Index of element of tag just scanned; may be result of short tag
minimization */
M_PAREXTERN M_ELEMENT m_scanel ;
/* Read-ahead buffer and number of characters currently in that buffer */
#define M_SAVECHAR 500
M_PAREXTERN int m_savechar[M_SAVECHAR] ;
M_PAREXTERN M_WCHAR m_savedchar[M_SAVECHAR] ;
M_PAREXTERN M_WCHAR m_oldlinestat[M_SAVECHAR] ;
M_PAREXTERN M_WCHAR m_oldatrs[M_SAVECHAR] ;
M_PAREXTERN int m_sourcefile[M_SAVECHAR] ;
M_PAREXTERN M_WCHAR m_atrs M_PARINIT(TRUE) ;
M_PAREXTERN int m_oldlsindex M_PARINIT(M_SAVECHAR - 1) ;
M_PAREXTERN int m_toundo M_PARINIT(0) ;
M_PAREXTERN int m_maxundo M_PARINIT(0) ;
#define M_LINELENGTH 80
M_PAREXTERN int m_saveline[M_LINELENGTH][M_ENTLVL + 1] ;
M_PAREXTERN int m_svlncnt[M_ENTLVL + 1] M_PARINIT({0}) ;
M_PAREXTERN LOGICAL m_svlnwrap[M_ENTLVL + 1] M_PARINIT({FALSE}) ;
/* Arrays used for short references */
M_PAREXTERN int m_hold[M_HOLDSIZ] ;
M_PAREXTERN M_HOLDTYPE m_dhold[M_HOLDSIZ] ;
M_PAREXTERN int m_delim[M_HOLDSIZ] ;
M_PAREXTERN char m_srefchartype[M_HOLDSIZ] ;
M_PAREXTERN int m_current[M_HOLDSIZ] ;
/* Options
A -- Trace of calls to m_malloc() and m_free()
B --
C -- Trace of calls to m_getachar(), putachar()
D -- Trace of encountered data characters
E -- Don't report duplicate entity declarations
F --
G --
H -- M_malloc and m_free check for valid heap
I --
J --
K --
L -- Don't limit number of possible tokens displayed by expecting()
M -- Determine start-tag minimization strictly according to the Standard
N --
O --
P --
Q --
R --
S -- Scanner trace
T -- Tag trace
U --
V --
W -- Missing tagc not considered an error
X --
Y --
Z --
*/
M_PAREXTERN LOGICAL m_malftrace M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_chtrace M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_cdtrace M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_entdupchk M_PARINIT(TRUE) ;
M_PAREXTERN LOGICAL m_heapchk M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_explimit M_PARINIT(TRUE) ;
M_PAREXTERN LOGICAL m_conform M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_scantrace M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_tagtrace M_PARINIT(FALSE) ;
M_PAREXTERN LOGICAL m_wholetag M_PARINIT(FALSE) ;
M_PAREXTERN int m_toptstat ;
/* Flag that indicates when unexpected content detected after document
appears to be complete */
M_PAREXTERN LOGICAL m_aftereod M_PARINIT(FALSE) ;
/* Save standard C main program arguments */
M_PAREXTERN int m_argc ;
M_PAREXTERN char **m_argv ;
/* PARSER output file */
#if defined(__linux__) || defined(CSRG_BASED)
M_PAREXTERN FILE *m_outfile;
M_PAREXTERN FILE *m_errfile;
#else
M_PAREXTERN FILE *m_outfile M_PARINIT(stdout) ;
M_PAREXTERN FILE *m_errfile M_PARINIT(stdout) ;
#endif
/* Save processing instruction */
M_PAREXTERN M_WCHAR m_pi[M_PILEN + 1] ;
M_PAREXTERN int m_pilen M_PARINIT(0) ;
/* Entity being defined */
M_PAREXTERN M_ENTITY *m_entity ;
M_PAREXTERN int m_entclen ;
M_PAREXTERN M_WCHAR m_entcontent[M_LITLEN + 1] ;
/* Largest positive integer */
#define M_BIGINT 0x7FFF
/* Include function prototypes */
#include "proto.h"

View File

@@ -1,303 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: proto.h /main/3 1995/11/08 10:24:42 rswiston $ */
void chksnb(void);
int m_actgetc(void);
void m_adjuststate(void);
LOGICAL m_allwhite(const M_WCHAR *string);
void m_attval(M_WCHAR *string);
LOGICAL m_attvonly(M_WCHAR *string);
int m_checkstart(M_ELEMENT val);
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
void m_closent(void *m_ptr);
void m_codeent(int m_ent);
M_PARSE *m_copystackelt(void);
M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content,
unsigned char *wheredef);
void m_dispcurelt(M_WCHAR *file, int line);
void m_done(void);
void m_dumpline(M_WCHAR *file, int line);
void m_eduptype(int type);
M_ELEMENT m_eltname(void);
void m_endaction(M_ELEMENT m_elt);
void m_endcase(int m_action);
void m_endtag(M_ELEMENT c);
void m_entexpand(M_ENTITY *openent);
void m_eprefix(void);
void m_err1(const char *text, const M_WCHAR *arg);
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg5);
void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
void m_errline(char *p);
void m_error(char *text);
void m_esuffix(void);
void m_exit(int status);
void m_etcomplete(void);
LOGICAL m_excluded(M_ELEMENT elt);
void m_expecting(void);
void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
int m_findact(M_ELEMENT elt, int *array);
void m_findatt(void);
void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
LOGICAL wild);
int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
M_ELEMENT m_findunique(M_STATE from, int *newleft);
void m_frcend(M_ELEMENT val);
void m_frcstart(void);
void m_free(void *block, char *msg);
void m_freeFSA(M_PARSE *stackelt);
void m_freemin(M_MIN *min
, char *msg);
void m_freeparam(M_PARSE *stackelt);
LOGICAL m_gendelim(int srlen, int context);
int m_getachar(M_HOLDTYPE *dchar);
int m_getc(void *m_ptr);
int mb_getwc(void *m_ptr);
void *m_getdata(int n, LOGICAL *flag);
void m_getline(M_WCHAR **file, int *line);
void m_getname(M_WCHAR first);
void m_getsignon(void);
int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
void m_globes(void);
void m_globss(void);
void m_holdproc(void);
void m_inctest(int *count, int limit, char *message);
void m_initialize(void);
void m_lastchars(void);
int m_level(M_WCHAR *elt);
int m_mblevel(char *elt);
void m_litproc(int delim);
void m_longent(int context);
LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
unsigned char *wheredef);
void *m_malloc(int size, char *msg);
void m_mberr1(const char *text, const char *arg);
void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
unsigned char type);
void m_ntrent(M_WCHAR *p);
void m_nullendtag(void);
LOGICAL m_omitend(void);
LOGICAL m_omitstart(void);
void m_openchk(FILE **ptr, char *name, char *mode);
void *m_openent(M_WCHAR *entcontent);
void *m_openfirst(void);
void m_optstring(char *p);
int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
int m_parcount(M_WCHAR *elt);
M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
M_WCHAR *m_parent(int n);
M_WCHAR *m_parname(M_WCHAR *elt, int n);
M_WCHAR *m_mbparname(char *elt, int n);
const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
void m_parupper(int par, M_WCHAR *string);
LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
void m_pop(void);
void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
LOGICAL m_putdata(void *data, int n);
void m_readcomments(void);
void *m_realloc(void *ptr, int size, char *msg);
int m_scan(void);
void m_setmap(int map, LOGICAL useoradd);
void m_setoptions(void);
void m_setparam(M_WCHAR **cvar, int par);
void m_shortref(int context);
void m_showcurelt(void);
void m_signmsg(char *p);
void m_sigre(void);
void m_startdoc(void);
void m_startmsg(void);
void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
void m_stcomplete(void);
void m_stkdefaultparams(void);
void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
void m_stkparams(void);
void m_strtaction(M_ELEMENT m_elt);
void m_strtcase(int m_action);
void m_strtcdata(int scanval);
LOGICAL m_strtproc(M_ELEMENT scanval);
void m_strttag(M_ELEMENT val, LOGICAL net);
void m_textaction(M_WCHAR m_textchar);
void m_textout(char *format, LOGICAL start, LOGICAL end);
LOGICAL m_textpermitted(void);
M_WCHAR *m_thisfile(void);
int m_thisline(void);
void m_trace(char *p);
void m_wctrace(M_WCHAR *p);
LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
void m_undodelim(M_WCHAR *delim, LOGICAL flag);
void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
void m_updatedefault(const int par, const M_WCHAR *string);
int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
int m_mbmbupstrcmp(const char *p, const char *q);
LOGICAL m_validinpar(M_WCHAR *string);
LOGICAL m_vldentref(void);
LOGICAL m_whitespace(M_WCHAR c);

View File

@@ -1,288 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: tex.h /main/3 1995/11/08 10:26:25 rswiston $ */
EXTERN char *special[256]
#if defined(DEFINE)
= {
/* Char Name TeX Expansion */
/* */
/* 0: ^@ NUL */ 0,
/* 1: ^A SOH */ 0,
/* 2: ^B STX */ 0,
/* 3: ^C ETX */ 0,
/* 4: ^D EOT */ 0,
/* 5: ^E ENQ */ 0,
/* 6: ^F ACK */ 0,
/* 7: ^G BEL */ 0,
/* 8: ^H BS */ 0,
/* 9: ^I HT */ 0,
/* 10: ^J LF */ 0,
/* 11: ^K VT */ 0,
/* 12: ^L FF */ 0,
/* 13: ^M CR */ 0,
/* 14: ^N SO */ 0,
/* 15: ^O SI */ 0,
/* 16: ^P DLE */ 0,
/* 17: ^Q DC1 */ 0,
/* 18: ^R DC2 */ 0,
/* 19: ^S DC3 */ 0,
/* 20: ^T DC4 */ 0,
/* 21: ^U NAK */ 0,
/* 22: ^V SYN */ 0,
/* 23: ^W ETB */ 0,
/* 24: ^X CAN */ 0,
/* 25: ^Y EM */ 0,
/* 26: ^Z SUB */ 0,
/* 27: ^[ ESC */ 0,
/* 28: ^\ FS */ 0,
/* 29: ^] GS */ 0,
/* 30: ^^ RS */ 0,
/* 31: ^_ US */ 0,
/* 32: SP */ 0,
/* 33: ! */ 0,
/* 34: " */ 0,
/* 35: # */ "\\#",
/* 36: $ */ "{\\dollar}",
/* 37: % */ "\\%",
/* 38: & */ "\\&",
/* 39: ' */ "{'}",
/* 40: ( */ 0,
/* 41: ) */ 0,
/* 42: * */ 0,
/* 43: + */ 0,
/* 44: , */ 0,
/* 45: - */ "{-}",
/* 46: . */ 0,
/* 47: / */ 0,
/* 48: 0 */ 0,
/* 49: 1 */ 0,
/* 50: 2 */ 0,
/* 51: 3 */ 0,
/* 52: 4 */ 0,
/* 53: 5 */ 0,
/* 54: 6 */ 0,
/* 55: 7 */ 0,
/* 56: 8 */ 0,
/* 57: 9 */ 0,
/* 58: : */ 0,
/* 59: ; */ 0,
/* 60: < */ "{\\lthan}",
/* 61: = */ 0,
/* 62: > */ "{\\gthan}",
/* 63: ? */ 0,
/* 64: @ */ 0,
/* 65: A */ 0,
/* 66: B */ 0,
/* 67: C */ 0,
/* 68: D */ 0,
/* 69: E */ 0,
/* 70: F */ 0,
/* 71: G */ 0,
/* 72: H */ 0,
/* 73: I */ 0,
/* 74: J */ 0,
/* 75: K */ 0,
/* 76: L */ 0,
/* 77: M */ 0,
/* 78: N */ 0,
/* 79: O */ 0,
/* 80: P */ 0,
/* 81: Q */ 0,
/* 82: R */ 0,
/* 83: S */ 0,
/* 84: T */ 0,
/* 85: U */ 0,
/* 86: V */ 0,
/* 87: W */ 0,
/* 88: X */ 0,
/* 89: Y */ 0,
/* 90: Z */ 0,
/* 91: [ */ 0,
/* 92: \\ */ "{\\bslash}",
/* 93: ] */ 0,
/* 94: ^ */ "\\string^",
/* 95: _ */ "{\\under}",
/* 96: ` */ "{`}",
/* 97: a */ 0,
/* 98: b */ 0,
/* 99: c */ 0,
/* 100: d */ 0,
/* 101: e */ 0,
/* 102: f */ 0,
/* 103: g */ 0,
/* 104: h */ 0,
/* 105: i */ 0,
/* 106: j */ 0,
/* 107: k */ 0,
/* 108: l */ 0,
/* 109: m */ 0,
/* 110: n */ 0,
/* 111: o */ 0,
/* 112: p */ 0,
/* 113: q */ 0,
/* 114: r */ 0,
/* 115: s */ 0,
/* 116: t */ 0,
/* 117: u */ 0,
/* 118: v */ 0,
/* 119: w */ 0,
/* 120: x */ 0,
/* 121: y */ 0,
/* 122: z */ 0,
/* 123: { */ "{\\lbrac}",
/* 124: | */ "{\\vbar}",
/* 125: } */ "{\\rbrac}",
/* 126: ~ */ "\\string~",
/* 127: DEL */ 0,
/* 128: undefined */ 0,
/* 129: undefined */ 0,
/* 130: undefined */ 0,
/* 131: undefined */ 0,
/* 132: undefined */ 0,
/* 133: undefined */ 0,
/* 134: undefined */ 0,
/* 135: undefined */ 0,
/* 136: undefined */ 0,
/* 137: undefined */ 0,
/* 138: undefined */ 0,
/* 139: undefined */ 0,
/* 140: undefined */ 0,
/* 141: undefined */ 0,
/* 142: undefined */ 0,
/* 143: undefined */ 0,
/* 144: undefined */ 0,
/* 145: undefined */ 0,
/* 146: undefined */ 0,
/* 147: undefined */ 0,
/* 148: undefined */ 0,
/* 149: undefined */ 0,
/* 150: undefined */ 0,
/* 151: undefined */ 0,
/* 152: undefined */ 0,
/* 153: undefined */ 0,
/* 154: undefined */ 0,
/* 155: undefined */ 0,
/* 156: undefined */ 0,
/* 157: undefined */ 0,
/* 158: undefined */ 0,
/* 159: undefined */ 0,
/* 160: undefined */ 0,
/* 161: A grave */ "\\`A",
/* 162: A circumflex */ "\\^A",
/* 163: E grave */ "\\`E",
/* 164: E circumflex */ "\\^E",
/* 165: E dieresis */ "\\\042E",
/* 166: I circumflex */ "\\^I",
/* 167: I dieresis */ "\\\042I",
/* 168: acute accent */ "\\'{ }",
/* 169: grave accent */ "\\`{ }",
/* 170: circumflex */ "\\^{ }",
/* 171: dieresis */ "\\\042{ }",
/* 172: tilde */ "\\~{ }",
/* 173: U grave */ "\\`U",
/* 174: U circumflex */ "\\^U",
/* 175: Italian Lira */ 0,
/* 176: overbar */ 0,
/* 177: Y acute */ "\\'Y",
/* 178: y acute */ "\\'y",
/* 179: degree */ 0,
/* 180: C cedilla */ "\\c{C}",
/* 181: c cedilla */ "\\c{c}",
/* 182: N tilde */ "\\~N",
/* 183: n tilde */ "\\~n",
/* 184: inverted exclamation mark */ "{!`}",
/* 185: inverted question mark */ "{?`}",
/* 186: currency sign */ 0,
/* 187: pound sterling */ 0,
/* 188: Yen */ 0,
/* 189: Section sign */ 0,
/* 190: florin */ 0,
/* 191: Cent sign */ 0,
/* 192: a circumflex */ "\\^a",
/* 193: e circumflex */ "\\^e",
/* 194: o circumflex */ "\\^o",
/* 195: u circumflex */ "\\^u",
/* 196: a acute */ "\\'a",
/* 197: e acute */ "\\'e",
/* 198: o acute */ "\\'o",
/* 199: u acute */ "\\'u",
/* 200: a grave */ "\\`a",
/* 201: e grave */ "\\`e",
/* 202: o grave */ "\\`o",
/* 203: u grave */ "\\`u",
/* 204: a dieresis */ "\\\042a",
/* 205: e dieresis */ "\\\042e",
/* 206: o dieresis */ "\\\042o",
/* 207: u dieresis */ "\\\042u",
/* 208: A angstrom */ "{\\AA}",
/* 209: i circumflex */ "{\\^\\i}",
/* 210: O slash */ "{\\O}",
/* 211: AE ligature */ "{\\AE}",
/* 212: a angstrom */ "{\\aa}",
/* 213: i acute */ "{\\'\\i}",
/* 214: o slash */ "{\\o}",
/* 215: ae ligature */ "{\\ae}",
/* 216: A dieresis */ "\\\042A",
/* 217: i grave */ "{\\`\\i}",
/* 218: O dieresis */ "\\\042O",
/* 219: U dieresis */ "\\\042U",
/* 220: E acute */ "\\'E",
/* 221: i dieresis */ "{\\\042\\i}",
/* 222: SS ligature */ "{\\ss}",
/* 223: O circumflex */ "\\^O",
/* 224: A acute */ "\\'A",
/* 225: A tilde */ "\\~A",
/* 226: a tilde */ "\\~a",
/* 227: Eth */ 0,
/* 228: eth */ 0,
/* 229: I acute */ "\\'I",
/* 230: I grave */ "\\`I",
/* 231: O acute */ "\\'O",
/* 232: O grave */ "\\`O",
/* 233: O tilde */ "\\~O",
/* 234: o tilde */ "\\~o",
/* 235: S caron */ "\\v{S}",
/* 236: s caron */ "\\v{s}",
/* 237: U acute */ "\\'U",
/* 238: Y dieresis */ "\\\042Y",
/* 239: y dieresis */ "\\\042y",
/* 240: Thorn */ 0,
/* 241: thorn */ 0,
/* 242: undefined */ 0,
/* 243: mu */ 0,
/* 244: paragraph sign */ 0,
/* 245: fraction 3/4 */ 0,
/* 246: long dash */ 0,
/* 247: fraction 1/4 */ 0,
/* 248: fraction 1/2 */ 0,
/* 249: Female ordinal */ 0,
/* 250: Male ordinal */ 0,
/* 251: French double open quote */ 0,
/* 252: Solid square */ 0,
/* 253: French double close quote */ 0,
/* 254: Plus over minus sign */ 0,
/* 255: undefined */ 0
}
#endif
;

View File

@@ -1,37 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: userinc.h /main/3 1995/11/08 10:26:57 rswiston $ */
/* Copyright 1988, 1989 Hewlett-Packard Co. */
/* Header files for interface code files */
#include <stdio.h>
#include "basic.h"
#include "trie.h"
#include "dtdext.h"
#include "parser.h"
#include "delim.h"
#include "entext.h"
#include "signonx.h"
#include "pval.h"
#include "version.h"