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

@@ -13,7 +13,7 @@ HELPUTILSRC = $(HELPTAG)/util
HELPBUILDSRC = $(HELPTAG)/build HELPBUILDSRC = $(HELPTAG)/build
HELPUTILLIB = $(HELPTAG)/util/libutil.a HELPUTILLIB = $(HELPTAG)/util/libutil.a
build_CFLAGS = -I$(HELPUTILSRC) build_CFLAGS = -DCANON1 -I$(HELPUTILSRC) -I../../include/util -I../../include/build
build_LDADD = ../util/libutil.a build_LDADD = ../util/libutil.a

View File

@@ -1,424 +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: build.h /main/3 1995/11/08 09:24:53 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Build.h is the primary include file for allocation of global variables
for program BUILD. */
#if defined(BUILDEF)
#define BUILDEXTERN
#define BUILDINIT(a) = a
#else
#define BUILDEXTERN extern
#define BUILDINIT(a)
#endif
#include <stdio.h>
#include "basic.h"
#include "trie.h"
#include "common.h"
/* Defined types */
typedef struct arc ARC ;
typedef struct state STATE ;
typedef struct tree TREE ;
typedef struct statelist STATELIST ;
typedef struct parameter PARAMETER ;
typedef struct exception EXCEPTION ;
typedef struct ptype PTYPE ;
typedef struct eltstruct ELTSTRUCT ;
typedef struct lhsstruct LHS ;
typedef struct stack STACK ;
typedef struct srefstruct SREFSTRUCT ;
typedef struct srefdata SREFDATA ;
typedef struct mapstruct MAP ;
typedef struct andgroup ANDGROUP ;
/* Each item in a list of states contains value, a pointer to a state;
next, a pointer to the next item in the list; and level, which
indicates the level of nested subexpressions within the regular expression
when the state was added to the FSA. */
struct statelist {
STATE *value ;
STATELIST *next ;
int level ;
} ;
struct stack {
STACK *oldtop ;
STATELIST *starts ;
STATELIST *finals ;
STATELIST *allfinal ;
STATELIST *newfinal ;
ARC *starta ;
} ;
BUILDEXTERN STACK bot
#if defined(BUILDEF)
= {
NULL, NULL, NULL, NULL, NULL, NULL
}
#endif
;
BUILDEXTERN STACK *top BUILDINIT(&bot) ;
BUILDEXTERN int stacklevels BUILDINIT(0) ;
/* Used to report nondeterminism in and groups */
#define ANDCONFLICT 1
#define DATACONFLICT 2
#define ELTCONFLICT 3
/* Name of an element, and of the first element on the left-hand side of
the current rule */
#define thisrule lhs->elt->enptr
/* Set declared entity type */
#define SETETYPE(p,t) adddefent(p) ; entity->type = t
/* Definitions for entities */
#define EMPTYMAP 1
#define ERREXIT 1
/* Prefix for default short reference map and entities */
#define M_PREFIX "M-"
/* State transition network generated by CONTEXT */
#define sparse
#include "sparse.h"
/* Function prototypes */
#include "proto.h"
/* Frequently output strings */
#define ndif "}\n#endif\n ;\n\n"
#define SUBONE else fputs("[1] ;\n\n", dtd) ;
/* An array used to indicate which characters can appear within
element names */
#if defined(BUILDEF)
#include "chartype.h"
#else
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
#endif
/* Current state of the finite-state machine which controls BUILD */
BUILDEXTERN int curcon BUILDINIT(RULE) ;
BUILDEXTERN int m_token ;
BUILDEXTERN M_WCHAR scanval ;
/* Used to pass names and literals from the scanner */
BUILDEXTERN M_WCHAR name[M_NAMELEN + 1] ;
BUILDEXTERN M_WCHAR literal[M_LITLEN + 1] ;
/* Scanner buffer for read-ahead */
BUILDEXTERN int toundo BUILDINIT(0) ;
BUILDEXTERN int maxundo BUILDINIT(0) ;
/* Size of scanner buffer for read-ahead */
#define SAVECHAR 50
BUILDEXTERN int savechar[SAVECHAR] ;
/* Whether errors have occurred */
BUILDEXTERN LOGICAL errexit BUILDINIT(FALSE) ;
/* FSA storage */
/* Each state in an FSA is represented by a flag indicating whether it is
a final state, a pointer to a list of transitions from the state,
and a flag that indicates whether parsed character data is possible
from the state */
struct state {
LOGICAL final ;
LOGICAL datacontent ;
LOGICAL frompcdata ;
ARC *first ;
int count ;
STATE *next ;
} ;
BUILDEXTERN STATE *firststate BUILDINIT(NULL) ;
BUILDEXTERN STATE **nextstate BUILDINIT(&firststate) ;
BUILDEXTERN STATE *startstate ;
/* Each arc in an FSA is an element in the arc list emanating from a
particular state. Associated fields include label, a pointer to
the name of the element labelling the arc (garbage if the label is an
and group); optional, a flag indicating whether or not the label is
contextually required; minim, a flag indicating whether or not the arc
corresponds to an element selected by explicit minimization;
and group, a pointer to the list of FSA's making
up the andgroup if the arc's label is an andgroup; to, a pointer to the
state entered by the arc; next, a pointer to the next arc
in the current arc list; and finally, id, a pointer to the node in the
tree representation of the model corresponding to the arc (id is used
in the detection of ambiguity to differentiate between arcs with the same
label corresponding to one model token and those with the same label
corresponding to more than one model token).
*/
struct arc {
ELTSTRUCT *label ;
LOGICAL optional ;
LOGICAL minim ;
ANDGROUP *group ;
STATE *to ;
ARC *next ;
int id ;
} ;
/* Andgroups are elements in a list of the FSA's corresponding to the
content submodels in an andgroup. Each list element contains a pointer
to the start state of the FSA and a pointer to the next element in the
list */
struct andgroup{
STATE *start ;
ANDGROUP *nextptr ;
ANDGROUP *next ;
int count ;
} ;
BUILDEXTERN ANDGROUP *firstand BUILDINIT(NULL) ;
BUILDEXTERN ANDGROUP **nextand BUILDINIT(&firstand) ;
/* Tree representation of a rule */
/* Each node in the tree representation corresponds to a submodel.
Associated with the node is the submodel's connector and occurrence
indicator; terminal, a flag indicating whether the submodel in turn
has submodels; value, the element of which a terminal submodel consists;
pointers first and last to the first and last submodel of the node;
and right pointing to the node's next sibling in the tree. */
struct tree {
int connector, occurrence ;
ELTSTRUCT *value ;
LOGICAL terminal ;
LOGICAL minim ;
TREE *first, *right, *parent ;
int eltid ;
} ;
BUILDEXTERN TREE *ruletree BUILDINIT(NULL) ;
BUILDEXTERN TREE *curtree ;
/* Various counters */
BUILDEXTERN int eltsinrule BUILDINIT(0) ;
BUILDEXTERN int stateused BUILDINIT(0) ;
BUILDEXTERN int andused BUILDINIT(0) ;
/* Element names on the left-hand side of the current rule */
struct lhsstruct {
ELTSTRUCT *elt ;
LHS *next ;
} ;
BUILDEXTERN LHS *lhs BUILDINIT(NULL) ;
BUILDEXTERN LHS **nextlhs BUILDINIT(&lhs) ;
/* Content type (regular expression, ANY, NONE, CDATA, RCDATA) of the
current rule. */
BUILDEXTERN int contype ;
/* Indicates whether <PARAM>, <USEMAP>, or <MIN> fields have occurred in
current rule */
BUILDEXTERN LOGICAL poccur, uoccur, moccur ;
/* Indicates whether an ID parameter for this rule has occurred */
BUILDEXTERN LOGICAL idoccur ;
/* Short reference map for this rule */
BUILDEXTERN int srefp ;
BUILDEXTERN LOGICAL useoradd ;
/* Whether start- and end-tag minimization are permitted for the current
rule */
BUILDEXTERN LOGICAL smin, emin ;
/* Suffix for generated entity names */
BUILDEXTERN int egensuf ;
/* Storage for exceptions */
BUILDEXTERN int excount BUILDINIT(0) ;
struct exception {
int element ;
EXCEPTION *next ;
EXCEPTION *nextptr ;
} ;
BUILDEXTERN EXCEPTION *firstex BUILDINIT(NULL) ;
BUILDEXTERN EXCEPTION **nextex BUILDINIT(&firstex) ;
BUILDEXTERN EXCEPTION *exlist ;
/* Total number of parameters for all elements */
BUILDEXTERN int parcount BUILDINIT(0) ;
/* Primary representation of parameters */
struct parameter {
M_WCHAR *paramname ;
int type ;
int kwlist ;
PTYPE *ptypep ;
int deftype ;
int defval ;
M_WCHAR *defstring ;
/* Next parameter for this element */
PARAMETER *next ;
/* Link for list of all parameters for all elements */
PARAMETER *nextptr ;
} ;
BUILDEXTERN PARAMETER *newpar BUILDINIT(NULL) ;
BUILDEXTERN PARAMETER *plist BUILDINIT(NULL) ;
BUILDEXTERN PARAMETER *firstpar BUILDINIT(NULL) ;
BUILDEXTERN PARAMETER **nextpar BUILDINIT(&firstpar) ;
/* Storage for parameter names */
BUILDEXTERN int pnamelen BUILDINIT(0) ;
/* Storage for parameter values that are named keywords */
BUILDEXTERN int ptypelen BUILDINIT(0) ;
struct ptype {
M_WCHAR *keyword ;
int next ;
PTYPE *nextptr ;
} ;
BUILDEXTERN PTYPE *firstptype BUILDINIT(NULL) ;
BUILDEXTERN PTYPE *thisptype ;
BUILDEXTERN PTYPE **nextptype BUILDINIT(&firstptype) ;
BUILDEXTERN int kwlen BUILDINIT(0) ;
/* Storage for parameter default values */
BUILDEXTERN int deflen BUILDINIT(0) ;
/* Characters needed for element names */
BUILDEXTERN int enamelen BUILDINIT(0) ;
/* Description of an element: */
struct eltstruct {
/* Pointer to element name */
M_WCHAR *enptr ;
/* Start state of element's content model's FSA */
STATE *model ;
/* Type of element's content (Regular expression, ANY, RCDATA, etc) */
int content ;
/* Pointer to element's inclusion list */
int inptr ;
/* Pointer to element's exclusion list */
int exptr ;
/* Pointer to element's parameter list */
PARAMETER *parptr ;
/* Index in output of first item in element's parameter list */
int parindex ;
/* Number of element's parameters */
int paramcount ;
/* Whether start- and end-tag minimization are permitted */
LOGICAL stmin, etmin ;
/* Pointer to short reference map, if any */
int srefptr ;
/* TRUE for USEMAP, FALSE for ADDMAP */
LOGICAL useoradd ;
ELTSTRUCT *next ;
int eltno ;
} ;
BUILDEXTERN ELTSTRUCT *firstelt BUILDINIT(NULL) ;
BUILDEXTERN ELTSTRUCT **nextelt BUILDINIT(&firstelt) ;
/* Most number of parameters had by a single element */
BUILDEXTERN int maxpar BUILDINIT(0) ;
/* Number of parameters current element has */
BUILDEXTERN int pcount ;
BUILDEXTERN FILE *dtd ;
BUILDEXTERN FILE *m_errfile ;
/* Line number in input file */
BUILDEXTERN int m_line BUILDINIT(1) ;
/* Options */
/* Scan trace */
BUILDEXTERN LOGICAL scantrace BUILDINIT(FALSE) ;
/* Trace calls to malloc/free */
BUILDEXTERN LOGICAL m_malftrace BUILDINIT(FALSE) ;
/* Test validity of heap in calls to malloc/free */
BUILDEXTERN LOGICAL m_heapchk BUILDINIT(FALSE) ;
/* Flag set if strictly conforming to ISO 8879 */
BUILDEXTERN LOGICAL standard BUILDINIT(FALSE) ;
/* File pointer used by utilities in ..\util\scanutil for input file */
BUILDEXTERN FILE *ifile ;
/* Element names are stored in a trie. */
BUILDEXTERN M_TRIE eltree ;
/* Count of elements */
BUILDEXTERN int ecount BUILDINIT(0) ;
/* Storage for short reference map names and definitions */
BUILDEXTERN M_TRIE maptree ;
BUILDEXTERN M_TRIE sreftree ;
BUILDEXTERN int mapcnt BUILDINIT(0) ;
BUILDEXTERN int curmap ;
struct srefstruct {
int srefcnt ;
SREFDATA *data ;
SREFSTRUCT *next ;
} ;
BUILDEXTERN SREFSTRUCT *firstsref BUILDINIT(NULL) ;
BUILDEXTERN SREFSTRUCT **nextsref BUILDINIT(&firstsref) ;
struct srefdata {
int map ;
int entidx ;
SREFDATA *next ;
} ;
BUILDEXTERN SREFDATA *thissref ;
BUILDEXTERN int sreflen BUILDINIT(0) ;
BUILDEXTERN M_WCHAR mapname[M_NAMELEN + 1] ;
BUILDEXTERN int maxsr ;
BUILDEXTERN int maxseq ;
struct mapstruct {
int map ;
M_WCHAR *mapname ;
LOGICAL defined ;
MAP *nextptr ;
} ;
BUILDEXTERN MAP *firstmap BUILDINIT(NULL) ;
BUILDEXTERN MAP **nextmap BUILDINIT(&firstmap) ;
/* Storage for entities */
BUILDEXTERN M_TRIE m_enttrie[1] ;
BUILDEXTERN M_ENTITY *entity ;
BUILDEXTERN M_ENTITY *lastent BUILDINIT(NULL) ;
BUILDEXTERN M_ENTITY *firstent BUILDINIT(NULL) ;
BUILDEXTERN M_WCHAR entcontent[M_LITLEN + 1] ;
BUILDEXTERN int entclen ;
BUILDEXTERN int m_entcnt BUILDINIT(0) ;
BUILDEXTERN FILE *entfile ;
BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
M_WCHAR *MakeWideCharString(const char *from);

View File

@@ -1,226 +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 09:26:24 rswiston $ */
/*
Copyright (c) 1988, 1989 Hewlett-Packard Co.
*/
/* Proto.h contains function prototypes for program BUILD. */
int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
int id, LOGICAL minim, ELTSTRUCT **errelt);
void adddefent(M_WCHAR *mapname);
LOGICAL addent(M_WCHAR *name);
void addex(void);
void addkeyword(void);
LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
void addndent(M_WCHAR *p);
void addpar(void);
void addsref(M_WCHAR *p);
LOGICAL m_allwhite(const M_WCHAR *string);
void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
ELTSTRUCT **errelt);
LOGICAL checkdefault(const M_WCHAR *string);
int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
void copyintolist(STATELIST *from, STATELIST **to);
void countdown(M_TRIE *parent, int *count);
void defmapname(void);
char *deftype(int n);
void dellist(STATELIST **list);
void delstartarcs(void);
void done(void);
void dumpentnode(FILE *file, M_TRIE *value);
void dumpmapnode(FILE *file, M_TRIE *value);
void dumpsrefnode(FILE *file,
M_TRIE *value);
void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)( FILE *, M_TRIE *));
void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
void (*proc)(M_ENTITY *));
void eltblocks(FILE *tempfile);
void eltreeout(void);
void endmodel(void);
void entout(char *fname);
char *enttype(int n);
void m_error(char *text);
void m_err1(const char *text, const M_WCHAR *arg);
void m_mberr1(char *text, const char *arg);
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
void exout(void);
void m_free(void *block, char *msg);
void freetree(TREE *ruletree);
void found(LOGICAL *flag, char *delim);
void fsa(void);
int getachar(void);
ANDGROUP *getand(void);
LOGICAL getname(int first);
STATE *getstate(void);
int gettoken(int *c, int context);
TREE *gettreenode(void);
void initialize(void);
LOGICAL litproc(int delim);
void makeand(LOGICAL *canbenull, TREE *root, int optional);
LOGICAL makefsa(TREE *root, int optional);
void makeor(LOGICAL *canbenull, TREE *root);
void makeseq(LOGICAL *canbenull, TREE *root, int optional);
void *m_malloc(int size, char *msg);
void msgline(char *text);
void msg1line(char *text, char *arg1);
void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
void normdefault(M_WCHAR *string);
LOGICAL notinlist(STATELIST *item, STATELIST *list);
ELTSTRUCT *ntrelt(M_WCHAR *p);
void m_openchk(FILE **ptr, char *name, char *mode);
void parout(void);
char *partype(int n);
LOGICAL permitspcd(ARC *a);
void pop(void);
void prulend(void);
void push(void);
LOGICAL regenerate(TREE *start, TREE *stop);
void repeat(TREE *root);
void ruleinit(void);
void rulend(void);
LOGICAL samelabelarc(ARC *a, STATE *s);
void savelhs(LOGICAL param);
void savestartarcs(void);
int scan(void);
void setdefault(const M_WCHAR *string);
void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
void skiptoend(void);
int m_sprscon(int i, int j);
void srefout(void);
STATE *startfsa(TREE *root, LOGICAL *canbenull);
void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
void template(void);
char *typecon(int n);
void undodelim(M_WCHAR *delim);
void ungetachar(int c);
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);
void warning(char *text);
void warning1(char *text, M_WCHAR *arg);
void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
LOGICAL m_whitespace(M_WCHAR c);

View File

@@ -17,7 +17,8 @@ HELPTSSFILE = $(HELPTAGSRC)/htag.tss
eltdef_LDADD = $(HELPUTILLIB) eltdef_LDADD = $(HELPUTILLIB)
eltdef_CFLAGS = -I$(HELPUTILSRC) -I$(HELPBUILDSRC) eltdef_CFLAGS = -DCANON1 -I../util -I../build -I../../include/util \
-I../../include/build -I../../include/eltdef
eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c

View File

@@ -1,240 +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: eltdef.h /main/3 1995/11/08 09:27:36 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Eltdef.h is the include file for allocating global variables in ELTDEF */
#if defined(ELTDEF)
#define ELTEXTERN
#define ELTINIT(a) = a
#else
#define ELTEXTERN extern
#define ELTINIT(a)
#endif
#include "common.h"
/* Error recovery status */
#define RENTITY 0
#define RSIGNON 1
#define RGLOBDEC 2
#define RGLOBDEF 3
#define RELEMENT 4
/* State transition network generated by CONTEXT */
#include "sparse.h"
/* Indicates whether, and if so where, each character can appear in
a name */
#if defined(ELTDEF)
#include "chartype.h"
#else
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
#endif
/* Scanned name or literal */
ELTEXTERN M_WCHAR name[M_NAMELEN + 1] ;
ELTEXTERN M_WCHAR literal[M_LITLEN + 1] ;
/* Associates a C variable with a particular parameter */
typedef struct cvarstruct CVARSTRUCT ;
struct cvarstruct {
int param ;
M_WCHAR *cvarptr ;
CVARSTRUCT *next ;
} ;
ELTEXTERN CVARSTRUCT *cvarlist ;
/* Current and previous context (state) of transition system
controlling ELTDEF */
ELTEXTERN int curcon ELTINIT(START) ;
ELTEXTERN int m_prevcon ;
/* Character read-ahead buffer */
ELTEXTERN int toundo ELTINIT(0) ;
ELTEXTERN int maxundo ELTINIT(0) ;
#define SAVECHAR 50
ELTEXTERN int savechar[SAVECHAR] ;
/* Chain of elements named in pseudo-tag */
typedef struct chain CHAIN ;
struct chain {
M_ELEMENT elt ;
CHAIN *next ;
} ;
ELTEXTERN CHAIN *firstchain ELTINIT(NULL) ;
ELTEXTERN CHAIN **nextchain ELTINIT(&firstchain) ;
/* Text character returned from scanner */
ELTEXTERN M_WCHAR textchar ;
/* Identifying index of element currently being processed */
ELTEXTERN M_ELEMENT openelt ELTINIT(M_NULLVAL) ;
/* Output files */
ELTEXTERN FILE *globdec, *globdef, *string,
*pfile, *tfile, *sfile, *efile, *entfile, *ifile, *stfile, *ifh, *pvalh ;
/* Flags indicating whether currently in the middle of processing
an action */
ELTEXTERN LOGICAL intext ELTINIT(FALSE),
inent ELTINIT(FALSE),
inpc ELTINIT(FALSE),
insc ELTINIT(FALSE),
inec ELTINIT(FALSE),
instc ELTINIT(FALSE),
instring ELTINIT(FALSE) ;
/* Location of global start-string and end-string, if any */
ELTEXTERN int gss ELTINIT(0),
ges ELTINIT(0) ;
/* Flags indicating whether default code setments are to be used */
ELTEXTERN LOGICAL finitext ELTINIT(TRUE),
finipi ELTINIT(TRUE),
finistc ELTINIT(TRUE) ;
/* Whether have finished the sign-on message */
ELTEXTERN LOGICAL signonend ELTINIT(FALSE) ;
/* Whether errors have occurred */
ELTEXTERN LOGICAL errexit ELTINIT(FALSE) ;
/* Number of characters currently written to stext.h and etext.h */
ELTEXTERN int stringcnt ELTINIT(1) ;
/* Number of actions so far written to code files */
ELTEXTERN int sactions ELTINIT(1),
eactions ELTINIT(1),
tactions ELTINIT(1),
pactions ELTINIT(1),
stactions ELTINIT(1) ;
/* Pool of ponters for associating a chain of elements with an action string
or code */
typedef struct action ACTION ;
struct action {
int data ;
M_ELEMENT element ;
int count ;
ACTION *son ;
ACTION *next ;
ACTION *nextact ;
} ;
ELTEXTERN int actlen ELTINIT(0) ;
ELTEXTERN ACTION *firstact ELTINIT(NULL) ;
ELTEXTERN ACTION **nextact ELTINIT(&firstact) ;
/* Number of elements defined in the document type */
#if defined(M_DTDDEF)
#define ELCOUNT sizeof(m_element)/sizeof(m_element[0])
#else
#define ELCOUNT
#endif
/* Action arrays, indexed by the element in which they occur. Each element
is a linked list for actions qualified by the context in which they
occur. */
ELTEXTERN ACTION *starray[ELCOUNT],
*etarray[ELCOUNT],
*scarray[ELCOUNT],
*ecarray[ELCOUNT],
*tcarray[ELCOUNT],
*pcarray[ELCOUNT],
*stcarray[ELCOUNT] ;
/* Store the sign-on message */
#define SOCHAR 512
ELTEXTERN char signonmsg[SOCHAR] ;
ELTEXTERN int sochar ELTINIT(0) ;
/* Indicates which elements have been processed at a particular time */
ELTEXTERN LOGICAL processed[ELCOUNT] ;
/* Flags to indicate whether data has yet been written to various files */
ELTEXTERN LOGICAL stringstart ELTINIT(TRUE) ;
/* Flag indicating whether a carriage return was the last character of
the signon message */
ELTEXTERN LOGICAL socr ELTINIT(FALSE) ;
/* Number of current input line */
ELTEXTERN int m_line ELTINIT(1) ;
/* Pointer to file error for error messages */
ELTEXTERN FILE *m_errfile ;
/* Name of interface file */
#define IFLEN 512
ELTEXTERN char iffile[IFLEN] ;
/* Pointer to current entity */
ELTEXTERN M_ENTITY *entity ;
/* Count of code entities defined */
ELTEXTERN int codeent ELTINIT(0) ;
/* Content of entity being defined */
ELTEXTERN int entclen ;
ELTEXTERN M_WCHAR entcontent[M_LITLEN + 1] ;
/* Error recovery status */
ELTEXTERN int restart ELTINIT(RENTITY) ;
/* Strings to write to generated files */
#define pproto "M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype"
#define pformal "m_pi, m_entname, m_enttype"
#define pftype " M_WCHAR *m_pi ;\n M_WCHAR *m_entname ;\n int m_enttype ;"
#define tproto "M_WCHAR m_textchar"
#define tformal "m_textchar"
#define tftype " M_WCHAR m_textchar ;\n"
#define stproto "M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END"
#define stformal "m_string, M_START, M_END"
#define stft " M_WCHAR *m_string ;\n LOGICAL M_START ;\n LOGICAL M_END ;\n"
/* Structures for generating defines for parameter values */
ELTEXTERN M_TRIE parval ;
typedef struct {
M_WCHAR *cname ;
M_WCHAR *value ;
int line ;
} PARVAL ;
ELTEXTERN PARVAL *pval ;
/* Function prototypes */
#include "proto.h"
/* Flag to open fewer files for convenience of debugging with
CodeView */
ELTEXTERN LOGICAL debug ELTINIT(FALSE) ;
/* Scanner trace for debugging */
ELTEXTERN LOGICAL scantrace ELTINIT(FALSE) ;
/* Test validity of heap in calls to malloc/free */
ELTEXTERN LOGICAL m_heapchk ELTINIT(FALSE) ;
/* Trace calls to malloc/free */
ELTEXTERN LOGICAL m_malftrace ELTINIT(FALSE) ;

View File

@@ -1,141 +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 09:28:07 rswiston $ */
/*
Copyright (c) 1988, 1989 Hewlett-Packard Co.
*/
/* Proto.h contains function prototypes for program ELTDEF. */
void actptrout(ACTION **array, char *name);
void addent(void);
LOGICAL m_allwhite(const M_WCHAR *string);
void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
void countdown(M_TRIE *parent, int *count);
void cvalue(void);
void done(void);
void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
void (*proc)(M_ENTITY *));
void endcode(LOGICAL flag, FILE *file);
void endini(void);
void endsignon(void);
void endstring(void);
void entout(char *fname);
void enttype(int type);
void m_error(char *text);
void m_err1(const char *text, const M_WCHAR *arg);
void m_mberr1(char *text, const char *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_err5(char *text,
M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
void m_exit(int status);
void m_free(void *block, char *msg);
void freechain(void);
int getachar(void);
int *getaction(ACTION **array);
ACTION *getactstruct(void);
void getname(int first);
int gettoken(int *c, int context);
void initialize(void);
LOGICAL m_letter(M_WCHAR c);
LOGICAL litproc(int delim);
void *m_malloc(int size, char *msg);
void m_openchk(FILE **ptr, char *name, char *mode);
void outpval(M_TRIE *p);
void outstring(void);
int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
int scan(void);
void skiptoend(void);
void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
char *formal, char *formtype);
void startelement(void);
void storecvar(void);
void storepname(void);
void undodelim(M_WCHAR *delim);
void ungetachar(int c);
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);
void value(M_WCHAR *p);
void warning(char *text);
void warning1(char *text, M_WCHAR *arg);
LOGICAL m_whitespace(M_WCHAR c);

View File

@@ -23,10 +23,11 @@ XDONE:
BUILT_SOURCES = XDONE BUILT_SOURCES = XDONE
CLEANFILES = $(BUILT_SOURCES) CLEANFILES = $(BUILT_SOURCES)
AM_CPPFLAGS = -I$(HELPPARSERSRC) -I$(HELPUTILSRC) \ AM_CPPFLAGS = -DCANON1 -I../parser -I../eltdef -I../../include/parser -I../../include/util \
-I$(HELPELTDEFSRC) $(DT_INCDIR) -I../../include/eltdef -I../../include/helptag \
$(DT_INCDIR)
# needed by parser/ # needed by parser/
noinst_LIBRARIES = libhelptag.a noinst_LIBRARIES = libhelptag.a
libhelptag_a_SOURCES = custom.c default.c help.c option.c \ libhelptag_a_SOURCES = custom.c default.c help.c option.c \
special.c out.c xref.c global.c ../parser/delim.h special.c out.c xref.c global.c

View File

@@ -1,274 +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: fproto.h /main/3 1995/11/08 09:30:01 rswiston $ */
/* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
/* Function prototypes for HP Tag/TeX translator */
void assert_hometopic_exists(void);
/* osf has basename() defined in system header file, change
* basename() to fbasename(). --XPG4 standard.
*/
void fbasename(void);
void chapstart(M_WCHAR *id);
void checkgloss(void);
M_WCHAR *checkid(M_WCHAR *id);
void checkmsghead (void);
void dumpxref(void);
void echohead(M_WCHAR *p);
void mb_echohead(char *p);
void endhead(void);
void esoutchar(M_WCHAR textchar);
void vexoutchar(M_WCHAR textchar);
void exoutchar(M_WCHAR textchar);
void imoutchar(M_WCHAR textchar);
int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
M_WCHAR *glinktype, M_WCHAR *gdescription);
void idstring(M_WCHAR *string);
void indexchar(M_WCHAR textchar);
void Item(M_WCHAR *id);
char *m_itoa(int n, char *s);
LOGICAL m_letter(M_WCHAR c);
void loadxref(void);
void options(LOGICAL filelenonly);
void outchar(M_WCHAR textchar, FILE *outfile );
void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
void realoutchar(M_WCHAR textchar, FILE *outfile);
void rsectstart(M_WCHAR *id);
void rseqend(void);
M_WCHAR *searchforfile(M_WCHAR *file);
void setid(M_WCHAR *id,
LOGICAL where,
LOGICAL csensitive,
LOGICAL inchapter,
char *chapter,
M_WCHAR *xrffile,
int xrfline,
LOGICAL xrefable );
void setopt(char *string, LOGICAL filelenonly);
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
void shchar(M_WCHAR textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
LOGICAL *errflg);
void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
LOGICAL *errflg);
void shstring(M_WCHAR *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
LOGICAL *errflg);
void mb_shstring(char *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
LOGICAL *errflg);
void starthelpnode(M_WCHAR *ssi,
M_WCHAR *id,
int level);
void mb_starthelpnode(char *ssi,
char *id,
int level);
void StartLabList(M_WCHAR *spacing,
M_WCHAR *longlabel);
void StartList(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
void EndList(void);
void strcode(M_WCHAR *string, FILE *outfile);
void mb_strcode(char *string, FILE *outfile);
void svhdstring(M_WCHAR *string);
void svtcstring(M_WCHAR *string);
void termchar(M_WCHAR textchar);
void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
void texinit(void);
int vextextsize(const M_WCHAR *keyword);
int vgloss(const M_WCHAR *keyword);
int vcenter(const M_WCHAR *keyword);
int vnumber(const M_WCHAR *keyword);
LOGICAL vstack(const M_WCHAR *keyword);
int vordertype(const M_WCHAR *keyword);
int vlonglabel(const M_WCHAR *keyword);
int vspacing(const M_WCHAR *keyword);
int vtype(const M_WCHAR *keyword);
void xrefexpand(M_WCHAR *id);
char *GetDefaultHeaderString(char *elementName,
unsigned char desiredType,
char *defaultString);
void SetDefaultLocale(void);
char *MakeMByteString(const M_WCHAR *from);
M_WCHAR *MakeWideCharString(const char *from);
void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *gposition,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
M_WCHAR *gdescription);
void figure( M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *id,
M_WCHAR *file,
M_WCHAR *figpos,
M_WCHAR *cappos,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
M_WCHAR *gdescription);
void endterm( M_WCHAR *base,
M_WCHAR *gloss,
char *linktype);
M_WCHAR wc_toupper( M_WCHAR wc);
M_WCHAR *wc_stringtoupper( M_WCHAR *wcp);
int NextId(void);
char *GetLanguage(void);
char *GetCharset(void);
void HandleLink( M_WCHAR *hyperlink,
M_WCHAR *type,
M_WCHAR *description);
char *mb_realloc( char *ptr, long size);
char *mb_malloc( long size);
void mb_free( char **pptr);
void Add2ToRowVec( int *length, char **rowvec, char *id1, char *id2);
void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize);
void EndEx(void);
void StartNCW(char *which);
void StartBlock(char *pclass, char *ssi, char *id);
void AddToSNB(char *id, char *iconName);
void StartNCWtext(char *which, char *iconFile, char *headingString);
void IncludeToss(void);
M_WCHAR *CycleEnt( LOGICAL init,
unsigned char *type,
M_WCHAR ***content,
unsigned char *wheredef);
void ModifyEntities(void);
void PushForm(char *class,
char *ssi,
char *id);
void PushForm2(char *class,
char *ssi,
char *id1,
char *id2);
void PopForm(void);
void PopForm2(void);
void PopFormMaybe(void);
void EmitSavedAnchors(void);
void CloseVirpage(void);

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 09:33:08 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

@@ -16,8 +16,9 @@ HELPUTILSRC = $(HELPTAG)/util
HELPBUILDSRC = $(HELPTAG)/build HELPBUILDSRC = $(HELPTAG)/build
HELPUTILLIB = $(HELPTAG)/util/libutil.a HELPUTILLIB = $(HELPTAG)/util/libutil.a
AM_CPPFLAGS = -I$(HELPUTILSRC) -I$(HELPTAGSRC) -I$(HELPBUILDSRC) \ AM_CPPFLAGS = -DCANON1 -I../util -I../helptag -I../build -I../eltdef -I../../include/util \
-I$(HELPELTDEFSRC) -I$(HELPTAGSRC) -I../../include/build-I../../include/eltdef \
-I../../include/parser -I../../include/helptag
dthelp_ctag1_SOURCES = parser.c actutil.c \ dthelp_ctag1_SOURCES = parser.c actutil.c \
closent.c code.c cyclent.c dcurelt.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 09:34:21 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,462 +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 09:41:12 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(PROLOG) ;
M_PAREXTERN int m_prevcon ;
M_PAREXTERN int m_token ;
M_PAREXTERN int m_scanval ;
extern char *user_defined_entities;
/* 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,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 09:44:47 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 09:45:39 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"

View File

@@ -2,6 +2,8 @@ MAINTAINERCLEANFILES = Makefile.in
noinst_LIBRARIES = libutil.a noinst_LIBRARIES = libutil.a
AM_CPPFLAGS = -DCANON1 -I../../include/util
noinst_PROGRAMS = context fclndir noinst_PROGRAMS = context fclndir
context_SOURCES = context.c context_SOURCES = context.c
@@ -11,11 +13,7 @@ fclndir_SOURCES = context.c
libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \ libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \
triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \ triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \
conutil.c error.c exit.c itoa.c malloc.c openchk.c \ conutil.c error.c exit.c itoa.c malloc.c openchk.c \
trie.c triecnt.c whitesp.c basic.h common.h \ trie.c triecnt.c whitesp.c
dtddef.h entdef.h sparse.h trie.h chartype.h cont.h dtdext.h \
entext.h sref.h version.h
# FIXME I think emptyfil.c and fclndir.c can be deleted?
context_LDADD = libutil.a context_LDADD = libutil.a
fclndir_LDADD = libutil.a fclndir_LDADD = libutil.a

View File

@@ -1,73 +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: basic.h /main/3 1995/11/08 09:46:43 rswiston $ */
/* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
/* Basic.h has a few very primitive #define's used by all MARKUP programs */
#include <stdlib.h>
/* hpux protects stdio.h from multiple includes thru stdlib.h . */
#include <stdio.h>
#include <ctype.h>
#define TRUE 1
#define FALSE 0
typedef unsigned char LOGICAL;
/* End of String marker */
#define M_EOS '\0'
/* Integer null value marker */
#define M_NULLVAL 0
/* 8-bit data characters */
typedef unsigned char M_CHAR8;
/* wide characters */
typedef wchar_t M_WCHAR;
/* For function prototypes */
typedef char * M_POINTER;
char *MakeMByteString(const M_WCHAR *from);
M_WCHAR *MakeWideCharString(const char *from);
int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
int w_strlen(const M_WCHAR *string);
M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
void *m_malloc(int size, char *msg);
void m_free(void *block, char *msg);
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
int mb_getwc(void *m_ptr);

View File

@@ -1,290 +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: chartype.h /main/3 1995/11/08 09:47:05 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* This table defines the subset of the HP Roman8 character set
supported by HP Tag. Characters defined in Roman8 but not supported
by HP Tag are marked "(invalid)". */
M_CHARTYPE m_ctarray[M_CHARSETLEN]
= {
/* Char Name Type, Upper, Lower */
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
/* 2: ^B STX */ {M_NONNAME, 2, 2},
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
/* 8: ^H BS */ {M_NONNAME, 8, 8},
/* 9: ^I HT */ {M_NONNAME, 9, 9},
/* 10: ^J LF */ {M_NONNAME, 10, 10},
/* 11: ^K VT */ {M_NONNAME, 11, 11},
/* 12: ^L FF */ {M_NONNAME, 12, 12},
/* 13: ^M CR */ {M_NONNAME, 13, 13},
/* 14: ^N SO */ {M_NONNAME, 14, 14},
/* 15: ^O SI */ {M_NONNAME, 15, 15},
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
/* 29: ^] GS */ {M_NONNAME, 29, 29},
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
/* 31: ^_ US */ {M_NONNAME, 31, 31},
/* 32: SP */ {M_NONNAME, 32, 32},
/* 33: ! */ {M_NONNAME, 33, 33},
/* 34: " */ {M_NONNAME, 34, 34},
/* 35: # */ {M_NONNAME, 35, 35},
/* 36: $ */ {M_NONNAME, 36, 36},
/* 37: % */ {M_NONNAME, 37, 37},
/* 38: & */ {M_NONNAME, 38, 38},
/* 39: ' */ {M_NONNAME, 39, 39},
/* 40: ( */ {M_NONNAME, 40, 40},
/* 41: ) */ {M_NONNAME, 41, 41},
/* 42: * */ {M_NONNAME, 42, 42},
/* 43: + */ {M_NAMECHAR, 43, 43},
/* 44: , */ {M_NONNAME, 44, 44},
/* 45: - */ {M_NAMECHAR, 45, 45},
/* 46: . */ {M_NAMECHAR, 46, 46},
/* 47: / */ {M_NONNAME, 47, 47},
/* 48: 0 */ {M_DIGIT, 48, 48},
/* 49: 1 */ {M_DIGIT, 49, 49},
/* 50: 2 */ {M_DIGIT, 50, 50},
/* 51: 3 */ {M_DIGIT, 51, 51},
/* 52: 4 */ {M_DIGIT, 52, 52},
/* 53: 5 */ {M_DIGIT, 53, 53},
/* 54: 6 */ {M_DIGIT, 54, 54},
/* 55: 7 */ {M_DIGIT, 55, 55},
/* 56: 8 */ {M_DIGIT, 56, 56},
/* 57: 9 */ {M_DIGIT, 57, 57},
/* 58: : */ {M_NONNAME, 58, 58},
/* 59: ; */ {M_NONNAME, 59, 59},
/* 60: < */ {M_NONNAME, 60, 60},
/* 61: = */ {M_NONNAME, 61, 61},
/* 62: > */ {M_NONNAME, 62, 62},
/* 63: ? */ {M_NONNAME, 63, 63},
/* 64: @ */ {M_NONNAME, 64, 64},
/* 65: A */ {M_NMSTART, 65, 97},
/* 66: B */ {M_NMSTART, 66, 98},
/* 67: C */ {M_NMSTART, 67, 99},
/* 68: D */ {M_NMSTART, 68, 100},
/* 69: E */ {M_NMSTART, 69, 101},
/* 70: F */ {M_NMSTART, 70, 102},
/* 71: G */ {M_NMSTART, 71, 103},
/* 72: H */ {M_NMSTART, 72, 104},
/* 73: I */ {M_NMSTART, 73, 105},
/* 74: J */ {M_NMSTART, 74, 106},
/* 75: K */ {M_NMSTART, 75, 107},
/* 76: L */ {M_NMSTART, 76, 108},
/* 77: M */ {M_NMSTART, 77, 109},
/* 78: N */ {M_NMSTART, 78, 110},
/* 79: O */ {M_NMSTART, 79, 111},
/* 80: P */ {M_NMSTART, 80, 112},
/* 81: Q */ {M_NMSTART, 81, 113},
/* 82: R */ {M_NMSTART, 82, 114},
/* 83: S */ {M_NMSTART, 83, 115},
/* 84: T */ {M_NMSTART, 84, 116},
/* 85: U */ {M_NMSTART, 85, 117},
/* 86: V */ {M_NMSTART, 86, 118},
/* 87: W */ {M_NMSTART, 87, 119},
/* 88: X */ {M_NMSTART, 88, 120},
/* 89: Y */ {M_NMSTART, 89, 121},
/* 90: Z */ {M_NMSTART, 90, 122},
/* 91: [ */ {M_NONNAME, 91, 91},
/* 92: \\ */ {M_NONNAME, 92, 92},
/* 93: ] */ {M_NONNAME, 93, 93},
/* 94: ^ */ {M_NONNAME, 94, 94},
/* 95: _ */ {M_NONNAME, 95, 95},
/* 96: ` */ {M_NONNAME, 96, 96},
/* 97: a */ {M_NMSTART, 65, 97},
/* 98: b */ {M_NMSTART, 66, 98},
/* 99: c */ {M_NMSTART, 67, 99},
/* 100: d */ {M_NMSTART, 68, 100},
/* 101: e */ {M_NMSTART, 69, 101},
/* 102: f */ {M_NMSTART, 70, 102},
/* 103: g */ {M_NMSTART, 71, 103},
/* 104: h */ {M_NMSTART, 72, 104},
/* 105: i */ {M_NMSTART, 73, 105},
/* 106: j */ {M_NMSTART, 74, 106},
/* 107: k */ {M_NMSTART, 75, 107},
/* 108: l */ {M_NMSTART, 76, 108},
/* 109: m */ {M_NMSTART, 77, 109},
/* 110: n */ {M_NMSTART, 78, 110},
/* 111: o */ {M_NMSTART, 79, 111},
/* 112: p */ {M_NMSTART, 80, 112},
/* 113: q */ {M_NMSTART, 81, 113},
/* 114: r */ {M_NMSTART, 82, 114},
/* 115: s */ {M_NMSTART, 83, 115},
/* 116: t */ {M_NMSTART, 84, 116},
/* 117: u */ {M_NMSTART, 85, 117},
/* 118: v */ {M_NMSTART, 86, 118},
/* 119: w */ {M_NMSTART, 87, 119},
/* 120: x */ {M_NMSTART, 88, 120},
/* 121: y */ {M_NMSTART, 89, 121},
/* 122: z */ {M_NMSTART, 90, 122},
/* 123: { */ {M_NONNAME, 123, 123},
/* 124: | */ {M_NONNAME, 124, 124},
/* 125: } */ {M_NONNAME, 125, 125},
/* 126: ~ */ {M_NONNAME, 126, 126},
/* 127: DEL */ {M_NONNAME, 127, 127},
/* 128: undefined */ {M_NONNAME, 128, 128},
/* 129: undefined */ {M_NONNAME, 129, 129},
/* 130: undefined */ {M_NONNAME, 130, 130},
/* 131: undefined */ {M_NONNAME, 131, 131},
/* 132: undefined */ {M_NONNAME, 132, 132},
/* 133: undefined */ {M_NONNAME, 133, 133},
/* 134: undefined */ {M_NONNAME, 134, 134},
/* 135: undefined */ {M_NONNAME, 135, 135},
/* 136: undefined */ {M_NONNAME, 136, 136},
/* 137: undefined */ {M_NONNAME, 137, 137},
/* 138: undefined */ {M_NONNAME, 138, 138},
/* 139: undefined */ {M_NONNAME, 139, 139},
/* 140: undefined */ {M_NONNAME, 140, 140},
/* 141: undefined */ {M_NONNAME, 141, 141},
/* 142: undefined */ {M_NONNAME, 142, 142},
/* 143: undefined */ {M_NONNAME, 143, 143},
/* 144: undefined */ {M_NONNAME, 144, 144},
/* 145: undefined */ {M_NONNAME, 145, 145},
/* 146: undefined */ {M_NONNAME, 146, 146},
/* 147: undefined */ {M_NONNAME, 147, 147},
/* 148: undefined */ {M_NONNAME, 148, 148},
/* 149: undefined */ {M_NONNAME, 149, 149},
/* 150: undefined */ {M_NONNAME, 150, 150},
/* 151: undefined */ {M_NONNAME, 151, 151},
/* 152: undefined */ {M_NONNAME, 152, 152},
/* 153: undefined */ {M_NONNAME, 153, 153},
/* 154: undefined */ {M_NONNAME, 154, 154},
/* 155: undefined */ {M_NONNAME, 155, 155},
/* 156: undefined */ {M_NONNAME, 156, 156},
/* 157: undefined */ {M_NONNAME, 157, 157},
/* 158: undefined */ {M_NONNAME, 158, 158},
/* 159: undefined */ {M_NONNAME, 159, 159},
/* 160: undefined */ {M_NONNAME, 160, 160},
/* 161: A grave */ {M_NMSTART, 161, 200},
/* 162: A circumflex */ {M_NMSTART, 162, 192},
/* 163: E grave */ {M_NMSTART, 163, 201},
/* 164: E circumflex */ {M_NMSTART, 164, 193},
/* 165: E dieresis */ {M_NMSTART, 165, 205},
/* 166: I circumflex */ {M_NMSTART, 166, 209},
/* 167: I dieresis */ {M_NMSTART, 167, 221},
/* 168: acute accent */ {M_NONNAME, 168, 168},
/* 169: grave accent */ {M_NONNAME, 169, 169},
/* 170: circumflex */ {M_NONNAME, 170, 170},
/* 171: dieresis */ {M_NONNAME, 171, 171},
/* 172: tilde */ {M_NONNAME, 172, 172},
/* 173: U grave */ {M_NMSTART, 173, 203},
/* 174: U circumflex */ {M_NMSTART, 174, 195},
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
/* 177: Y acute */ {M_NMSTART, 177, 178},
/* 178: y acute */ {M_NMSTART, 177, 178},
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
/* 180: C cedilla */ {M_NMSTART, 180, 181},
/* 181: c cedilla */ {M_NMSTART, 180, 181},
/* 182: N tilde */ {M_NMSTART, 182, 183},
/* 183: n tilde */ {M_NMSTART, 182, 183},
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
/* 188: Yen */ {M_NONNAME, 188, 188},
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
/* 192: a circumflex */ {M_NMSTART, 162, 192},
/* 193: e circumflex */ {M_NMSTART, 164, 193},
/* 194: o circumflex */ {M_NMSTART, 223, 194},
/* 195: u circumflex */ {M_NMSTART, 174, 195},
/* 196: a acute */ {M_NMSTART, 224, 196},
/* 197: e acute */ {M_NMSTART, 220, 197},
/* 198: o acute */ {M_NMSTART, 231, 198},
/* 199: u acute */ {M_NMSTART, 237, 199},
/* 200: a grave */ {M_NMSTART, 161, 200},
/* 201: e grave */ {M_NMSTART, 163, 201},
/* 202: o grave */ {M_NMSTART, 232, 202},
/* 203: u grave */ {M_NMSTART, 173, 203},
/* 204: a dieresis */ {M_NMSTART, 216, 204},
/* 205: e dieresis */ {M_NMSTART, 165, 205},
/* 206: o dieresis */ {M_NMSTART, 218, 206},
/* 207: u dieresis */ {M_NMSTART, 219, 207},
/* 208: A angstrom */ {M_NMSTART, 208, 212},
/* 209: i circumflex */ {M_NMSTART, 166, 209},
/* 210: O slash */ {M_NMSTART, 210, 214},
/* 211: AE ligature */ {M_NMSTART, 211, 215},
/* 212: a angstrom */ {M_NMSTART, 208, 212},
/* 213: i acute */ {M_NMSTART, 229, 213},
/* 214: o slash */ {M_NMSTART, 210, 214},
/* 215: ae ligature */ {M_NMSTART, 211, 215},
/* 216: A dieresis */ {M_NMSTART, 216, 204},
/* 217: i grave */ {M_NMSTART, 230, 217},
/* 218: O dieresis */ {M_NMSTART, 218, 206},
/* 219: U dieresis */ {M_NMSTART, 219, 207},
/* 220: E acute */ {M_NMSTART, 220, 197},
/* 221: i dieresis */ {M_NMSTART, 167, 221},
/* 222: SS ligature */ {M_NMSTART, 222, 222},
/* 223: O circumflex */ {M_NMSTART, 223, 194},
/* 224: A acute */ {M_NMSTART, 224, 196},
/* 225: A tilde */ {M_NMSTART, 225, 226},
/* 226: a tilde */ {M_NMSTART, 225, 226},
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
/* 229: I acute */ {M_NMSTART, 229, 213},
/* 230: I grave */ {M_NMSTART, 230, 217},
/* 231: O acute */ {M_NMSTART, 231, 198},
/* 232: O grave */ {M_NMSTART, 232, 202},
/* 233: O tilde */ {M_NMSTART, 233, 234},
/* 234: o tilde */ {M_NMSTART, 233, 234},
/* 235: S caron */ {M_NMSTART, 235, 236},
/* 236: s caron */ {M_NMSTART, 235, 236},
/* 237: U acute */ {M_NMSTART, 237, 199},
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
/* 239: y dieresis */ {M_NMSTART, 238, 239},
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
/* 242: undefined */ {M_NONNAME, 242, 242},
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
/* 255: undefined */ {M_NONNAME, 255, 255},
} ;

View File

@@ -1,85 +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: common.h /main/3 1995/11/08 09:47:28 rswiston $ */
/*
Copyright (c) 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Common.h contains definitions common to programs BUILD, ELTDEF, and PARSER.
Its purpose is to insure that limits, such as the maximum length of an SGML
name, are the same for all programs.
*/
#define M_MARKUP
/* White-space characters */
#define M_RE '\n'
#define M_SPACE ' '
#define M_TAB '\t'
/* Maximum length of a default parameter value */
#define M_LITLEN 240
/* Maximum length of an element name */
#define M_NAMELEN 64
/* M_NONNAME, M_NMSTART, M_NAMECHAR, and M_DIGIT are used to indicate
which characters can appear within element names*/
#define M_NONNAME 0
#define M_NMSTART 1
#define M_NAMECHAR 2
#define M_DIGIT 3
/* Number of characters in the character set */
#define M_CHARSETLEN 256
/* Structure for entities */
typedef struct m_entity M_ENTITY ;
struct m_entity {
unsigned char type ;
unsigned char wheredef ;
M_WCHAR *content ;
M_WCHAR *name ;
#if defined(BUILDEXTERN) || defined(ELTEXTERN)
int index ;
M_ENTITY *next ;
#endif
#if ! defined(BUILDEXTERN)
int codeindex ;
#endif
} ;
/* Declarations for character types */
typedef struct {
LOGICAL type ;
/* Must be same type as EOF */
int upper ;
int lower ;
} M_CHARTYPE ;
#define m_ischar(x) ((int) (x) >= 0 && (int) (x) < M_CHARSETLEN)
#define m_cttype(x) (m_ischar(x) ? m_ctarray[x].type : M_NONNAME)
#define m_ctupper(x) (m_ischar(x) ? m_ctarray[x].upper : x)
#define m_ctlower(x) (m_ischar(x) ? m_ctarray[x].lower : x)
#define m_ctdigit(x) (m_ischar(x) ? m_ctarray[x].type == M_DIGIT : FALSE)

View File

@@ -1,147 +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: cont.h /main/3 1995/11/08 09:47:47 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Cont.h is the primary include file for program CONTEXT. */
#if defined(CONTDEF)
#define CONTEXTERN
#define CONTINIT(a) = a
#else
#define CONTEXTERN extern
#define CONTINIT(a)
#endif
void countdown(M_TRIE *parent, int *count);
void dumpdlmptr(void);
void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
void dumptree(LOGICAL sparse);
void enterdelim(int n);
void m_error(char *text);
void m_err1(char *text, char *arg);
void getcode(int n);
void getcolon(void);
int getContext(void);
LOGICAL getdname(void);
void inccon(void);
void incdelim(void);
void loaddelim(void);
void *m_malloc(int size, char *msg);
void nextcon(LOGICAL sparse);
void m_openchk(FILE **ptr, char *name, char *mode);
void printval(FILE *file, M_TRIE *value);
void prtctxt(int column, int value);
int readchar(LOGICAL cap);
void skiptoend(void);
void unread(int c);
void warning(char *text);
void warning1(char *text, char *arg);
void warning2(char *text, char *arg1, char *arg2);
LOGICAL m_whitespace(M_WCHAR c);
#define NOMORE -1
/* Increase by 10 percent */
#define m_plus10p(x) (x + (x > 10 ? x / 10 : 1))
CONTEXTERN int NUMCON CONTINIT(100) ;
#define CNAMELEN 12
#define DNAMELEN 12
#define DELIMLEN 25
CONTEXTERN int NUMDELIM CONTINIT(100) ;
#define contype ccount <= 255 ? "unsigned char" : "int"
CONTEXTERN LOGICAL m_heapchk CONTINIT(FALSE) ;
CONTEXTERN LOGICAL m_malftrace CONTINIT(FALSE) ;
#define ENDIFSTRING "}\n#endif\n ;\n"
CONTEXTERN char endif[sizeof(ENDIFSTRING)] CONTINIT(ENDIFSTRING) ;
CONTEXTERN LOGICAL casestarted ;
CONTEXTERN LOGICAL errexit CONTINIT(FALSE) ;
CONTEXTERN FILE *delim ;
CONTEXTERN FILE *context ;
CONTEXTERN FILE *fcase, *cdat, *ddat, *m_errfile ;
CONTEXTERN M_TRIE delimtrie ;
CONTEXTERN M_TRIE **contree ;
CONTEXTERN int *xtransit ;
#define transit(i,j) xtransit[i * NUMDELIM + j]
CONTEXTERN M_WCHAR **contexts ;
CONTEXTERN int ccount CONTINIT(0) ;
CONTEXTERN M_WCHAR dname[DNAMELEN + 1] ;
CONTEXTERN M_WCHAR dstring[DELIMLEN + 1] ;
CONTEXTERN int dcount CONTINIT(0) ;
CONTEXTERN struct dstruct {
int count ;
M_WCHAR *string ;
} *dstruct ;
CONTEXTERN LOGICAL withdelim ;
CONTEXTERN LOGICAL loading ;
CONTEXTERN int curdelim ;
CONTEXTERN char **dlmptr ;
CONTEXTERN LOGICAL first CONTINIT(TRUE) ;
CONTEXTERN int maxd CONTINIT(0) ;
CONTEXTERN int m_line CONTINIT(1) ;
CONTEXTERN int nonzero CONTINIT(0) ;

View File

@@ -1,103 +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: dtddef.h /main/3 1995/11/08 09:48:56 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Dtddef.h contains definitions relevant to document-type
definitions */
typedef int M_ELEMENT ;
typedef int M_ARC ;
typedef int M_STATE ;
typedef int M_ANDGROUP ;
/* Possible element content types */
#define M_REGEXP 0
#define M_ANY 1
#define M_NONE 2
#define M_CDATA 3
#define M_RCDATA 4
typedef struct{
int enptr, start, content, inptr, exptr, parptr, parcount, srefptr ;
unsigned int smin : 1, emin : 1, useoradd : 1 ;
} M_ELTSTRUCT ;
typedef struct {
int paramname, type, kwlist, deftype ;
M_WCHAR *defval ;
} M_PARAMETER ;
/* Possible parameter default types */
#define M_NAMEDEF 0
#define M_CURRENT 1
#define M_REQUIRED 2
#define M_NULLDEF 3
#define M_CHANGEDCUR 4
/* Possible parameter types */
#define M_KEYWORD 0
#define M_ID 1
#define M_IDRF 2
#define M_IDRFS 3
#define M_NAMEPAR 4
#define M_NAMES 5
#define M_NMTOKEN 6
#define M_NMSTOKEN 7
#define M_NUMBER 8
#define M_NUMS 9
#define M_NUTOKEN 10
#define M_NUSTOKEN 11
#define M_CDATT 12
#define M_ENTATT 13
typedef struct {
int sref ;
int entity ;
int next ;
} M_SREF ;
typedef struct {
unsigned final : 1, datacontent : 1 ;
unsigned first : 14 ;
} M_STATESTRUCT ;
typedef struct {
M_STATE start ;
M_ANDGROUP next ;
} M_ANDSTRUCT ;
typedef struct {
M_ELEMENT element ;
int next ;
} M_EXCEPTION ;
typedef struct {
unsigned label : 15;
unsigned optional : 1;
int minim ;
M_ANDGROUP group ;
M_STATE to ;
M_ARC next ;
} M_ARCSTRUCT ;

View File

@@ -1,68 +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: dtdext.h /main/3 1995/11/08 09:49:13 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Dtdext.h contains the dtd-independent external forms of
declarations relevant to document-type definitions. The
definition form of these declarations is contained in files
dtd.h and arc.h generated by BUILD. */
#include "dtddef.h"
extern M_PTRIE m_entree[] ;
extern M_WCHAR m_ename[] ;
extern int m_elcount ;
extern M_ELTSTRUCT m_element[] ;
extern M_WCHAR m_keyword[] ;
extern M_WCHAR m_defval[] ;
extern struct {
int keyword, next ;
} m_ptype[] ;
extern M_PARAMETER m_parameter[] ;
extern M_WCHAR m_pname[] ;
extern M_PTRIE m_maptree[] ;
extern M_PTRIE m_sreftree[] ;
extern int m_map[] ;
extern M_SREF m_sref[] ;
extern M_STATESTRUCT m_state[] ;
extern M_ANDSTRUCT m_andgroup[] ;
extern M_EXCEPTION m_exception[] ;
extern M_ARCSTRUCT m_arc[] ;

View File

@@ -1,46 +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: entdef.h /main/3 1995/11/08 09:49:54 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Entdef.h contains definitions relevant to entities */
#define M_GENERAL 0
#define M_SYSTEM 1
#define M_STARTTAG 2
#define M_ENDTAG 3
#define M_MD 4
#define M_MS 5
#ifdef M_PI
#undef M_PI
#endif
#define M_PI 6
#define M_CDATAENT 7
#define M_SDATA 8
#define M_CODEPI 9
#define M_CODESDATA 10
#define M_DBUILD 1
#define M_DELTDEF 2
#define M_DPARSER 3

View File

@@ -1,44 +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: entext.h /main/3 1995/11/08 09:50:14 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Entext.h contains the dtd- and interface-independent external
forms of declarations relevant to entity declarations that occur in a
dtd or interface. The definition form of these declarations is
contained in files entity.h generated by BUILD and entity2.h
generated by ELTDEF */
#include "entdef.h"
extern M_WCHAR m_entcon[] ;
extern M_WCHAR m_entname[] ;
extern M_ENTITY m_entities[] ;
extern M_TRIE m_enttrie[] ;
#if defined(ELTEXTERN)
extern int m_entcnt ;
extern M_ENTITY *firstent ;
extern M_ENTITY *lastent ;
#endif

View File

@@ -1,38 +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: sparse.h /main/3 1995/11/08 09:54:27 rswiston $ */
/* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
/* Sparse.h contains definitions which allow selection of the sparse
matrix output option of CONTEXT */
#if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j)
int m_sprscon(int i, int j);
#else
#define m_newcon(i, j) m_nextcon[i][j]
#endif

View File

@@ -1,32 +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: sref.h /main/3 1995/11/08 09:54:41 rswiston $ */
/* Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
/* Sref.h contains declarations for short references relevant to more than
one program */
#define BLANKSEQ 'B'
#define RS 'S'
#define WSSEQ 'W'

View File

@@ -1,60 +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: trie.h /main/3 1995/11/08 09:55:25 rswiston $ */
/*
Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Trie.h contains definitions relating to trees used to store
element names, delimiter strings, short reference strings, etc. */
/* The data structure described here is not a true trie as described
in Knuth, Vol. 3. These functions represent entries by a tree
structure in which there is one level of subnode for each letter
in an entry. In a trie, subnodes are not needed as soon as a
unique prefix has been encountered. */
typedef struct m_trie M_TRIE ;
typedef struct m_ptrie M_PTRIE ;
struct m_trie {
M_WCHAR symbol ;
M_TRIE *next ;
M_TRIE *data ;
} ;
struct m_ptrie {
LOGICAL more ;
M_WCHAR symbol ;
int index ;
} ;
M_TRIE *m_gettrienode(void);
void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);

View File

@@ -1,27 +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: version.h /main/3 1995/11/08 09:57:24 rswiston $ */
/* Copyright (c) 1987, 1988, 1989 Hewlett-Packard Co. */
/* Version.h defines the MARKUP System Version Number */
#define M_VERSION "Version 2.4"

View File

@@ -70,6 +70,8 @@
#define CHARSET 13 #define CHARSET 13
#define ONERROR 14 #define ONERROR 14
#define POPFONT
#if defined(FUTURE_FEATURE) #if defined(FUTURE_FEATURE)
#define GRAPHICS 15 #define GRAPHICS 15
#define NOGRAPHICS 16 #define NOGRAPHICS 16
@@ -167,9 +169,7 @@ struct search {
} ; } ;
EXTERN SEARCH *path INIT(NULL) ; EXTERN SEARCH *path INIT(NULL) ;
EXTERN SEARCH **endpath INIT(&path) ; EXTERN SEARCH **endpath INIT(&path) ;
EXTERN char dirsep EXTERN char dirsep INIT('/') ;
INIT('/')
;
#define CSEP '/' #define CSEP '/'
#define SSEP "/" #define SSEP "/"
@@ -251,6 +251,7 @@ EXTERN int exTextSize;
whether content found in the document */ whether content found in the document */
EXTERN long postpreamble INIT(0L) ; EXTERN long postpreamble INIT(0L) ;
EXTERN long prebye INIT(0L) ; EXTERN long prebye INIT(0L) ;
EXTERN LOGICAL fabbrev INIT(FALSE);
EXTERN LOGICAL filefound INIT(FALSE) ; EXTERN LOGICAL filefound INIT(FALSE) ;
/* Chapter or appendix number */ /* Chapter or appendix number */
@@ -507,8 +508,8 @@ EXTERN LOGICAL wsterm ;
EXTERN int lastTermId; EXTERN int lastTermId;
EXTERN LOGICAL firstAnnot; EXTERN LOGICAL firstAnnot;
EXTERN int exLineNum;
EXTERN LOGICAL tonumexlines; EXTERN LOGICAL tonumexlines;
EXTERN int exLineNum;
EXTERN int oldExLineNum; EXTERN int oldExLineNum;
/* Saved document title */ /* Saved document title */
@@ -672,6 +673,7 @@ EXTERN LIST outlist
= {0, 0, 0, 0, DOTPUNCT, FALSE, FIRST, NULL, NULL} = {0, 0, 0, 0, DOTPUNCT, FALSE, FIRST, NULL, NULL}
#endif #endif
; ;
EXTERN LOGICAL leaderok INIT(FALSE);
EXTERN LIST *lastlist INIT(&outlist) ; EXTERN LIST *lastlist INIT(&outlist) ;
EXTERN int bulcount INIT(0) ; EXTERN int bulcount INIT(0) ;

View File

@@ -20,7 +20,7 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
/* $XConsortium: special.h /main/3 1995/11/08 09:32:44 rswiston $ */ /* $XConsortium: special.h /main/3 1995/11/08 10:12:54 rswiston $ */
0, "^@ NUL", SPECIAL, NULL, 0, 0, "^@ NUL", SPECIAL, NULL, 0,
1, "^A SOH", SPECIAL, NULL, 0, 1, "^A SOH", SPECIAL, NULL, 0,
2, "^B STX", SPECIAL, NULL, 0, 2, "^B STX", SPECIAL, NULL, 0,

View File

@@ -296,11 +296,15 @@ M_PAREXTERN M_WCHAR m_saveatt[M_NAMELEN + 1] ;
value of m_curcon before last character was scanned; m_token is the token value of m_curcon before last character was scanned; m_token is the token
type returned by last call to scanner; and type returned by last call to scanner; and
m_scanval is index of element name just read within tag delimiters */ m_scanval is index of element name just read within tag delimiters */
#ifdef CANON1
M_PAREXTERN int m_curcon M_PARINIT(PROLOG);
#else
M_PAREXTERN int m_curcon M_PARINIT(PREAMBLE); M_PAREXTERN int m_curcon M_PARINIT(PREAMBLE);
#endif
M_PAREXTERN int m_prevcon ; M_PAREXTERN int m_prevcon ;
M_PAREXTERN int m_token ; M_PAREXTERN int m_token ;
M_PAREXTERN int m_scanval ; M_PAREXTERN int m_scanval ;
extern char *user_defined_entities;
/* Declarations for tentative list of omitted tags when checking for tag /* Declarations for tentative list of omitted tags when checking for tag
MINimization */ MINimization */
typedef struct m_min M_MIN ; typedef struct m_min M_MIN ;

View File

@@ -227,7 +227,11 @@ void m_readcomments(void);
void *m_realloc(void *ptr, int size, char *msg); void *m_realloc(void *ptr, int size, char *msg);
#ifdef CANON1
int m_scan(LOGICAL prolog); int m_scan(LOGICAL prolog);
#else
int m_scan(void);
#endif
void m_setmap(int map, LOGICAL useoradd); void m_setmap(int map, LOGICAL useoradd);

View File

@@ -38,7 +38,11 @@ name, are the same for all programs.
#define M_TAB '\t' #define M_TAB '\t'
/* Maximum length of a default parameter value */ /* Maximum length of a default parameter value */
#ifdef PASS2
#define M_LITLEN 1024 #define M_LITLEN 1024
#else
#define M_LITLEN 240
#endif
/* Maximum length of an element name */ /* Maximum length of an element name */
#define M_NAMELEN 64 #define M_NAMELEN 64

View File

@@ -13,7 +13,7 @@ HELPUTILSRC = $(HELPTAG)/util
HELPBUILDSRC = $(HELPTAG)/build HELPBUILDSRC = $(HELPTAG)/build
HELPUTILLIB = $(HELPTAG)/util/libutil.a HELPUTILLIB = $(HELPTAG)/util/libutil.a
build_CFLAGS = -I$(HELPUTILSRC) build_CFLAGS = -DPASS1 -I$(HELPUTILSRC) -I../../include/util -I../../include/build
build_LDADD = ../util/libutil.a build_LDADD = ../util/libutil.a

View File

@@ -1,424 +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: build.h /main/3 1995/11/08 10:00:30 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Build.h is the primary include file for allocation of global variables
for program BUILD. */
#if defined(BUILDEF)
#define BUILDEXTERN
#define BUILDINIT(a) = a
#else
#define BUILDEXTERN extern
#define BUILDINIT(a)
#endif
#include <stdio.h>
#include "basic.h"
#include "trie.h"
#include "common.h"
/* Defined types */
typedef struct arc ARC ;
typedef struct state STATE ;
typedef struct tree TREE ;
typedef struct statelist STATELIST ;
typedef struct parameter PARAMETER ;
typedef struct exception EXCEPTION ;
typedef struct ptype PTYPE ;
typedef struct eltstruct ELTSTRUCT ;
typedef struct lhsstruct LHS ;
typedef struct stack STACK ;
typedef struct srefstruct SREFSTRUCT ;
typedef struct srefdata SREFDATA ;
typedef struct mapstruct MAP ;
typedef struct andgroup ANDGROUP ;
/* Each item in a list of states contains value, a pointer to a state;
next, a pointer to the next item in the list; and level, which
indicates the level of nested subexpressions within the regular expression
when the state was added to the FSA. */
struct statelist {
STATE *value ;
STATELIST *next ;
int level ;
} ;
struct stack {
STACK *oldtop ;
STATELIST *starts ;
STATELIST *finals ;
STATELIST *allfinal ;
STATELIST *newfinal ;
ARC *starta ;
} ;
BUILDEXTERN STACK bot
#if defined(BUILDEF)
= {
NULL, NULL, NULL, NULL, NULL, NULL
}
#endif
;
BUILDEXTERN STACK *top BUILDINIT(&bot) ;
BUILDEXTERN int stacklevels BUILDINIT(0) ;
/* Used to report nondeterminism in and groups */
#define ANDCONFLICT 1
#define DATACONFLICT 2
#define ELTCONFLICT 3
/* Name of an element, and of the first element on the left-hand side of
the current rule */
#define thisrule lhs->elt->enptr
/* Set declared entity type */
#define SETETYPE(p,t) adddefent(p) ; entity->type = t
/* Definitions for entities */
#define EMPTYMAP 1
#define ERREXIT 1
/* Prefix for default short reference map and entities */
#define M_PREFIX "M-"
/* State transition network generated by CONTEXT */
#define sparse
#include "sparse.h"
/* Function prototypes */
#include "proto.h"
/* Frequently output strings */
#define ndif "}\n#endif\n ;\n\n"
#define SUBONE else fputs("[1] ;\n\n", dtd) ;
/* An array used to indicate which characters can appear within
element names */
#if defined(BUILDEF)
#include "chartype.h"
#else
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
#endif
/* Current state of the finite-state machine which controls BUILD */
BUILDEXTERN int curcon BUILDINIT(RULE) ;
BUILDEXTERN int m_token ;
BUILDEXTERN M_WCHAR scanval ;
/* Used to pass names and literals from the scanner */
BUILDEXTERN M_WCHAR name[M_NAMELEN + 1] ;
BUILDEXTERN M_WCHAR literal[M_LITLEN + 1] ;
/* Scanner buffer for read-ahead */
BUILDEXTERN int toundo BUILDINIT(0) ;
BUILDEXTERN int maxundo BUILDINIT(0) ;
/* Size of scanner buffer for read-ahead */
#define SAVECHAR 50
BUILDEXTERN int savechar[SAVECHAR] ;
/* Whether errors have occurred */
BUILDEXTERN LOGICAL errexit BUILDINIT(FALSE) ;
/* FSA storage */
/* Each state in an FSA is represented by a flag indicating whether it is
a final state, a pointer to a list of transitions from the state,
and a flag that indicates whether parsed character data is possible
from the state */
struct state {
LOGICAL final ;
LOGICAL datacontent ;
LOGICAL frompcdata ;
ARC *first ;
int count ;
STATE *next ;
} ;
BUILDEXTERN STATE *firststate BUILDINIT(NULL) ;
BUILDEXTERN STATE **nextstate BUILDINIT(&firststate) ;
BUILDEXTERN STATE *startstate ;
/* Each arc in an FSA is an element in the arc list emanating from a
particular state. Associated fields include label, a pointer to
the name of the element labelling the arc (garbage if the label is an
and group); optional, a flag indicating whether or not the label is
contextually required; minim, a flag indicating whether or not the arc
corresponds to an element selected by explicit minimization;
and group, a pointer to the list of FSA's making
up the andgroup if the arc's label is an andgroup; to, a pointer to the
state entered by the arc; next, a pointer to the next arc
in the current arc list; and finally, id, a pointer to the node in the
tree representation of the model corresponding to the arc (id is used
in the detection of ambiguity to differentiate between arcs with the same
label corresponding to one model token and those with the same label
corresponding to more than one model token).
*/
struct arc {
ELTSTRUCT *label ;
LOGICAL optional ;
LOGICAL minim ;
ANDGROUP *group ;
STATE *to ;
ARC *next ;
int id ;
} ;
/* Andgroups are elements in a list of the FSA's corresponding to the
content submodels in an andgroup. Each list element contains a pointer
to the start state of the FSA and a pointer to the next element in the
list */
struct andgroup{
STATE *start ;
ANDGROUP *nextptr ;
ANDGROUP *next ;
int count ;
} ;
BUILDEXTERN ANDGROUP *firstand BUILDINIT(NULL) ;
BUILDEXTERN ANDGROUP **nextand BUILDINIT(&firstand) ;
/* Tree representation of a rule */
/* Each node in the tree representation corresponds to a submodel.
Associated with the node is the submodel's connector and occurrence
indicator; terminal, a flag indicating whether the submodel in turn
has submodels; value, the element of which a terminal submodel consists;
pointers first and last to the first and last submodel of the node;
and right pointing to the node's next sibling in the tree. */
struct tree {
int connector, occurrence ;
ELTSTRUCT *value ;
LOGICAL terminal ;
LOGICAL minim ;
TREE *first, *right, *parent ;
int eltid ;
} ;
BUILDEXTERN TREE *ruletree BUILDINIT(NULL) ;
BUILDEXTERN TREE *curtree ;
/* Various counters */
BUILDEXTERN int eltsinrule BUILDINIT(0) ;
BUILDEXTERN int stateused BUILDINIT(0) ;
BUILDEXTERN int andused BUILDINIT(0) ;
/* Element names on the left-hand side of the current rule */
struct lhsstruct {
ELTSTRUCT *elt ;
LHS *next ;
} ;
BUILDEXTERN LHS *lhs BUILDINIT(NULL) ;
BUILDEXTERN LHS **nextlhs BUILDINIT(&lhs) ;
/* Content type (regular expression, ANY, NONE, CDATA, RCDATA) of the
current rule. */
BUILDEXTERN int contype ;
/* Indicates whether <PARAM>, <USEMAP>, or <MIN> fields have occurred in
current rule */
BUILDEXTERN LOGICAL poccur, uoccur, moccur ;
/* Indicates whether an ID parameter for this rule has occurred */
BUILDEXTERN LOGICAL idoccur ;
/* Short reference map for this rule */
BUILDEXTERN int srefp ;
BUILDEXTERN LOGICAL useoradd ;
/* Whether start- and end-tag minimization are permitted for the current
rule */
BUILDEXTERN LOGICAL smin, emin ;
/* Suffix for generated entity names */
BUILDEXTERN int egensuf ;
/* Storage for exceptions */
BUILDEXTERN int excount BUILDINIT(0) ;
struct exception {
int element ;
EXCEPTION *next ;
EXCEPTION *nextptr ;
} ;
BUILDEXTERN EXCEPTION *firstex BUILDINIT(NULL) ;
BUILDEXTERN EXCEPTION **nextex BUILDINIT(&firstex) ;
BUILDEXTERN EXCEPTION *exlist ;
/* Total number of parameters for all elements */
BUILDEXTERN int parcount BUILDINIT(0) ;
/* Primary representation of parameters */
struct parameter {
M_WCHAR *paramname ;
int type ;
int kwlist ;
PTYPE *ptypep ;
int deftype ;
int defval ;
M_WCHAR *defstring ;
/* Next parameter for this element */
PARAMETER *next ;
/* Link for list of all parameters for all elements */
PARAMETER *nextptr ;
} ;
BUILDEXTERN PARAMETER *newpar BUILDINIT(NULL) ;
BUILDEXTERN PARAMETER *plist BUILDINIT(NULL) ;
BUILDEXTERN PARAMETER *firstpar BUILDINIT(NULL) ;
BUILDEXTERN PARAMETER **nextpar BUILDINIT(&firstpar) ;
/* Storage for parameter names */
BUILDEXTERN int pnamelen BUILDINIT(0) ;
/* Storage for parameter values that are named keywords */
BUILDEXTERN int ptypelen BUILDINIT(0) ;
struct ptype {
M_WCHAR *keyword ;
int next ;
PTYPE *nextptr ;
} ;
BUILDEXTERN PTYPE *firstptype BUILDINIT(NULL) ;
BUILDEXTERN PTYPE *thisptype ;
BUILDEXTERN PTYPE **nextptype BUILDINIT(&firstptype) ;
BUILDEXTERN int kwlen BUILDINIT(0) ;
/* Storage for parameter default values */
BUILDEXTERN int deflen BUILDINIT(0) ;
/* Characters needed for element names */
BUILDEXTERN int enamelen BUILDINIT(0) ;
/* Description of an element: */
struct eltstruct {
/* Pointer to element name */
M_WCHAR *enptr ;
/* Start state of element's content model's FSA */
STATE *model ;
/* Type of element's content (Regular expression, ANY, RCDATA, etc) */
int content ;
/* Pointer to element's inclusion list */
int inptr ;
/* Pointer to element's exclusion list */
int exptr ;
/* Pointer to element's parameter list */
PARAMETER *parptr ;
/* Index in output of first item in element's parameter list */
int parindex ;
/* Number of element's parameters */
int paramcount ;
/* Whether start- and end-tag minimization are permitted */
LOGICAL stmin, etmin ;
/* Pointer to short reference map, if any */
int srefptr ;
/* TRUE for USEMAP, FALSE for ADDMAP */
LOGICAL useoradd ;
ELTSTRUCT *next ;
int eltno ;
} ;
BUILDEXTERN ELTSTRUCT *firstelt BUILDINIT(NULL) ;
BUILDEXTERN ELTSTRUCT **nextelt BUILDINIT(&firstelt) ;
/* Most number of parameters had by a single element */
BUILDEXTERN int maxpar BUILDINIT(0) ;
/* Number of parameters current element has */
BUILDEXTERN int pcount ;
BUILDEXTERN FILE *dtd ;
BUILDEXTERN FILE *m_errfile ;
/* Line number in input file */
BUILDEXTERN int m_line BUILDINIT(1) ;
/* Options */
/* Scan trace */
BUILDEXTERN LOGICAL scantrace BUILDINIT(FALSE) ;
/* Trace calls to malloc/free */
BUILDEXTERN LOGICAL m_malftrace BUILDINIT(FALSE) ;
/* Test validity of heap in calls to malloc/free */
BUILDEXTERN LOGICAL m_heapchk BUILDINIT(FALSE) ;
/* Flag set if strictly conforming to ISO 8879 */
BUILDEXTERN LOGICAL standard BUILDINIT(FALSE) ;
/* File pointer used by utilities in ..\util\scanutil for input file */
BUILDEXTERN FILE *ifile ;
/* Element names are stored in a trie. */
BUILDEXTERN M_TRIE eltree ;
/* Count of elements */
BUILDEXTERN int ecount BUILDINIT(0) ;
/* Storage for short reference map names and definitions */
BUILDEXTERN M_TRIE maptree ;
BUILDEXTERN M_TRIE sreftree ;
BUILDEXTERN int mapcnt BUILDINIT(0) ;
BUILDEXTERN int curmap ;
struct srefstruct {
int srefcnt ;
SREFDATA *data ;
SREFSTRUCT *next ;
} ;
BUILDEXTERN SREFSTRUCT *firstsref BUILDINIT(NULL) ;
BUILDEXTERN SREFSTRUCT **nextsref BUILDINIT(&firstsref) ;
struct srefdata {
int map ;
int entidx ;
SREFDATA *next ;
} ;
BUILDEXTERN SREFDATA *thissref ;
BUILDEXTERN int sreflen BUILDINIT(0) ;
BUILDEXTERN M_WCHAR mapname[M_NAMELEN + 1] ;
BUILDEXTERN int maxsr ;
BUILDEXTERN int maxseq ;
struct mapstruct {
int map ;
M_WCHAR *mapname ;
LOGICAL defined ;
MAP *nextptr ;
} ;
BUILDEXTERN MAP *firstmap BUILDINIT(NULL) ;
BUILDEXTERN MAP **nextmap BUILDINIT(&firstmap) ;
/* Storage for entities */
BUILDEXTERN M_TRIE m_enttrie[1] ;
BUILDEXTERN M_ENTITY *entity ;
BUILDEXTERN M_ENTITY *lastent BUILDINIT(NULL) ;
BUILDEXTERN M_ENTITY *firstent BUILDINIT(NULL) ;
BUILDEXTERN M_WCHAR entcontent[M_LITLEN + 1] ;
BUILDEXTERN int entclen ;
BUILDEXTERN int m_entcnt BUILDINIT(0) ;
BUILDEXTERN FILE *entfile ;
BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
M_WCHAR *MakeWideCharString(const char *from);

View File

@@ -15,7 +15,8 @@ HELPTSSFILE = $(HELPTAGSRC)/htag.tss
eltdef_LDADD = $(HELPUTILLIB) eltdef_LDADD = $(HELPUTILLIB)
eltdef_CFLAGS = -I$(HELPUTILSRC) -I$(HELPBUILDSRC) eltdef_CFLAGS = -DPASS1 -I../build -I../util -I../../include/util -I../../include/build \
-I../../include/eltdef
eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c

View File

@@ -1,240 +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: eltdef.h /main/3 1995/11/08 10:04:40 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Eltdef.h is the include file for allocating global variables in ELTDEF */
#if defined(ELTDEF)
#define ELTEXTERN
#define ELTINIT(a) = a
#else
#define ELTEXTERN extern
#define ELTINIT(a)
#endif
#include "common.h"
/* Error recovery status */
#define RENTITY 0
#define RSIGNON 1
#define RGLOBDEC 2
#define RGLOBDEF 3
#define RELEMENT 4
/* State transition network generated by CONTEXT */
#include "sparse.h"
/* Indicates whether, and if so where, each character can appear in
a name */
#if defined(ELTDEF)
#include "chartype.h"
#else
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
#endif
/* Scanned name or literal */
ELTEXTERN M_WCHAR name[M_NAMELEN + 1] ;
ELTEXTERN M_WCHAR literal[M_LITLEN + 1] ;
/* Associates a C variable with a particular parameter */
typedef struct cvarstruct CVARSTRUCT ;
struct cvarstruct {
int param ;
M_WCHAR *cvarptr ;
CVARSTRUCT *next ;
} ;
ELTEXTERN CVARSTRUCT *cvarlist ;
/* Current and previous context (state) of transition system
controlling ELTDEF */
ELTEXTERN int curcon ELTINIT(START) ;
ELTEXTERN int m_prevcon ;
/* Character read-ahead buffer */
ELTEXTERN int toundo ELTINIT(0) ;
ELTEXTERN int maxundo ELTINIT(0) ;
#define SAVECHAR 50
ELTEXTERN int savechar[SAVECHAR] ;
/* Chain of elements named in pseudo-tag */
typedef struct chain CHAIN ;
struct chain {
M_ELEMENT elt ;
CHAIN *next ;
} ;
ELTEXTERN CHAIN *firstchain ELTINIT(NULL) ;
ELTEXTERN CHAIN **nextchain ELTINIT(&firstchain) ;
/* Text character returned from scanner */
ELTEXTERN M_WCHAR textchar ;
/* Identifying index of element currently being processed */
ELTEXTERN M_ELEMENT openelt ELTINIT(M_NULLVAL) ;
/* Output files */
ELTEXTERN FILE *globdec, *globdef, *string,
*pfile, *tfile, *sfile, *efile, *entfile, *ifile, *stfile, *ifh, *pvalh ;
/* Flags indicating whether currently in the middle of processing
an action */
ELTEXTERN LOGICAL intext ELTINIT(FALSE),
inent ELTINIT(FALSE),
inpc ELTINIT(FALSE),
insc ELTINIT(FALSE),
inec ELTINIT(FALSE),
instc ELTINIT(FALSE),
instring ELTINIT(FALSE) ;
/* Location of global start-string and end-string, if any */
ELTEXTERN int gss ELTINIT(0),
ges ELTINIT(0) ;
/* Flags indicating whether default code setments are to be used */
ELTEXTERN LOGICAL finitext ELTINIT(TRUE),
finipi ELTINIT(TRUE),
finistc ELTINIT(TRUE) ;
/* Whether have finished the sign-on message */
ELTEXTERN LOGICAL signonend ELTINIT(FALSE) ;
/* Whether errors have occurred */
ELTEXTERN LOGICAL errexit ELTINIT(FALSE) ;
/* Number of characters currently written to stext.h and etext.h */
ELTEXTERN int stringcnt ELTINIT(1) ;
/* Number of actions so far written to code files */
ELTEXTERN int sactions ELTINIT(1),
eactions ELTINIT(1),
tactions ELTINIT(1),
pactions ELTINIT(1),
stactions ELTINIT(1) ;
/* Pool of ponters for associating a chain of elements with an action string
or code */
typedef struct action ACTION ;
struct action {
int data ;
M_ELEMENT element ;
int count ;
ACTION *son ;
ACTION *next ;
ACTION *nextact ;
} ;
ELTEXTERN int actlen ELTINIT(0) ;
ELTEXTERN ACTION *firstact ELTINIT(NULL) ;
ELTEXTERN ACTION **nextact ELTINIT(&firstact) ;
/* Number of elements defined in the document type */
#if defined(M_DTDDEF)
#define ELCOUNT sizeof(m_element)/sizeof(m_element[0])
#else
#define ELCOUNT
#endif
/* Action arrays, indexed by the element in which they occur. Each element
is a linked list for actions qualified by the context in which they
occur. */
ELTEXTERN ACTION *starray[ELCOUNT],
*etarray[ELCOUNT],
*scarray[ELCOUNT],
*ecarray[ELCOUNT],
*tcarray[ELCOUNT],
*pcarray[ELCOUNT],
*stcarray[ELCOUNT] ;
/* Store the sign-on message */
#define SOCHAR 512
ELTEXTERN char signonmsg[SOCHAR] ;
ELTEXTERN int sochar ELTINIT(0) ;
/* Indicates which elements have been processed at a particular time */
ELTEXTERN LOGICAL processed[ELCOUNT] ;
/* Flags to indicate whether data has yet been written to various files */
ELTEXTERN LOGICAL stringstart ELTINIT(TRUE) ;
/* Flag indicating whether a carriage return was the last character of
the signon message */
ELTEXTERN LOGICAL socr ELTINIT(FALSE) ;
/* Number of current input line */
ELTEXTERN int m_line ELTINIT(1) ;
/* Pointer to file error for error messages */
ELTEXTERN FILE *m_errfile ;
/* Name of interface file */
#define IFLEN 512
ELTEXTERN char iffile[IFLEN] ;
/* Pointer to current entity */
ELTEXTERN M_ENTITY *entity ;
/* Count of code entities defined */
ELTEXTERN int codeent ELTINIT(0) ;
/* Content of entity being defined */
ELTEXTERN int entclen ;
ELTEXTERN M_WCHAR entcontent[M_LITLEN + 1] ;
/* Error recovery status */
ELTEXTERN int restart ELTINIT(RENTITY) ;
/* Strings to write to generated files */
#define pproto "M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype"
#define pformal "m_pi, m_entname, m_enttype"
#define pftype " M_WCHAR *m_pi ;\n M_WCHAR *m_entname ;\n int m_enttype ;"
#define tproto "M_WCHAR m_textchar"
#define tformal "m_textchar"
#define tftype " M_WCHAR m_textchar ;\n"
#define stproto "M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END"
#define stformal "m_string, M_START, M_END"
#define stft " M_WCHAR *m_string ;\n LOGICAL M_START ;\n LOGICAL M_END ;\n"
/* Structures for generating defines for parameter values */
ELTEXTERN M_TRIE parval ;
typedef struct {
M_WCHAR *cname ;
M_WCHAR *value ;
int line ;
} PARVAL ;
ELTEXTERN PARVAL *pval ;
/* Function prototypes */
#include "proto.h"
/* Flag to open fewer files for convenience of debugging with
CodeView */
ELTEXTERN LOGICAL debug ELTINIT(FALSE) ;
/* Scanner trace for debugging */
ELTEXTERN LOGICAL scantrace ELTINIT(FALSE) ;
/* Test validity of heap in calls to malloc/free */
ELTEXTERN LOGICAL m_heapchk ELTINIT(FALSE) ;
/* Trace calls to malloc/free */
ELTEXTERN LOGICAL m_malftrace ELTINIT(FALSE) ;

View File

@@ -1,141 +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:05:39 rswiston $ */
/*
Copyright (c) 1988, 1989 Hewlett-Packard Co.
*/
/* Proto.h contains function prototypes for program ELTDEF. */
void actptrout(ACTION **array, char *name);
void addent(void);
LOGICAL m_allwhite(const M_WCHAR *string);
void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
void countdown(M_TRIE *parent, int *count);
void cvalue(void);
void done(void);
void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
void (*proc)(M_ENTITY *));
void endcode(LOGICAL flag, FILE *file);
void endini(void);
void endsignon(void);
void endstring(void);
void entout(char *fname);
void enttype(int type);
void m_error(char *text);
void m_err1(const char *text, const M_WCHAR *arg);
void m_mberr1(char *text, const char *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_err5(char *text,
M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
void m_exit(int status);
void m_free(void *block, char *msg);
void freechain(void);
int getachar(void);
int *getaction(ACTION **array);
ACTION *getactstruct(void);
void getname(int first);
int gettoken(int *c, int context);
void initialize(void);
LOGICAL m_letter(M_WCHAR c);
LOGICAL litproc(int delim);
void *m_malloc(int size, char *msg);
void m_openchk(FILE **ptr, char *name, char *mode);
void outpval(M_TRIE *p);
void outstring(void);
int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
int scan(void);
void skiptoend(void);
void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
char *formal, char *formtype);
void startelement(void);
void storecvar(void);
void storepname(void);
void undodelim(M_WCHAR *delim);
void ungetachar(int c);
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);
void value(M_WCHAR *p);
void warning(char *text);
void warning1(char *text, M_WCHAR *arg);
LOGICAL m_whitespace(M_WCHAR c);

View File

@@ -23,8 +23,9 @@ XDONE:
BUILT_SOURCES = XDONE BUILT_SOURCES = XDONE
CLEANFILES = $(BUILT_SOURCES) CLEANFILES = $(BUILT_SOURCES)
AM_CPPFLAGS = -I. -I$(HELPPARSERSRC) -I$(HELPUTILSRC) \ AM_CPPFLAGS = -DPASS1 -I../parser -I../eltdef -I../../include/parser -I../../include/util \
-I$(HELPELTDEFSRC) $(DT_INCDIR) -I../../include/eltdef -I../../include/helptag \
$(DT_INCDIR)
# needed by parser/ # needed by parser/
noinst_LIBRARIES = libhelptag.a noinst_LIBRARIES = libhelptag.a

View File

@@ -1,677 +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
*/
/* $TOG: global.h /main/4 1998/04/06 13:18:34 mgreess $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Global definitions for HP Tag/TeX translator */
/* When changing this file, check "grphpar.h" for conflicts */
#if defined(DEFINE)
#define EXTERN
#define INIT(a) = a
#else
#define EXTERN extern
#define INIT(a)
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <unistd.h>
#include <locale.h>
#include <fcntl.h>
#define MAXHEADLINES 3
#define FNAMELEN 513
#define BIGBUF 1024
/* Must be in same order as values in optkey, adjust NUMOPTIONS if changed*/
#define DRAFT 1
#define FINAL 2
#define MEMO 3
#define NOMEMO 4
#define SEARCHKEY 5
#define CLEARSEARCH 6
#define LONGFILES 7
#define LONGFILE 8
#define LONG 9
#define SHORTFILES 10
#define SHORTFILE 11
#define SHORT 12
#define CHARSET 13
#define ONERROR 14
#if defined(FUTURE_FEATURE)
#define GRAPHICS 15
#define NOGRAPHICS 16
#define REV 17
#define NOREV 18
#endif /* FUTURE_FEATURE */
#define NUMOPTIONS 14
EXTERN int optval INIT(M_NULLVAL) ;
EXTERN char *optkey[NUMOPTIONS]
#if defined(DEFINE)
= {
"draft",
"final",
"memo",
"nomemo",
"search",
"clearsearch",
"longfiles",
"longfile",
"long",
"shortfiles",
"shortfile",
"short",
"charset",
"onerror",
#if defined(FUTURE_FEATURE)
"graphics",
"nographics",
"rev",
"norev",
#endif /* FUTURE_FEATURE */
}
#endif
;
/* Processing options */
EXTERN LOGICAL final INIT(FALSE) ;
EXTERN LOGICAL memo INIT(FALSE) ;
EXTERN int rebuild INIT(FALSE) ;
EXTERN LOGICAL stoponerror INIT(TRUE) ;
#if defined(FUTURE_FEATURE)
EXTERN LOGICAL prntrevs INIT(FALSE) ;
#endif /* FUTURE_FEATURE */
/* Flag for filelist vs. Tag to SDL translator */
EXTERN LOGICAL filelist INIT(FALSE) ;
EXTERN M_WCHAR *helpcharset INIT(NULL);
EXTERN M_WCHAR *helplang INIT(NULL);
EXTERN char *docId INIT("SDL-RESERVED0");
EXTERN char sdlReservedName[] INIT("SDL-RESERVED");
#define SDLNAMESIZ sizeof("SDL-RESERVED")
EXTERN char *pubId INIT("CDE 1.0");
/* Working directory, input directory, installation directory,
and search paths */
EXTERN LOGICAL defaultext ;
EXTERN M_WCHAR *inputname; /* pointer to name of main input file */
EXTERN char *base ;
EXTERN char *baseext ;
EXTERN char *nodirbase ;
EXTERN char *work INIT("") ;
EXTERN char *indir INIT(NULL) ;
EXTERN char *install INIT(NULL) ;
typedef struct search SEARCH ;
struct search {
char *directory ;
SEARCH *next ;
} ;
EXTERN SEARCH *path INIT(NULL) ;
EXTERN SEARCH **endpath INIT(&path) ;
EXTERN char dirsep INIT('/') ;
#define CSEP '/'
#define SSEP "/"
/* True within a sequence of rsect's */
EXTERN LOGICAL rsectseq INIT(FALSE) ;
/* True if SAMEPAGE for this rsect sequence */
EXTERN LOGICAL rsectsame ;
/* True if this manual has a glossary */
EXTERN LOGICAL glossary INIT(FALSE) ;
/* True while processing a note if a head was encountered */
EXTERN LOGICAL notehead ;
/* File pointer for cross-reference file */
EXTERN FILE *xrf ;
/* global link type pointer, used in xref to match latest link type */
EXTERN int global_linktype INIT (0);
/* pointers to image parameters for use in imagetext */
EXTERN M_WCHAR *indentp;
EXTERN M_WCHAR *imagegentityp;
EXTERN M_WCHAR *imagegpositionp;
EXTERN M_WCHAR *imageghyperlinkp;
EXTERN M_WCHAR *imageglinktypep;
EXTERN M_WCHAR *imagegdescription;
extern LOGICAL inParText;
extern LOGICAL inSdlP;
/* Save these ids and reuse them on the current virpage.
* We need two of each (except for the first) so we can alternate to
* avoid <form> thinking it is supposed to span them. The bullet id
* indexes will flip back and forth between 0 and 1 to pick an id.
*/
extern int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId;
extern int bulletIdIndex;
extern int looseBulletIdIndex;
/* save the textsize to emit it on the <p> tag; this allows us to have
* a single ssi= for the "ex" <block> and modify the text size individually
* in the "ex" <p>
*/
EXTERN int exTextSize;
/* File offset after preamble, and before \bye. Used to determine
whether content found in the document */
EXTERN long postpreamble INIT(0L) ;
EXTERN long prebye INIT(0L) ;
EXTERN LOGICAL filefound INIT(FALSE) ;
/* Chapter or appendix number */
EXTERN int part INIT(0) ;
EXTERN int chapter INIT(0) ;
EXTERN int chapinc INIT(0) ;
EXTERN char chapstring[15] INIT("0") ;
#define NODEID_LENGTH 204
/* name of current node */
EXTERN M_WCHAR nodeid[NODEID_LENGTH+1];
/* Node level variables */
EXTERN int thisnodelevel INIT(0);
EXTERN M_WCHAR *savehelpfilename INIT(NULL);
/* flag for omitting first newline in topic map file */
EXTERN LOGICAL nohometopic INIT(TRUE);
EXTERN int parTextId INIT(0);
EXTERN char *helpbase INIT(NULL);
EXTERN char *helpext;
/* Should we use these BASENAME_LIMIT on the size of file names? */
extern LOGICAL usingshortnames;
/* Limit on how long the basename can be for a .ht file */
#define BASENAME_LIMIT 6
/* limit on how many additional character are allowed before the ext */
/* (How many chapter numbers foo``12''.ht */
#define PRE_EXTENSION_LIMIT 2
EXTERN FILE *snbfp;
EXTERN FILE *indexfp;
/* Whether have processed anything in chapter or appendix */
EXTERN LOGICAL chapst INIT(FALSE) ;
/* TRUE for chapter, FALSE for appendix */
EXTERN LOGICAL inchapter INIT(TRUE) ;
/* Figure number within this chapter or appendix */
EXTERN int figno ;
/* Options on a particular figure */
EXTERN int ftype, fborder, ftonumber, fvideo, fstrip, fsnap, fautoscale,
fmaxlistrows ;
/* Place to hold <snb> entries until after a <virpage><head>, if any,
* is seen. Also, an integer value of the offset into the file to the
* point immediately after either <virpage> or <virpage><head> - the
* place to put the <snb>.
*/
EXTERN char *savesnb INIT(NULL);
EXTERN int snbstart INIT(0);
/* Table number within this chapter or appendix */
EXTERN int tableno ;
/* footnote number */
EXTERN int footnoteno INIT(0);
/* True while processing abbrev head for page footer */
EXTERN LOGICAL fabbrev INIT(FALSE) ;
EXTERN FILE *outfile ;
/* True if a figure or table has a caption */
EXTERN LOGICAL figcaption ;
EXTERN LOGICAL tabcaption ;
EXTERN char *capposition; /* left/center/right position of the caption */
EXTERN LOGICAL had_an_otherfront_head INIT(FALSE);
/* For softkeys */
EXTERN int sklines, skchars ;
/* contains current m_textchar, used to see if we need to issue an italic
correction. Issue italic correction everywhere except after commas
and periods. */
EXTERN M_WCHAR cur_char INIT(' ') ;
/* Special characters */
#define O_BR '{'
#define C_BR '}'
#define ESCAPE 27
/* Error _CoeMessage section */
EXTERN LOGICAL emsghead INIT(FALSE) ;
/* emsghead has three possible values:
DEFHEAD : use default error message title
USERHEAD : user specified
FALSE : do not process head (assume define is not equal to
DEFHEAD or USERHEAD)
*/
#define DEFHEAD 2
#define USERHEAD 3
/* declarations for the <form> stack */
typedef struct forminfo FORMINFO;
struct forminfo {
char *rowVec;
int vecLen;
};
EXTERN FORMINFO *formStackBase INIT(NULL);
EXTERN FORMINFO *formStackTop INIT(NULL);
EXTERN FORMINFO *formStackMax INIT(NULL);
/* flag that we have output an SDL <block> for <partext> */
EXTERN LOGICAL inBlock INIT(FALSE);
/* flag that we need to output an <fdata> for a <form> */
EXTERN LOGICAL needFData INIT(FALSE);
/* Figure stuff */
#define FIGDEFWH "3in"
#define MAXNORMROWS 55
#define MAXSMALROWS 75
#define MAXTINYROWS 100
#define MAXPENS 8 /* when changing, check prfigpenwidths() ! */
#define MAXPENWIDTH 1864680 /* approx 1cm in scaled points */
EXTERN LOGICAL fignote ;
EXTERN int fignotePtr, in_graphic, nlines, blank_middle ;
EXTERN unsigned long ncolumns, max_columns, res_index, xx, ri ;
EXTERN LOGICAL file_ent ;
EXTERN M_WCHAR *f_content ;
EXTERN M_WCHAR f_contqual[FNAMELEN] ;
EXTERN M_WCHAR *f_file ;
/* callouts -- entfile and lineno */
EXTERN M_WCHAR *figinpath ;
EXTERN int figline INIT(0) ;
/* -- callouts -- */
#define BYTE unsigned char
#define NEWPT 0
#define NEWGROUP 1
#define NEWLINE 2
#define NEWCALLOUT 3
typedef struct tagFPOINT {
float x,y;
} FPOINT ;
typedef struct tagPwT {
FPOINT coord;
char ew[2],
ns[2],
lcr[2];
} PTWTXT ;
#define AN_desc 3
#define AN_nsew 60
#define AN_text 12
#define AN_isbros 16
#define AN_hasbros 32
#define AN_sf1 64
#define AN_sf2 128
#define SH_desc 0
#define SH_nsew 2
#define SH_text 2
#define SH_isbros 4
#define SH_hasbros 5
#define SH_sf1 6
#define SH_sf2 7
#define UNPK(c,an,sh) ((c&an)>>sh)
EXTERN FILE *calfile ;
EXTERN int maxct;
EXTERN LOGICAL okcallout ;
/* -- end callout -- */
EXTERN FILE *pclfile ;
#define VERSION "Version"
EXTERN char *version INIT(NULL) ;
EXTERN char texdone[] INIT("TeX run completed successfully.") ;
/* Code for standard library function "access" */
#define READABLE 04
/* Allowable units on dimensions */
#define SPperPT 65536.0
#define PTperIN 72.27
#define CMperIN 2.54
#define MMperIN 25.4
#define PTperPC 12.0
EXTERN char *dimarray[5]
#if defined(DEFINE)
= { "in",
"cm",
"mm",
"pc",
"pt" }
#endif
;
/* misc */
EXTERN int newhline INIT(0) ;
EXTERN int synelcnt INIT(0);
/* Cross-Reference Declarations */
/* do we have foreward references? */
EXTERN LOGICAL have_forward_xrefs INIT(FALSE);
EXTERN M_WCHAR *xrffile ; /* Save file and line number for error messages */
EXTERN int xrfline INIT(0) ; /* --used to store into structure "xref" */
EXTERN M_TRIE xtree ;
struct xref {
M_WCHAR *textptr ; /* Pointer to expansion of xref */
LOGICAL defined ; /* Whether the xref has been defined */
LOGICAL wheredef ; /* Whether defined in this pass or a previous one */
LOGICAL retrieved ; /* Whether the value has been used */
LOGICAL csensitive ; /* Whether the value is chapter sensitive */
LOGICAL xrefable; /* can this be xref'd to legally? */
char *chapstring ; /* Number of chapter or appendix where it occurs */
LOGICAL inchapter ; /* Whether in chapter or appendix */
M_WCHAR *file ; /* File and line # where first referred to or */
int line ; /* first defined for error reports */
} ;
/* Value of one particular cross-reference */
EXTERN M_WCHAR xrefstring[400] ;
EXTERN int xstrlen INIT(0) ;
/* Pointer to the id */
EXTERN M_WCHAR *savid ;
EXTERN LOGICAL iderr ;
EXTERN char *imageId INIT(NULL); /* "image" id saved for "imagetext" */
/* Save head for page header in rsect and table of contents string*/
EXTERN M_WCHAR savehead[400] ;
EXTERN M_WCHAR savetabcap[400] ;
EXTERN int svheadlen ;
EXTERN int svtclen ;
EXTERN LOGICAL savhd ;
EXTERN LOGICAL savtc ;
EXTERN LOGICAL hderr ;
EXTERN LOGICAL echo ;
EXTERN LOGICAL tooutput INIT(TRUE) ;
/* Save example until we see an annotation (which will behave like a head */
EXTERN char *saveex;
EXTERN int svexlen;
EXTERN char *saveexseg;
EXTERN int svexseglen;
EXTERN LOGICAL savex;
EXTERN LOGICAL stackex;
EXTERN LOGICAL firstAnnot;
EXTERN LOGICAL tonumexlines;
EXTERN int exLineNum;
EXTERN int oldExLineNum;
/* Glossary Declarations */
EXTERN M_TRIE gtree ;
#define MAXTERM 200
EXTERN M_WCHAR term[MAXTERM + 1] ;
EXTERN M_WCHAR *termp ;
EXTERN LOGICAL wsterm ;
EXTERN int lastTermId;
/* Saved document title */
EXTERN M_WCHAR *savedtitle;
/* tell whether .hmi should have generic info put into it */
EXTERN LOGICAL hadtitle INIT(FALSE);
EXTERN LOGICAL hadabstract INIT(FALSE);
/* emit an empty abstract title if no head specified */
EXTERN LOGICAL needabstracthead INIT(FALSE);
/* Numeric codes corresponding to keyword parameter values */
#define FIXED 1
#define FLOAT 2
#define SIDE 1
#define STACK 2
#define COMPUTER 1
#define DISPLAY 2
/* Note that the definition of BOX was chosen so that the border
parameter on both figure and table could use it, even though these
parameters do not share all possible values */
#define BOX 1
#define TOP 2
#define BOTTOM 3
#define NOBORDER 4
#define SCREEN 5
#define NOBOX 2
#define ART 1
#define PCL 2
#define TIFF 3
#define LISTING 4
#define TEXT 5
#define HPGL 7
/* IMPORTANT: "FIG..." values should not be */
/* changed (eg. see proc "checkmargin") */
#define FIGTOP 0
#define FIGRIGHT 1
#define FIGBOTTOM 2
#define FIGLEFT 3
#define NFIGSIDES 4
#define WRAP 1
#define NOWRAP 2
/* text size macros */
#define NORMAL 1
#define SMALLER 2
#define SMALLEST 3
#define NUMBER 1
#define NONUMBER 2
#define LEFT 1
#define INDENT 2
#define CENTER 3
#define RIGHT 4
#define TIGHT 1
#define LOOSE 2
#define NORULE 1
#define HEADRULE 2
#define GRID 3
#define ORDER 0
#define BULLET 1
#define PLAIN 2
#define MILSPEC 3
#define LABEL 4
#define CHECK 5
#define UROMAN 0
#define UALPHA 1
#define ARABIC 2
#define LALPHA 3
#define LROMAN 4
#define DOTPUNCT 0
#define PARENPUNCT 1
#define NEWPAGE 0
#define SAMEPAGE 1
#define GLOSS 1
#define NOGLOSS 2
#define INVERSE 1
#define NOINVERSE 2
#define STRIP 1
#define NOSTRIP 2
#define DPENWDVAL 1
#define SNAP 1
#define NOSNAP 2
#define AUTOSCALE 1
#define NOAUTOSCALE 2
/* the values for these elements are significant...they are used to set
* TeX register values which are later tested by macros
*/
#define COMMAND 1
#define KEYS2 2
/* the values for these elements are significant...they are used to set
* TeX register values which are later tested by macros
*/
#define TWO 2
#define FOUR 4
#define EIGHT 8
#define OTHER 0
/* values for ctable tracking */
EXTERN int ctbltype;
EXTERN int ctbldisplines;
EXTERN int ctblgraphics;
/* Declarations for lists */
#define MAXLISTLEV 8
/* FIRST => first paragraph in list item. The one following the label.
FOLLOW => immediately after a figure, note, caution, warning, ex or vex
INSIDE => at least one previous paragraph
*/
enum ParagraphListLocation {FIRST, FOLLOW, INSIDE};
EXTERN LOGICAL firstPInBlock; /* give the first para a different ssi= */
EXTERN LOGICAL lablisttight[MAXLISTLEV];
EXTERN int labhid[MAXLISTLEV];
EXTERN int labhtextid[MAXLISTLEV];
EXTERN int labelid[MAXLISTLEV];
EXTERN int labeltextid[MAXLISTLEV];
EXTERN int list INIT(0) ;
typedef struct contchain CONTCHAIN ;
struct contchain {
long where ;
CONTCHAIN *next ;
} ;
typedef struct list LIST ;
struct list {
int type ;
int order ;
int count ;
int space ;
unsigned char punct ;
unsigned char started ;
unsigned char where ;
LIST *lastlist ;
CONTCHAIN *chain ;
} ;
EXTERN LIST outlist
#if defined(DEFINE)
= {0, 0, 0, 0, DOTPUNCT, FALSE, FIRST, NULL, NULL}
#endif
;
EXTERN LIST *lastlist INIT(&outlist) ;
EXTERN int bulcount INIT(0) ;
typedef struct rowvec ROWVEC;
struct rowvec {
unsigned char firstitem;
unsigned char longlabel;
};
EXTERN ROWVEC listitems[MAXLISTLEV+1];
/* save area for index processing */
EXTERN M_WCHAR idxsav[400] ;
/* Sort form of an index term */
EXTERN M_WCHAR sort[400] ;
/* Sort form of an index sub term */
EXTERN M_WCHAR subsort[400] ;
/* print form of index term */
EXTERN M_WCHAR print[400] ;
/* print form of index sub term */
EXTERN M_WCHAR subprint[400] ;
EXTERN int idxsavlen ;
EXTERN LOGICAL didsort ;
EXTERN LOGICAL didsubsort ;
/* Strings for constructing error messages */
EXTERN char firstused[] INIT("'%s' first used in line %d") ;
EXTERN char undef[] INIT("Undefined cross-reference %s (") ;
EXTERN char infile[] INIT("file %s, ") ;
EXTERN char online[] INIT("line %d)\n") ;
EXTERN char offile[] INIT(" of file: %s") ;
/* Whitemenu supported only in calculator, issue message only once */
EXTERN LOGICAL wmenu_err INIT(FALSE) ;
/* Pop the stack of font changes */
#define POPFONT
/* For index entries */
#define IDXSTRT1 {}
#define IDXSTRT2 {}
#define IDXSTRT IDXSTRT1 IDXSTRT2
#define IDXEND1 {}
#define IDXEND2 {}
#define IDXEND3 {}
#define IDXEND IDXEND1 IDXEND2 IDXEND3
/* Absorb consecutive <CR>'s, because TeX gets confused by them */
EXTERN LOGICAL multi_cr_flag INIT(FALSE);
/* flag for leaders within <LIST PLAIN> only */
EXTERN LOGICAL leaderok INIT(FALSE) ;
/* Direct debugging trace output to stdout or outfile */
EXTERN LOGICAL tracetostd INIT(FALSE) ;
/* Function prototypes */
#include "fproto.h"
/* Declarations for handling special characters */
#include "roman8.h"
/* Declarations for handling special characters for calculators*/
EXTERN char ccoutbuf[128] ;
/* Character conversion tables */
#include "charconv.h"

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: roman8.h /main/3 1995/11/08 10:12:15 rswiston $ */
EXTERN char *special[256]
#if defined(DEFINE)
= {
/* Char Name Roman8 Expansion (none needed) */
/* */
/* 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: # */ 0,
/* 36: $ */ 0,
/* 37: % */ 0,
/* 38: & */ "&&",
/* 39: ' */ 0,
/* 40: ( */ 0,
/* 41: ) */ 0,
/* 42: * */ 0,
/* 43: + */ 0,
/* 44: , */ 0,
/* 45: - */ 0,
/* 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: < */ "&<",
/* 61: = */ 0,
/* 62: > */ 0,
/* 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: \\ */ "\\",
/* 93: ] */ 0,
/* 94: ^ */ 0,
/* 95: _ */ 0,
/* 96: ` */ 0,
/* 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: { */ 0,
/* 124: | */ 0,
/* 125: } */ 0,
/* 126: ~ */ 0,
/* 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 */ 0,
/* 162: A circumflex */ 0,
/* 163: E grave */ 0,
/* 164: E circumflex */ 0,
/* 165: E dieresis */ 0,
/* 166: I circumflex */ 0,
/* 167: I dieresis */ 0,
/* 168: acute accent */ 0,
/* 169: grave accent */ 0,
/* 170: circumflex */ 0,
/* 171: dieresis */ 0,
/* 172: tilde */ 0,
/* 173: U grave */ 0,
/* 174: U circumflex */ 0,
/* 175: Italian Lira */ 0,
/* 176: overbar */ 0,
/* 177: Y acute */ 0,
/* 178: y acute */ 0,
/* 179: degree */ 0,
/* 180: C cedilla */ 0,
/* 181: c cedilla */ 0,
/* 182: N tilde */ 0,
/* 183: n tilde */ 0,
/* 184: inverted exclamation mark */ 0,
/* 185: inverted question mark */ 0,
/* 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 */ 0,
/* 193: e circumflex */ 0,
/* 194: o circumflex */ 0,
/* 195: u circumflex */ 0,
/* 196: a acute */ 0,
/* 197: e acute */ 0,
/* 198: o acute */ 0,
/* 199: u acute */ 0,
/* 200: a grave */ 0,
/* 201: e grave */ 0,
/* 202: o grave */ 0,
/* 203: u grave */ 0,
/* 204: a dieresis */ 0,
/* 205: e dieresis */ 0,
/* 206: o dieresis */ 0,
/* 207: u dieresis */ 0,
/* 208: A angstrom */ 0,
/* 209: i circumflex */ 0,
/* 210: O slash */ 0,
/* 211: AE ligature */ 0,
/* 212: a angstrom */ 0,
/* 213: i acute */ 0,
/* 214: o slash */ 0,
/* 215: ae ligature */ 0,
/* 216: A dieresis */ 0,
/* 217: i grave */ 0,
/* 218: O dieresis */ 0,
/* 219: U dieresis */ 0,
/* 220: E acute */ 0,
/* 221: i dieresis */ 0,
/* 222: SS ligature */ 0,
/* 223: O circumflex */ 0,
/* 224: A acute */ 0,
/* 225: A tilde */ 0,
/* 226: a tilde */ 0,
/* 227: Eth */ 0,
/* 228: eth */ 0,
/* 229: I acute */ 0,
/* 230: I grave */ 0,
/* 231: O acute */ 0,
/* 232: O grave */ 0,
/* 233: O tilde */ 0,
/* 234: o tilde */ 0,
/* 235: S caron */ 0,
/* 236: s caron */ 0,
/* 237: U acute */ 0,
/* 238: Y dieresis */ 0,
/* 239: y dieresis */ 0,
/* 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,244 +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: special.h /main/3 1995/11/08 10:12:54 rswiston $ */
0, "^@ NUL", SPECIAL, 0, 0,
1, "^A SOH", SPECIAL, 0, 0,
2, "^B STX", SPECIAL, 0, 0,
3, "^C ETX", SPECIAL, 0, 0,
4, "^D EOT", SPECIAL, 0, 0,
5, "^E ENQ", SPECIAL, 0, 0,
6, "^F ACK", SPECIAL, 0, 0,
7, "^G BEL", SPECIAL, 0, 0,
8, "^H BS", SPECIAL, 0, 0,
9, "^I HT", SPECIAL, 0, 0,
10, "^J LF", SPECIAL, 0, 0,
11, "^K VT", SPECIAL, 0, 0,
12, "^L FF", SPECIAL, 0, 0,
13, "^M CR", SPECIAL, 0, 0,
14, "^N SO", SPECIAL, 0, 0,
15, "^O SI", SPECIAL, 0, 0,
16, "^P DLE", SPECIAL, 0, 0,
17, "^Q DC1", SPECIAL, 0, 0,
18, "^R DC2", SPECIAL, 0, 0,
19, "^S DC3", SPECIAL, 0, 0,
20, "^T DC4", SPECIAL, 0, 0,
21, "^U NAK", SPECIAL, 0, 0,
22, "^V SYN", SPECIAL, 0, 0,
23, "^W ETB", SPECIAL, 0, 0,
24, "^X CAN", SPECIAL, 0, 0,
25, "^Y EM", SPECIAL, 0, 0,
26, "^Z SUB", SPECIAL, 0, 0,
27, "^[ ESC", SPECIAL, 0, 0,
28, "^\\ FS", SPECIAL, 0, 0,
29, "^] GS", SPECIAL, 0, 0,
30, "^^ RS", SPECIAL, 0, 0,
31, "^_ US", SPECIAL, 0, 0,
32, "SP", SPECIAL, 0, 0,
33, "!", SPECIAL, 0, 0,
34, "\"", SPECIAL, 0, 0,
35, "#", SPECIAL, "\\\\#", 0,
36, "$", SPECIAL, "\\\\dollar{}", 0,
37, "%", SPECIAL, "\\\\%", 0,
38, "&", SPECIAL, "\\\\&", 0,
39, "'", SPECIAL, 0, 0,
40, "(", SPECIAL, 0, 0,
41, ")", SPECIAL, 0, 0,
42, "*", SPECIAL, 0, 0,
43, "+", SPECIAL, 0, 0,
44, ",", SPECIAL, 0, 0,
45, "-", SPECIAL, "{-}", 0,
46, ".", SPECIAL, 0, 0,
47, "/", SPECIAL, 0, 0,
58, ":", SPECIAL, 0, 0,
59, ";", SPECIAL, 0, 0,
60, "<", SPECIAL, "{\\\\lthan}", 0,
61, "=", SPECIAL, 0, 0,
62, ">", SPECIAL, "{\\\\gthan}", 0,
63, "?", SPECIAL, 0, 0,
64, "@", SPECIAL, 0, 0,
91, "[", SPECIAL, 0, 0,
92, "\\\\", SPECIAL, "{\\\\bslash}", 0,
93, "]", SPECIAL, 0, 0,
94, "^", SPECIAL, "\\\\string^", 0,
95, "_", SPECIAL, "{\\\\under}", 0,
96, "`", SPECIAL, 0, 0,
123, "{", SPECIAL, "{\\\\lbrac}", 0,
124, "|", SPECIAL, "{\\\\vbar}", 0,
125, "}", SPECIAL, "{\\\\rbrac}", 0,
126, "~", SPECIAL, "\\\\string~", 0,
184, "inverted exclamation mark", SPECIAL, "{!`}", 0,
185, "inverted question mark", SPECIAL, "{?`}", 0,
168, "acute accent", SPECIAL, "\\\\'{ }", 0,
169, "grave accent", SPECIAL, "\\\\`{ }", 0,
170, "circumflex", SPECIAL, "\\\\^{ }", 0,
171, "dieresis", SPECIAL, "\\\\\\\"{ }", 0,
172, "tilde", SPECIAL, "\\\\~{ }", 0,
127, "DEL", SPECIAL, 0, 0,
48, "0", NORMAL, 0, 0,
49, "1", NORMAL, 0, 0,
50, "2", NORMAL, 0, 0,
51, "3", NORMAL, 0, 0,
52, "4", NORMAL, 0, 0,
53, "5", NORMAL, 0, 0,
54, "6", NORMAL, 0, 0,
55, "7", NORMAL, 0, 0,
56, "8", NORMAL, 0, 0,
57, "9", NORMAL, 0, 0,
97, "a", NORMAL, 0, 0,
192, "a circumflex", NORMAL, "\\\\^a", 0,
200, "a grave", NORMAL, "\\\\`a", 0,
196, "a acute", NORMAL, "\\\\'a", 0,
204, "a dieresis", NORMAL, "\\\\\\\"a", 0,
226, "a tilde", NORMAL, "\\\\~a", 0,
212, "a angstrom", NORMAL, "{\\\\aa}", 0,
215, "ae ligature", NORMAL, "{\\\\ae}", 0,
65, "A", NORMAL, NULL, 97,
162, "A circumflex", NORMAL, "\\\\^A", 192,
161, "A grave", NORMAL, "\\\\`A", 200,
224, "A acute", NORMAL, "\\\\'A", 196,
216, "A dieresis", NORMAL, "\\\\\\\"A", 204,
225, "A tilde", NORMAL, "\\\\~A", 226,
208, "A angstrom", NORMAL, "{\\\\AA}", 212,
211, "AE ligature", NORMAL, "{\\\\AE}", 215,
98, "b", NORMAL, 0, 0,
66, "B", NORMAL, 0, 98,
99, "c", NORMAL, 0, 0,
67, "C", NORMAL, 0, 99,
181, "c cedilla", NORMAL, "\\\\c{c}", 0,
180, "C cedilla", NORMAL, "\\\\c{C}", 181,
68, "D", NORMAL, 0, 100,
100, "d", NORMAL, 0, 0,
101, "e", NORMAL, 0, 0,
193, "e circumflex", NORMAL, "\\\\^e", 0,
201, "e grave", NORMAL, "\\\\`e", 0,
197, "e acute", NORMAL, "\\\\'e", 0,
205, "e dieresis", NORMAL, "\\\\\\\"e", 0,
69, "E", NORMAL, 0, 101,
164, "E circumflex", NORMAL, "\\\\^E", 193,
163, "E grave", NORMAL, "\\\\`E", 201,
220, "E acute", NORMAL, "\\\\'E", 197,
165, "E dieresis", NORMAL, "\\\\\\\"E", 205,
102, "f", NORMAL, 0, 0,
70, "F", NORMAL, 0, 102,
103, "g", NORMAL, 0, 0,
71, "G", NORMAL, 0, 103,
104, "h", NORMAL, 0, 0,
72, "H", NORMAL, 0, 104,
105, "i", NORMAL, 0, 0,
209, "i circumflex", NORMAL, "{\\\\^\\\\i}", 0,
217, "i grave", NORMAL, "{\\\\`\\\\i}", 0,
213, "i acute", NORMAL, "{\\\\'\\\\i}", 0,
221, "i dieresis", NORMAL, "{\\\\\\\"\\\\i}", 0,
73, "I", NORMAL, 0, 105,
166, "I circumflex", NORMAL, "\\\\^I", 209,
230, "I grave", NORMAL, "\\\\`I", 217,
229, "I acute", NORMAL, "\\\\'I", 213,
167, "I dieresis", NORMAL, "\\\\\\\"I", 221,
106, "j", NORMAL, 0, 0,
74, "J", NORMAL, 0, 106,
107, "k", NORMAL, 0, 0,
75, "K", NORMAL, 0, 107,
108, "l", NORMAL, 0, 0,
76, "L", NORMAL, 0, 108,
109, "m", NORMAL, 0, 0,
77, "M", NORMAL, 0, 109,
110, "n", NORMAL, 0, 0,
183, "n tilde", NORMAL, "\\\\~n", 0,
78, "N", NORMAL, 0, 110,
182, "N tilde", NORMAL, "\\\\~N", 183,
111, "o", NORMAL, 0, 0,
194, "o circumflex", NORMAL, "\\\\^o", 0,
202, "o grave", NORMAL, "\\\\`o", 0,
198, "o acute", NORMAL, "\\\\'o", 0,
206, "o dieresis", NORMAL, "\\\\\\\"o", 0,
234, "o tilde", NORMAL, "\\\\~o", 0,
214, "o slash", NORMAL, "{\\\\o}", 0,
79, "O", NORMAL, 0, 111,
223, "O circumflex", NORMAL, "\\\\^O", 194,
232, "O grave", NORMAL, "\\\\`O", 202,
231, "O acute", NORMAL, "\\\\'O", 198,
218, "O dieresis", NORMAL, "\\\\\\\"O", 206,
233, "O tilde", NORMAL, "\\\\~O", 234,
210, "O slash", NORMAL, "{\\\\O}", 214,
112, "p", NORMAL, 0, 0,
80, "P", NORMAL, 0, 112,
113, "q", NORMAL, 0, 0,
81, "Q", NORMAL, 0, 113,
114, "r", NORMAL, 0, 0,
82, "R", NORMAL, 0, 114,
115, "s", NORMAL, 0, 0,
236, "s caron", NORMAL, "\\\\v{s}", 0,
222, "SS ligature", NORMAL, "{\\\\ss}", 0,
83, "S", NORMAL, 0, 115,
235, "S caron", NORMAL, "\\\\v{S}", 236,
116, "t", NORMAL, 0, 0,
84, "T", NORMAL, 0, 116,
117, "u", NORMAL, 0, 0,
195, "u circumflex", NORMAL, "\\\\^u", 0,
203, "u grave", NORMAL, "\\\\`u", 0,
199, "u acute", NORMAL, "\\\\'u", 0,
207, "u dieresis", NORMAL, "\\\\\\\"u", 0,
85, "U", NORMAL, 0, 117,
174, "U circumflex", NORMAL, "\\\\^U", 195,
173, "U grave", NORMAL, "\\\\`U", 203,
237, "U acute", NORMAL, "\\\\'U", 199,
219, "U dieresis", NORMAL, "\\\\\\\"U", 207,
118, "v", NORMAL, 0, 0,
86, "V", NORMAL, 0, 118,
119, "w", NORMAL, 0, 0,
87, "W", NORMAL, 0, 119,
120, "x", NORMAL, 0, 0,
88, "X", NORMAL, 0, 120,
121, "y", NORMAL, 0, 0,
178, "y acute", NORMAL, "\\\\'y", 0,
239, "y dieresis", NORMAL, "\\\\\\\"y", 0,
89, "Y", NORMAL, 0, 121,
177, "Y acute", NORMAL, "\\\\'Y", 178,
238, "Y dieresis", NORMAL, "\\\\\\\"Y", 239,
122, "z", NORMAL, 0, 0,
90, "Z", NORMAL, 0, 0,
176, "overbar", UNSUPP, 0, 0,
179, "degree", UNSUPP, 0, 0,
189, "Section sign", UNSUPP, 0, 0,
191, "Cent sign", UNSUPP, 0, 0,
243, "mu", UNSUPP, 0, 0,
244, "paragraph sign", UNSUPP, 0, 0,
246, "long dash", UNSUPP, 0, 0,
249, "Female ordinal", UNSUPP, 0, 0,
250, "Male ordinal", UNSUPP, 0, 0,
254, "Plus over minus sign", UNSUPP, 0, 0,
175, "Italian Lira", UNSUPP, 0, 0,
186, "currency sign", UNSUPP, 0, 0,
187, "pound sterling", UNSUPP, 0, 0,
188, "Yen", UNSUPP, 0, 0,
190, "florin", UNSUPP, 0, 0,
227, "Eth", UNSUPP, 0, 0,
228, "eth", UNSUPP, 0, 0,
240, "Thorn", UNSUPP, 0, 0,
241, "thorn", UNSUPP, 0, 0,
245, "fraction 3/4", UNSUPP, 0, 0,
247, "fraction 1/4", UNSUPP, 0, 0,
248, "fraction 1/2", UNSUPP, 0, 0,
251, "French double open quote", UNSUPP, 0, 0,
252, "Solid square", UNSUPP, 0, 0,
253, "French double close quote", UNSUPP, 0, 0

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:13:34 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

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

View File

@@ -2,6 +2,8 @@ MAINTAINERCLEANFILES = Makefile.in
noinst_LIBRARIES = libutil.a noinst_LIBRARIES = libutil.a
AM_CPPFLAGS = -DPASS1 -I../../include/util
noinst_PROGRAMS = context fclndir noinst_PROGRAMS = context fclndir
context_SOURCES = context.c context_SOURCES = context.c
@@ -11,11 +13,7 @@ fclndir_SOURCES = context.c
libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \ libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \
triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \ triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \
conutil.c error.c exit.c itoa.c malloc.c openchk.c \ conutil.c error.c exit.c itoa.c malloc.c openchk.c \
trie.c triecnt.c whitesp.c basic.h common.h \ trie.c triecnt.c whitesp.c
dtddef.h entdef.h sparse.h trie.h chartype.h cont.h dtdext.h \
entext.h sref.h version.h
# FIXME I think emptyfil.c and fclndir.c can be deleted?
context_LDADD = libutil.a context_LDADD = libutil.a
fclndir_LDADD = libutil.a fclndir_LDADD = libutil.a

View File

@@ -1,72 +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: basic.h /main/3 1995/11/08 10:27:54 rswiston $ */
/* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
/* Basic.h has a few very primitive #define's used by all MARKUP programs */
#include <stdlib.h>
/* hpux protects stdio.h from multiple includes thru stdlib.h . */
#include <stdio.h>
#include <ctype.h>
#define TRUE 1
#define FALSE 0
typedef unsigned char LOGICAL;
/* End of String marker */
#define M_EOS '\0'
/* Integer null value marker */
#define M_NULLVAL 0
/* 8-bit data characters */
typedef unsigned char M_CHAR8;
/* wide characters */
typedef wchar_t M_WCHAR;
/* For function prototypes */
typedef char * M_POINTER;
char *MakeMByteString(const M_WCHAR *from);
M_WCHAR *MakeWideCharString(const char *from);
int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
int w_strlen(const M_WCHAR *string);
M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
void *m_malloc(int size, char *msg);
void m_free(void *block, char *msg);
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
int mb_getwc(void *m_ptr);

View File

@@ -1,290 +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: chartype.h /main/3 1995/11/08 10:28:12 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* This table defines the subset of the HP Roman8 character set
supported by HP Tag. Characters defined in Roman8 but not supported
by HP Tag are marked "(invalid)". */
M_CHARTYPE m_ctarray[M_CHARSETLEN]
= {
/* Char Name Type, Upper, Lower */
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
/* 2: ^B STX */ {M_NONNAME, 2, 2},
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
/* 8: ^H BS */ {M_NONNAME, 8, 8},
/* 9: ^I HT */ {M_NONNAME, 9, 9},
/* 10: ^J LF */ {M_NONNAME, 10, 10},
/* 11: ^K VT */ {M_NONNAME, 11, 11},
/* 12: ^L FF */ {M_NONNAME, 12, 12},
/* 13: ^M CR */ {M_NONNAME, 13, 13},
/* 14: ^N SO */ {M_NONNAME, 14, 14},
/* 15: ^O SI */ {M_NONNAME, 15, 15},
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
/* 29: ^] GS */ {M_NONNAME, 29, 29},
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
/* 31: ^_ US */ {M_NONNAME, 31, 31},
/* 32: SP */ {M_NONNAME, 32, 32},
/* 33: ! */ {M_NONNAME, 33, 33},
/* 34: " */ {M_NONNAME, 34, 34},
/* 35: # */ {M_NONNAME, 35, 35},
/* 36: $ */ {M_NONNAME, 36, 36},
/* 37: % */ {M_NONNAME, 37, 37},
/* 38: & */ {M_NONNAME, 38, 38},
/* 39: ' */ {M_NONNAME, 39, 39},
/* 40: ( */ {M_NONNAME, 40, 40},
/* 41: ) */ {M_NONNAME, 41, 41},
/* 42: * */ {M_NONNAME, 42, 42},
/* 43: + */ {M_NAMECHAR, 43, 43},
/* 44: , */ {M_NONNAME, 44, 44},
/* 45: - */ {M_NAMECHAR, 45, 45},
/* 46: . */ {M_NAMECHAR, 46, 46},
/* 47: / */ {M_NONNAME, 47, 47},
/* 48: 0 */ {M_DIGIT, 48, 48},
/* 49: 1 */ {M_DIGIT, 49, 49},
/* 50: 2 */ {M_DIGIT, 50, 50},
/* 51: 3 */ {M_DIGIT, 51, 51},
/* 52: 4 */ {M_DIGIT, 52, 52},
/* 53: 5 */ {M_DIGIT, 53, 53},
/* 54: 6 */ {M_DIGIT, 54, 54},
/* 55: 7 */ {M_DIGIT, 55, 55},
/* 56: 8 */ {M_DIGIT, 56, 56},
/* 57: 9 */ {M_DIGIT, 57, 57},
/* 58: : */ {M_NONNAME, 58, 58},
/* 59: ; */ {M_NONNAME, 59, 59},
/* 60: < */ {M_NONNAME, 60, 60},
/* 61: = */ {M_NONNAME, 61, 61},
/* 62: > */ {M_NONNAME, 62, 62},
/* 63: ? */ {M_NONNAME, 63, 63},
/* 64: @ */ {M_NONNAME, 64, 64},
/* 65: A */ {M_NMSTART, 65, 97},
/* 66: B */ {M_NMSTART, 66, 98},
/* 67: C */ {M_NMSTART, 67, 99},
/* 68: D */ {M_NMSTART, 68, 100},
/* 69: E */ {M_NMSTART, 69, 101},
/* 70: F */ {M_NMSTART, 70, 102},
/* 71: G */ {M_NMSTART, 71, 103},
/* 72: H */ {M_NMSTART, 72, 104},
/* 73: I */ {M_NMSTART, 73, 105},
/* 74: J */ {M_NMSTART, 74, 106},
/* 75: K */ {M_NMSTART, 75, 107},
/* 76: L */ {M_NMSTART, 76, 108},
/* 77: M */ {M_NMSTART, 77, 109},
/* 78: N */ {M_NMSTART, 78, 110},
/* 79: O */ {M_NMSTART, 79, 111},
/* 80: P */ {M_NMSTART, 80, 112},
/* 81: Q */ {M_NMSTART, 81, 113},
/* 82: R */ {M_NMSTART, 82, 114},
/* 83: S */ {M_NMSTART, 83, 115},
/* 84: T */ {M_NMSTART, 84, 116},
/* 85: U */ {M_NMSTART, 85, 117},
/* 86: V */ {M_NMSTART, 86, 118},
/* 87: W */ {M_NMSTART, 87, 119},
/* 88: X */ {M_NMSTART, 88, 120},
/* 89: Y */ {M_NMSTART, 89, 121},
/* 90: Z */ {M_NMSTART, 90, 122},
/* 91: [ */ {M_NONNAME, 91, 91},
/* 92: \\ */ {M_NONNAME, 92, 92},
/* 93: ] */ {M_NONNAME, 93, 93},
/* 94: ^ */ {M_NONNAME, 94, 94},
/* 95: _ */ {M_NONNAME, 95, 95},
/* 96: ` */ {M_NONNAME, 96, 96},
/* 97: a */ {M_NMSTART, 65, 97},
/* 98: b */ {M_NMSTART, 66, 98},
/* 99: c */ {M_NMSTART, 67, 99},
/* 100: d */ {M_NMSTART, 68, 100},
/* 101: e */ {M_NMSTART, 69, 101},
/* 102: f */ {M_NMSTART, 70, 102},
/* 103: g */ {M_NMSTART, 71, 103},
/* 104: h */ {M_NMSTART, 72, 104},
/* 105: i */ {M_NMSTART, 73, 105},
/* 106: j */ {M_NMSTART, 74, 106},
/* 107: k */ {M_NMSTART, 75, 107},
/* 108: l */ {M_NMSTART, 76, 108},
/* 109: m */ {M_NMSTART, 77, 109},
/* 110: n */ {M_NMSTART, 78, 110},
/* 111: o */ {M_NMSTART, 79, 111},
/* 112: p */ {M_NMSTART, 80, 112},
/* 113: q */ {M_NMSTART, 81, 113},
/* 114: r */ {M_NMSTART, 82, 114},
/* 115: s */ {M_NMSTART, 83, 115},
/* 116: t */ {M_NMSTART, 84, 116},
/* 117: u */ {M_NMSTART, 85, 117},
/* 118: v */ {M_NMSTART, 86, 118},
/* 119: w */ {M_NMSTART, 87, 119},
/* 120: x */ {M_NMSTART, 88, 120},
/* 121: y */ {M_NMSTART, 89, 121},
/* 122: z */ {M_NMSTART, 90, 122},
/* 123: { */ {M_NONNAME, 123, 123},
/* 124: | */ {M_NONNAME, 124, 124},
/* 125: } */ {M_NONNAME, 125, 125},
/* 126: ~ */ {M_NONNAME, 126, 126},
/* 127: DEL */ {M_NONNAME, 127, 127},
/* 128: undefined */ {M_NONNAME, 128, 128},
/* 129: undefined */ {M_NONNAME, 129, 129},
/* 130: undefined */ {M_NONNAME, 130, 130},
/* 131: undefined */ {M_NONNAME, 131, 131},
/* 132: undefined */ {M_NONNAME, 132, 132},
/* 133: undefined */ {M_NONNAME, 133, 133},
/* 134: undefined */ {M_NONNAME, 134, 134},
/* 135: undefined */ {M_NONNAME, 135, 135},
/* 136: undefined */ {M_NONNAME, 136, 136},
/* 137: undefined */ {M_NONNAME, 137, 137},
/* 138: undefined */ {M_NONNAME, 138, 138},
/* 139: undefined */ {M_NONNAME, 139, 139},
/* 140: undefined */ {M_NONNAME, 140, 140},
/* 141: undefined */ {M_NONNAME, 141, 141},
/* 142: undefined */ {M_NONNAME, 142, 142},
/* 143: undefined */ {M_NONNAME, 143, 143},
/* 144: undefined */ {M_NONNAME, 144, 144},
/* 145: undefined */ {M_NONNAME, 145, 145},
/* 146: undefined */ {M_NONNAME, 146, 146},
/* 147: undefined */ {M_NONNAME, 147, 147},
/* 148: undefined */ {M_NONNAME, 148, 148},
/* 149: undefined */ {M_NONNAME, 149, 149},
/* 150: undefined */ {M_NONNAME, 150, 150},
/* 151: undefined */ {M_NONNAME, 151, 151},
/* 152: undefined */ {M_NONNAME, 152, 152},
/* 153: undefined */ {M_NONNAME, 153, 153},
/* 154: undefined */ {M_NONNAME, 154, 154},
/* 155: undefined */ {M_NONNAME, 155, 155},
/* 156: undefined */ {M_NONNAME, 156, 156},
/* 157: undefined */ {M_NONNAME, 157, 157},
/* 158: undefined */ {M_NONNAME, 158, 158},
/* 159: undefined */ {M_NONNAME, 159, 159},
/* 160: undefined */ {M_NONNAME, 160, 160},
/* 161: A grave */ {M_NMSTART, 161, 200},
/* 162: A circumflex */ {M_NMSTART, 162, 192},
/* 163: E grave */ {M_NMSTART, 163, 201},
/* 164: E circumflex */ {M_NMSTART, 164, 193},
/* 165: E dieresis */ {M_NMSTART, 165, 205},
/* 166: I circumflex */ {M_NMSTART, 166, 209},
/* 167: I dieresis */ {M_NMSTART, 167, 221},
/* 168: acute accent */ {M_NONNAME, 168, 168},
/* 169: grave accent */ {M_NONNAME, 169, 169},
/* 170: circumflex */ {M_NONNAME, 170, 170},
/* 171: dieresis */ {M_NONNAME, 171, 171},
/* 172: tilde */ {M_NONNAME, 172, 172},
/* 173: U grave */ {M_NMSTART, 173, 203},
/* 174: U circumflex */ {M_NMSTART, 174, 195},
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
/* 177: Y acute */ {M_NMSTART, 177, 178},
/* 178: y acute */ {M_NMSTART, 177, 178},
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
/* 180: C cedilla */ {M_NMSTART, 180, 181},
/* 181: c cedilla */ {M_NMSTART, 180, 181},
/* 182: N tilde */ {M_NMSTART, 182, 183},
/* 183: n tilde */ {M_NMSTART, 182, 183},
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
/* 188: Yen */ {M_NONNAME, 188, 188},
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
/* 192: a circumflex */ {M_NMSTART, 162, 192},
/* 193: e circumflex */ {M_NMSTART, 164, 193},
/* 194: o circumflex */ {M_NMSTART, 223, 194},
/* 195: u circumflex */ {M_NMSTART, 174, 195},
/* 196: a acute */ {M_NMSTART, 224, 196},
/* 197: e acute */ {M_NMSTART, 220, 197},
/* 198: o acute */ {M_NMSTART, 231, 198},
/* 199: u acute */ {M_NMSTART, 237, 199},
/* 200: a grave */ {M_NMSTART, 161, 200},
/* 201: e grave */ {M_NMSTART, 163, 201},
/* 202: o grave */ {M_NMSTART, 232, 202},
/* 203: u grave */ {M_NMSTART, 173, 203},
/* 204: a dieresis */ {M_NMSTART, 216, 204},
/* 205: e dieresis */ {M_NMSTART, 165, 205},
/* 206: o dieresis */ {M_NMSTART, 218, 206},
/* 207: u dieresis */ {M_NMSTART, 219, 207},
/* 208: A angstrom */ {M_NMSTART, 208, 212},
/* 209: i circumflex */ {M_NMSTART, 166, 209},
/* 210: O slash */ {M_NMSTART, 210, 214},
/* 211: AE ligature */ {M_NMSTART, 211, 215},
/* 212: a angstrom */ {M_NMSTART, 208, 212},
/* 213: i acute */ {M_NMSTART, 229, 213},
/* 214: o slash */ {M_NMSTART, 210, 214},
/* 215: ae ligature */ {M_NMSTART, 211, 215},
/* 216: A dieresis */ {M_NMSTART, 216, 204},
/* 217: i grave */ {M_NMSTART, 230, 217},
/* 218: O dieresis */ {M_NMSTART, 218, 206},
/* 219: U dieresis */ {M_NMSTART, 219, 207},
/* 220: E acute */ {M_NMSTART, 220, 197},
/* 221: i dieresis */ {M_NMSTART, 167, 221},
/* 222: SS ligature */ {M_NMSTART, 222, 222},
/* 223: O circumflex */ {M_NMSTART, 223, 194},
/* 224: A acute */ {M_NMSTART, 224, 196},
/* 225: A tilde */ {M_NMSTART, 225, 226},
/* 226: a tilde */ {M_NMSTART, 225, 226},
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
/* 229: I acute */ {M_NMSTART, 229, 213},
/* 230: I grave */ {M_NMSTART, 230, 217},
/* 231: O acute */ {M_NMSTART, 231, 198},
/* 232: O grave */ {M_NMSTART, 232, 202},
/* 233: O tilde */ {M_NMSTART, 233, 234},
/* 234: o tilde */ {M_NMSTART, 233, 234},
/* 235: S caron */ {M_NMSTART, 235, 236},
/* 236: s caron */ {M_NMSTART, 235, 236},
/* 237: U acute */ {M_NMSTART, 237, 199},
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
/* 239: y dieresis */ {M_NMSTART, 238, 239},
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
/* 242: undefined */ {M_NONNAME, 242, 242},
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
/* 255: undefined */ {M_NONNAME, 255, 255},
} ;

View File

@@ -1,85 +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: common.h /main/3 1995/11/08 10:28:31 rswiston $ */
/*
Copyright (c) 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Common.h contains definitions common to programs BUILD, ELTDEF, and PARSER.
Its purpose is to insure that limits, such as the maximum length of an SGML
name, are the same for all programs.
*/
#define M_MARKUP
/* White-space characters */
#define M_RE '\n'
#define M_SPACE ' '
#define M_TAB '\t'
/* Maximum length of a default parameter value */
#define M_LITLEN 240
/* Maximum length of an element name */
#define M_NAMELEN 64
/* M_NONNAME, M_NMSTART, M_NAMECHAR, and M_DIGIT are used to indicate
which characters can appear within element names*/
#define M_NONNAME 0
#define M_NMSTART 1
#define M_NAMECHAR 2
#define M_DIGIT 3
/* Number of characters in the character set */
#define M_CHARSETLEN 256
/* Structure for entities */
typedef struct m_entity M_ENTITY ;
struct m_entity {
unsigned char type ;
unsigned char wheredef ;
M_WCHAR *content ;
M_WCHAR *name ;
#if defined(BUILDEXTERN) || defined(ELTEXTERN)
int index ;
M_ENTITY *next ;
#endif
#if ! defined(BUILDEXTERN)
int codeindex ;
#endif
} ;
/* Declarations for character types */
typedef struct {
LOGICAL type ;
/* Must be same type as EOF */
int upper ;
int lower ;
} M_CHARTYPE ;
#define m_ischar(x) ((int) (x) >= 0 && (int) (x) < M_CHARSETLEN)
#define m_cttype(x) (m_ischar(x) ? m_ctarray[x].type : M_NONNAME)
#define m_ctupper(x) (m_ischar(x) ? m_ctarray[x].upper : x)
#define m_ctlower(x) (m_ischar(x) ? m_ctarray[x].lower : x)
#define m_ctdigit(x) (m_ischar(x) ? m_ctarray[x].type == M_DIGIT : FALSE)

View File

@@ -1,147 +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: cont.h /main/3 1995/11/08 10:28:47 rswiston $ */
/*
Copyright 1986 Tandem Computers Incorporated.
This product and information is proprietary of Tandem Computers Incorporated.
Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Cont.h is the primary include file for program CONTEXT. */
#if defined(CONTDEF)
#define CONTEXTERN
#define CONTINIT(a) = a
#else
#define CONTEXTERN extern
#define CONTINIT(a)
#endif
void countdown(M_TRIE *parent, int *count);
void dumpdlmptr(void);
void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
void dumptree(LOGICAL sparse);
void enterdelim(int n);
void m_error(char *text);
void m_err1(char *text, char *arg);
void getcode(int n);
void getcolon(void);
int getContext(void);
LOGICAL getdname(void);
void inccon(void);
void incdelim(void);
void loaddelim(void);
void *m_malloc(int size, char *msg);
void nextcon(LOGICAL sparse);
void m_openchk(FILE **ptr, char *name, char *mode);
void printval(FILE *file, M_TRIE *value);
void prtctxt(int column, int value);
int readchar(LOGICAL cap);
void skiptoend(void);
void unread(int c);
void warning(char *text);
void warning1(char *text, char *arg);
void warning2(char *text, char *arg1, char *arg2);
LOGICAL m_whitespace(M_WCHAR c);
#define NOMORE -1
/* Increase by 10 percent */
#define m_plus10p(x) (x + (x > 10 ? x / 10 : 1))
CONTEXTERN int NUMCON CONTINIT(100) ;
#define CNAMELEN 12
#define DNAMELEN 12
#define DELIMLEN 25
CONTEXTERN int NUMDELIM CONTINIT(100) ;
#define contype ccount <= 255 ? "unsigned char" : "int"
CONTEXTERN LOGICAL m_heapchk CONTINIT(FALSE) ;
CONTEXTERN LOGICAL m_malftrace CONTINIT(FALSE) ;
#define ENDIFSTRING "}\n#endif\n ;\n"
CONTEXTERN char endif[sizeof(ENDIFSTRING)] CONTINIT(ENDIFSTRING) ;
CONTEXTERN LOGICAL casestarted ;
CONTEXTERN LOGICAL errexit CONTINIT(FALSE) ;
CONTEXTERN FILE *delim ;
CONTEXTERN FILE *context ;
CONTEXTERN FILE *fcase, *cdat, *ddat, *m_errfile ;
CONTEXTERN M_TRIE delimtrie ;
CONTEXTERN M_TRIE **contree ;
CONTEXTERN int *xtransit ;
#define transit(i,j) xtransit[i * NUMDELIM + j]
CONTEXTERN M_WCHAR **contexts ;
CONTEXTERN int ccount CONTINIT(0) ;
CONTEXTERN M_WCHAR dname[DNAMELEN + 1] ;
CONTEXTERN M_WCHAR dstring[DELIMLEN + 1] ;
CONTEXTERN int dcount CONTINIT(0) ;
CONTEXTERN struct dstruct {
int count ;
M_WCHAR *string ;
} *dstruct ;
CONTEXTERN LOGICAL withdelim ;
CONTEXTERN LOGICAL loading ;
CONTEXTERN int curdelim ;
CONTEXTERN char **dlmptr ;
CONTEXTERN LOGICAL first CONTINIT(TRUE) ;
CONTEXTERN int maxd CONTINIT(0) ;
CONTEXTERN int m_line CONTINIT(1) ;
CONTEXTERN int nonzero CONTINIT(0) ;

View File

@@ -1,103 +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: dtddef.h /main/3 1995/11/08 10:29:44 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Dtddef.h contains definitions relevant to document-type
definitions */
typedef int M_ELEMENT ;
typedef int M_ARC ;
typedef int M_STATE ;
typedef int M_ANDGROUP ;
/* Possible element content types */
#define M_REGEXP 0
#define M_ANY 1
#define M_NONE 2
#define M_CDATA 3
#define M_RCDATA 4
typedef struct{
int enptr, start, content, inptr, exptr, parptr, parcount, srefptr ;
unsigned int smin : 1, emin : 1, useoradd : 1 ;
} M_ELTSTRUCT ;
typedef struct {
int paramname, type, kwlist, deftype ;
M_WCHAR *defval ;
} M_PARAMETER ;
/* Possible parameter default types */
#define M_NAMEDEF 0
#define M_CURRENT 1
#define M_REQUIRED 2
#define M_NULLDEF 3
#define M_CHANGEDCUR 4
/* Possible parameter types */
#define M_KEYWORD 0
#define M_ID 1
#define M_IDRF 2
#define M_IDRFS 3
#define M_NAMEPAR 4
#define M_NAMES 5
#define M_NMTOKEN 6
#define M_NMSTOKEN 7
#define M_NUMBER 8
#define M_NUMS 9
#define M_NUTOKEN 10
#define M_NUSTOKEN 11
#define M_CDATT 12
#define M_ENTATT 13
typedef struct {
int sref ;
int entity ;
int next ;
} M_SREF ;
typedef struct {
unsigned final : 1, datacontent : 1 ;
unsigned first : 14 ;
} M_STATESTRUCT ;
typedef struct {
M_STATE start ;
M_ANDGROUP next ;
} M_ANDSTRUCT ;
typedef struct {
M_ELEMENT element ;
int next ;
} M_EXCEPTION ;
typedef struct {
unsigned label : 15;
unsigned optional : 1;
int minim ;
M_ANDGROUP group ;
M_STATE to ;
M_ARC next ;
} M_ARCSTRUCT ;

View File

@@ -1,68 +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: dtdext.h /main/3 1995/11/08 10:30:00 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Dtdext.h contains the dtd-independent external forms of
declarations relevant to document-type definitions. The
definition form of these declarations is contained in files
dtd.h and arc.h generated by BUILD. */
#include "dtddef.h"
extern M_PTRIE m_entree[] ;
extern M_WCHAR m_ename[] ;
extern int m_elcount ;
extern M_ELTSTRUCT m_element[] ;
extern M_WCHAR m_keyword[] ;
extern M_WCHAR m_defval[] ;
extern struct {
int keyword, next ;
} m_ptype[] ;
extern M_PARAMETER m_parameter[] ;
extern M_WCHAR m_pname[] ;
extern M_PTRIE m_maptree[] ;
extern M_PTRIE m_sreftree[] ;
extern int m_map[] ;
extern M_SREF m_sref[] ;
extern M_STATESTRUCT m_state[] ;
extern M_ANDSTRUCT m_andgroup[] ;
extern M_EXCEPTION m_exception[] ;
extern M_ARCSTRUCT m_arc[] ;

View File

@@ -1,46 +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: entdef.h /main/3 1995/11/08 10:30:33 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Entdef.h contains definitions relevant to entities */
#define M_GENERAL 0
#define M_SYSTEM 1
#define M_STARTTAG 2
#define M_ENDTAG 3
#define M_MD 4
#define M_MS 5
#ifdef M_PI
#undef M_PI
#endif
#define M_PI 6
#define M_CDATAENT 7
#define M_SDATA 8
#define M_CODEPI 9
#define M_CODESDATA 10
#define M_DBUILD 1
#define M_DELTDEF 2
#define M_DPARSER 3

View File

@@ -1,44 +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: entext.h /main/3 1995/11/08 10:30:52 rswiston $ */
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
/* Entext.h contains the dtd- and interface-independent external
forms of declarations relevant to entity declarations that occur in a
dtd or interface. The definition form of these declarations is
contained in files entity.h generated by BUILD and entity2.h
generated by ELTDEF */
#include "entdef.h"
extern M_WCHAR m_entcon[] ;
extern M_WCHAR m_entname[] ;
extern M_ENTITY m_entities[] ;
extern M_TRIE m_enttrie[] ;
#if defined(ELTEXTERN)
extern int m_entcnt ;
extern M_ENTITY *firstent ;
extern M_ENTITY *lastent ;
#endif

View File

@@ -1,38 +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: sparse.h /main/3 1995/11/08 10:36:16 rswiston $ */
/* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
/* Sparse.h contains definitions which allow selection of the sparse
matrix output option of CONTEXT */
#if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j)
int m_sprscon(int i, int j);
#else
#define m_newcon(i, j) m_nextcon[i][j]
#endif

View File

@@ -1,32 +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: sref.h /main/3 1995/11/08 10:36:37 rswiston $ */
/* Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
/* Sref.h contains declarations for short references relevant to more than
one program */
#define BLANKSEQ 'B'
#define RS 'S'
#define WSSEQ 'W'

View File

@@ -1,60 +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: trie.h /main/3 1995/11/08 10:37:32 rswiston $ */
/*
Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
*/
/* Trie.h contains definitions relating to trees used to store
element names, delimiter strings, short reference strings, etc. */
/* The data structure described here is not a true trie as described
in Knuth, Vol. 3. These functions represent entries by a tree
structure in which there is one level of subnode for each letter
in an entry. In a trie, subnodes are not needed as soon as a
unique prefix has been encountered. */
typedef struct m_trie M_TRIE ;
typedef struct m_ptrie M_PTRIE ;
struct m_trie {
M_WCHAR symbol ;
M_TRIE *next ;
M_TRIE *data ;
} ;
struct m_ptrie {
LOGICAL more ;
M_WCHAR symbol ;
int index ;
} ;
M_TRIE *m_gettrienode(void);
void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);

View File

@@ -1,27 +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: version.h /main/3 1995/11/08 10:40:02 rswiston $ */
/* Copyright (c) 1987, 1988, 1989 Hewlett-Packard Co. */
/* Version.h defines the MARKUP System Version Number */
#define M_VERSION "Version 2.4"

View File

@@ -14,7 +14,7 @@ SDLBUILDSRC = $(HTAG2)/build
SDLUTILLIB = $(HTAG2)/util/libutil.a SDLUTILLIB = $(HTAG2)/util/libutil.a
SDLIFFILE = $(HTAG2SRC)/help.if SDLIFFILE = $(HTAG2SRC)/help.if
build_CFLAGS = -I$(SDLUTILSRC) build_CFLAGS = -DPASS2 -I../../include/util -I../../include/build -I$(SDLUTILSRC)
build_LDADD = ../util/libutil.a build_LDADD = ../util/libutil.a

View File

@@ -1,228 +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:43:37 rswiston $ */
/*
Copyright (c) 1988, 1989 Hewlett-Packard Co.
*/
/* Proto.h contains function prototypes for program BUILD. */
int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
int id, LOGICAL minim, ELTSTRUCT **errelt);
void adddefent(M_WCHAR *mapname);
LOGICAL addent(M_WCHAR *name);
void addex(void);
void addkeyword(void);
LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
void addndent(M_WCHAR *p);
void addpar(void);
void addsref(M_WCHAR *p);
LOGICAL m_allwhite(const M_WCHAR *string);
void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
ELTSTRUCT **errelt);
LOGICAL checkdefault(const M_WCHAR *string);
int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
void copyintolist(STATELIST *from, STATELIST **to);
void countdown(M_TRIE *parent, int *count);
void defmapname(void);
char *deftype(int n);
void dellist(STATELIST **list);
void delstartarcs(void);
void done(void);
void dumpentnode(FILE *file, M_TRIE *value);
void dumpmapnode(FILE *file, M_TRIE *value);
void dumpsrefnode(FILE *file,
M_TRIE *value);
void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)( FILE *, M_TRIE *));
void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
void (*proc)(M_ENTITY *));
void eltblocks(FILE *tempfile);
void eltreeout(void);
void endmodel(void);
void entout(char *fname);
char *enttype(int n);
void m_error(char *text);
void m_err1(const char *text, const M_WCHAR *arg);
void m_mberr1(char *text, const char *arg);
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
void exout(void);
void m_free(void *block, char *msg);
void freetree(TREE *ruletree);
void found(LOGICAL *flag, char *delim);
void fsa(void);
int getachar(void);
ANDGROUP *getand(void);
LOGICAL getname(int first);
STATE *getstate(void);
int gettoken(int *c, int context);
TREE *gettreenode(void);
void initialize(void);
LOGICAL litproc(int delim);
int main(int argc, char **argv);
void makeand(LOGICAL *canbenull, TREE *root, int optional);
LOGICAL makefsa(TREE *root, int optional);
void makeor(LOGICAL *canbenull, TREE *root);
void makeseq(LOGICAL *canbenull, TREE *root, int optional);
void *m_malloc(int size, char *msg);
void msgline(char *text);
void msg1line(char *text, char *arg1);
void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
void normdefault(M_WCHAR *string);
LOGICAL notinlist(STATELIST *item, STATELIST *list);
ELTSTRUCT *ntrelt(M_WCHAR *p);
void m_openchk(FILE **ptr, char *name, char *mode);
void parout(void);
char *partype(int n);
LOGICAL permitspcd(ARC *a);
void pop(void);
void prulend(void);
void push(void);
LOGICAL regenerate(TREE *start, TREE *stop);
void repeat(TREE *root);
void ruleinit(void);
void rulend(void);
LOGICAL samelabelarc(ARC *a, STATE *s);
void savelhs(LOGICAL param);
void savestartarcs(void);
int scan(void);
void setdefault(const M_WCHAR *string);
void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
void skiptoend(void);
int m_sprscon(int i, int j);
void srefout(void);
STATE *startfsa(TREE *root, LOGICAL *canbenull);
void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
void template(void);
char *typecon(int n);
void undodelim(M_WCHAR *delim);
void ungetachar(int c);
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);
void warning(char *text);
void warning1(char *text, M_WCHAR *arg);
void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
LOGICAL m_whitespace(M_WCHAR c);

View File

@@ -16,7 +16,8 @@ SDLIFFILE = $(HTAG2SRC)/sdl.if
eltdef_LDADD = $(SDLUTILLIB) eltdef_LDADD = $(SDLUTILLIB)
eltdef_CFLAGS = -I$(SDLUTILSRC) -I$(SDLBUILDSRC) eltdef_CFLAGS = -DPASS2 -I../util -I../build -I../../include/util \
-I../../include/build -I../../include/eltdef
eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c

View File

@@ -15,9 +15,10 @@ SDLBUILDSRC = $(HTAG2)/build
SDLUTILLIB = $(HTAG2)/util/libutil.a SDLUTILLIB = $(HTAG2)/util/libutil.a
SDLIFFILE = $(HTAG2SRC)/help.if SDLIFFILE = $(HTAG2SRC)/help.if
AM_CPPFLAGS = -I$(SDLPARSERSRC) -I$(SDLUTILSRC) \ AM_CPPFLAGS = -DPASS2 -I../parser -I../util -I../eltdef \
-I$(SDLELTDEFSRC) $(DT_INCDIR) -I../../include/parser -I../../include/util \
-I../../include/eltdef $(DT_INCDIR)
# needed by parser/ # needed by parser/
noinst_LIBRARIES = libhelptag.a noinst_LIBRARIES = libhelptag.a
libhelptag_a_SOURCES = custom.c sdl.c option.c out.c global.c ../parser/delim.h libhelptag_a_SOURCES = custom.c sdl.c option.c out.c global.c

View File

@@ -17,8 +17,8 @@ SDLBUILDSRC = $(HTAG2)/build
SDLUTILLIB = $(HTAG2)/util/libutil.a SDLUTILLIB = $(HTAG2)/util/libutil.a
SDLIFFILE = $(HTAG2SRC)/help.if SDLIFFILE = $(HTAG2SRC)/help.if
AM_CPPFLAGS = -I. -I$(SDLUTILSRC) -I$(HTAG2SRC) -I$(SDLBUILDSRC) \ AM_CPPFLAGS = -DPASS2 -I../util -I../build -I../eltdef -I../../include/util -I$(HTAG2SRC) -I../../include/build \
-I$(SDLELTDEFSRC) -I../../include/eltdef -I../../include/parser
dthelp_htag2_SOURCES = parser.c actutil.c \ dthelp_htag2_SOURCES = parser.c actutil.c \
closent.c code.c cyclent.c dcurelt.c \ closent.c code.c cyclent.c dcurelt.c \

View File

@@ -1,301 +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:57:56 rswiston $ */
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

@@ -4,6 +4,8 @@ MAINTAINERCLEANFILES = Makefile.in
noinst_LIBRARIES = libutil.a noinst_LIBRARIES = libutil.a
AM_CFLAGS = -DPASS2 -I../../include/util
noinst_PROGRAMS = context fclndir noinst_PROGRAMS = context fclndir
context_SOURCES = context.c context_SOURCES = context.c
@@ -13,11 +15,7 @@ fclndir_SOURCES = context.c
libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \ libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \
triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \ triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \
conutil.c error.c exit.c itoa.c malloc.c openchk.c \ conutil.c error.c exit.c itoa.c malloc.c openchk.c \
trie.c triecnt.c whitesp.c basic.h common.h \ trie.c triecnt.c whitesp.c
dtddef.h entdef.h sparse.h trie.h chartype.h cont.h dtdext.h \
entext.h sref.h version.h
# FIXME I think emptyfil.c and fclndir.c can be deleted?
context_LDADD = libutil.a context_LDADD = libutil.a
fclndir_LDADD = libutil.a fclndir_LDADD = libutil.a