Remove SGML tools from -current.
This commit is contained in:
parent
78e4c02479
commit
2ef9b73dba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=27526
@ -1,6 +1,6 @@
|
|||||||
# @(#)Makefile 8.1 (Berkeley) 6/5/93
|
# @(#)Makefile 8.1 (Berkeley) 6/5/93
|
||||||
|
|
||||||
SUBDIR= dict doc examples info man me misc mk sgml skel syscons \
|
SUBDIR= dict doc examples info man me misc mk skel syscons \
|
||||||
tabset termcap timedef zoneinfo
|
tabset termcap timedef zoneinfo
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
-- $Id$ --
|
|
||||||
|
|
||||||
-- ISO general entities --
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN"
|
|
||||||
"ISO/ISOamsa"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN"
|
|
||||||
"ISO/ISOamsb"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN"
|
|
||||||
"ISO/ISOamsc"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN"
|
|
||||||
"ISO/ISOamsn"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN"
|
|
||||||
"ISO/ISOamso"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN"
|
|
||||||
"ISO/ISOamsr"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN"
|
|
||||||
"ISO/ISObox"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN"
|
|
||||||
"ISO/ISOcyr1"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN"
|
|
||||||
"ISO/ISOcyr2"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN"
|
|
||||||
"ISO/ISOdia"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN"
|
|
||||||
"ISO/ISOgrk1"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN"
|
|
||||||
"ISO/ISOgrk2"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN"
|
|
||||||
"ISO/ISOgrk3"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN"
|
|
||||||
"ISO/ISOgrk4"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN"
|
|
||||||
"ISO/ISOlat1"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN"
|
|
||||||
"ISO/ISOlat2"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN"
|
|
||||||
"ISO/ISOnum"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN"
|
|
||||||
"ISO/ISOpub"
|
|
||||||
|
|
||||||
PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN"
|
|
||||||
"ISO/ISOtech"
|
|
||||||
|
|
||||||
-- Linuxdoc, as customized for FreeBSD --
|
|
||||||
|
|
||||||
DOCTYPE "linuxdoc"
|
|
||||||
"FreeBSD/linuxdoc.dcl"
|
|
||||||
|
|
||||||
PUBLIC "-//FreeBSD//DTD linuxdoc//EN"
|
|
||||||
"FreeBSD/linuxdoc.dtd"
|
|
||||||
|
|
||||||
-- Transpec for instant(1) --
|
|
||||||
|
|
||||||
PUBLIC "-//FreeBSD//DTD transpec//EN"
|
|
||||||
"transpec/transpec.dtd"
|
|
||||||
|
|
||||||
-- Docbook --
|
|
||||||
|
|
||||||
PUBLIC "-//Davenport//DTD DocBook V3.0//EN"
|
|
||||||
"docbook/docbook.dtd"
|
|
||||||
|
|
||||||
PUBLIC "-//Davenport//ELEMENTS DocBook Information Pool V3.0//EN"
|
|
||||||
"docbook/dbpool.mod"
|
|
||||||
|
|
||||||
PUBLIC "-//Davenport//ELEMENTS DocBook Document Hierarchy V3.0//EN"
|
|
||||||
"docbook/dbhier.mod"
|
|
||||||
|
|
||||||
PUBLIC "-//Davenport//ENTITIES DocBook Additional General Entities V3.0//EN"
|
|
||||||
"docbook/dbgenent.mod"
|
|
||||||
|
|
||||||
PUBLIC "-//USA-DOD//DTD Table Model 951010//EN"
|
|
||||||
"docbook/cals-tbl.dtd"
|
|
@ -1,12 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
FILES= linuxdoc.dtd linuxdoc.dcl linuxdoc.sty
|
|
||||||
NOOBJ= noobj
|
|
||||||
|
|
||||||
all clean cleandir depend lint tags:
|
|
||||||
|
|
||||||
afterinstall:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
|
||||||
${DESTDIR}${BINDIR}/${.CURDIR:T}
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
|
@ -1,105 +0,0 @@
|
|||||||
<!SGML "ISO 8879:1986"
|
|
||||||
|
|
||||||
CHARSET
|
|
||||||
|
|
||||||
BASESET "ISO 646:1983//CHARSET
|
|
||||||
International Reference Version (IRV)//ESC 2/5 4/0"
|
|
||||||
DESCSET
|
|
||||||
0 9 UNUSED
|
|
||||||
9 2 9
|
|
||||||
11 2 UNUSED
|
|
||||||
13 1 13
|
|
||||||
14 18 UNUSED
|
|
||||||
32 95 32
|
|
||||||
127 1 UNUSED
|
|
||||||
|
|
||||||
BASESET "ISO Registration Number 100//CHARSET
|
|
||||||
ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1"
|
|
||||||
DESCSET
|
|
||||||
128 32 UNUSED
|
|
||||||
160 96 32
|
|
||||||
|
|
||||||
|
|
||||||
CAPACITY SGMLREF
|
|
||||||
|
|
||||||
TOTALCAP 99000000
|
|
||||||
ATTCAP 1000000
|
|
||||||
ATTCHCAP 1000000
|
|
||||||
AVGRPCAP 1000000
|
|
||||||
ELEMCAP 1000000
|
|
||||||
ENTCAP 1000000
|
|
||||||
ENTCHCAP 1000000
|
|
||||||
GRPCAP 1000000
|
|
||||||
IDCAP 32000000
|
|
||||||
IDREFCAP 32000000
|
|
||||||
|
|
||||||
SCOPE DOCUMENT
|
|
||||||
|
|
||||||
SYNTAX
|
|
||||||
|
|
||||||
SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9
|
|
||||||
10 11 12 13 14 15 16 17 18 19
|
|
||||||
20 21 22 23 24 25 26 27 28 29
|
|
||||||
30 31 127 128 129
|
|
||||||
130 131 132 133 134 135 136 137 138 139
|
|
||||||
140 141 142 143 144 145 146 147 148 149
|
|
||||||
150 151 152 153 154 155 156 157 158 159
|
|
||||||
|
|
||||||
BASESET "ISO 646:1983//CHARSET
|
|
||||||
International Reference Version (IRV)//ESC 2/5 4/0"
|
|
||||||
DESCSET
|
|
||||||
0 128 0
|
|
||||||
|
|
||||||
|
|
||||||
FUNCTION
|
|
||||||
RE 13
|
|
||||||
RS 10
|
|
||||||
SPACE 32
|
|
||||||
TAB SEPCHAR 9
|
|
||||||
|
|
||||||
NAMING
|
|
||||||
LCNMSTRT ""
|
|
||||||
UCNMSTRT ""
|
|
||||||
LCNMCHAR ".-"
|
|
||||||
UCNMCHAR ".-"
|
|
||||||
NAMECASE GENERAL YES
|
|
||||||
ENTITY NO
|
|
||||||
|
|
||||||
DELIM GENERAL SGMLREF
|
|
||||||
SHORTREF SGMLREF
|
|
||||||
|
|
||||||
NAMES SGMLREF
|
|
||||||
|
|
||||||
QUANTITY SGMLREF
|
|
||||||
ATTCNT 256
|
|
||||||
GRPCNT 253
|
|
||||||
GRPGTCNT 253
|
|
||||||
LITLEN 8092
|
|
||||||
NAMELEN 44
|
|
||||||
TAGLVL 100
|
|
||||||
|
|
||||||
FEATURES
|
|
||||||
MINIMIZE
|
|
||||||
DATATAG NO
|
|
||||||
OMITTAG YES
|
|
||||||
RANK NO
|
|
||||||
SHORTTAG YES
|
|
||||||
|
|
||||||
LINK
|
|
||||||
SIMPLE NO
|
|
||||||
IMPLICIT NO
|
|
||||||
EXPLICIT NO
|
|
||||||
|
|
||||||
OTHER
|
|
||||||
CONCUR NO
|
|
||||||
SUBDOC NO
|
|
||||||
FORMAL YES
|
|
||||||
|
|
||||||
APPINFO
|
|
||||||
NONE
|
|
||||||
>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Reference Concrete Syntax modifications for the DocBook DTD,
|
|
||||||
Revision: 2.2.1
|
|
||||||
-->
|
|
@ -1,450 +0,0 @@
|
|||||||
<!-- This is LINUXDOC.DTD, a hacked version of QWERTZ.DTD v1.3
|
|
||||||
by Matt Welsh; modified from QWERTZ.DTD by Tom Gordon -->
|
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
|
||||||
<!-- Parameter Entities -->
|
|
||||||
<!-- =========================================================== -->
|
|
||||||
|
|
||||||
<!entity % emph
|
|
||||||
" em|it|bf|sf|sl|tt|cparam " >
|
|
||||||
|
|
||||||
<!entity % index "idx|cdx" >
|
|
||||||
|
|
||||||
<!-- url added by HG; htmlurl added by esr -->
|
|
||||||
<!entity % xref
|
|
||||||
" label|ref|pageref|cite|url|htmlurl|ncite|email " >
|
|
||||||
|
|
||||||
<!entity % inline
|
|
||||||
" (#pcdata | f| x| %emph; |sq| %xref | %index )* " >
|
|
||||||
|
|
||||||
<!entity % list
|
|
||||||
" list | itemize | enum | descrip " >
|
|
||||||
|
|
||||||
<!entity % par
|
|
||||||
" %list; | comment | lq | quote | tscreen " >
|
|
||||||
|
|
||||||
<!entity % mathpar " dm | eq " >
|
|
||||||
|
|
||||||
<!entity % thrm
|
|
||||||
" def | prop | lemma | coroll | proof | theorem " >
|
|
||||||
|
|
||||||
<!entity % litprog " code | verb " >
|
|
||||||
|
|
||||||
<!entity % sectpar
|
|
||||||
" %par; | figure | tabular | table | %mathpar; |
|
|
||||||
%thrm; | %litprog; ">
|
|
||||||
<!element linuxdoc o o
|
|
||||||
(part | chapt | sect | article | report |
|
|
||||||
book | letter | telefax | slides | notes | manpage ) >
|
|
||||||
|
|
||||||
<!ENTITY % ISOlat1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Latin 1//EN">
|
|
||||||
%ISOlat1;
|
|
||||||
<!ENTITY % ISOnum PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
|
|
||||||
%ISOnum;
|
|
||||||
<!ENTITY % ISOdia PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Diacritical Marks//EN">
|
|
||||||
%ISOdia;
|
|
||||||
<!ENTITY % ISOpub PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Publishing//EN">
|
|
||||||
%ISOpub;
|
|
||||||
<!ENTITY % ISOamsa PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN">
|
|
||||||
%ISOamsa;
|
|
||||||
<!ENTITY % ISOamsb PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN">
|
|
||||||
%ISOamsb;
|
|
||||||
<!ENTITY % ISOamsc PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN">
|
|
||||||
%ISOamsc;
|
|
||||||
<!ENTITY % ISOamsn PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN">
|
|
||||||
%ISOamsn;
|
|
||||||
<!ENTITY % ISOamso PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN">
|
|
||||||
%ISOamso;
|
|
||||||
<!ENTITY % ISOamsr PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN">
|
|
||||||
%ISOamsr;
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<!entity Ae 'Ä' >
|
|
||||||
<!entity ae 'ä' >
|
|
||||||
<!entity Oe 'Ö' >
|
|
||||||
<!entity oe 'ö' >
|
|
||||||
<!entity Ue 'Ü' >
|
|
||||||
<!entity ue 'ü' >
|
|
||||||
<!entity sz 'ß' >
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
|
||||||
<!-- Elements -->
|
|
||||||
<!-- =========================================================== -->
|
|
||||||
|
|
||||||
<!element p o o (( %inline | %sectpar )+) +(newline) >
|
|
||||||
<!entity ptag '<p>' >
|
|
||||||
<!entity psplit '</p><p>' >
|
|
||||||
|
|
||||||
<!shortref pmap
|
|
||||||
"&#RS;B" null
|
|
||||||
"&#RS;B&#RE;" psplit
|
|
||||||
"&#RS;&#RE;" psplit>
|
|
||||||
|
|
||||||
<!usemap pmap p>
|
|
||||||
<!element em - - (%inline)>
|
|
||||||
<!element bf - - (%inline)>
|
|
||||||
<!element it - - (%inline)>
|
|
||||||
<!element sf - - (%inline)>
|
|
||||||
<!element sl - - (%inline)>
|
|
||||||
<!element tt - - (%inline)>
|
|
||||||
<!element sq - - (%inline)>
|
|
||||||
<!element cparam - - (%inline)>
|
|
||||||
|
|
||||||
<!entity ftag '<f>' -- formula begin -- >
|
|
||||||
<!entity qendtag '</sq>'>
|
|
||||||
|
|
||||||
<!element lq - - (p*)>
|
|
||||||
<!element quote - - ((%inline; | %sectpar;)*, p*)+ >
|
|
||||||
<!element tscreen - - ((%inline; | %sectpar;)*, p*)+ >
|
|
||||||
<!element itemize - - (item+)>
|
|
||||||
<!element enum - - (item+)>
|
|
||||||
<!element list - - (item+)>
|
|
||||||
|
|
||||||
<!-- What a mess. The following is here to clean up problems with
|
|
||||||
paragraph breaks in a descrip. I can think of cases where this might
|
|
||||||
break, but it seems to work. mdw -->
|
|
||||||
|
|
||||||
<!shortref desmap
|
|
||||||
"&#RS;B" null
|
|
||||||
"&#RS;B&#RE;" ptag
|
|
||||||
"&#RS;&#RE;" ptag>
|
|
||||||
|
|
||||||
<!element descrip - - (tag?, p+)+ >
|
|
||||||
<!usemap desmap descrip>
|
|
||||||
|
|
||||||
<!element item o o ((%inline; | %sectpar;)*, p*) >
|
|
||||||
|
|
||||||
<!element tag - o (%inline)>
|
|
||||||
<!usemap global (list,itemize,enum)>
|
|
||||||
<!entity space " ">
|
|
||||||
<!entity null "">
|
|
||||||
|
|
||||||
<!element figure - - ((eps | ph ), caption?)>
|
|
||||||
<!attlist figure
|
|
||||||
loc cdata "tbp">
|
|
||||||
|
|
||||||
<!element eps - o empty >
|
|
||||||
<!attlist eps
|
|
||||||
file cdata #required>
|
|
||||||
<!element ph - o empty >
|
|
||||||
<!attlist ph
|
|
||||||
vspace cdata #required>
|
|
||||||
|
|
||||||
<!element caption - o (%inline)>
|
|
||||||
|
|
||||||
<!shortref oneline
|
|
||||||
"B&#RE;" space
|
|
||||||
"&#RS;&#RE;" null
|
|
||||||
"&#RS;B&#RE;" null>
|
|
||||||
|
|
||||||
<!usemap oneline tag>
|
|
||||||
<!usemap oneline caption>
|
|
||||||
|
|
||||||
<!entity % tabrow "(%inline, (colsep, %inline)*)" >
|
|
||||||
<!element tabular - -
|
|
||||||
(%tabrow, (rowsep, hline?, %tabrow)*, caption?) >
|
|
||||||
|
|
||||||
<!attlist tabular
|
|
||||||
ca cdata #required>
|
|
||||||
|
|
||||||
<!element rowsep - o empty>
|
|
||||||
<!element colsep - o empty>
|
|
||||||
<!element hline - o empty>
|
|
||||||
|
|
||||||
<!entity rowsep "<rowsep>">
|
|
||||||
<!entity colsep "<colsep>">
|
|
||||||
|
|
||||||
<!shortref tabmap
|
|
||||||
"&#RE;" null
|
|
||||||
"&#RS;&#RE;" null
|
|
||||||
"&#RS;B&#RE;" null
|
|
||||||
"&#RS;B" null
|
|
||||||
"B&#RE;" null
|
|
||||||
"BB" space>
|
|
||||||
|
|
||||||
<!usemap tabmap tabular>
|
|
||||||
<!element table - - (tabular, caption?) >
|
|
||||||
<!attlist table
|
|
||||||
loc cdata "tbp">
|
|
||||||
|
|
||||||
<!element code - - rcdata>
|
|
||||||
<!element verb - - rcdata>
|
|
||||||
|
|
||||||
<!shortref ttmap -- also on one-line --
|
|
||||||
"B&#RE;" space
|
|
||||||
"&#RS;&#RE;" null
|
|
||||||
"&#RS;B&#RE;" null
|
|
||||||
"&#RS;B" null>
|
|
||||||
|
|
||||||
<!usemap ttmap tt>
|
|
||||||
<!element mc - - cdata >
|
|
||||||
<!entity % sppos "tu" >
|
|
||||||
<!entity % fcs "%sppos;|phr" >
|
|
||||||
<!entity % fcstxt "#pcdata|mc|%fcs;" >
|
|
||||||
<!entity % fscs "rf|v|fi" >
|
|
||||||
<!entity % limits "pr|in|sum" >
|
|
||||||
<!entity % fbu "fr|lim|ar|root" >
|
|
||||||
<!entity % fph "unl|ovl|sup|inf" >
|
|
||||||
<!entity % fbutxt "(%fbu;) | (%limits;) |
|
|
||||||
(%fcstxt;)|(%fscs;)|(%fph;)" >
|
|
||||||
<!entity % fphtxt "p|#pcdata" >
|
|
||||||
<!element f - - ((%fbutxt;)*) >
|
|
||||||
|
|
||||||
<!entity fendtag '</f>' -- formula end -- >
|
|
||||||
|
|
||||||
<!shortref fmap
|
|
||||||
"&#RS;B" null
|
|
||||||
"&#RS;B&#RE;" null
|
|
||||||
"&#RS;&#RE;" null>
|
|
||||||
|
|
||||||
<!usemap fmap f >
|
|
||||||
|
|
||||||
<!element dm - - ((%fbutxt;)*)>
|
|
||||||
<!element eq - - ((%fbutxt;)*)>
|
|
||||||
|
|
||||||
<!shortref dmmap
|
|
||||||
"&#RE;" space>
|
|
||||||
|
|
||||||
<!usemap dmmap (dm,eq)>
|
|
||||||
<!element fr - - (nu,de) >
|
|
||||||
<!element nu o o ((%fbutxt;)*) >
|
|
||||||
<!element de o o ((%fbutxt;)*) >
|
|
||||||
<!element ll o o ((%fbutxt;)*) >
|
|
||||||
<!element ul o o ((%fbutxt;)*) >
|
|
||||||
<!element opd - o ((%fbutxt;)*) >
|
|
||||||
<!element pr - - (ll,ul,opd?) >
|
|
||||||
<!element in - - (ll,ul,opd?) >
|
|
||||||
<!element sum - - (ll,ul,opd?) >
|
|
||||||
<!element lim - - (op,ll,ul,opd?) >
|
|
||||||
<!element op o o (%fcstxt;|rf|%fph;) -(tu) >
|
|
||||||
<!element root - - ((%fbutxt;)*) >
|
|
||||||
<!attlist root
|
|
||||||
n cdata "">
|
|
||||||
<!element col o o ((%fbutxt;)*) >
|
|
||||||
<!element row o o (col, (arc, col)*) >
|
|
||||||
|
|
||||||
<!element ar - - (row, (arr, row)*) >
|
|
||||||
<!attlist ar
|
|
||||||
ca cdata #required >
|
|
||||||
<!element arr - o empty >
|
|
||||||
<!element arc - o empty >
|
|
||||||
<!entity arr "<arr>" >
|
|
||||||
<!entity arc "<arc>" >
|
|
||||||
|
|
||||||
<!shortref arrmap
|
|
||||||
"&#RE;" space>
|
|
||||||
|
|
||||||
<!usemap arrmap ar >
|
|
||||||
<!element sup - - ((%fbutxt;)*) -(tu) >
|
|
||||||
<!element inf - - ((%fbutxt;)*) -(tu) >
|
|
||||||
<!element unl - - ((%fbutxt;)*) >
|
|
||||||
<!element ovl - - ((%fbutxt;)*) >
|
|
||||||
<!element rf - o (#pcdata) >
|
|
||||||
<!element phr - o ((%fphtxt;)*) >
|
|
||||||
<!element v - o ((%fcstxt;)*)
|
|
||||||
-(tu|%limits;|%fbu;|%fph;) >
|
|
||||||
<!element fi - o (#pcdata) >
|
|
||||||
<!element tu - o empty >
|
|
||||||
|
|
||||||
<!usemap global (rf,phr)>
|
|
||||||
<!element def - - (thtag?, p+) >
|
|
||||||
<!element prop - - (thtag?, p+) >
|
|
||||||
<!element lemma - - (thtag?, p+) >
|
|
||||||
<!element coroll - - (thtag?, p+) >
|
|
||||||
<!element proof - - (p+) >
|
|
||||||
<!element theorem - - (thtag?, p+) >
|
|
||||||
<!element thtag - - (%inline)>
|
|
||||||
|
|
||||||
<!usemap global (def,prop,lemma,coroll,proof,theorem)>
|
|
||||||
<!usemap oneline thtag>
|
|
||||||
<!entity qtag '<sq>' >
|
|
||||||
|
|
||||||
<!shortref global
|
|
||||||
"&#RS;B" null -- delete leading blanks -- >
|
|
||||||
|
|
||||||
<!usemap global linuxdoc>
|
|
||||||
<!element label - o empty>
|
|
||||||
<!attlist label id cdata #required>
|
|
||||||
|
|
||||||
<!-- ref modified to have an optional name field HG -->
|
|
||||||
<!element ref - o empty>
|
|
||||||
<!attlist ref
|
|
||||||
id cdata #required
|
|
||||||
name cdata #implied>
|
|
||||||
|
|
||||||
<!-- url entity added to have direct url references HG -->
|
|
||||||
<!element url - o empty>
|
|
||||||
<!attlist url
|
|
||||||
url cdata #required
|
|
||||||
name cdata #implied>
|
|
||||||
|
|
||||||
<!-- htmlurl entity added to have quieter url references esr -->
|
|
||||||
<!element htmlurl - o empty>
|
|
||||||
<!attlist htmlurl
|
|
||||||
url cdata #required
|
|
||||||
name cdata #implied>
|
|
||||||
|
|
||||||
<!element pageref - o empty>
|
|
||||||
<!attlist pageref
|
|
||||||
id cdata #required>
|
|
||||||
<!element comment - - (%inline)>
|
|
||||||
<!element x - - ((#pcdata | mc)*) >
|
|
||||||
<!usemap #empty x >
|
|
||||||
|
|
||||||
<!-- Hacked by mdw to exclude abstract; abstract now part of titlepag -->
|
|
||||||
<!element article - -
|
|
||||||
(titlepag, header?,
|
|
||||||
toc?, lof?, lot?, p*, (part | sect)*,
|
|
||||||
(appendix, sect+)?, biblio?) +(footnote)>
|
|
||||||
|
|
||||||
<!attlist article
|
|
||||||
opts cdata #IMPLIED>
|
|
||||||
|
|
||||||
<!-- Hacked by mdw to exclude abstract; abstract now part of titlepag -->
|
|
||||||
<!element report - -
|
|
||||||
(titlepag, header?, toc?, lof?, lot?, p*,
|
|
||||||
(part | chapt)*, (appendix, chapt+)?, biblio?) +(footnote)>
|
|
||||||
|
|
||||||
<!attlist report
|
|
||||||
opts cdata #IMPLIED>
|
|
||||||
<!element book - -
|
|
||||||
(titlepag, header?, toc?, lof?, lot?, p*, (part | chapt)*,
|
|
||||||
(appendix, chapt+)?, biblio?) +(footnote) >
|
|
||||||
|
|
||||||
<!attlist book
|
|
||||||
opts cdata #IMPLIED>
|
|
||||||
|
|
||||||
<!-- Hacked by mdw, abstract now part of titlepag -->
|
|
||||||
<!element titlepag o o (title, author, date?, abstract?)>
|
|
||||||
<!element title - o (%inline, subtitle?) +(newline)>
|
|
||||||
<!element subtitle - o (%inline)>
|
|
||||||
<!usemap oneline titlepag>
|
|
||||||
<!element author - o (name, thanks?, inst?,
|
|
||||||
(and, name, thanks?, inst?)*)>
|
|
||||||
<!element name o o (%inline) +(newline)>
|
|
||||||
<!element and - o empty>
|
|
||||||
<!element thanks - o (%inline)>
|
|
||||||
<!element inst - o (%inline) +(newline)>
|
|
||||||
<!element date - o (#pcdata) >
|
|
||||||
|
|
||||||
<!usemap global thanks>
|
|
||||||
|
|
||||||
<!element newline - o empty >
|
|
||||||
<!entity nl "<newline>">
|
|
||||||
|
|
||||||
<!-- Hacked by mdw -->
|
|
||||||
<!element abstract - o (%inline)>
|
|
||||||
<!usemap oneline abstract>
|
|
||||||
|
|
||||||
|
|
||||||
<!element toc - o empty>
|
|
||||||
<!element lof - o empty>
|
|
||||||
<!element lot - o empty>
|
|
||||||
<!element header - - (lhead, rhead) >
|
|
||||||
<!element lhead - o (%inline)>
|
|
||||||
<!element rhead - o (%inline)>
|
|
||||||
<!entity % sect "heading, header?, p* " >
|
|
||||||
<!element heading o o (%inline)>
|
|
||||||
<!element part - o (%sect, (chapt* | sect*))>
|
|
||||||
<!element chapt - o (%sect, sect*) +(footnote)>
|
|
||||||
<!element sect - o (%sect, sect1*) +(footnote)>
|
|
||||||
<!element sect1 - o (%sect, sect2*)>
|
|
||||||
<!element sect2 - o (%sect, sect3*)>
|
|
||||||
<!element sect3 - o (%sect, sect4*)>
|
|
||||||
<!element sect4 - o (%sect)>
|
|
||||||
<!usemap oneline (part,chapt,sect,sect1,sect2,sect3,sect4)>
|
|
||||||
<!element appendix - o empty >
|
|
||||||
<!element footnote - - (%inline)>
|
|
||||||
<!usemap global footnote>
|
|
||||||
<!element cite - o empty>
|
|
||||||
<!attlist cite
|
|
||||||
id cdata #required>
|
|
||||||
|
|
||||||
<!element ncite - o empty>
|
|
||||||
<!attlist ncite
|
|
||||||
id cdata #required
|
|
||||||
note cdata #required>
|
|
||||||
|
|
||||||
|
|
||||||
<!element idx - - (#pcdata)>
|
|
||||||
<!element cdx - - (#pcdata)>
|
|
||||||
|
|
||||||
<!element biblio - o empty>
|
|
||||||
<!attlist biblio
|
|
||||||
style cdata "linuxdoc"
|
|
||||||
files cdata "">
|
|
||||||
<!element slides - - (slide*) >
|
|
||||||
|
|
||||||
<!attlist slides
|
|
||||||
opts cdata "null">
|
|
||||||
<!element slide - o (title?, p+) >
|
|
||||||
<!entity % addr "(address?, email?, phone?, fax?)" >
|
|
||||||
|
|
||||||
<!element letter - -
|
|
||||||
(from, %addr, to, %addr, cc?, subject?, sref?, rref?,
|
|
||||||
rdate?, opening, p+, closing, encl?, ps?)>
|
|
||||||
|
|
||||||
<!attlist letter
|
|
||||||
opts cdata "null">
|
|
||||||
|
|
||||||
<!element from - o (#pcdata) >
|
|
||||||
<!element to - o (#pcdata) >
|
|
||||||
|
|
||||||
<!usemap oneline (from,to)>
|
|
||||||
|
|
||||||
<!element address - o (#pcdata) +(newline) >
|
|
||||||
<!element email - o (#pcdata) >
|
|
||||||
<!element phone - o (#pcdata) >
|
|
||||||
<!element fax - o (#pcdata) >
|
|
||||||
|
|
||||||
<!element subject - o (%inline;) >
|
|
||||||
<!element sref - o (#pcdata) >
|
|
||||||
<!element rref - o (#pcdata) >
|
|
||||||
<!element rdate - o (#pcdata) >
|
|
||||||
|
|
||||||
<!element opening - o (%inline;) >
|
|
||||||
<!usemap oneline opening>
|
|
||||||
|
|
||||||
<!element closing - o (%inline;) >
|
|
||||||
<!element cc - o (%inline;) +(newline) >
|
|
||||||
<!element encl - o (%inline;) +(newline) >
|
|
||||||
|
|
||||||
<!element ps - o (p+) >
|
|
||||||
|
|
||||||
<!element telefax - -
|
|
||||||
(from, %addr, to, address, email?,
|
|
||||||
phone?, fax, cc?, subject?,
|
|
||||||
opening, p+, closing, ps?)>
|
|
||||||
|
|
||||||
<!attlist telefax
|
|
||||||
opts cdata "null"
|
|
||||||
length cdata "2">
|
|
||||||
|
|
||||||
<!element notes - - (title?, p+) >
|
|
||||||
<!attlist notes
|
|
||||||
opts cdata "null" >
|
|
||||||
<!element manpage - - (sect1*)
|
|
||||||
-(sect2 | f | %mathpar | figure | tabular |
|
|
||||||
table | %xref | %thrm )>
|
|
||||||
|
|
||||||
|
|
||||||
<!attlist manpage
|
|
||||||
opts cdata "null"
|
|
||||||
title cdata ""
|
|
||||||
sectnum cdata "1" >
|
|
||||||
<!shortref manpage
|
|
||||||
"&#RS;B" null>
|
|
||||||
|
|
||||||
<!usemap manpage manpage >
|
|
||||||
<!-- end of linuxdoc dtd -->
|
|
@ -1,129 +0,0 @@
|
|||||||
%% This is linuxdoc-qwertz.sty, for use with SGML-generated LaTeX
|
|
||||||
%% by Matt Welsh (mdw@sunsite.unc.edu)
|
|
||||||
%%
|
|
||||||
%% Based on linuxdoc.sty by Michael K. Johnson, and latex.tex by
|
|
||||||
%% Leslie Lamport.
|
|
||||||
%%
|
|
||||||
%% Modified by John Fieber <jfieber@freebsd.org> for the FreeBSD
|
|
||||||
%% Documentation Project.
|
|
||||||
|
|
||||||
\typeout{Linux Documentation Style `linuxdoc, version 0.02 <6 May 1995>}
|
|
||||||
|
|
||||||
% qwertz TeX macros
|
|
||||||
|
|
||||||
\catcode`\"=12
|
|
||||||
\sloppy
|
|
||||||
\newtheorem{definition}{Definition}
|
|
||||||
\newtheorem{proposition}{Proposition}
|
|
||||||
\newtheorem{lemma}{Lemma}
|
|
||||||
\newtheorem{corollary}{Corollary}
|
|
||||||
\newtheorem{theorem}{Theorem}
|
|
||||||
\newcommand{\mch}[1]{{\ifmmode#1 \else\(#1\)\fi}}
|
|
||||||
\newcommand{\lt}{{\ifmmode{<}\else{\verb+<+}\fi}}
|
|
||||||
\newcommand{\gt}{{\ifmmode{>}\else{\verb+>+}\fi}}
|
|
||||||
\newcommand{\verbar}{{\ifmmode{|}\else{\tt|}\fi}}
|
|
||||||
\newcommand{\idx}[1]{#1\index{#1}}
|
|
||||||
\newcommand{\cdx}[1]{#1\index{#1@{\tt #1}}}
|
|
||||||
|
|
||||||
%%% GLOBAL LAYOUT THINGS
|
|
||||||
|
|
||||||
\marginparwidth 0.0 in
|
|
||||||
\parindent 0.0 in
|
|
||||||
\topmargin -0.5 in
|
|
||||||
\textheight 8.5 in
|
|
||||||
\advance\headsep 2 ex
|
|
||||||
\advance\textheight -2 ex
|
|
||||||
\renewcommand{\baselinestretch}{1.14}
|
|
||||||
\addtolength{\parskip}{1.2 ex}
|
|
||||||
|
|
||||||
%%% ONE-SIDED/TWO-SIDED DEPENDENCIES
|
|
||||||
|
|
||||||
\if@twoside % ``book'' style was chosen
|
|
||||||
\oddsidemargin 0.0 in
|
|
||||||
\evensidemargin 0 in
|
|
||||||
\textwidth 6 in
|
|
||||||
\def\ps@headings{\let\@mkboth\markboth
|
|
||||||
\def\@oddfoot{}\def\@evenfoot{}% No feet.
|
|
||||||
\def\@evenhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
|
|
||||||
\rm \thepage\hfil \bf \leftmark} % Left heading.
|
|
||||||
\def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
|
|
||||||
{\bf \rightmark}\hfil \rm\thepage} % Right heading.
|
|
||||||
\def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\@chapapp\ \thechapter. \ \fi ##1}}{}}%
|
|
||||||
\def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
|
|
||||||
\thesection. \ \fi ##1}}}}
|
|
||||||
|
|
||||||
\else % if not book style, then
|
|
||||||
\oddsidemargin 0.0 in
|
|
||||||
\evensidemargin\oddsidemargin
|
|
||||||
\textwidth 6.5 in
|
|
||||||
\def\ps@headings{\let\@mkboth\markboth
|
|
||||||
\def\@oddfoot{}\def\@evenfoot{}% No feet.
|
|
||||||
\def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
|
|
||||||
{\bf \rightmark}\hfil \rm\thepage} % Right heading.
|
|
||||||
\def\@evenhead\@oddhead
|
|
||||||
\def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\@chapapp\ \thechapter. \ \fi ##1}}{}}%
|
|
||||||
\def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
|
|
||||||
\thesection. \ \fi ##1}}}}
|
|
||||||
|
|
||||||
\fi
|
|
||||||
|
|
||||||
%% Titlepage stuff
|
|
||||||
|
|
||||||
\gdef\@title{}
|
|
||||||
\gdef\title#1{\gdef\@title{#1}}
|
|
||||||
\gdef\@date{}
|
|
||||||
\gdef\date#1{\gdef\@date{#1}}
|
|
||||||
\gdef\@author{}
|
|
||||||
\gdef\author#1{\gdef\@author{#1}}
|
|
||||||
\gdef\@abstract{}
|
|
||||||
\gdef\abstract#1{\gdef\@abstract{#1}}
|
|
||||||
|
|
||||||
\def\maketitle{\thispagestyle{empty}\let\footnotesize\small%
|
|
||||||
\let\footnoterule\relax
|
|
||||||
%\setcounter{page}{0}%
|
|
||||||
%\null
|
|
||||||
%\vskip 3 in
|
|
||||||
\noindent
|
|
||||||
{\huge\sf \@title}\\
|
|
||||||
\rule{\textwidth}{1mm}\\
|
|
||||||
\mbox{} \@author\ \hfill \@date\ \\
|
|
||||||
\vskip 1 ex
|
|
||||||
\noindent{\sf \@abstract}
|
|
||||||
\setcounter{footnote}{0}%
|
|
||||||
\gdef\@author{}\gdef\@title{}\gdef\@years{}\gdef\@abstract{}
|
|
||||||
\let\maketitle\relax}
|
|
||||||
|
|
||||||
%% Needs to be here for the previous ps@headings defs to work.
|
|
||||||
\pagestyle{headings}
|
|
||||||
|
|
||||||
%%% USEFUL MACROS
|
|
||||||
|
|
||||||
\newcommand{\linux}{Linux} % Always use this when
|
|
||||||
% refering to the \linux\
|
|
||||||
% operating system, like that.
|
|
||||||
\newcommand{\key}[1]{{\fbox{\small\tt #1}}} % Use this to mark keys, like
|
|
||||||
% \key{del} for the delete key.
|
|
||||||
\newcommand{\ret}{\fbox{\sf return}} % Special case for the return key.
|
|
||||||
\newcommand{\st}{\small\tt} % Small typewriter -- comes in handy.
|
|
||||||
%\newcommand{\lb}{{\tt\char '173}} % Left Brace '{'
|
|
||||||
%\newcommand{\rb}{{\tt\char '175}} % Right Brace '}'
|
|
||||||
\newcommand{\lbr}{$\langle$} % Left Bracket '<'
|
|
||||||
\newcommand{\rbr}{$\rangle$} % Right Bracket '>'
|
|
||||||
\newcommand{\bs}{{\tt\char '134}} % BackSlash '\'
|
|
||||||
\newcommand{\tm}{${}^{\mbox{\tiny\sf TM}}$}
|
|
||||||
\newcommand{\TM}{\tm} % TM trademark symbol in
|
|
||||||
% either case
|
|
||||||
\newcommand{\cparam}[1]{{\rm \lbr{\sl #1}\rbr}}
|
|
||||||
% Metavariables.
|
|
||||||
|
|
||||||
%% define URL macro to handle the optional name argument
|
|
||||||
\def\url#1#2{{\em #2} {\tt (#1)}}
|
|
||||||
|
|
||||||
%% the tscreen environment automatically goes into typewriter type,
|
|
||||||
%% but is otherwise like the screen environment
|
|
||||||
|
|
||||||
\newenvironment{tscreen}%
|
|
||||||
{\begin{quote}\bgroup\small\tt}%
|
|
||||||
{\egroup\end{quote}}
|
|
@ -1,66 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOamsa PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN">
|
|
||||||
%ISOamsa;
|
|
||||||
-->
|
|
||||||
<!ENTITY cularr SDATA "[cularr]"--/curvearrowleft A: left curved arrow -->
|
|
||||||
<!ENTITY curarr SDATA "[curarr]"--/curvearrowright A: rt curved arrow -->
|
|
||||||
<!ENTITY dArr SDATA "[dArr ]"--/Downarrow A: down dbl arrow -->
|
|
||||||
<!ENTITY darr2 SDATA "[darr2 ]"--/downdownarrows A: two down arrows -->
|
|
||||||
<!ENTITY dharl SDATA "[dharl ]"--/downleftharpoon A: dn harpoon-left -->
|
|
||||||
<!ENTITY dharr SDATA "[dharr ]"--/downrightharpoon A: down harpoon-rt -->
|
|
||||||
<!ENTITY lAarr SDATA "[lAarr ]"--/Lleftarrow A: left triple arrow -->
|
|
||||||
<!ENTITY Larr SDATA "[Larr ]"--/twoheadleftarrow A:-->
|
|
||||||
<!ENTITY larr2 SDATA "[larr2 ]"--/leftleftarrows A: two left arrows -->
|
|
||||||
<!ENTITY larrhk SDATA "[larrhk]"--/hookleftarrow A: left arrow-hooked -->
|
|
||||||
<!ENTITY larrlp SDATA "[larrlp]"--/looparrowleft A: left arrow-looped -->
|
|
||||||
<!ENTITY larrtl SDATA "[larrtl]"--/leftarrowtail A: left arrow-tailed -->
|
|
||||||
<!ENTITY lhard SDATA "[lhard ]"--/leftharpoondown A: l harpoon-down -->
|
|
||||||
<!ENTITY lharu SDATA "[lharu ]"--/leftharpoonup A: left harpoon-up -->
|
|
||||||
<!ENTITY hArr SDATA "[hArr ]"--/Leftrightarrow A: l&r dbl arrow -->
|
|
||||||
<!ENTITY harr SDATA "[harr ]"--/leftrightarrow A: l&r arrow -->
|
|
||||||
<!ENTITY lrarr2 SDATA "[lrarr2]"--/leftrightarrows A: l arr over r arr -->
|
|
||||||
<!ENTITY rlarr2 SDATA "[rlarr2]"--/rightleftarrows A: r arr over l arr -->
|
|
||||||
<!ENTITY harrw SDATA "[harrw ]"--/leftrightsquigarrow A: l&r arr-wavy -->
|
|
||||||
<!ENTITY rlhar2 SDATA "[rlhar2]"--/rightleftharpoons A: r harp over l -->
|
|
||||||
<!ENTITY lrhar2 SDATA "[lrhar2]"--/leftrightharpoons A: l harp over r -->
|
|
||||||
<!ENTITY lsh SDATA "[lsh ]"--/Lsh A:-->
|
|
||||||
<!ENTITY map SDATA "[map ]"--/mapsto A:-->
|
|
||||||
<!ENTITY mumap SDATA "[mumap ]"--/multimap A:-->
|
|
||||||
<!ENTITY nearr SDATA "[nearr ]"--/nearrow A: NE pointing arrow -->
|
|
||||||
<!ENTITY nlArr SDATA "[nlArr ]"--/nLeftarrow A: not implied by -->
|
|
||||||
<!ENTITY nlarr SDATA "[nlarr ]"--/nleftarrow A: not left arrow -->
|
|
||||||
<!ENTITY nhArr SDATA "[nhArr ]"--/nLeftrightarrow A: not l&r dbl arr -->
|
|
||||||
<!ENTITY nharr SDATA "[nharr ]"--/nleftrightarrow A: not l&r arrow -->
|
|
||||||
<!ENTITY nrarr SDATA "[nrarr ]"--/nrightarrow A: not right arrow -->
|
|
||||||
<!ENTITY nrArr SDATA "[nrArr ]"--/nRightarrow A: not implies -->
|
|
||||||
<!ENTITY nwarr SDATA "[nwarr ]"--/nwarrow A: NW pointing arrow -->
|
|
||||||
<!ENTITY olarr SDATA "[olarr ]"--/circlearrowleft A: l arr in circle -->
|
|
||||||
<!ENTITY orarr SDATA "[orarr ]"--/circlearrowright A: r arr in circle -->
|
|
||||||
<!ENTITY rAarr SDATA "[rAarr ]"--/Rrightarrow A: right triple arrow -->
|
|
||||||
<!ENTITY Rarr SDATA "[Rarr ]"--/twoheadrightarrow A:-->
|
|
||||||
<!ENTITY rarr2 SDATA "[rarr2 ]"--/rightrightarrows A: two rt arrows -->
|
|
||||||
<!ENTITY rarrhk SDATA "[rarrhk]"--/hookrightarrow A: rt arrow-hooked -->
|
|
||||||
<!ENTITY rarrlp SDATA "[rarrlp]"--/looparrowright A: rt arrow-looped -->
|
|
||||||
<!ENTITY rarrtl SDATA "[rarrtl]"--/rightarrowtail A: rt arrow-tailed -->
|
|
||||||
<!ENTITY rarrw SDATA "[rarrw ]"--/squigarrowright A: rt arrow-wavy -->
|
|
||||||
<!ENTITY rhard SDATA "[rhard ]"--/rightharpoondown A: rt harpoon-down -->
|
|
||||||
<!ENTITY rharu SDATA "[rharu ]"--/rightharpoonup A: rt harpoon-up -->
|
|
||||||
<!ENTITY rsh SDATA "[rsh ]"--/Rsh A:-->
|
|
||||||
<!ENTITY drarr SDATA "[drarr ]"--/searrow A: downward rt arrow -->
|
|
||||||
<!ENTITY dlarr SDATA "[dlarr ]"--/swarrow A: downward l arrow -->
|
|
||||||
<!ENTITY uArr SDATA "[uArr ]"--/Uparrow A: up dbl arrow -->
|
|
||||||
<!ENTITY uarr2 SDATA "[uarr2 ]"--/upuparrows A: two up arrows -->
|
|
||||||
<!ENTITY vArr SDATA "[vArr ]"--/Updownarrow A: up&down dbl arrow -->
|
|
||||||
<!ENTITY varr SDATA "[varr ]"--/updownarrow A: up&down arrow -->
|
|
||||||
<!ENTITY uharl SDATA "[uharl ]"--/upleftharpoon A: up harpoon-left -->
|
|
||||||
<!ENTITY uharr SDATA "[uharr ]"--/uprightharpoon A: up harp-r-->
|
|
||||||
<!ENTITY xlArr SDATA "[xlArr ]"--/Longleftarrow A: long l dbl arrow -->
|
|
||||||
<!ENTITY xhArr SDATA "[xhArr ]"--/Longleftrightarrow A: long l&r dbl arr-->
|
|
||||||
<!ENTITY xharr SDATA "[xharr ]"--/longleftrightarrow A: long l&r arr -->
|
|
||||||
<!ENTITY xrArr SDATA "[xrArr ]"--/Longrightarrow A: long rt dbl arr -->
|
|
@ -1,52 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOamsb PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN">
|
|
||||||
%ISOamsb;
|
|
||||||
-->
|
|
||||||
<!ENTITY amalg SDATA "[amalg ]"--/amalg B: amalgamation or coproduct-->
|
|
||||||
<!ENTITY Barwed SDATA "[Barwed]"--/doublebarwedge B: log and, dbl bar-->
|
|
||||||
<!ENTITY barwed SDATA "[barwed]"--/barwedge B: logical and, bar above-->
|
|
||||||
<!ENTITY Cap SDATA "[Cap ]"--/Cap /doublecap B: dbl intersection-->
|
|
||||||
<!ENTITY Cup SDATA "[Cup ]"--/Cup /doublecup B: dbl union-->
|
|
||||||
<!ENTITY cuvee SDATA "[cuvee ]"--/curlyvee B: curly logical or-->
|
|
||||||
<!ENTITY cuwed SDATA "[cuwed ]"--/curlywedge B: curly logical and-->
|
|
||||||
<!ENTITY diam SDATA "[diam ]"--/diamond B: open diamond-->
|
|
||||||
<!ENTITY divonx SDATA "[divonx]"--/divideontimes B: division on times-->
|
|
||||||
<!ENTITY intcal SDATA "[intcal]"--/intercal B: intercal-->
|
|
||||||
<!ENTITY lthree SDATA "[lthree]"--/leftthreetimes B:-->
|
|
||||||
<!ENTITY ltimes SDATA "[ltimes]"--/ltimes B: times sign, left closed-->
|
|
||||||
<!ENTITY minusb SDATA "[minusb]"--/boxminus B: minus sign in box-->
|
|
||||||
<!ENTITY oast SDATA "[oast ]"--/circledast B: asterisk in circle-->
|
|
||||||
<!ENTITY ocir SDATA "[ocir ]"--/circledcirc B: open dot in circle-->
|
|
||||||
<!ENTITY odash SDATA "[odash ]"--/circleddash B: hyphen in circle-->
|
|
||||||
<!ENTITY odot SDATA "[odot ]"--/odot B: middle dot in circle-->
|
|
||||||
<!ENTITY ominus SDATA "[ominus]"--/ominus B: minus sign in circle-->
|
|
||||||
<!ENTITY oplus SDATA "[oplus ]"--/oplus B: plus sign in circle-->
|
|
||||||
<!ENTITY osol SDATA "[osol ]"--/oslash B: solidus in circle-->
|
|
||||||
<!ENTITY otimes SDATA "[otimes]"--/otimes B: multiply sign in circle-->
|
|
||||||
<!ENTITY plusb SDATA "[plusb ]"--/boxplus B: plus sign in box-->
|
|
||||||
<!ENTITY plusdo SDATA "[plusdo]"--/dotplus B: plus sign, dot above-->
|
|
||||||
<!ENTITY rthree SDATA "[rthree]"--/rightthreetimes B:-->
|
|
||||||
<!ENTITY rtimes SDATA "[rtimes]"--/rtimes B: times sign, right closed-->
|
|
||||||
<!ENTITY sdot SDATA "[sdot ]"--/cdot B: small middle dot-->
|
|
||||||
<!ENTITY sdotb SDATA "[sdotb ]"--/dotsquare /boxdot B: small dot in box-->
|
|
||||||
<!ENTITY setmn SDATA "[setmn ]"--/setminus B: reverse solidus-->
|
|
||||||
<!ENTITY sqcap SDATA "[sqcap ]"--/sqcap B: square intersection-->
|
|
||||||
<!ENTITY sqcup SDATA "[sqcup ]"--/sqcup B: square union-->
|
|
||||||
<!ENTITY ssetmn SDATA "[ssetmn]"--/smallsetminus B: sm reverse solidus-->
|
|
||||||
<!ENTITY sstarf SDATA "[sstarf]"--/star B: small star, filled-->
|
|
||||||
<!ENTITY timesb SDATA "[timesb]"--/boxtimes B: multiply sign in box-->
|
|
||||||
<!ENTITY top SDATA "[top ]"--/top B: inverted perpendicular-->
|
|
||||||
<!ENTITY uplus SDATA "[uplus ]"--/uplus B: plus sign in union-->
|
|
||||||
<!ENTITY wreath SDATA "[wreath]"--/wr B: wreath product-->
|
|
||||||
<!ENTITY xcirc SDATA "[xcirc ]"--/bigcirc B: large circle-->
|
|
||||||
<!ENTITY xdtri SDATA "[xdtri ]"--/bigtriangledown B: big dn tri, open-->
|
|
||||||
<!ENTITY xutri SDATA "[xutri ]"--/bigtriangleup B: big up tri, open-->
|
|
||||||
<!ENTITY coprod SDATA "[coprod]"--/coprod L: coproduct operator-->
|
|
||||||
<!ENTITY prod SDATA "[prod ]"--/prod L: product operator-->
|
|
||||||
<!ENTITY sum SDATA "[sum ]"--/sum L: summation operator-->
|
|
@ -1,20 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOamsc PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN">
|
|
||||||
%ISOamsc;
|
|
||||||
-->
|
|
||||||
<!ENTITY rceil SDATA "[rceil ]"--/rceil C: right ceiling-->
|
|
||||||
<!ENTITY rfloor SDATA "[rfloor]"--/rfloor C: right floor-->
|
|
||||||
<!ENTITY rpargt SDATA "[rpargt]"--/rightparengtr C: right paren, gt-->
|
|
||||||
<!ENTITY urcorn SDATA "[urcorn]"--/urcorner C: upper right corner-->
|
|
||||||
<!ENTITY drcorn SDATA "[drcorn]"--/lrcorner C: downward right corner-->
|
|
||||||
<!ENTITY lceil SDATA "[lceil ]"--/lceil O: left ceiling-->
|
|
||||||
<!ENTITY lfloor SDATA "[lfloor]"--/lfloor O: left floor-->
|
|
||||||
<!ENTITY lpargt SDATA "[lpargt]"--/leftparengtr O: left parenthesis, gt-->
|
|
||||||
<!ENTITY ulcorn SDATA "[ulcorn]"--/ulcorner O: upper left corner-->
|
|
||||||
<!ENTITY dlcorn SDATA "[dlcorn]"--/llcorner O: downward left corner-->
|
|
@ -1,70 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOamsn PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES
|
|
||||||
Added Math Symbols: Negated Relations//EN">
|
|
||||||
%ISOamsn;
|
|
||||||
-->
|
|
||||||
<!ENTITY gnap SDATA "[gnap ]"--/gnapprox N: greater, not approximate-->
|
|
||||||
<!ENTITY gne SDATA "[gne ]"--/gneq N: greater, not equals-->
|
|
||||||
<!ENTITY gnE SDATA "[gnE ]"--/gneqq N: greater, not dbl equals-->
|
|
||||||
<!ENTITY gnsim SDATA "[gnsim ]"--/gnsim N: greater, not similar-->
|
|
||||||
<!ENTITY gvnE SDATA "[gvnE ]"--/gvertneqq N: gt, vert, not dbl eq-->
|
|
||||||
<!ENTITY lnap SDATA "[lnap ]"--/lnapprox N: less, not approximate-->
|
|
||||||
<!ENTITY lnE SDATA "[lnE ]"--/lneqq N: less, not double equals-->
|
|
||||||
<!ENTITY lne SDATA "[lne ]"--/lneq N: less, not equals-->
|
|
||||||
<!ENTITY lnsim SDATA "[lnsim ]"--/lnsim N: less, not similar-->
|
|
||||||
<!ENTITY lvnE SDATA "[lvnE ]"--/lvertneqq N: less, vert, not dbl eq-->
|
|
||||||
<!ENTITY nap SDATA "[nap ]"--/napprox N: not approximate-->
|
|
||||||
<!ENTITY ncong SDATA "[ncong ]"--/ncong N: not congruent with-->
|
|
||||||
<!ENTITY nequiv SDATA "[nequiv]"--/nequiv N: not identical with-->
|
|
||||||
<!ENTITY ngE SDATA "[ngE ]"--/ngeqq N: not greater, dbl equals-->
|
|
||||||
<!ENTITY nge SDATA "[nge ]"--/ngeq N: not greater-than-or-equal-->
|
|
||||||
<!ENTITY nges SDATA "[nges ]"--/ngeqslant N: not gt-or-eq, slanted-->
|
|
||||||
<!ENTITY ngt SDATA "[ngt ]"--/ngtr N: not greater-than-->
|
|
||||||
<!ENTITY nle SDATA "[nle ]"--/nleq N: not less-than-or-equal-->
|
|
||||||
<!ENTITY nlE SDATA "[nlE ]"--/nleqq N: not less, dbl equals-->
|
|
||||||
<!ENTITY nles SDATA "[nles ]"--/nleqslant N: not less-or-eq, slant-->
|
|
||||||
<!ENTITY nlt SDATA "[nlt ]"--/nless N: not less-than-->
|
|
||||||
<!ENTITY nltri SDATA "[nltri ]"--/ntriangleleft N: not left triangle-->
|
|
||||||
<!ENTITY nltrie SDATA "[nltrie]"--/ntrianglelefteq N: not l tri, eq-->
|
|
||||||
<!ENTITY nmid SDATA "[nmid ]"--/nmid-->
|
|
||||||
<!ENTITY npar SDATA "[npar ]"--/nparallel N: not parallel-->
|
|
||||||
<!ENTITY npr SDATA "[npr ]"--/nprec N: not precedes-->
|
|
||||||
<!ENTITY npre SDATA "[npre ]"--/npreceq N: not precedes, equals-->
|
|
||||||
<!ENTITY nrtri SDATA "[nrtri ]"--/ntriangleright N: not rt triangle-->
|
|
||||||
<!ENTITY nrtrie SDATA "[nrtrie]"--/ntrianglerighteq N: not r tri, eq-->
|
|
||||||
<!ENTITY nsc SDATA "[nsc ]"--/nsucc N: not succeeds-->
|
|
||||||
<!ENTITY nsce SDATA "[nsce ]"--/nsucceq N: not succeeds, equals-->
|
|
||||||
<!ENTITY nsim SDATA "[nsim ]"--/nsim N: not similar-->
|
|
||||||
<!ENTITY nsime SDATA "[nsime ]"--/nsimeq N: not similar, equals-->
|
|
||||||
<!ENTITY nsmid SDATA "[nsmid ]"--/nshortmid-->
|
|
||||||
<!ENTITY nspar SDATA "[nspar ]"--/nshortparallel N: not short par-->
|
|
||||||
<!ENTITY nsub SDATA "[nsub ]"--/nsubset N: not subset-->
|
|
||||||
<!ENTITY nsube SDATA "[nsube ]"--/nsubseteq N: not subset, equals-->
|
|
||||||
<!ENTITY nsubE SDATA "[nsubE ]"--/nsubseteqq N: not subset, dbl eq-->
|
|
||||||
<!ENTITY nsup SDATA "[nsup ]"--/nsupset N: not superset-->
|
|
||||||
<!ENTITY nsupE SDATA "[nsupE ]"--/nsupseteqq N: not superset, dbl eq-->
|
|
||||||
<!ENTITY nsupe SDATA "[nsupe ]"--/nsupseteq N: not superset, equals-->
|
|
||||||
<!ENTITY nvdash SDATA "[nvdash]"--/nvdash N: not vertical, dash-->
|
|
||||||
<!ENTITY nvDash SDATA "[nvDash]"--/nvDash N: not vertical, dbl dash-->
|
|
||||||
<!ENTITY nVDash SDATA "[nVDash]"--/nVDash N: not dbl vert, dbl dash-->
|
|
||||||
<!ENTITY nVdash SDATA "[nVdash]"--/nVdash N: not dbl vertical, dash-->
|
|
||||||
<!ENTITY prnap SDATA "[prnap ]"--/precnapprox N: precedes, not approx-->
|
|
||||||
<!ENTITY prnE SDATA "[prnE ]"--/precneqq N: precedes, not dbl eq-->
|
|
||||||
<!ENTITY prnsim SDATA "[prnsim]"--/precnsim N: precedes, not similar-->
|
|
||||||
<!ENTITY scnap SDATA "[scnap ]"--/succnapprox N: succeeds, not approx-->
|
|
||||||
<!ENTITY scnE SDATA "[scnE ]"--/succneqq N: succeeds, not dbl eq-->
|
|
||||||
<!ENTITY scnsim SDATA "[scnsim]"--/succnsim N: succeeds, not similar-->
|
|
||||||
<!ENTITY subne SDATA "[subne ]"--/subsetneq N: subset, not equals-->
|
|
||||||
<!ENTITY subnE SDATA "[subnE ]"--/subsetneqq N: subset, not dbl eq-->
|
|
||||||
<!ENTITY supne SDATA "[supne ]"--/supsetneq N: superset, not equals-->
|
|
||||||
<!ENTITY supnE SDATA "[supnE ]"--/supsetneqq N: superset, not dbl eq-->
|
|
||||||
<!ENTITY vsubnE SDATA "[vsubnE]"--/subsetneqq N: subset not dbl eq, var-->
|
|
||||||
<!ENTITY vsubne SDATA "[vsubne]"--/subsetneq N: subset, not eq, var-->
|
|
||||||
<!ENTITY vsupne SDATA "[vsupne]"--/supsetneq N: superset, not eq, var-->
|
|
||||||
<!ENTITY vsupnE SDATA "[vsupnE]"--/supsetneqq N: super not dbl eq, var-->
|
|
@ -1,29 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOamso PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN">
|
|
||||||
%ISOamso;
|
|
||||||
-->
|
|
||||||
<!ENTITY ang SDATA "[ang ]"--/angle - angle-->
|
|
||||||
<!ENTITY angmsd SDATA "[angmsd]"--/measuredangle - angle-measured-->
|
|
||||||
<!ENTITY beth SDATA "[beth ]"--/beth - beth, Hebrew-->
|
|
||||||
<!ENTITY bprime SDATA "[bprime]"--/backprime - reverse prime-->
|
|
||||||
<!ENTITY comp SDATA "[comp ]"--/complement - complement sign-->
|
|
||||||
<!ENTITY daleth SDATA "[daleth]"--/daleth - daleth, Hebrew-->
|
|
||||||
<!ENTITY ell SDATA "[ell ]"--/ell - cursive small l-->
|
|
||||||
<!ENTITY empty SDATA "[empty ]"--/emptyset /varnothing =small o, slash-->
|
|
||||||
<!ENTITY gimel SDATA "[gimel ]"--/gimel - gimel, Hebrew-->
|
|
||||||
<!ENTITY image SDATA "[image ]"--/Im - imaginary-->
|
|
||||||
<!ENTITY inodot SDATA "[inodot]"--/imath =small i, no dot-->
|
|
||||||
<!ENTITY jnodot SDATA "[jnodot]"--/jmath - small j, no dot-->
|
|
||||||
<!ENTITY nexist SDATA "[nexist]"--/nexists - negated exists-->
|
|
||||||
<!ENTITY oS SDATA "[oS ]"--/circledS - capital S in circle-->
|
|
||||||
<!ENTITY planck SDATA "[planck]"--/hbar /hslash - Planck's over 2pi-->
|
|
||||||
<!ENTITY real SDATA "[real ]"--/Re - real-->
|
|
||||||
<!ENTITY sbsol SDATA "[sbsol ]"--/sbs - short reverse solidus-->
|
|
||||||
<!ENTITY vprime SDATA "[vprime]"--/varprime - prime, variant-->
|
|
||||||
<!ENTITY weierp SDATA "[weierp]"--/wp - Weierstrass p-->
|
|
@ -1,94 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOamsr PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN">
|
|
||||||
%ISOamsr;
|
|
||||||
-->
|
|
||||||
<!ENTITY ape SDATA "[ape ]"--/approxeq R: approximate, equals-->
|
|
||||||
<!ENTITY asymp SDATA "[asymp ]"--/asymp R: asymptotically equal to-->
|
|
||||||
<!ENTITY bcong SDATA "[bcong ]"--/backcong R: reverse congruent-->
|
|
||||||
<!ENTITY bepsi SDATA "[bepsi ]"--/backepsilon R: such that-->
|
|
||||||
<!ENTITY bowtie SDATA "[bowtie]"--/bowtie R:-->
|
|
||||||
<!ENTITY bsim SDATA "[bsim ]"--/backsim R: reverse similar-->
|
|
||||||
<!ENTITY bsime SDATA "[bsime ]"--/backsimeq R: reverse similar, eq-->
|
|
||||||
<!ENTITY bump SDATA "[bump ]"--/Bumpeq R: bumpy equals-->
|
|
||||||
<!ENTITY bumpe SDATA "[bumpe ]"--/bumpeq R: bumpy equals, equals-->
|
|
||||||
<!ENTITY cire SDATA "[cire ]"--/circeq R: circle, equals-->
|
|
||||||
<!ENTITY colone SDATA "[colone]"--/coloneq R: colon, equals-->
|
|
||||||
<!ENTITY cuepr SDATA "[cuepr ]"--/curlyeqprec R: curly eq, precedes-->
|
|
||||||
<!ENTITY cuesc SDATA "[cuesc ]"--/curlyeqsucc R: curly eq, succeeds-->
|
|
||||||
<!ENTITY cupre SDATA "[cupre ]"--/curlypreceq R: curly precedes, eq-->
|
|
||||||
<!ENTITY dashv SDATA "[dashv ]"--/dashv R: dash, vertical-->
|
|
||||||
<!ENTITY ecir SDATA "[ecir ]"--/eqcirc R: circle on equals sign-->
|
|
||||||
<!ENTITY ecolon SDATA "[ecolon]"--/eqcolon R: equals, colon-->
|
|
||||||
<!ENTITY eDot SDATA "[eDot ]"--/doteqdot /Doteq R: eq, even dots-->
|
|
||||||
<!ENTITY esdot SDATA "[esdot ]"--/doteq R: equals, single dot above-->
|
|
||||||
<!ENTITY efDot SDATA "[efDot ]"--/fallingdotseq R: eq, falling dots-->
|
|
||||||
<!ENTITY egs SDATA "[egs ]"--/eqslantgtr R: equal-or-gtr, slanted-->
|
|
||||||
<!ENTITY els SDATA "[els ]"--/eqslantless R: eq-or-less, slanted-->
|
|
||||||
<!ENTITY erDot SDATA "[erDot ]"--/risingdotseq R: eq, rising dots-->
|
|
||||||
<!ENTITY fork SDATA "[fork ]"--/pitchfork R: pitchfork-->
|
|
||||||
<!ENTITY frown SDATA "[frown ]"--/frown R: down curve-->
|
|
||||||
<!ENTITY gap SDATA "[gap ]"--/gtrapprox R: greater, approximate-->
|
|
||||||
<!ENTITY gsdot SDATA "[gsdot ]"--/gtrdot R: greater than, single dot-->
|
|
||||||
<!ENTITY gE SDATA "[gE ]"--/geqq R: greater, double equals-->
|
|
||||||
<!ENTITY gel SDATA "[gel ]"--/gtreqless R: greater, equals, less-->
|
|
||||||
<!ENTITY gEl SDATA "[gEl ]"--/gtreqqless R: gt, dbl equals, less-->
|
|
||||||
<!ENTITY ges SDATA "[ges ]"--/geqslant R: gt-or-equal, slanted-->
|
|
||||||
<!ENTITY Gg SDATA "[Gg ]"--/ggg /Gg /gggtr R: triple gtr-than-->
|
|
||||||
<!ENTITY gl SDATA "[gl ]"--/gtrless R: greater, less-->
|
|
||||||
<!ENTITY gsim SDATA "[gsim ]"--/gtrsim R: greater, similar-->
|
|
||||||
<!ENTITY Gt SDATA "[Gt ]"--/gg R: dbl greater-than sign-->
|
|
||||||
<!ENTITY lap SDATA "[lap ]"--/lessapprox R: less, approximate-->
|
|
||||||
<!ENTITY ldot SDATA "[ldot ]"--/lessdot R: less than, with dot-->
|
|
||||||
<!ENTITY lE SDATA "[lE ]"--/leqq R: less, double equals-->
|
|
||||||
<!ENTITY lEg SDATA "[lEg ]"--/lesseqqgtr R: less, dbl eq, greater-->
|
|
||||||
<!ENTITY leg SDATA "[leg ]"--/lesseqgtr R: less, eq, greater-->
|
|
||||||
<!ENTITY les SDATA "[les ]"--/leqslant R: less-than-or-eq, slant-->
|
|
||||||
<!ENTITY lg SDATA "[lg ]"--/lessgtr R: less, greater-->
|
|
||||||
<!ENTITY Ll SDATA "[Ll ]"--/Ll /lll /llless R: triple less-than-->
|
|
||||||
<!ENTITY lsim SDATA "[lsim ]"--/lesssim R: less, similar-->
|
|
||||||
<!ENTITY Lt SDATA "[Lt ]"--/ll R: double less-than sign-->
|
|
||||||
<!ENTITY ltrie SDATA "[ltrie ]"--/trianglelefteq R: left triangle, eq-->
|
|
||||||
<!ENTITY mid SDATA "[mid ]"--/mid R:-->
|
|
||||||
<!ENTITY models SDATA "[models]"--/models R:-->
|
|
||||||
<!ENTITY pr SDATA "[pr ]"--/prec R: precedes-->
|
|
||||||
<!ENTITY prap SDATA "[prap ]"--/precapprox R: precedes, approximate-->
|
|
||||||
<!ENTITY pre SDATA "[pre ]"--/preceq R: precedes, equals-->
|
|
||||||
<!ENTITY prsim SDATA "[prsim ]"--/precsim R: precedes, similar-->
|
|
||||||
<!ENTITY rtrie SDATA "[rtrie ]"--/trianglerighteq R: right tri, eq-->
|
|
||||||
<!ENTITY samalg SDATA "[samalg]"--/smallamalg R: small amalg-->
|
|
||||||
<!ENTITY sc SDATA "[sc ]"--/succ R: succeeds-->
|
|
||||||
<!ENTITY scap SDATA "[scap ]"--/succapprox R: succeeds, approximate-->
|
|
||||||
<!ENTITY sccue SDATA "[sccue ]"--/succcurlyeq R: succeeds, curly eq-->
|
|
||||||
<!ENTITY sce SDATA "[sce ]"--/succeq R: succeeds, equals-->
|
|
||||||
<!ENTITY scsim SDATA "[scsim ]"--/succsim R: succeeds, similar-->
|
|
||||||
<!ENTITY sfrown SDATA "[sfrown]"--/smallfrown R: small down curve-->
|
|
||||||
<!ENTITY smid SDATA "[smid ]"--/shortmid R:-->
|
|
||||||
<!ENTITY smile SDATA "[smile ]"--/smile R: up curve-->
|
|
||||||
<!ENTITY spar SDATA "[spar ]"--/shortparallel R: short parallel-->
|
|
||||||
<!ENTITY sqsub SDATA "[sqsub ]"--/sqsubset R: square subset-->
|
|
||||||
<!ENTITY sqsube SDATA "[sqsube]"--/sqsubseteq R: square subset, equals-->
|
|
||||||
<!ENTITY sqsup SDATA "[sqsup ]"--/sqsupset R: square superset-->
|
|
||||||
<!ENTITY sqsupe SDATA "[sqsupe]"--/sqsupseteq R: square superset, eq-->
|
|
||||||
<!ENTITY ssmile SDATA "[ssmile]"--/smallsmile R: small up curve-->
|
|
||||||
<!ENTITY Sub SDATA "[Sub ]"--/Subset R: double subset-->
|
|
||||||
<!ENTITY subE SDATA "[subE ]"--/subseteqq R: subset, dbl equals-->
|
|
||||||
<!ENTITY Sup SDATA "[Sup ]"--/Supset R: dbl superset-->
|
|
||||||
<!ENTITY supE SDATA "[supE ]"--/supseteqq R: superset, dbl equals-->
|
|
||||||
<!ENTITY thkap SDATA "[thkap ]"--/thickapprox R: thick approximate-->
|
|
||||||
<!ENTITY thksim SDATA "[thksim]"--/thicksim R: thick similar-->
|
|
||||||
<!ENTITY trie SDATA "[trie ]"--/triangleq R: triangle, equals-->
|
|
||||||
<!ENTITY twixt SDATA "[twixt ]"--/between R: between-->
|
|
||||||
<!ENTITY vdash SDATA "[vdash ]"--/vdash R: vertical, dash-->
|
|
||||||
<!ENTITY Vdash SDATA "[Vdash ]"--/Vdash R: dbl vertical, dash-->
|
|
||||||
<!ENTITY vDash SDATA "[vDash ]"--/vDash R: vertical, dbl dash-->
|
|
||||||
<!ENTITY veebar SDATA "[veebar]"--/veebar R: logical or, bar below-->
|
|
||||||
<!ENTITY vltri SDATA "[vltri ]"--/vartriangleleft R: l tri, open, var-->
|
|
||||||
<!ENTITY vprop SDATA "[vprop ]"--/varpropto R: proportional, variant-->
|
|
||||||
<!ENTITY vrtri SDATA "[vrtri ]"--/vartriangleright R: r tri, open, var-->
|
|
||||||
<!ENTITY Vvdash SDATA "[Vvdash]"--/Vvdash R: triple vertical, dash-->
|
|
@ -1,62 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISObox PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Box and Line Drawing//EN">
|
|
||||||
%ISObox;
|
|
||||||
-->
|
|
||||||
<!-- All names are in the form: box1234, where:
|
|
||||||
box = constants that identify a box drawing entity.
|
|
||||||
1&2 = v, V, u, U, d, D, Ud, or uD, as follows:
|
|
||||||
v = vertical line for full height.
|
|
||||||
u = upper half of vertical line.
|
|
||||||
d = downward (lower) half of vertical line.
|
|
||||||
3&4 = h, H, l, L, r, R, Lr, or lR, as follows:
|
|
||||||
h = horizontal line for full width.
|
|
||||||
l = left half of horizontal line.
|
|
||||||
r = right half of horizontal line.
|
|
||||||
In all cases, an upper-case letter means a double or heavy line.
|
|
||||||
-->
|
|
||||||
<!ENTITY boxh SDATA "[boxh ]"--horizontal line -->
|
|
||||||
<!ENTITY boxv SDATA "[boxv ]"--vertical line-->
|
|
||||||
<!ENTITY boxur SDATA "[boxur ]"--upper right quadrant-->
|
|
||||||
<!ENTITY boxul SDATA "[boxul ]"--upper left quadrant-->
|
|
||||||
<!ENTITY boxdl SDATA "[boxdl ]"--lower left quadrant-->
|
|
||||||
<!ENTITY boxdr SDATA "[boxdr ]"--lower right quadrant-->
|
|
||||||
<!ENTITY boxvr SDATA "[boxvr ]"--upper and lower right quadrants-->
|
|
||||||
<!ENTITY boxhu SDATA "[boxhu ]"--upper left and right quadrants-->
|
|
||||||
<!ENTITY boxvl SDATA "[boxvl ]"--upper and lower left quadrants-->
|
|
||||||
<!ENTITY boxhd SDATA "[boxhd ]"--lower left and right quadrants-->
|
|
||||||
<!ENTITY boxvh SDATA "[boxvh ]"--all four quadrants-->
|
|
||||||
<!ENTITY boxvR SDATA "[boxvR ]"--upper and lower right quadrants-->
|
|
||||||
<!ENTITY boxhU SDATA "[boxhU ]"--upper left and right quadrants-->
|
|
||||||
<!ENTITY boxvL SDATA "[boxvL ]"--upper and lower left quadrants-->
|
|
||||||
<!ENTITY boxhD SDATA "[boxhD ]"--lower left and right quadrants-->
|
|
||||||
<!ENTITY boxvH SDATA "[boxvH ]"--all four quadrants-->
|
|
||||||
<!ENTITY boxH SDATA "[boxH ]"--horizontal line-->
|
|
||||||
<!ENTITY boxV SDATA "[boxV ]"--vertical line-->
|
|
||||||
<!ENTITY boxUR SDATA "[boxUR ]"--upper right quadrant-->
|
|
||||||
<!ENTITY boxUL SDATA "[boxUL ]"--upper left quadrant-->
|
|
||||||
<!ENTITY boxDL SDATA "[boxDL ]"--lower left quadrant-->
|
|
||||||
<!ENTITY boxDR SDATA "[boxDR ]"--lower right quadrant-->
|
|
||||||
<!ENTITY boxVR SDATA "[boxVR ]"--upper and lower right quadrants-->
|
|
||||||
<!ENTITY boxHU SDATA "[boxHU ]"--upper left and right quadrants-->
|
|
||||||
<!ENTITY boxVL SDATA "[boxVL ]"--upper and lower left quadrants-->
|
|
||||||
<!ENTITY boxHD SDATA "[boxHD ]"--lower left and right quadrants-->
|
|
||||||
<!ENTITY boxVH SDATA "[boxVH ]"--all four quadrants-->
|
|
||||||
<!ENTITY boxVr SDATA "[boxVr ]"--upper and lower right quadrants-->
|
|
||||||
<!ENTITY boxHu SDATA "[boxHu ]"--upper left and right quadrants-->
|
|
||||||
<!ENTITY boxVl SDATA "[boxVl ]"--upper and lower left quadrants-->
|
|
||||||
<!ENTITY boxHd SDATA "[boxHd ]"--lower left and right quadrants-->
|
|
||||||
<!ENTITY boxVh SDATA "[boxVh ]"--all four quadrants-->
|
|
||||||
<!ENTITY boxuR SDATA "[boxuR ]"--upper right quadrant-->
|
|
||||||
<!ENTITY boxUl SDATA "[boxUl ]"--upper left quadrant-->
|
|
||||||
<!ENTITY boxdL SDATA "[boxdL ]"--lower left quadrant-->
|
|
||||||
<!ENTITY boxDr SDATA "[boxDr ]"--lower right quadrant-->
|
|
||||||
<!ENTITY boxUr SDATA "[boxUr ]"--upper right quadrant-->
|
|
||||||
<!ENTITY boxuL SDATA "[boxuL ]"--upper left quadrant-->
|
|
||||||
<!ENTITY boxDl SDATA "[boxDl ]"--lower left quadrant-->
|
|
||||||
<!ENTITY boxdR SDATA "[boxdR ]"--lower right quadrant-->
|
|
@ -1,77 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOcyr1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
|
|
||||||
%ISOcyr1;
|
|
||||||
-->
|
|
||||||
<!ENTITY acy SDATA "[acy ]"--=small a, Cyrillic-->
|
|
||||||
<!ENTITY Acy SDATA "[Acy ]"--=capital A, Cyrillic-->
|
|
||||||
<!ENTITY bcy SDATA "[bcy ]"--=small be, Cyrillic-->
|
|
||||||
<!ENTITY Bcy SDATA "[Bcy ]"--=capital BE, Cyrillic-->
|
|
||||||
<!ENTITY vcy SDATA "[vcy ]"--=small ve, Cyrillic-->
|
|
||||||
<!ENTITY Vcy SDATA "[Vcy ]"--=capital VE, Cyrillic-->
|
|
||||||
<!ENTITY gcy SDATA "[gcy ]"--=small ghe, Cyrillic-->
|
|
||||||
<!ENTITY Gcy SDATA "[Gcy ]"--=capital GHE, Cyrillic-->
|
|
||||||
<!ENTITY dcy SDATA "[dcy ]"--=small de, Cyrillic-->
|
|
||||||
<!ENTITY Dcy SDATA "[Dcy ]"--=capital DE, Cyrillic-->
|
|
||||||
<!ENTITY iecy SDATA "[iecy ]"--=small ie, Cyrillic-->
|
|
||||||
<!ENTITY IEcy SDATA "[IEcy ]"--=capital IE, Cyrillic-->
|
|
||||||
<!ENTITY iocy SDATA "[iocy ]"--=small io, Russian-->
|
|
||||||
<!ENTITY IOcy SDATA "[IOcy ]"--=capital IO, Russian-->
|
|
||||||
<!ENTITY zhcy SDATA "[zhcy ]"--=small zhe, Cyrillic-->
|
|
||||||
<!ENTITY ZHcy SDATA "[ZHcy ]"--=capital ZHE, Cyrillic-->
|
|
||||||
<!ENTITY zcy SDATA "[zcy ]"--=small ze, Cyrillic-->
|
|
||||||
<!ENTITY Zcy SDATA "[Zcy ]"--=capital ZE, Cyrillic-->
|
|
||||||
<!ENTITY icy SDATA "[icy ]"--=small i, Cyrillic-->
|
|
||||||
<!ENTITY Icy SDATA "[Icy ]"--=capital I, Cyrillic-->
|
|
||||||
<!ENTITY jcy SDATA "[jcy ]"--=small short i, Cyrillic-->
|
|
||||||
<!ENTITY Jcy SDATA "[Jcy ]"--=capital short I, Cyrillic-->
|
|
||||||
<!ENTITY kcy SDATA "[kcy ]"--=small ka, Cyrillic-->
|
|
||||||
<!ENTITY Kcy SDATA "[Kcy ]"--=capital KA, Cyrillic-->
|
|
||||||
<!ENTITY lcy SDATA "[lcy ]"--=small el, Cyrillic-->
|
|
||||||
<!ENTITY Lcy SDATA "[Lcy ]"--=capital EL, Cyrillic-->
|
|
||||||
<!ENTITY mcy SDATA "[mcy ]"--=small em, Cyrillic-->
|
|
||||||
<!ENTITY Mcy SDATA "[Mcy ]"--=capital EM, Cyrillic-->
|
|
||||||
<!ENTITY ncy SDATA "[ncy ]"--=small en, Cyrillic-->
|
|
||||||
<!ENTITY Ncy SDATA "[Ncy ]"--=capital EN, Cyrillic-->
|
|
||||||
<!ENTITY ocy SDATA "[ocy ]"--=small o, Cyrillic-->
|
|
||||||
<!ENTITY Ocy SDATA "[Ocy ]"--=capital O, Cyrillic-->
|
|
||||||
<!ENTITY pcy SDATA "[pcy ]"--=small pe, Cyrillic-->
|
|
||||||
<!ENTITY Pcy SDATA "[Pcy ]"--=capital PE, Cyrillic-->
|
|
||||||
<!ENTITY rcy SDATA "[rcy ]"--=small er, Cyrillic-->
|
|
||||||
<!ENTITY Rcy SDATA "[Rcy ]"--=capital ER, Cyrillic-->
|
|
||||||
<!ENTITY scy SDATA "[scy ]"--=small es, Cyrillic-->
|
|
||||||
<!ENTITY Scy SDATA "[Scy ]"--=capital ES, Cyrillic-->
|
|
||||||
<!ENTITY tcy SDATA "[tcy ]"--=small te, Cyrillic-->
|
|
||||||
<!ENTITY Tcy SDATA "[Tcy ]"--=capital TE, Cyrillic-->
|
|
||||||
<!ENTITY ucy SDATA "[ucy ]"--=small u, Cyrillic-->
|
|
||||||
<!ENTITY Ucy SDATA "[Ucy ]"--=capital U, Cyrillic-->
|
|
||||||
<!ENTITY fcy SDATA "[fcy ]"--=small ef, Cyrillic-->
|
|
||||||
<!ENTITY Fcy SDATA "[Fcy ]"--=capital EF, Cyrillic-->
|
|
||||||
<!ENTITY khcy SDATA "[khcy ]"--=small ha, Cyrillic-->
|
|
||||||
<!ENTITY KHcy SDATA "[KHcy ]"--=capital HA, Cyrillic-->
|
|
||||||
<!ENTITY tscy SDATA "[tscy ]"--=small tse, Cyrillic-->
|
|
||||||
<!ENTITY TScy SDATA "[TScy ]"--=capital TSE, Cyrillic-->
|
|
||||||
<!ENTITY chcy SDATA "[chcy ]"--=small che, Cyrillic-->
|
|
||||||
<!ENTITY CHcy SDATA "[CHcy ]"--=capital CHE, Cyrillic-->
|
|
||||||
<!ENTITY shcy SDATA "[shcy ]"--=small sha, Cyrillic-->
|
|
||||||
<!ENTITY SHcy SDATA "[SHcy ]"--=capital SHA, Cyrillic-->
|
|
||||||
<!ENTITY shchcy SDATA "[shchcy]"--=small shcha, Cyrillic-->
|
|
||||||
<!ENTITY SHCHcy SDATA "[SHCHcy]"--=capital SHCHA, Cyrillic-->
|
|
||||||
<!ENTITY hardcy SDATA "[hardcy]"--=small hard sign, Cyrillic-->
|
|
||||||
<!ENTITY HARDcy SDATA "[HARDcy]"--=capital HARD sign, Cyrillic-->
|
|
||||||
<!ENTITY ycy SDATA "[ycy ]"--=small yeru, Cyrillic-->
|
|
||||||
<!ENTITY Ycy SDATA "[Ycy ]"--=capital YERU, Cyrillic-->
|
|
||||||
<!ENTITY softcy SDATA "[softcy]"--=small soft sign, Cyrillic-->
|
|
||||||
<!ENTITY SOFTcy SDATA "[SOFTcy]"--=capital SOFT sign, Cyrillic-->
|
|
||||||
<!ENTITY ecy SDATA "[ecy ]"--=small e, Cyrillic-->
|
|
||||||
<!ENTITY Ecy SDATA "[Ecy ]"--=capital E, Cyrillic-->
|
|
||||||
<!ENTITY yucy SDATA "[yucy ]"--=small yu, Cyrillic-->
|
|
||||||
<!ENTITY YUcy SDATA "[YUcy ]"--=capital YU, Cyrillic-->
|
|
||||||
<!ENTITY yacy SDATA "[yacy ]"--=small ya, Cyrillic-->
|
|
||||||
<!ENTITY YAcy SDATA "[YAcy ]"--=capital YA, Cyrillic-->
|
|
||||||
<!ENTITY numero SDATA "[numero]"--=numero sign-->
|
|
@ -1,36 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOcyr2 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN">
|
|
||||||
%ISOcyr2;
|
|
||||||
-->
|
|
||||||
<!ENTITY djcy SDATA "[djcy ]"--=small dje, Serbian-->
|
|
||||||
<!ENTITY DJcy SDATA "[DJcy ]"--=capital DJE, Serbian-->
|
|
||||||
<!ENTITY gjcy SDATA "[gjcy ]"--=small gje, Macedonian-->
|
|
||||||
<!ENTITY GJcy SDATA "[GJcy ]"--=capital GJE Macedonian-->
|
|
||||||
<!ENTITY jukcy SDATA "[jukcy ]"--=small je, Ukrainian-->
|
|
||||||
<!ENTITY Jukcy SDATA "[Jukcy ]"--=capital JE, Ukrainian-->
|
|
||||||
<!ENTITY dscy SDATA "[dscy ]"--=small dse, Macedonian-->
|
|
||||||
<!ENTITY DScy SDATA "[DScy ]"--=capital DSE, Macedonian-->
|
|
||||||
<!ENTITY iukcy SDATA "[iukcy ]"--=small i, Ukrainian-->
|
|
||||||
<!ENTITY Iukcy SDATA "[Iukcy ]"--=capital I, Ukrainian-->
|
|
||||||
<!ENTITY yicy SDATA "[yicy ]"--=small yi, Ukrainian-->
|
|
||||||
<!ENTITY YIcy SDATA "[YIcy ]"--=capital YI, Ukrainian-->
|
|
||||||
<!ENTITY jsercy SDATA "[jsercy]"--=small je, Serbian-->
|
|
||||||
<!ENTITY Jsercy SDATA "[Jsercy]"--=capital JE, Serbian-->
|
|
||||||
<!ENTITY ljcy SDATA "[ljcy ]"--=small lje, Serbian-->
|
|
||||||
<!ENTITY LJcy SDATA "[LJcy ]"--=capital LJE, Serbian-->
|
|
||||||
<!ENTITY njcy SDATA "[njcy ]"--=small nje, Serbian-->
|
|
||||||
<!ENTITY NJcy SDATA "[NJcy ]"--=capital NJE, Serbian-->
|
|
||||||
<!ENTITY tshcy SDATA "[tshcy ]"--=small tshe, Serbian-->
|
|
||||||
<!ENTITY TSHcy SDATA "[TSHcy ]"--=capital TSHE, Serbian-->
|
|
||||||
<!ENTITY kjcy SDATA "[kjcy ]"--=small kje Macedonian-->
|
|
||||||
<!ENTITY KJcy SDATA "[KJcy ]"--=capital KJE, Macedonian-->
|
|
||||||
<!ENTITY ubrcy SDATA "[ubrcy ]"--=small u, Byelorussian-->
|
|
||||||
<!ENTITY Ubrcy SDATA "[Ubrcy ]"--=capital U, Byelorussian-->
|
|
||||||
<!ENTITY dzcy SDATA "[dzcy ]"--=small dze, Serbian-->
|
|
||||||
<!ENTITY DZcy SDATA "[DZcy ]"--=capital dze, Serbian-->
|
|
@ -1,24 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOdia PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Diacritical Marks//EN">
|
|
||||||
%ISOdia;
|
|
||||||
-->
|
|
||||||
<!ENTITY acute SDATA "[acute ]"--=acute accent-->
|
|
||||||
<!ENTITY breve SDATA "[breve ]"--=breve-->
|
|
||||||
<!ENTITY caron SDATA "[caron ]"--=caron-->
|
|
||||||
<!ENTITY cedil SDATA "[cedil ]"--=cedilla-->
|
|
||||||
<!ENTITY circ SDATA "[circ ]"--=circumflex accent-->
|
|
||||||
<!ENTITY dblac SDATA "[dblac ]"--=double acute accent-->
|
|
||||||
<!ENTITY die SDATA "[die ]"--=dieresis-->
|
|
||||||
<!ENTITY dot SDATA "[dot ]"--=dot above-->
|
|
||||||
<!ENTITY grave SDATA "[grave ]"--=grave accent-->
|
|
||||||
<!ENTITY macr SDATA "[macr ]"--=macron-->
|
|
||||||
<!ENTITY ogon SDATA "[ogon ]"--=ogonek-->
|
|
||||||
<!ENTITY ring SDATA "[ring ]"--=ring-->
|
|
||||||
<!ENTITY tilde SDATA "[tilde ]"--=tilde-->
|
|
||||||
<!ENTITY uml SDATA "[uml ]"--=umlaut mark-->
|
|
@ -1,59 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOgrk1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Greek Letters//EN">
|
|
||||||
%ISOgrk1;
|
|
||||||
-->
|
|
||||||
<!ENTITY agr SDATA "[agr ]"--=small alpha, Greek-->
|
|
||||||
<!ENTITY Agr SDATA "[Agr ]"--=capital Alpha, Greek-->
|
|
||||||
<!ENTITY bgr SDATA "[bgr ]"--=small beta, Greek-->
|
|
||||||
<!ENTITY Bgr SDATA "[Bgr ]"--=capital Beta, Greek-->
|
|
||||||
<!ENTITY ggr SDATA "[ggr ]"--=small gamma, Greek-->
|
|
||||||
<!ENTITY Ggr SDATA "[Ggr ]"--=capital Gamma, Greek-->
|
|
||||||
<!ENTITY dgr SDATA "[dgr ]"--=small delta, Greek-->
|
|
||||||
<!ENTITY Dgr SDATA "[Dgr ]"--=capital Delta, Greek-->
|
|
||||||
<!ENTITY egr SDATA "[egr ]"--=small epsilon, Greek-->
|
|
||||||
<!ENTITY Egr SDATA "[Egr ]"--=capital Epsilon, Greek-->
|
|
||||||
<!ENTITY zgr SDATA "[zgr ]"--=small zeta, Greek-->
|
|
||||||
<!ENTITY Zgr SDATA "[Zgr ]"--=capital Zeta, Greek-->
|
|
||||||
<!ENTITY eegr SDATA "[eegr ]"--=small eta, Greek-->
|
|
||||||
<!ENTITY EEgr SDATA "[EEgr ]"--=capital Eta, Greek-->
|
|
||||||
<!ENTITY thgr SDATA "[thgr ]"--=small theta, Greek-->
|
|
||||||
<!ENTITY THgr SDATA "[THgr ]"--=capital Theta, Greek-->
|
|
||||||
<!ENTITY igr SDATA "[igr ]"--=small iota, Greek-->
|
|
||||||
<!ENTITY Igr SDATA "[Igr ]"--=capital Iota, Greek-->
|
|
||||||
<!ENTITY kgr SDATA "[kgr ]"--=small kappa, Greek-->
|
|
||||||
<!ENTITY Kgr SDATA "[Kgr ]"--=capital Kappa, Greek-->
|
|
||||||
<!ENTITY lgr SDATA "[lgr ]"--=small lambda, Greek-->
|
|
||||||
<!ENTITY Lgr SDATA "[Lgr ]"--=capital Lambda, Greek-->
|
|
||||||
<!ENTITY mgr SDATA "[mgr ]"--=small mu, Greek-->
|
|
||||||
<!ENTITY Mgr SDATA "[Mgr ]"--=capital Mu, Greek-->
|
|
||||||
<!ENTITY ngr SDATA "[ngr ]"--=small nu, Greek-->
|
|
||||||
<!ENTITY Ngr SDATA "[Ngr ]"--=capital Nu, Greek-->
|
|
||||||
<!ENTITY xgr SDATA "[xgr ]"--=small xi, Greek-->
|
|
||||||
<!ENTITY Xgr SDATA "[Xgr ]"--=capital Xi, Greek-->
|
|
||||||
<!ENTITY ogr SDATA "[ogr ]"--=small omicron, Greek-->
|
|
||||||
<!ENTITY Ogr SDATA "[Ogr ]"--=capital Omicron, Greek-->
|
|
||||||
<!ENTITY pgr SDATA "[pgr ]"--=small pi, Greek-->
|
|
||||||
<!ENTITY Pgr SDATA "[Pgr ]"--=capital Pi, Greek-->
|
|
||||||
<!ENTITY rgr SDATA "[rgr ]"--=small rho, Greek-->
|
|
||||||
<!ENTITY Rgr SDATA "[Rgr ]"--=capital Rho, Greek-->
|
|
||||||
<!ENTITY sgr SDATA "[sgr ]"--=small sigma, Greek-->
|
|
||||||
<!ENTITY Sgr SDATA "[Sgr ]"--=capital Sigma, Greek-->
|
|
||||||
<!ENTITY sfgr SDATA "[sfgr ]"--=final small sigma, Greek-->
|
|
||||||
<!ENTITY tgr SDATA "[tgr ]"--=small tau, Greek-->
|
|
||||||
<!ENTITY Tgr SDATA "[Tgr ]"--=capital Tau, Greek-->
|
|
||||||
<!ENTITY ugr SDATA "[ugr ]"--=small upsilon, Greek-->
|
|
||||||
<!ENTITY Ugr SDATA "[Ugr ]"--=capital Upsilon, Greek-->
|
|
||||||
<!ENTITY phgr SDATA "[phgr ]"--=small phi, Greek-->
|
|
||||||
<!ENTITY PHgr SDATA "[PHgr ]"--=capital Phi, Greek-->
|
|
||||||
<!ENTITY khgr SDATA "[khgr ]"--=small chi, Greek-->
|
|
||||||
<!ENTITY KHgr SDATA "[KHgr ]"--=capital Chi, Greek-->
|
|
||||||
<!ENTITY psgr SDATA "[psgr ]"--=small psi, Greek-->
|
|
||||||
<!ENTITY PSgr SDATA "[PSgr ]"--=capital Psi, Greek-->
|
|
||||||
<!ENTITY ohgr SDATA "[ohgr ]"--=small omega, Greek-->
|
|
||||||
<!ENTITY OHgr SDATA "[OHgr ]"--=capital Omega, Greek-->
|
|
@ -1,30 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOgrk2 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Monotoniko Greek//EN">
|
|
||||||
%ISOgrk2;
|
|
||||||
-->
|
|
||||||
<!ENTITY aacgr SDATA "[aacgr ]"--=small alpha, accent, Greek-->
|
|
||||||
<!ENTITY Aacgr SDATA "[Aacgr ]"--=capital Alpha, accent, Greek-->
|
|
||||||
<!ENTITY eacgr SDATA "[eacgr ]"--=small epsilon, accent, Greek-->
|
|
||||||
<!ENTITY Eacgr SDATA "[Eacgr ]"--=capital Epsilon, accent, Greek-->
|
|
||||||
<!ENTITY eeacgr SDATA "[eeacgr]"--=small eta, accent, Greek-->
|
|
||||||
<!ENTITY EEacgr SDATA "[EEacgr]"--=capital Eta, accent, Greek-->
|
|
||||||
<!ENTITY idigr SDATA "[idigr ]"--=small iota, dieresis, Greek-->
|
|
||||||
<!ENTITY Idigr SDATA "[Idigr ]"--=capital Iota, dieresis, Greek-->
|
|
||||||
<!ENTITY iacgr SDATA "[iacgr ]"--=small iota, accent, Greek-->
|
|
||||||
<!ENTITY Iacgr SDATA "[Iacgr ]"--=capital Iota, accent, Greek-->
|
|
||||||
<!ENTITY idiagr SDATA "[idiagr]"--=small iota, dieresis, accent, Greek-->
|
|
||||||
<!ENTITY oacgr SDATA "[oacgr ]"--=small omicron, accent, Greek-->
|
|
||||||
<!ENTITY Oacgr SDATA "[Oacgr ]"--=capital Omicron, accent, Greek-->
|
|
||||||
<!ENTITY udigr SDATA "[udigr ]"--=small upsilon, dieresis, Greek-->
|
|
||||||
<!ENTITY Udigr SDATA "[Udigr ]"--=capital Upsilon, dieresis, Greek-->
|
|
||||||
<!ENTITY uacgr SDATA "[uacgr ]"--=small upsilon, accent, Greek-->
|
|
||||||
<!ENTITY Uacgr SDATA "[Uacgr ]"--=capital Upsilon, accent, Greek-->
|
|
||||||
<!ENTITY udiagr SDATA "[udiagr]"--=small upsilon, dieresis, accent, Greek-->
|
|
||||||
<!ENTITY ohacgr SDATA "[ohacgr]"--=small omega, accent, Greek-->
|
|
||||||
<!ENTITY OHacgr SDATA "[OHacgr]"--=capital Omega, accent, Greek-->
|
|
@ -1,53 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOgrk3 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Greek Symbols//EN">
|
|
||||||
%ISOgrk3;
|
|
||||||
-->
|
|
||||||
<!ENTITY alpha SDATA "[alpha ]"--=small alpha, Greek-->
|
|
||||||
<!ENTITY beta SDATA "[beta ]"--=small beta, Greek-->
|
|
||||||
<!ENTITY gamma SDATA "[gamma ]"--=small gamma, Greek-->
|
|
||||||
<!ENTITY Gamma SDATA "[Gamma ]"--=capital Gamma, Greek-->
|
|
||||||
<!ENTITY gammad SDATA "[gammad]"--/digamma-->
|
|
||||||
<!ENTITY delta SDATA "[delta ]"--=small delta, Greek-->
|
|
||||||
<!ENTITY Delta SDATA "[Delta ]"--=capital Delta, Greek-->
|
|
||||||
<!ENTITY epsi SDATA "[epsi ]"--=small epsilon, Greek-->
|
|
||||||
<!ENTITY epsiv SDATA "[epsiv ]"--/varepsilon-->
|
|
||||||
<!ENTITY epsis SDATA "[epsis ]"--/straightepsilon-->
|
|
||||||
<!ENTITY zeta SDATA "[zeta ]"--=small zeta, Greek-->
|
|
||||||
<!ENTITY eta SDATA "[eta ]"--=small eta, Greek-->
|
|
||||||
<!ENTITY thetas SDATA "[thetas]"--straight theta-->
|
|
||||||
<!ENTITY Theta SDATA "[Theta ]"--=capital Theta, Greek-->
|
|
||||||
<!ENTITY thetav SDATA "[thetav]"--/vartheta - curly or open theta-->
|
|
||||||
<!ENTITY iota SDATA "[iota ]"--=small iota, Greek-->
|
|
||||||
<!ENTITY kappa SDATA "[kappa ]"--=small kappa, Greek-->
|
|
||||||
<!ENTITY kappav SDATA "[kappav]"--/varkappa-->
|
|
||||||
<!ENTITY lambda SDATA "[lambda]"--=small lambda, Greek-->
|
|
||||||
<!ENTITY Lambda SDATA "[Lambda]"--=capital Lambda, Greek-->
|
|
||||||
<!ENTITY mu SDATA "[mu ]"--=small mu, Greek-->
|
|
||||||
<!ENTITY nu SDATA "[nu ]"--=small nu, Greek-->
|
|
||||||
<!ENTITY xi SDATA "[xi ]"--=small xi, Greek-->
|
|
||||||
<!ENTITY Xi SDATA "[Xi ]"--=capital Xi, Greek-->
|
|
||||||
<!ENTITY pi SDATA "[pi ]"--=small pi, Greek-->
|
|
||||||
<!ENTITY piv SDATA "[piv ]"--/varpi-->
|
|
||||||
<!ENTITY Pi SDATA "[Pi ]"--=capital Pi, Greek-->
|
|
||||||
<!ENTITY rho SDATA "[rho ]"--=small rho, Greek-->
|
|
||||||
<!ENTITY rhov SDATA "[rhov ]"--/varrho-->
|
|
||||||
<!ENTITY sigma SDATA "[sigma ]"--=small sigma, Greek-->
|
|
||||||
<!ENTITY Sigma SDATA "[Sigma ]"--=capital Sigma, Greek-->
|
|
||||||
<!ENTITY sigmav SDATA "[sigmav]"--/varsigma-->
|
|
||||||
<!ENTITY tau SDATA "[tau ]"--=small tau, Greek-->
|
|
||||||
<!ENTITY upsi SDATA "[upsi ]"--=small upsilon, Greek-->
|
|
||||||
<!ENTITY Upsi SDATA "[Upsi ]"--=capital Upsilon, Greek-->
|
|
||||||
<!ENTITY phis SDATA "[phis ]"--/straightphi - straight phi-->
|
|
||||||
<!ENTITY Phi SDATA "[Phi ]"--=capital Phi, Greek-->
|
|
||||||
<!ENTITY phiv SDATA "[phiv ]"--/varphi - curly or open phi-->
|
|
||||||
<!ENTITY chi SDATA "[chi ]"--=small chi, Greek-->
|
|
||||||
<!ENTITY psi SDATA "[psi ]"--=small psi, Greek-->
|
|
||||||
<!ENTITY Psi SDATA "[Psi ]"--=capital Psi, Greek-->
|
|
||||||
<!ENTITY omega SDATA "[omega ]"--=small omega, Greek-->
|
|
||||||
<!ENTITY Omega SDATA "[Omega ]"--=capital Omega, Greek-->
|
|
@ -1,53 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOgrk4 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN">
|
|
||||||
%ISOgrk4;
|
|
||||||
-->
|
|
||||||
<!ENTITY b.alpha SDATA "[b.alpha ]"--=small alpha, Greek-->
|
|
||||||
<!ENTITY b.beta SDATA "[b.beta ]"--=small beta, Greek-->
|
|
||||||
<!ENTITY b.gamma SDATA "[b.gamma ]"--=small gamma, Greek-->
|
|
||||||
<!ENTITY b.Gamma SDATA "[b.Gamma ]"--=capital Gamma, Greek-->
|
|
||||||
<!ENTITY b.gammad SDATA "[b.gammad]"--/digamma-->
|
|
||||||
<!ENTITY b.delta SDATA "[b.delta ]"--=small delta, Greek-->
|
|
||||||
<!ENTITY b.Delta SDATA "[b.Delta ]"--=capital Delta, Greek-->
|
|
||||||
<!ENTITY b.epsi SDATA "[b.epsi ]"--=small epsilon, Greek-->
|
|
||||||
<!ENTITY b.epsiv SDATA "[b.epsiv ]"--/varepsilon-->
|
|
||||||
<!ENTITY b.epsis SDATA "[b.epsis ]"--/straightepsilon-->
|
|
||||||
<!ENTITY b.zeta SDATA "[b.zeta ]"--=small zeta, Greek-->
|
|
||||||
<!ENTITY b.eta SDATA "[b.eta ]"--=small eta, Greek-->
|
|
||||||
<!ENTITY b.thetas SDATA "[b.thetas]"--straight theta-->
|
|
||||||
<!ENTITY b.Theta SDATA "[b.Theta ]"--=capital Theta, Greek-->
|
|
||||||
<!ENTITY b.thetav SDATA "[b.thetav]"--/vartheta - curly or open theta-->
|
|
||||||
<!ENTITY b.iota SDATA "[b.iota ]"--=small iota, Greek-->
|
|
||||||
<!ENTITY b.kappa SDATA "[b.kappa ]"--=small kappa, Greek-->
|
|
||||||
<!ENTITY b.kappav SDATA "[b.kappav]"--/varkappa-->
|
|
||||||
<!ENTITY b.lambda SDATA "[b.lambda]"--=small lambda, Greek-->
|
|
||||||
<!ENTITY b.Lambda SDATA "[b.Lambda]"--=capital Lambda, Greek-->
|
|
||||||
<!ENTITY b.mu SDATA "[b.mu ]"--=small mu, Greek-->
|
|
||||||
<!ENTITY b.nu SDATA "[b.nu ]"--=small nu, Greek-->
|
|
||||||
<!ENTITY b.xi SDATA "[b.xi ]"--=small xi, Greek-->
|
|
||||||
<!ENTITY b.Xi SDATA "[b.Xi ]"--=capital Xi, Greek-->
|
|
||||||
<!ENTITY b.pi SDATA "[b.pi ]"--=small pi, Greek-->
|
|
||||||
<!ENTITY b.Pi SDATA "[b.Pi ]"--=capital Pi, Greek-->
|
|
||||||
<!ENTITY b.piv SDATA "[b.piv ]"--/varpi-->
|
|
||||||
<!ENTITY b.rho SDATA "[b.rho ]"--=small rho, Greek-->
|
|
||||||
<!ENTITY b.rhov SDATA "[b.rhov ]"--/varrho-->
|
|
||||||
<!ENTITY b.sigma SDATA "[b.sigma ]"--=small sigma, Greek-->
|
|
||||||
<!ENTITY b.Sigma SDATA "[b.Sigma ]"--=capital Sigma, Greek-->
|
|
||||||
<!ENTITY b.sigmav SDATA "[b.sigmav]"--/varsigma-->
|
|
||||||
<!ENTITY b.tau SDATA "[b.tau ]"--=small tau, Greek-->
|
|
||||||
<!ENTITY b.upsi SDATA "[b.upsi ]"--=small upsilon, Greek-->
|
|
||||||
<!ENTITY b.Upsi SDATA "[b.Upsi ]"--=capital Upsilon, Greek-->
|
|
||||||
<!ENTITY b.phis SDATA "[b.phis ]"--/straightphi - straight phi-->
|
|
||||||
<!ENTITY b.Phi SDATA "[b.Phi ]"--=capital Phi, Greek-->
|
|
||||||
<!ENTITY b.phiv SDATA "[b.phiv ]"--/varphi - curly or open phi-->
|
|
||||||
<!ENTITY b.chi SDATA "[b.chi ]"--=small chi, Greek-->
|
|
||||||
<!ENTITY b.psi SDATA "[b.psi ]"--=small psi, Greek-->
|
|
||||||
<!ENTITY b.Psi SDATA "[b.Psi ]"--=capital Psi, Greek-->
|
|
||||||
<!ENTITY b.omega SDATA "[b.omega ]"--=small omega, Greek-->
|
|
||||||
<!ENTITY b.Omega SDATA "[b.Omega ]"--=capital Omega, Greek-->
|
|
@ -1,72 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOlat1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Latin 1//EN">
|
|
||||||
%ISOlat1;
|
|
||||||
-->
|
|
||||||
<!ENTITY aacute SDATA "[aacute]"--=small a, acute accent-->
|
|
||||||
<!ENTITY Aacute SDATA "[Aacute]"--=capital A, acute accent-->
|
|
||||||
<!ENTITY acirc SDATA "[acirc ]"--=small a, circumflex accent-->
|
|
||||||
<!ENTITY Acirc SDATA "[Acirc ]"--=capital A, circumflex accent-->
|
|
||||||
<!ENTITY agrave SDATA "[agrave]"--=small a, grave accent-->
|
|
||||||
<!ENTITY Agrave SDATA "[Agrave]"--=capital A, grave accent-->
|
|
||||||
<!ENTITY aring SDATA "[aring ]"--=small a, ring-->
|
|
||||||
<!ENTITY Aring SDATA "[Aring ]"--=capital A, ring-->
|
|
||||||
<!ENTITY atilde SDATA "[atilde]"--=small a, tilde-->
|
|
||||||
<!ENTITY Atilde SDATA "[Atilde]"--=capital A, tilde-->
|
|
||||||
<!ENTITY auml SDATA "[auml ]"--=small a, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY Auml SDATA "[Auml ]"--=capital A, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY aelig SDATA "[aelig ]"--=small ae diphthong (ligature)-->
|
|
||||||
<!ENTITY AElig SDATA "[AElig ]"--=capital AE diphthong (ligature)-->
|
|
||||||
<!ENTITY ccedil SDATA "[ccedil]"--=small c, cedilla-->
|
|
||||||
<!ENTITY Ccedil SDATA "[Ccedil]"--=capital C, cedilla-->
|
|
||||||
<!ENTITY eth SDATA "[eth ]"--=small eth, Icelandic-->
|
|
||||||
<!ENTITY ETH SDATA "[ETH ]"--=capital Eth, Icelandic-->
|
|
||||||
<!ENTITY eacute SDATA "[eacute]"--=small e, acute accent-->
|
|
||||||
<!ENTITY Eacute SDATA "[Eacute]"--=capital E, acute accent-->
|
|
||||||
<!ENTITY ecirc SDATA "[ecirc ]"--=small e, circumflex accent-->
|
|
||||||
<!ENTITY Ecirc SDATA "[Ecirc ]"--=capital E, circumflex accent-->
|
|
||||||
<!ENTITY egrave SDATA "[egrave]"--=small e, grave accent-->
|
|
||||||
<!ENTITY Egrave SDATA "[Egrave]"--=capital E, grave accent-->
|
|
||||||
<!ENTITY euml SDATA "[euml ]"--=small e, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY Euml SDATA "[Euml ]"--=capital E, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY iacute SDATA "[iacute]"--=small i, acute accent-->
|
|
||||||
<!ENTITY Iacute SDATA "[Iacute]"--=capital I, acute accent-->
|
|
||||||
<!ENTITY icirc SDATA "[icirc ]"--=small i, circumflex accent-->
|
|
||||||
<!ENTITY Icirc SDATA "[Icirc ]"--=capital I, circumflex accent-->
|
|
||||||
<!ENTITY igrave SDATA "[igrave]"--=small i, grave accent-->
|
|
||||||
<!ENTITY Igrave SDATA "[Igrave]"--=capital I, grave accent-->
|
|
||||||
<!ENTITY iuml SDATA "[iuml ]"--=small i, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY Iuml SDATA "[Iuml ]"--=capital I, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY ntilde SDATA "[ntilde]"--=small n, tilde-->
|
|
||||||
<!ENTITY Ntilde SDATA "[Ntilde]"--=capital N, tilde-->
|
|
||||||
<!ENTITY oacute SDATA "[oacute]"--=small o, acute accent-->
|
|
||||||
<!ENTITY Oacute SDATA "[Oacute]"--=capital O, acute accent-->
|
|
||||||
<!ENTITY ocirc SDATA "[ocirc ]"--=small o, circumflex accent-->
|
|
||||||
<!ENTITY Ocirc SDATA "[Ocirc ]"--=capital O, circumflex accent-->
|
|
||||||
<!ENTITY ograve SDATA "[ograve]"--=small o, grave accent-->
|
|
||||||
<!ENTITY Ograve SDATA "[Ograve]"--=capital O, grave accent-->
|
|
||||||
<!ENTITY oslash SDATA "[oslash]"--=small o, slash-->
|
|
||||||
<!ENTITY Oslash SDATA "[Oslash]"--=capital O, slash-->
|
|
||||||
<!ENTITY otilde SDATA "[otilde]"--=small o, tilde-->
|
|
||||||
<!ENTITY Otilde SDATA "[Otilde]"--=capital O, tilde-->
|
|
||||||
<!ENTITY ouml SDATA "[ouml ]"--=small o, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY Ouml SDATA "[Ouml ]"--=capital O, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY szlig SDATA "[szlig ]"--=small sharp s, German (sz ligature)-->
|
|
||||||
<!ENTITY thorn SDATA "[thorn ]"--=small thorn, Icelandic-->
|
|
||||||
<!ENTITY THORN SDATA "[THORN ]"--=capital THORN, Icelandic-->
|
|
||||||
<!ENTITY uacute SDATA "[uacute]"--=small u, acute accent-->
|
|
||||||
<!ENTITY Uacute SDATA "[Uacute]"--=capital U, acute accent-->
|
|
||||||
<!ENTITY ucirc SDATA "[ucirc ]"--=small u, circumflex accent-->
|
|
||||||
<!ENTITY Ucirc SDATA "[Ucirc ]"--=capital U, circumflex accent-->
|
|
||||||
<!ENTITY ugrave SDATA "[ugrave]"--=small u, grave accent-->
|
|
||||||
<!ENTITY Ugrave SDATA "[Ugrave]"--=capital U, grave accent-->
|
|
||||||
<!ENTITY uuml SDATA "[uuml ]"--=small u, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY Uuml SDATA "[Uuml ]"--=capital U, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY yacute SDATA "[yacute]"--=small y, acute accent-->
|
|
||||||
<!ENTITY Yacute SDATA "[Yacute]"--=capital Y, acute accent-->
|
|
||||||
<!ENTITY yuml SDATA "[yuml ]"--=small y, dieresis or umlaut mark-->
|
|
@ -1,131 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOlat2 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Latin 2//EN">
|
|
||||||
%ISOlat2;
|
|
||||||
-->
|
|
||||||
<!ENTITY abreve SDATA "[abreve]"--=small a, breve-->
|
|
||||||
<!ENTITY Abreve SDATA "[Abreve]"--=capital A, breve-->
|
|
||||||
<!ENTITY amacr SDATA "[amacr ]"--=small a, macron-->
|
|
||||||
<!ENTITY Amacr SDATA "[Amacr ]"--=capital A, macron-->
|
|
||||||
<!ENTITY aogon SDATA "[aogon ]"--=small a, ogonek-->
|
|
||||||
<!ENTITY Aogon SDATA "[Aogon ]"--=capital A, ogonek-->
|
|
||||||
<!ENTITY cacute SDATA "[cacute]"--=small c, acute accent-->
|
|
||||||
<!ENTITY Cacute SDATA "[Cacute]"--=capital C, acute accent-->
|
|
||||||
<!ENTITY ccaron SDATA "[ccaron]"--=small c, caron-->
|
|
||||||
<!ENTITY Ccaron SDATA "[Ccaron]"--=capital C, caron-->
|
|
||||||
<!ENTITY ccirc SDATA "[ccirc ]"--=small c, circumflex accent-->
|
|
||||||
<!ENTITY Ccirc SDATA "[Ccirc ]"--=capital C, circumflex accent-->
|
|
||||||
<!ENTITY cdot SDATA "[cdot ]"--=small c, dot above-->
|
|
||||||
<!ENTITY Cdot SDATA "[Cdot ]"--=capital C, dot above-->
|
|
||||||
<!ENTITY dcaron SDATA "[dcaron]"--=small d, caron-->
|
|
||||||
<!ENTITY Dcaron SDATA "[Dcaron]"--=capital D, caron-->
|
|
||||||
<!ENTITY dstrok SDATA "[dstrok]"--=small d, stroke-->
|
|
||||||
<!ENTITY Dstrok SDATA "[Dstrok]"--=capital D, stroke-->
|
|
||||||
<!ENTITY ecaron SDATA "[ecaron]"--=small e, caron-->
|
|
||||||
<!ENTITY Ecaron SDATA "[Ecaron]"--=capital E, caron-->
|
|
||||||
<!ENTITY edot SDATA "[edot ]"--=small e, dot above-->
|
|
||||||
<!ENTITY Edot SDATA "[Edot ]"--=capital E, dot above-->
|
|
||||||
<!ENTITY emacr SDATA "[emacr ]"--=small e, macron-->
|
|
||||||
<!ENTITY Emacr SDATA "[Emacr ]"--=capital E, macron-->
|
|
||||||
<!ENTITY eogon SDATA "[eogon ]"--=small e, ogonek-->
|
|
||||||
<!ENTITY Eogon SDATA "[Eogon ]"--=capital E, ogonek-->
|
|
||||||
<!ENTITY gacute SDATA "[gacute]"--=small g, acute accent-->
|
|
||||||
<!ENTITY gbreve SDATA "[gbreve]"--=small g, breve-->
|
|
||||||
<!ENTITY Gbreve SDATA "[Gbreve]"--=capital G, breve-->
|
|
||||||
<!ENTITY Gcedil SDATA "[Gcedil]"--=capital G, cedilla-->
|
|
||||||
<!ENTITY gcirc SDATA "[gcirc ]"--=small g, circumflex accent-->
|
|
||||||
<!ENTITY Gcirc SDATA "[Gcirc ]"--=capital G, circumflex accent-->
|
|
||||||
<!ENTITY gdot SDATA "[gdot ]"--=small g, dot above-->
|
|
||||||
<!ENTITY Gdot SDATA "[Gdot ]"--=capital G, dot above-->
|
|
||||||
<!ENTITY hcirc SDATA "[hcirc ]"--=small h, circumflex accent-->
|
|
||||||
<!ENTITY Hcirc SDATA "[Hcirc ]"--=capital H, circumflex accent-->
|
|
||||||
<!ENTITY hstrok SDATA "[hstrok]"--=small h, stroke-->
|
|
||||||
<!ENTITY Hstrok SDATA "[Hstrok]"--=capital H, stroke-->
|
|
||||||
<!ENTITY Idot SDATA "[Idot ]"--=capital I, dot above-->
|
|
||||||
<!ENTITY Imacr SDATA "[Imacr ]"--=capital I, macron-->
|
|
||||||
<!ENTITY imacr SDATA "[imacr ]"--=small i, macron-->
|
|
||||||
<!ENTITY ijlig SDATA "[ijlig ]"--=small ij ligature-->
|
|
||||||
<!ENTITY IJlig SDATA "[IJlig ]"--=capital IJ ligature-->
|
|
||||||
<!ENTITY inodot SDATA "[inodot]"--=small i without dot-->
|
|
||||||
<!ENTITY iogon SDATA "[iogon ]"--=small i, ogonek-->
|
|
||||||
<!ENTITY Iogon SDATA "[Iogon ]"--=capital I, ogonek-->
|
|
||||||
<!ENTITY itilde SDATA "[itilde]"--=small i, tilde-->
|
|
||||||
<!ENTITY Itilde SDATA "[Itilde]"--=capital I, tilde-->
|
|
||||||
<!ENTITY jcirc SDATA "[jcirc ]"--=small j, circumflex accent-->
|
|
||||||
<!ENTITY Jcirc SDATA "[Jcirc ]"--=capital J, circumflex accent-->
|
|
||||||
<!ENTITY kcedil SDATA "[kcedil]"--=small k, cedilla-->
|
|
||||||
<!ENTITY Kcedil SDATA "[Kcedil]"--=capital K, cedilla-->
|
|
||||||
<!ENTITY kgreen SDATA "[kgreen]"--=small k, Greenlandic-->
|
|
||||||
<!ENTITY lacute SDATA "[lacute]"--=small l, acute accent-->
|
|
||||||
<!ENTITY Lacute SDATA "[Lacute]"--=capital L, acute accent-->
|
|
||||||
<!ENTITY lcaron SDATA "[lcaron]"--=small l, caron-->
|
|
||||||
<!ENTITY Lcaron SDATA "[Lcaron]"--=capital L, caron-->
|
|
||||||
<!ENTITY lcedil SDATA "[lcedil]"--=small l, cedilla-->
|
|
||||||
<!ENTITY Lcedil SDATA "[Lcedil]"--=capital L, cedilla-->
|
|
||||||
<!ENTITY lmidot SDATA "[lmidot]"--=small l, middle dot-->
|
|
||||||
<!ENTITY Lmidot SDATA "[Lmidot]"--=capital L, middle dot-->
|
|
||||||
<!ENTITY lstrok SDATA "[lstrok]"--=small l, stroke-->
|
|
||||||
<!ENTITY Lstrok SDATA "[Lstrok]"--=capital L, stroke-->
|
|
||||||
<!ENTITY nacute SDATA "[nacute]"--=small n, acute accent-->
|
|
||||||
<!ENTITY Nacute SDATA "[Nacute]"--=capital N, acute accent-->
|
|
||||||
<!ENTITY eng SDATA "[eng ]"--=small eng, Lapp-->
|
|
||||||
<!ENTITY ENG SDATA "[ENG ]"--=capital ENG, Lapp-->
|
|
||||||
<!ENTITY napos SDATA "[napos ]"--=small n, apostrophe-->
|
|
||||||
<!ENTITY ncaron SDATA "[ncaron]"--=small n, caron-->
|
|
||||||
<!ENTITY Ncaron SDATA "[Ncaron]"--=capital N, caron-->
|
|
||||||
<!ENTITY ncedil SDATA "[ncedil]"--=small n, cedilla-->
|
|
||||||
<!ENTITY Ncedil SDATA "[Ncedil]"--=capital N, cedilla-->
|
|
||||||
<!ENTITY odblac SDATA "[odblac]"--=small o, double acute accent-->
|
|
||||||
<!ENTITY Odblac SDATA "[Odblac]"--=capital O, double acute accent-->
|
|
||||||
<!ENTITY Omacr SDATA "[Omacr ]"--=capital O, macron-->
|
|
||||||
<!ENTITY omacr SDATA "[omacr ]"--=small o, macron-->
|
|
||||||
<!ENTITY oelig SDATA "[oelig ]"--=small oe ligature-->
|
|
||||||
<!ENTITY OElig SDATA "[OElig ]"--=capital OE ligature-->
|
|
||||||
<!ENTITY racute SDATA "[racute]"--=small r, acute accent-->
|
|
||||||
<!ENTITY Racute SDATA "[Racute]"--=capital R, acute accent-->
|
|
||||||
<!ENTITY rcaron SDATA "[rcaron]"--=small r, caron-->
|
|
||||||
<!ENTITY Rcaron SDATA "[Rcaron]"--=capital R, caron-->
|
|
||||||
<!ENTITY rcedil SDATA "[rcedil]"--=small r, cedilla-->
|
|
||||||
<!ENTITY Rcedil SDATA "[Rcedil]"--=capital R, cedilla-->
|
|
||||||
<!ENTITY sacute SDATA "[sacute]"--=small s, acute accent-->
|
|
||||||
<!ENTITY Sacute SDATA "[Sacute]"--=capital S, acute accent-->
|
|
||||||
<!ENTITY scaron SDATA "[scaron]"--=small s, caron-->
|
|
||||||
<!ENTITY Scaron SDATA "[Scaron]"--=capital S, caron-->
|
|
||||||
<!ENTITY scedil SDATA "[scedil]"--=small s, cedilla-->
|
|
||||||
<!ENTITY Scedil SDATA "[Scedil]"--=capital S, cedilla-->
|
|
||||||
<!ENTITY scirc SDATA "[scirc ]"--=small s, circumflex accent-->
|
|
||||||
<!ENTITY Scirc SDATA "[Scirc ]"--=capital S, circumflex accent-->
|
|
||||||
<!ENTITY tcaron SDATA "[tcaron]"--=small t, caron-->
|
|
||||||
<!ENTITY Tcaron SDATA "[Tcaron]"--=capital T, caron-->
|
|
||||||
<!ENTITY tcedil SDATA "[tcedil]"--=small t, cedilla-->
|
|
||||||
<!ENTITY Tcedil SDATA "[Tcedil]"--=capital T, cedilla-->
|
|
||||||
<!ENTITY tstrok SDATA "[tstrok]"--=small t, stroke-->
|
|
||||||
<!ENTITY Tstrok SDATA "[Tstrok]"--=capital T, stroke-->
|
|
||||||
<!ENTITY ubreve SDATA "[ubreve]"--=small u, breve-->
|
|
||||||
<!ENTITY Ubreve SDATA "[Ubreve]"--=capital U, breve-->
|
|
||||||
<!ENTITY udblac SDATA "[udblac]"--=small u, double acute accent-->
|
|
||||||
<!ENTITY Udblac SDATA "[Udblac]"--=capital U, double acute accent-->
|
|
||||||
<!ENTITY umacr SDATA "[umacr ]"--=small u, macron-->
|
|
||||||
<!ENTITY Umacr SDATA "[Umacr ]"--=capital U, macron-->
|
|
||||||
<!ENTITY uogon SDATA "[uogon ]"--=small u, ogonek-->
|
|
||||||
<!ENTITY Uogon SDATA "[Uogon ]"--=capital U, ogonek-->
|
|
||||||
<!ENTITY uring SDATA "[uring ]"--=small u, ring-->
|
|
||||||
<!ENTITY Uring SDATA "[Uring ]"--=capital U, ring-->
|
|
||||||
<!ENTITY utilde SDATA "[utilde]"--=small u, tilde-->
|
|
||||||
<!ENTITY Utilde SDATA "[Utilde]"--=capital U, tilde-->
|
|
||||||
<!ENTITY wcirc SDATA "[wcirc ]"--=small w, circumflex accent-->
|
|
||||||
<!ENTITY Wcirc SDATA "[Wcirc ]"--=capital W, circumflex accent-->
|
|
||||||
<!ENTITY ycirc SDATA "[ycirc ]"--=small y, circumflex accent-->
|
|
||||||
<!ENTITY Ycirc SDATA "[Ycirc ]"--=capital Y, circumflex accent-->
|
|
||||||
<!ENTITY Yuml SDATA "[Yuml ]"--=capital Y, dieresis or umlaut mark-->
|
|
||||||
<!ENTITY zacute SDATA "[zacute]"--=small z, acute accent-->
|
|
||||||
<!ENTITY Zacute SDATA "[Zacute]"--=capital Z, acute accent-->
|
|
||||||
<!ENTITY zcaron SDATA "[zcaron]"--=small z, caron-->
|
|
||||||
<!ENTITY Zcaron SDATA "[Zcaron]"--=capital Z, caron-->
|
|
||||||
<!ENTITY zdot SDATA "[zdot ]"--=small z, dot above-->
|
|
||||||
<!ENTITY Zdot SDATA "[Zdot ]"--=capital Z, dot above-->
|
|
@ -1,91 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOnum PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
|
|
||||||
%ISOnum;
|
|
||||||
-->
|
|
||||||
<!ENTITY half SDATA "[half ]"--=fraction one-half-->
|
|
||||||
<!ENTITY frac12 SDATA "[frac12]"--=fraction one-half-->
|
|
||||||
<!ENTITY frac14 SDATA "[frac14]"--=fraction one-quarter-->
|
|
||||||
<!ENTITY frac34 SDATA "[frac34]"--=fraction three-quarters-->
|
|
||||||
<!ENTITY frac18 SDATA "[frac18]"--=fraction one-eighth-->
|
|
||||||
<!ENTITY frac38 SDATA "[frac38]"--=fraction three-eighths-->
|
|
||||||
<!ENTITY frac58 SDATA "[frac58]"--=fraction five-eighths-->
|
|
||||||
<!ENTITY frac78 SDATA "[frac78]"--=fraction seven-eighths-->
|
|
||||||
|
|
||||||
<!ENTITY sup1 SDATA "[sup1 ]"--=superscript one-->
|
|
||||||
<!ENTITY sup2 SDATA "[sup2 ]"--=superscript two-->
|
|
||||||
<!ENTITY sup3 SDATA "[sup3 ]"--=superscript three-->
|
|
||||||
|
|
||||||
<!ENTITY plus SDATA "[plus ]"--=plus sign B:-- >
|
|
||||||
<!ENTITY plusmn SDATA "[plusmn]"--/pm B: =plus-or-minus sign-->
|
|
||||||
<!ENTITY lt SDATA "[lt ]"--=less-than sign R:-->
|
|
||||||
<!ENTITY equals SDATA "[equals]"--=equals sign R:-->
|
|
||||||
<!ENTITY gt SDATA "[gt ]"--=greater-than sign R:-->
|
|
||||||
<!ENTITY divide SDATA "[divide]"--/div B: =divide sign-->
|
|
||||||
<!ENTITY times SDATA "[times ]"--/times B: =multiply sign-->
|
|
||||||
|
|
||||||
<!ENTITY curren SDATA "[curren]"--=general currency sign-->
|
|
||||||
<!ENTITY pound SDATA "[pound ]"--=pound sign-->
|
|
||||||
<!ENTITY dollar SDATA "[dollar]"--=dollar sign-->
|
|
||||||
<!ENTITY cent SDATA "[cent ]"--=cent sign-->
|
|
||||||
<!ENTITY yen SDATA "[yen ]"--/yen =yen sign-->
|
|
||||||
|
|
||||||
<!ENTITY num SDATA "[num ]"--=number sign-->
|
|
||||||
<!ENTITY percnt SDATA "[percnt]"--=percent sign-->
|
|
||||||
<!ENTITY amp SDATA "[amp ]"--=ampersand-->
|
|
||||||
<!ENTITY ast SDATA "[ast ]"--/ast B: =asterisk-->
|
|
||||||
<!ENTITY commat SDATA "[commat]"--=commercial at-->
|
|
||||||
<!ENTITY lsqb SDATA "[lsqb ]"--/lbrack O: =left square bracket-->
|
|
||||||
<!ENTITY bsol SDATA "[bsol ]"--/backslash =reverse solidus-->
|
|
||||||
<!ENTITY rsqb SDATA "[rsqb ]"--/rbrack C: =right square bracket-->
|
|
||||||
<!ENTITY lcub SDATA "[lcub ]"--/lbrace O: =left curly bracket-->
|
|
||||||
<!ENTITY horbar SDATA "[horbar]"--=horizontal bar-->
|
|
||||||
<!ENTITY verbar SDATA "[verbar]"--/vert =vertical bar-->
|
|
||||||
<!ENTITY rcub SDATA "[rcub ]"--/rbrace C: =right curly bracket-->
|
|
||||||
<!ENTITY micro SDATA "[micro ]"--=micro sign-->
|
|
||||||
<!ENTITY ohm SDATA "[ohm ]"--=ohm sign-->
|
|
||||||
<!ENTITY deg SDATA "[deg ]"--=degree sign-->
|
|
||||||
<!ENTITY ordm SDATA "[ordm ]"--=ordinal indicator, masculine-->
|
|
||||||
<!ENTITY ordf SDATA "[ordf ]"--=ordinal indicator, feminine-->
|
|
||||||
<!ENTITY sect SDATA "[sect ]"--=section sign-->
|
|
||||||
<!ENTITY para SDATA "[para ]"--=pilcrow (paragraph sign)-->
|
|
||||||
<!ENTITY middot SDATA "[middot]"--/centerdot B: =middle dot-->
|
|
||||||
<!ENTITY larr SDATA "[larr ]"--/leftarrow /gets A: =leftward arrow-->
|
|
||||||
<!ENTITY rarr SDATA "[rarr ]"--/rightarrow /to A: =rightward arrow-->
|
|
||||||
<!ENTITY uarr SDATA "[uarr ]"--/uparrow A: =upward arrow-->
|
|
||||||
<!ENTITY darr SDATA "[darr ]"--/downarrow A: =downward arrow-->
|
|
||||||
<!ENTITY copy SDATA "[copy ]"--=copyright sign-->
|
|
||||||
<!ENTITY reg SDATA "[reg ]"--/circledR =registered sign-->
|
|
||||||
<!ENTITY trade SDATA "[trade ]"--=trade mark sign-->
|
|
||||||
<!ENTITY brvbar SDATA "[brvbar]"--=broken (vertical) bar-->
|
|
||||||
<!ENTITY not SDATA "[not ]"--/neg /lnot =not sign-->
|
|
||||||
<!ENTITY sung SDATA "[sung ]"--=music note (sung text sign)-->
|
|
||||||
|
|
||||||
<!ENTITY excl SDATA "[excl ]"--=exclamation mark-->
|
|
||||||
<!ENTITY iexcl SDATA "[iexcl ]"--=inverted exclamation mark-->
|
|
||||||
<!ENTITY quot SDATA "[quot ]"--=quotation mark-->
|
|
||||||
<!ENTITY apos SDATA "[apos ]"--=apostrophe-->
|
|
||||||
<!ENTITY lpar SDATA "[lpar ]"--O: =left parenthesis-->
|
|
||||||
<!ENTITY rpar SDATA "[rpar ]"--C: =right parenthesis-->
|
|
||||||
<!ENTITY comma SDATA "[comma ]"--P: =comma-->
|
|
||||||
<!ENTITY lowbar SDATA "[lowbar]"--=low line-->
|
|
||||||
<!ENTITY hyphen SDATA "[hyphen]"--=hyphen-->
|
|
||||||
<!ENTITY period SDATA "[period]"--=full stop, period-->
|
|
||||||
<!ENTITY sol SDATA "[sol ]"--=solidus-->
|
|
||||||
<!ENTITY colon SDATA "[colon ]"--/colon P:-->
|
|
||||||
<!ENTITY semi SDATA "[semi ]"--=semicolon P:-->
|
|
||||||
<!ENTITY quest SDATA "[quest ]"--=question mark-->
|
|
||||||
<!ENTITY iquest SDATA "[iquest]"--=inverted question mark-->
|
|
||||||
<!ENTITY laquo SDATA "[laquo ]"--=angle quotation mark, left-->
|
|
||||||
<!ENTITY raquo SDATA "[raquo ]"--=angle quotation mark, right-->
|
|
||||||
<!ENTITY lsquo SDATA "[lsquo ]"--=single quotation mark, left-->
|
|
||||||
<!ENTITY rsquo SDATA "[rsquo ]"--=single quotation mark, right-->
|
|
||||||
<!ENTITY ldquo SDATA "[ldquo ]"--=double quotation mark, left-->
|
|
||||||
<!ENTITY rdquo SDATA "[rdquo ]"--=double quotation mark, right-->
|
|
||||||
<!ENTITY nbsp SDATA "[nbsp ]"--=no break (required) space-->
|
|
||||||
<!ENTITY shy SDATA "[shy ]"--=soft hyphen-->
|
|
@ -1,100 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOpub PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Publishing//EN">
|
|
||||||
%ISOpub;
|
|
||||||
-->
|
|
||||||
<!ENTITY emsp SDATA "[emsp ]"--=em space-->
|
|
||||||
<!ENTITY ensp SDATA "[ensp ]"--=en space (1/2-em)-->
|
|
||||||
<!ENTITY emsp13 SDATA "[emsp3 ]"--=1/3-em space-->
|
|
||||||
<!ENTITY emsp14 SDATA "[emsp4 ]"--=1/4-em space-->
|
|
||||||
<!ENTITY numsp SDATA "[numsp ]"--=digit space (width of a number)-->
|
|
||||||
<!ENTITY puncsp SDATA "[puncsp]"--=punctuation space (width of comma)-->
|
|
||||||
<!ENTITY thinsp SDATA "[thinsp]"--=thin space (1/6-em)-->
|
|
||||||
<!ENTITY hairsp SDATA "[hairsp]"--=hair space-->
|
|
||||||
<!ENTITY mdash SDATA "[mdash ]"--=em dash-->
|
|
||||||
<!ENTITY ndash SDATA "[ndash ]"--=en dash-->
|
|
||||||
<!ENTITY dash SDATA "[dash ]"--=hyphen (true graphic)-->
|
|
||||||
<!ENTITY blank SDATA "[blank ]"--=significant blank symbol-->
|
|
||||||
<!ENTITY hellip SDATA "[hellip]"--=ellipsis (horizontal)-->
|
|
||||||
<!ENTITY nldr SDATA "[nldr ]"--=double baseline dot (en leader)-->
|
|
||||||
<!ENTITY frac13 SDATA "[frac13]"--=fraction one-third-->
|
|
||||||
<!ENTITY frac23 SDATA "[frac23]"--=fraction two-thirds-->
|
|
||||||
<!ENTITY frac15 SDATA "[frac15]"--=fraction one-fifth-->
|
|
||||||
<!ENTITY frac25 SDATA "[frac25]"--=fraction two-fifths-->
|
|
||||||
<!ENTITY frac35 SDATA "[frac35]"--=fraction three-fifths-->
|
|
||||||
<!ENTITY frac45 SDATA "[frac45]"--=fraction four-fifths-->
|
|
||||||
<!ENTITY frac16 SDATA "[frac16]"--=fraction one-sixth-->
|
|
||||||
<!ENTITY frac56 SDATA "[frac56]"--=fraction five-sixths-->
|
|
||||||
<!ENTITY incare SDATA "[incare]"--=in-care-of symbol-->
|
|
||||||
<!ENTITY block SDATA "[block ]"--=full block-->
|
|
||||||
<!ENTITY uhblk SDATA "[uhblk ]"--=upper half block-->
|
|
||||||
<!ENTITY lhblk SDATA "[lhblk ]"--=lower half block-->
|
|
||||||
<!ENTITY blk14 SDATA "[blk14 ]"--=25% shaded block-->
|
|
||||||
<!ENTITY blk12 SDATA "[blk12 ]"--=50% shaded block-->
|
|
||||||
<!ENTITY blk34 SDATA "[blk34 ]"--=75% shaded block-->
|
|
||||||
<!ENTITY marker SDATA "[marker]"--=histogram marker-->
|
|
||||||
<!ENTITY cir SDATA "[cir ]"--/circ B: =circle, open-->
|
|
||||||
<!ENTITY squ SDATA "[squ ]"--=square, open-->
|
|
||||||
<!ENTITY rect SDATA "[rect ]"--=rectangle, open-->
|
|
||||||
<!ENTITY utri SDATA "[utri ]"--/triangle =up triangle, open-->
|
|
||||||
<!ENTITY dtri SDATA "[dtri ]"--/triangledown =down triangle, open-->
|
|
||||||
<!ENTITY star SDATA "[star ]"--=star, open-->
|
|
||||||
<!ENTITY bull SDATA "[bull ]"--/bullet B: =round bullet, filled-->
|
|
||||||
<!ENTITY squf SDATA "[squf ]"--/blacksquare =sq bullet, filled-->
|
|
||||||
<!ENTITY utrif SDATA "[utrif ]"--/blacktriangle =up tri, filled-->
|
|
||||||
<!ENTITY dtrif SDATA "[dtrif ]"--/blacktriangledown =dn tri, filled-->
|
|
||||||
<!ENTITY ltrif SDATA "[ltrif ]"--/blacktriangleleft R: =l tri, filled-->
|
|
||||||
<!ENTITY rtrif SDATA "[rtrif ]"--/blacktriangleright R: =r tri, filled-->
|
|
||||||
<!ENTITY clubs SDATA "[clubs ]"--/clubsuit =club suit symbol-->
|
|
||||||
<!ENTITY diams SDATA "[diams ]"--/diamondsuit =diamond suit symbol-->
|
|
||||||
<!ENTITY hearts SDATA "[hearts]"--/heartsuit =heart suit symbol-->
|
|
||||||
<!ENTITY spades SDATA "[spades]"--/spadesuit =spades suit symbol-->
|
|
||||||
<!ENTITY malt SDATA "[malt ]"--/maltese =maltese cross-->
|
|
||||||
<!ENTITY dagger SDATA "[dagger]"--/dagger B: =dagger-->
|
|
||||||
<!ENTITY Dagger SDATA "[Dagger]"--/ddagger B: =double dagger-->
|
|
||||||
<!ENTITY check SDATA "[check ]"--/checkmark =tick, check mark-->
|
|
||||||
<!ENTITY cross SDATA "[ballot]"--=ballot cross-->
|
|
||||||
<!ENTITY sharp SDATA "[sharp ]"--/sharp =musical sharp-->
|
|
||||||
<!ENTITY flat SDATA "[flat ]"--/flat =musical flat-->
|
|
||||||
<!ENTITY male SDATA "[male ]"--=male symbol-->
|
|
||||||
<!ENTITY female SDATA "[female]"--=female symbol-->
|
|
||||||
<!ENTITY phone SDATA "[phone ]"--=telephone symbol-->
|
|
||||||
<!ENTITY telrec SDATA "[telrec]"--=telephone recorder symbol-->
|
|
||||||
<!ENTITY copysr SDATA "[copysr]"--=sound recording copyright sign-->
|
|
||||||
<!ENTITY caret SDATA "[caret ]"--=caret (insertion mark)-->
|
|
||||||
<!ENTITY lsquor SDATA "[lsquor]"--=rising single quote, left (low)-->
|
|
||||||
<!ENTITY ldquor SDATA "[ldquor]"--=rising dbl quote, left (low)-->
|
|
||||||
|
|
||||||
<!ENTITY fflig SDATA "[fflig ]"--small ff ligature-->
|
|
||||||
<!ENTITY filig SDATA "[filig ]"--small fi ligature-->
|
|
||||||
<!ENTITY fjlig SDATA "[fjlig ]"--small fj ligature-->
|
|
||||||
<!ENTITY ffilig SDATA "[ffilig]"--small ffi ligature-->
|
|
||||||
<!ENTITY ffllig SDATA "[ffllig]"--small ffl ligature-->
|
|
||||||
<!ENTITY fllig SDATA "[fllig ]"--small fl ligature-->
|
|
||||||
|
|
||||||
<!ENTITY mldr SDATA "[mldr ]"--em leader-->
|
|
||||||
<!ENTITY rdquor SDATA "[rdquor]"--rising dbl quote, right (high)-->
|
|
||||||
<!ENTITY rsquor SDATA "[rsquor]"--rising single quote, right (high)-->
|
|
||||||
<!ENTITY vellip SDATA "[vellip]"--vertical ellipsis-->
|
|
||||||
|
|
||||||
<!ENTITY hybull SDATA "[hybull]"--rectangle, filled (hyphen bullet)-->
|
|
||||||
<!ENTITY loz SDATA "[loz ]"--/lozenge - lozenge or total mark-->
|
|
||||||
<!ENTITY lozf SDATA "[lozf ]"--/blacklozenge - lozenge, filled-->
|
|
||||||
<!ENTITY ltri SDATA "[ltri ]"--/triangleleft B: l triangle, open-->
|
|
||||||
<!ENTITY rtri SDATA "[rtri ]"--/triangleright B: r triangle, open-->
|
|
||||||
<!ENTITY starf SDATA "[starf ]"--/bigstar - star, filled-->
|
|
||||||
|
|
||||||
<!ENTITY natur SDATA "[natur ]"--/natural - music natural-->
|
|
||||||
<!ENTITY rx SDATA "[rx ]"--pharmaceutical prescription (Rx)-->
|
|
||||||
<!ENTITY sext SDATA "[sext ]"--sextile (6-pointed star)-->
|
|
||||||
|
|
||||||
<!ENTITY target SDATA "[target]"--register mark or target-->
|
|
||||||
<!ENTITY dlcrop SDATA "[dlcrop]"--downward left crop mark -->
|
|
||||||
<!ENTITY drcrop SDATA "[drcrop]"--downward right crop mark -->
|
|
||||||
<!ENTITY ulcrop SDATA "[ulcrop]"--upward left crop mark -->
|
|
||||||
<!ENTITY urcrop SDATA "[urcrop]"--upward right crop mark -->
|
|
@ -1,73 +0,0 @@
|
|||||||
<!-- (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % ISOtech PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES General Technical//EN">
|
|
||||||
%ISOtech;
|
|
||||||
-->
|
|
||||||
<!ENTITY aleph SDATA "[aleph ]"--/aleph =aleph, Hebrew-->
|
|
||||||
<!ENTITY and SDATA "[and ]"--/wedge /land B: =logical and-->
|
|
||||||
<!ENTITY ang90 SDATA "[ang90 ]"--=right (90 degree) angle-->
|
|
||||||
<!ENTITY angsph SDATA "[angsph]"--/sphericalangle =angle-spherical-->
|
|
||||||
<!ENTITY ap SDATA "[ap ]"--/approx R: =approximate-->
|
|
||||||
<!ENTITY becaus SDATA "[becaus]"--/because R: =because-->
|
|
||||||
<!ENTITY bottom SDATA "[bottom]"--/bot B: =perpendicular-->
|
|
||||||
<!ENTITY cap SDATA "[cap ]"--/cap B: =intersection-->
|
|
||||||
<!ENTITY cong SDATA "[cong ]"--/cong R: =congruent with-->
|
|
||||||
<!ENTITY conint SDATA "[conint]"--/oint L: =contour integral operator-->
|
|
||||||
<!ENTITY cup SDATA "[cup ]"--/cup B: =union or logical sum-->
|
|
||||||
<!ENTITY equiv SDATA "[equiv ]"--/equiv R: =identical with-->
|
|
||||||
<!ENTITY exist SDATA "[exist ]"--/exists =at least one exists-->
|
|
||||||
<!ENTITY forall SDATA "[forall]"--/forall =for all-->
|
|
||||||
<!ENTITY fnof SDATA "[fnof ]"--=function of (italic small f)-->
|
|
||||||
<!ENTITY ge SDATA "[ge ]"--/geq /ge R: =greater-than-or-equal-->
|
|
||||||
<!ENTITY iff SDATA "[iff ]"--/iff =if and only if-->
|
|
||||||
<!ENTITY infin SDATA "[infin ]"--/infty =infinity-->
|
|
||||||
<!ENTITY int SDATA "[int ]"--/int L: =integral operator-->
|
|
||||||
<!ENTITY isin SDATA "[isin ]"--/in R: =set membership-->
|
|
||||||
<!ENTITY lang SDATA "[lang ]"--/langle O: =left angle bracket-->
|
|
||||||
<!ENTITY lArr SDATA "[lArr ]"--/Leftarrow A: =is implied by-->
|
|
||||||
<!ENTITY le SDATA "[le ]"--/leq /le R: =less-than-or-equal-->
|
|
||||||
<!ENTITY minus SDATA "[minus ]"--B: =minus sign-->
|
|
||||||
<!ENTITY mnplus SDATA "[mnplus]"--/mp B: =minus-or-plus sign-->
|
|
||||||
<!ENTITY nabla SDATA "[nabla ]"--/nabla =del, Hamilton operator-->
|
|
||||||
<!ENTITY ne SDATA "[ne ]"--/ne /neq R: =not equal-->
|
|
||||||
<!ENTITY ni SDATA "[ni ]"--/ni /owns R: =contains-->
|
|
||||||
<!ENTITY or SDATA "[or ]"--/vee /lor B: =logical or-->
|
|
||||||
<!ENTITY par SDATA "[par ]"--/parallel R: =parallel-->
|
|
||||||
<!ENTITY part SDATA "[part ]"--/partial =partial differential-->
|
|
||||||
<!ENTITY permil SDATA "[permil]"--=per thousand-->
|
|
||||||
<!ENTITY perp SDATA "[perp ]"--/perp R: =perpendicular-->
|
|
||||||
<!ENTITY prime SDATA "[prime ]"--/prime =prime or minute-->
|
|
||||||
<!ENTITY Prime SDATA "[Prime ]"--=double prime or second-->
|
|
||||||
<!ENTITY prop SDATA "[prop ]"--/propto R: =is proportional to-->
|
|
||||||
<!ENTITY radic SDATA "[radic ]"--/surd =radical-->
|
|
||||||
<!ENTITY rang SDATA "[rang ]"--/rangle C: =right angle bracket-->
|
|
||||||
<!ENTITY rArr SDATA "[rArr ]"--/Rightarrow A: =implies-->
|
|
||||||
<!ENTITY sim SDATA "[sim ]"--/sim R: =similar-->
|
|
||||||
<!ENTITY sime SDATA "[sime ]"--/simeq R: =similar, equals-->
|
|
||||||
<!ENTITY square SDATA "[square]"--/square B: =square-->
|
|
||||||
<!ENTITY sub SDATA "[sub ]"--/subset R: =subset or is implied by-->
|
|
||||||
<!ENTITY sube SDATA "[sube ]"--/subseteq R: =subset, equals-->
|
|
||||||
<!ENTITY sup SDATA "[sup ]"--/supset R: =superset or implies-->
|
|
||||||
<!ENTITY supe SDATA "[supe ]"--/supseteq R: =superset, equals-->
|
|
||||||
<!ENTITY there4 SDATA "[there4]"--/therefore R: =therefore-->
|
|
||||||
<!ENTITY Verbar SDATA "[Verbar]"--/Vert =dbl vertical bar-->
|
|
||||||
|
|
||||||
<!ENTITY angst SDATA "[angst ]"--Angstrom =capital A, ring-->
|
|
||||||
<!ENTITY bernou SDATA "[bernou]"--Bernoulli function (script capital B)-->
|
|
||||||
<!ENTITY compfn SDATA "[compfn]"--B: composite function (small circle)-->
|
|
||||||
<!ENTITY Dot SDATA "[Dot ]"--=dieresis or umlaut mark-->
|
|
||||||
<!ENTITY DotDot SDATA "[DotDot]"--four dots above-->
|
|
||||||
<!ENTITY hamilt SDATA "[hamilt]"--Hamiltonian (script capital H)-->
|
|
||||||
<!ENTITY lagran SDATA "[lagran]"--Lagrangian (script capital L)-->
|
|
||||||
<!ENTITY lowast SDATA "[lowast]"--low asterisk-->
|
|
||||||
<!ENTITY notin SDATA "[notin ]"--N: negated set membership-->
|
|
||||||
<!ENTITY order SDATA "[order ]"--order of (script small o)-->
|
|
||||||
<!ENTITY phmmat SDATA "[phmmat]"--physics M-matrix (script capital M)-->
|
|
||||||
<!ENTITY tdot SDATA "[tdot ]"--three dots above-->
|
|
||||||
<!ENTITY tprime SDATA "[tprime]"--triple prime-->
|
|
||||||
<!ENTITY wedgeq SDATA "[wedgeq]"--R: corresponds to (wedge, equals)-->
|
|
@ -1,15 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
FILES= ISOamsa ISOamsb ISOamsc ISOamsn ISOamso ISOamsr
|
|
||||||
FILES+= ISObox ISOcyr1 ISOcyr2 ISOdia ISOgrk1 ISOgrk2 ISOgrk3
|
|
||||||
FILES+= ISOgrk4 ISOlat1 ISOlat2 ISOnum ISOpub ISOtech
|
|
||||||
NOOBJ= noobj
|
|
||||||
|
|
||||||
all clean cleandir depend lint tags:
|
|
||||||
|
|
||||||
afterinstall:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
|
||||||
${DESTDIR}${BINDIR}/${.CURDIR:T}
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
SUBDIR= FreeBSD ISO docbook transpec
|
|
||||||
FILES= CATALOG
|
|
||||||
MAINTAINER=jfieber@freebsd.org
|
|
||||||
|
|
||||||
BINDIR?=/usr/share
|
|
||||||
DISTRIBUTION?= bin
|
|
||||||
|
|
||||||
afterinstall:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
|
||||||
${DESTDIR}${BINDIR}/${.CURDIR:T}
|
|
||||||
|
|
||||||
afterdistribute:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
|
||||||
${DISTDIR}/${DISTRIBUTION}${BINDIR}/${.CURDIR:T}
|
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
|
@ -1,3 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
BINDIR?= /usr/share/sgml
|
|
@ -1,15 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
FILES= cals-tbl.dtd dbgenent.mod dbhier.mod dbpool.mod
|
|
||||||
FILES+= docbook.dcl docbook.dtd
|
|
||||||
NOOBJ= noobj
|
|
||||||
|
|
||||||
all clean cleandir depend lint tags:
|
|
||||||
|
|
||||||
afterinstall:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
|
||||||
${DESTDIR}${BINDIR}/${.CURDIR:T}
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
|
||||||
|
|
||||||
|
|
@ -1,331 +0,0 @@
|
|||||||
<!-- CALS TABLE MODEL DECLARATION MODULE -->
|
|
||||||
|
|
||||||
<!-- This set of declarations defines the CALS Table Model as of the
|
|
||||||
date shown in the Formal Public Identifier (FPI) for this entity.
|
|
||||||
|
|
||||||
This set of declarations may be referred to using a public external
|
|
||||||
entity declaration and reference as shown in the following two lines:
|
|
||||||
|
|
||||||
<!ENTITY % calstbls PUBLIC "-//USA-DOD//DTD Table Model 951010//EN">
|
|
||||||
%calstbls;
|
|
||||||
|
|
||||||
If various parameter entities used within this set of declarations
|
|
||||||
are to be given non-default values, the appropriate declarations
|
|
||||||
should be given before calling in this package (i.e., before the
|
|
||||||
"%calstbls;" reference).
|
|
||||||
|
|
||||||
NOTE: This set of declarations assumes a NAMELEN of 32 as is used in
|
|
||||||
the standard CALS defined SGML declaration.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- This entity includes a set of element and attribute declarations
|
|
||||||
that partially defines the CALS table model. However, the model
|
|
||||||
is not well-defined without the accompanying natural language
|
|
||||||
description of the semantics (meanings) of these various elements,
|
|
||||||
attributes, and attribute values. The semantic writeup, available
|
|
||||||
as a separate entity, should be used in conjunction with this entity.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- In order to use the CALS table model, various parameter entity
|
|
||||||
declarations are required. A brief description is as follows:
|
|
||||||
|
|
||||||
ENTITY NAME WHERE USED WHAT IT IS
|
|
||||||
|
|
||||||
%bodyatt In ATTLIST of: Additional (non-table related)
|
|
||||||
table element(s) attributes on the overall
|
|
||||||
(wrapper) table element(s)
|
|
||||||
|
|
||||||
%secur In ATTLIST of: Additional (non-table related)
|
|
||||||
table element(s) attributes on all the listed
|
|
||||||
<tgroup> elements
|
|
||||||
<tbody>
|
|
||||||
table head and foot element(s)
|
|
||||||
<row>
|
|
||||||
<entrytbl>
|
|
||||||
<entry>
|
|
||||||
|
|
||||||
%yesorno In ATTLIST of: An attribute declared value
|
|
||||||
almost all elements for a "boolean" attribute
|
|
||||||
|
|
||||||
%titles In content model of: The "title" part of the model
|
|
||||||
table element(s) group for the table element(s)
|
|
||||||
|
|
||||||
%paracon In content model of: The "text" (data content) part
|
|
||||||
<entry> of the model group for <entry>
|
|
||||||
|
|
||||||
%tbl.table.name In declaration of: The name(s) of the "table"
|
|
||||||
table element(s) element(s)
|
|
||||||
|
|
||||||
%tbl.table-titles.mdl In content model of: The model group for the title
|
|
||||||
table elements(s) part of the content model for
|
|
||||||
table element(s)
|
|
||||||
|
|
||||||
%tbl.table-main.mdl In content model of: The model group for the main part
|
|
||||||
table elements(s) (not including titles) of the
|
|
||||||
content model for table element(s)
|
|
||||||
|
|
||||||
%tbl.table.mdl In content model of: The model group for the content
|
|
||||||
table elements(s) model for table element(s),
|
|
||||||
often (and by default) defined
|
|
||||||
in terms of %tbl.table-titles.mdl
|
|
||||||
and %tbl.table-main.mdl
|
|
||||||
|
|
||||||
%tbl.table.excep In content model of: The exceptions for the content
|
|
||||||
table element(s) model for table element(s)
|
|
||||||
|
|
||||||
%tbl.table.att In ATTLIST of: Additional attributes on the
|
|
||||||
table element(s) table element(s)
|
|
||||||
|
|
||||||
%tbl.tgroup.mdl In content model of: The model group for the content
|
|
||||||
<tgroup> model for <tgroup>
|
|
||||||
|
|
||||||
%tbl.tgroup.att In ATTLIST of: Additional attributes on the
|
|
||||||
<tgroup> <tgroup> and <entrytbl> elements
|
|
||||||
<entrytbl>
|
|
||||||
|
|
||||||
%tbl.hdft.name In declaration of: The name(s) of the table
|
|
||||||
head/foot element(s) head and foot element(s)
|
|
||||||
|
|
||||||
%tbl.hdft.mdl In content model of: The model group for the content
|
|
||||||
head/foot element(s) model for head/foot element(s)
|
|
||||||
|
|
||||||
%tbl.hdft.excep In content model of: The exceptions for the content
|
|
||||||
head/foot element(s) model for head/foot element(s)
|
|
||||||
|
|
||||||
%tbl.row.mdl In content model of: The model group for the content
|
|
||||||
<row> model for <row>
|
|
||||||
|
|
||||||
%tbl.row.excep In content model of: The exceptions for the content
|
|
||||||
<row> model for <row>
|
|
||||||
|
|
||||||
%tbl.entrytbl.mdl In content model of: The model group for the content
|
|
||||||
<entrytbl> model for <entrytbl>
|
|
||||||
|
|
||||||
%tbl.entrytbl.excep In content model of: The exceptions for the content
|
|
||||||
<entrytbl> model for <entrytbl>
|
|
||||||
|
|
||||||
%tbl.entry.mdl In content model of: The model group for the content
|
|
||||||
<entry> model for <entry>
|
|
||||||
|
|
||||||
%tbl.entry.excep In content model of: The exceptions for the content
|
|
||||||
<entry> model for <entry>
|
|
||||||
|
|
||||||
If any of these parameter entities are not declared before this set of
|
|
||||||
declarations is referenced, this set of declarations will make the
|
|
||||||
following default definitions for all of these have parameter entities.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- These definitions are not directly related to the table model, but are
|
|
||||||
used in the default CALS table model and are usually defined elsewhere
|
|
||||||
(and prior to the inclusion of this table module) in a CALS DTD. -->
|
|
||||||
|
|
||||||
<!ENTITY % bodyatt "">
|
|
||||||
<!ENTITY % secur "">
|
|
||||||
<!ENTITY % yesorno 'NUMBER' -- no if zero(s),
|
|
||||||
yes if any other digits value -->
|
|
||||||
<!ENTITY % titles 'title?'>
|
|
||||||
<!ENTITY % paracon '#PCDATA' -- default for use in entry content -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
The parameter entities as defined below provide the CALS table model
|
|
||||||
as published (as part of the Example DTD) in MIL-HDBK-28001.
|
|
||||||
|
|
||||||
These following declarations provide the CALS-compliant default definitions
|
|
||||||
for these entities. However, these entities can and should be redefined
|
|
||||||
(by giving the appropriate parameter entity declaration(s) prior to the
|
|
||||||
reference to this Table Model declaration set entity) to fit the needs
|
|
||||||
of the current application.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ENTITY % tbl.table.name "(table|chart)">
|
|
||||||
<!ENTITY % tbl.table-titles.mdl "%titles,">
|
|
||||||
<!ENTITY % tbl.table-main.mdl "(tgroup+|graphic+)">
|
|
||||||
<!ENTITY % tbl.table.mdl "%tbl.table-titles.mdl; %tbl.table-main.mdl;">
|
|
||||||
<!ENTITY % tbl.table.excep "-(table|chart|figure)">
|
|
||||||
<!ENTITY % tbl.table.att '
|
|
||||||
tabstyle NMTOKEN #IMPLIED
|
|
||||||
tocentry %yesorno; #IMPLIED
|
|
||||||
shortentry %yesorno; #IMPLIED
|
|
||||||
orient (port|land) #IMPLIED
|
|
||||||
pgwide %yesorno; #IMPLIED '>
|
|
||||||
<!ENTITY % tbl.tgroup.mdl "colspec*,spanspec*,thead?,tfoot?,tbody">
|
|
||||||
<!ENTITY % tbl.tgroup.att '
|
|
||||||
tgroupstyle NMTOKEN #IMPLIED '>
|
|
||||||
<!ENTITY % tbl.hdft.name "(thead|tfoot)">
|
|
||||||
<!ENTITY % tbl.hdft.mdl "colspec*,row+">
|
|
||||||
<!ENTITY % tbl.hdft.excep "-(entrytbl)">
|
|
||||||
<!ENTITY % tbl.row.mdl "(entry|entrytbl)+">
|
|
||||||
<!ENTITY % tbl.row.excep "-(pgbrk)">
|
|
||||||
<!ENTITY % tbl.entrytbl.mdl "colspec*,spanspec*,thead?,tbody">
|
|
||||||
<!ENTITY % tbl.entrytbl.excep "-(entrytbl|pgbrk)">
|
|
||||||
<!ENTITY % tbl.entry.mdl "(para|warning|caution|note|legend|%paracon;)*">
|
|
||||||
<!ENTITY % tbl.entry.excep "-(pgbrk)">
|
|
||||||
|
|
||||||
<!-- ===== Element and attribute declarations follow. ===== -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Default declarations previously defined in this entity and
|
|
||||||
referenced below include:
|
|
||||||
ENTITY % tbl.table.name "(table|chart)"
|
|
||||||
ENTITY % tbl.table-titles.mdl "%titles,"
|
|
||||||
ENTITY % tbl.table-main.mdl "(tgroup+|graphic+)"
|
|
||||||
ENTITY % tbl.table.mdl "%tbl.table-titles; %tbl.table-main.mdl;"
|
|
||||||
ENTITY % tbl.table.excep "-(table|chart|figure)"
|
|
||||||
ENTITY % tbl.table.att '
|
|
||||||
tabstyle NMTOKEN #IMPLIED
|
|
||||||
tocentry %yesorno; #IMPLIED
|
|
||||||
shortentry %yesorno; #IMPLIED
|
|
||||||
orient (port|land) #IMPLIED
|
|
||||||
pgwide %yesorno; #IMPLIED '
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT %tbl.table.name; - - (%tbl.table.mdl;) %tbl.table.excep; >
|
|
||||||
|
|
||||||
<!ATTLIST table
|
|
||||||
frame (top|bottom|topbot|all|sides|none) #IMPLIED
|
|
||||||
colsep %yesorno; #IMPLIED
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
%tbl.table.att;
|
|
||||||
%bodyatt;
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Default declarations previously defined in this entity and
|
|
||||||
referenced below include:
|
|
||||||
ENTITY % tbl.tgroup.mdl "colspec*,spanspec*,thead?,tfoot?,tbody"
|
|
||||||
ENTITY % tbl.tgroup.att '
|
|
||||||
tgroupstyle NMTOKEN #IMPLIED '
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT tgroup - O (%tbl.tgroup.mdl;) >
|
|
||||||
|
|
||||||
<!ATTLIST tgroup
|
|
||||||
cols NUMBER #REQUIRED
|
|
||||||
%tbl.tgroup.att;
|
|
||||||
colsep %yesorno; #IMPLIED
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
align (left|right|center|justify|char) #IMPLIED
|
|
||||||
char CDATA #IMPLIED
|
|
||||||
charoff NUTOKEN #IMPLIED
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
||||||
<!ELEMENT colspec - O EMPTY >
|
|
||||||
|
|
||||||
<!ATTLIST colspec
|
|
||||||
colnum NUMBER #IMPLIED
|
|
||||||
colname NMTOKEN #IMPLIED
|
|
||||||
colwidth CDATA #IMPLIED
|
|
||||||
colsep %yesorno; #IMPLIED
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
align (left|right|center|justify|char) #IMPLIED
|
|
||||||
char CDATA #IMPLIED
|
|
||||||
charoff NUTOKEN #IMPLIED
|
|
||||||
>
|
|
||||||
|
|
||||||
<!ELEMENT spanspec - O EMPTY >
|
|
||||||
|
|
||||||
<!ATTLIST spanspec
|
|
||||||
namest NMTOKEN #REQUIRED
|
|
||||||
nameend NMTOKEN #REQUIRED
|
|
||||||
spanname NMTOKEN #REQUIRED
|
|
||||||
colsep %yesorno; #IMPLIED
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
align (left|right|center|justify|char) #IMPLIED
|
|
||||||
char CDATA #IMPLIED
|
|
||||||
charoff NUTOKEN #IMPLIED
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Default declarations previously defined in this entity and
|
|
||||||
referenced below include:
|
|
||||||
ENTITY % tbl.hdft.name "(thead|tfoot)"
|
|
||||||
ENTITY % tbl.hdft.mdl "colspec*,row+"
|
|
||||||
ENTITY % tbl.hdft.excep "-(entrytbl)"
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT %tbl.hdft.name; - O (%tbl.hdft.mdl;) %tbl.hdft.excep;>
|
|
||||||
|
|
||||||
<!ATTLIST %tbl.hdft.name;
|
|
||||||
valign (top|middle|bottom) #IMPLIED
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<!ELEMENT tbody - O (row+)>
|
|
||||||
|
|
||||||
<!ATTLIST tbody
|
|
||||||
valign (top|middle|bottom) #IMPLIED
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Default declarations previously defined in this entity and
|
|
||||||
referenced below include:
|
|
||||||
ENTITY % tbl.row.mdl "(entry|entrytbl)+"
|
|
||||||
ENTITY % tbl.row.excep "-(pgbrk)"
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT row - O (%tbl.row.mdl;) %tbl.row.excep;>
|
|
||||||
|
|
||||||
<!ATTLIST row
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
valign (top|middle|bottom) #IMPLIED
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Default declarations previously defined in this entity and
|
|
||||||
referenced below include:
|
|
||||||
ENTITY % tbl.entrytbl.mdl "colspec*,spanspec*,thead?,tbody"
|
|
||||||
ENTITY % tbl.entrytbl.excep "-(entrytbl|pgbrk)"
|
|
||||||
ENTITY % tbl.tgroup.att '
|
|
||||||
tgroupstyle NMTOKEN #IMPLIED '
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT entrytbl - - (%tbl.entrytbl.mdl) %tbl.entrytbl.excep; >
|
|
||||||
|
|
||||||
<!ATTLIST entrytbl
|
|
||||||
cols NUMBER #REQUIRED
|
|
||||||
%tbl.tgroup.att;
|
|
||||||
colname NMTOKEN #IMPLIED
|
|
||||||
spanname NMTOKEN #IMPLIED
|
|
||||||
namest NMTOKEN #IMPLIED
|
|
||||||
nameend NMTOKEN #IMPLIED
|
|
||||||
colsep %yesorno; #IMPLIED
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
align (left|right|center|justify|char) #IMPLIED
|
|
||||||
char CDATA #IMPLIED
|
|
||||||
charoff NUTOKEN #IMPLIED
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Default declarations previously defined in this entity and
|
|
||||||
referenced below include:
|
|
||||||
ENTITY % paracon "#PCDATA"
|
|
||||||
ENTITY % tbl.entry.mdl "(para|warning|caution|note|legend|%paracon;)*"
|
|
||||||
ENTITY % tbl.entry.excep "-(pgbrk)"
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT entry - O (%tbl.entry.mdl;) %tbl.entry.excep; >
|
|
||||||
|
|
||||||
<!ATTLIST entry
|
|
||||||
colname NMTOKEN #IMPLIED
|
|
||||||
namest NMTOKEN #IMPLIED
|
|
||||||
nameend NMTOKEN #IMPLIED
|
|
||||||
spanname NMTOKEN #IMPLIED
|
|
||||||
morerows NUMBER #IMPLIED
|
|
||||||
colsep %yesorno; #IMPLIED
|
|
||||||
rowsep %yesorno; #IMPLIED
|
|
||||||
align (left|right|center|justify|char) #IMPLIED
|
|
||||||
char CDATA #IMPLIED
|
|
||||||
charoff NUTOKEN #IMPLIED
|
|
||||||
rotate %yesorno; #IMPLIED
|
|
||||||
valign (top|middle|bottom) #IMPLIED
|
|
||||||
%secur;
|
|
||||||
>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
<!-- ...................................................................... -->
|
|
||||||
<!-- DocBook additional general entities V3.0 ............................. -->
|
|
||||||
<!-- File dbgenent.mod .................................................... -->
|
|
||||||
|
|
||||||
<!-- You can edit this file to add the following:
|
|
||||||
|
|
||||||
o General entity declarations of any kind. For example:
|
|
||||||
|
|
||||||
<!ENTITY happyface SDATA "insert-face"> (system-specific data)
|
|
||||||
<!ENTITY productname "WinWidget"> (small boilerplate)
|
|
||||||
<!ENTITY legal-notice SYSTEM "notice.sgm"> (large boilerplate)
|
|
||||||
|
|
||||||
o Notation declarations. For example:
|
|
||||||
|
|
||||||
<!NOTATION chicken-scratch SYSTEM>
|
|
||||||
|
|
||||||
o Declarations for and references to external parameter entities
|
|
||||||
containing collections of any of the above. For example:
|
|
||||||
|
|
||||||
<!ENTITY % all-titles PUBLIC "-//DocTools//ELEMENTS Book Titles//EN">
|
|
||||||
%all-titles;
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- End of DocBook additional general entities V3.0 ...................... -->
|
|
||||||
<!-- ...................................................................... -->
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,106 +0,0 @@
|
|||||||
<!SGML "ISO 8879:1986"
|
|
||||||
-- ...................................................................... --
|
|
||||||
-- DocBook SGML declaration V3.0 ........................................ --
|
|
||||||
-- file docbook.dcl ..................................................... --
|
|
||||||
|
|
||||||
CHARSET
|
|
||||||
|
|
||||||
BASESET
|
|
||||||
"ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0"
|
|
||||||
DESCSET
|
|
||||||
0 9 UNUSED
|
|
||||||
9 2 9
|
|
||||||
11 2 UNUSED
|
|
||||||
13 1 13
|
|
||||||
14 18 UNUSED
|
|
||||||
32 95 32
|
|
||||||
127 1 UNUSED
|
|
||||||
|
|
||||||
BASESET
|
|
||||||
"ISO Registration Number 100//CHARSET ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1"
|
|
||||||
DESCSET
|
|
||||||
128 32 UNUSED
|
|
||||||
160 96 32
|
|
||||||
|
|
||||||
CAPACITY SGMLREF
|
|
||||||
|
|
||||||
TOTALCAP 99000000
|
|
||||||
ATTCAP 1000000
|
|
||||||
ATTCHCAP 1000000
|
|
||||||
AVGRPCAP 1000000
|
|
||||||
ELEMCAP 1000000
|
|
||||||
ENTCAP 1000000
|
|
||||||
ENTCHCAP 1000000
|
|
||||||
GRPCAP 1000000
|
|
||||||
IDCAP 32000000
|
|
||||||
IDREFCAP 32000000
|
|
||||||
|
|
||||||
SCOPE DOCUMENT
|
|
||||||
|
|
||||||
SYNTAX
|
|
||||||
|
|
||||||
SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9
|
|
||||||
10 11 12 13 14 15 16 17 18 19
|
|
||||||
20 21 22 23 24 25 26 27 28 29
|
|
||||||
30 31 127 128 129
|
|
||||||
130 131 132 133 134 135 136 137 138 139
|
|
||||||
140 141 142 143 144 145 146 147 148 149
|
|
||||||
150 151 152 153 154 155 156 157 158 159
|
|
||||||
|
|
||||||
BASESET
|
|
||||||
"ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0"
|
|
||||||
DESCSET
|
|
||||||
0 128 0
|
|
||||||
|
|
||||||
FUNCTION
|
|
||||||
RE 13
|
|
||||||
RS 10
|
|
||||||
SPACE 32
|
|
||||||
TAB SEPCHAR 9
|
|
||||||
|
|
||||||
NAMING
|
|
||||||
LCNMSTRT ""
|
|
||||||
UCNMSTRT ""
|
|
||||||
LCNMCHAR ".-"
|
|
||||||
UCNMCHAR ".-"
|
|
||||||
NAMECASE
|
|
||||||
GENERAL YES
|
|
||||||
ENTITY NO
|
|
||||||
|
|
||||||
DELIM
|
|
||||||
GENERAL SGMLREF
|
|
||||||
SHORTREF SGMLREF
|
|
||||||
|
|
||||||
NAMES SGMLREF
|
|
||||||
|
|
||||||
QUANTITY SGMLREF
|
|
||||||
ATTCNT 256
|
|
||||||
GRPCNT 253
|
|
||||||
GRPGTCNT 253
|
|
||||||
LITLEN 8092
|
|
||||||
NAMELEN 44
|
|
||||||
TAGLVL 100
|
|
||||||
|
|
||||||
FEATURES
|
|
||||||
|
|
||||||
MINIMIZE
|
|
||||||
DATATAG NO
|
|
||||||
OMITTAG NO
|
|
||||||
RANK NO
|
|
||||||
SHORTTAG YES
|
|
||||||
|
|
||||||
LINK
|
|
||||||
SIMPLE NO
|
|
||||||
IMPLICIT NO
|
|
||||||
EXPLICIT NO
|
|
||||||
|
|
||||||
OTHER
|
|
||||||
CONCUR NO
|
|
||||||
SUBDOC NO
|
|
||||||
FORMAL YES
|
|
||||||
|
|
||||||
APPINFO NONE
|
|
||||||
|
|
||||||
-- End of DocBook SGML declaration V3.0 ................................. --
|
|
||||||
-- ...................................................................... --
|
|
||||||
>
|
|
@ -1,277 +0,0 @@
|
|||||||
<!-- ...................................................................... -->
|
|
||||||
<!-- DocBook DTD V3.0 ..................................................... -->
|
|
||||||
<!-- File docbook.dtd ..................................................... -->
|
|
||||||
|
|
||||||
<!-- Copyright 1992, 1993, 1994, 1995, 1996 HaL Computer Systems, Inc.,
|
|
||||||
O'Reilly & Associates, Inc., ArborText, Inc., and Fujitsu Software
|
|
||||||
Corporation.
|
|
||||||
|
|
||||||
Permission to use, copy, modify and distribute the DocBook DTD and
|
|
||||||
its accompanying documentation for any purpose and without fee is
|
|
||||||
hereby granted in perpetuity, provided that the above copyright
|
|
||||||
notice and this paragraph appear in all copies. The copyright
|
|
||||||
holders make no representation about the suitability of the DTD for
|
|
||||||
any purpose. It is provided "as is" without expressed or implied
|
|
||||||
warranty.
|
|
||||||
|
|
||||||
If you modify the DocBook DTD in any way, except for declaring and
|
|
||||||
referencing additional sets of general entities and declaring
|
|
||||||
additional notations, label your DTD as a variant of DocBook. See
|
|
||||||
the maintenance documentation for more information.
|
|
||||||
|
|
||||||
Please direct all questions, bug reports, or suggestions for
|
|
||||||
changes to the davenport@online.ora.com mailing list or to one of
|
|
||||||
the maintainers:
|
|
||||||
|
|
||||||
o Terry Allen, Fujitsu Software Corporation
|
|
||||||
3055 Orchard Drive, San Jose, CA 95134
|
|
||||||
<tallen@fsc.fujitsu.com>
|
|
||||||
|
|
||||||
o Eve Maler, ArborText Inc.
|
|
||||||
105 Lexington St., Burlington, MA 01803
|
|
||||||
<elm@arbortext.com>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- ...................................................................... -->
|
|
||||||
|
|
||||||
<!-- This is the driver file for Version 3.0 of the DocBook DTD.
|
|
||||||
Please use the following formal public identifier to identify it:
|
|
||||||
|
|
||||||
"-//Davenport//DTD DocBook V3.0//EN"
|
|
||||||
|
|
||||||
For example, if your document's top-level element is Book, and
|
|
||||||
you are using DocBook directly, use the FPI in the DOCTYPE
|
|
||||||
declaration:
|
|
||||||
|
|
||||||
<!DOCTYPE Book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [...]>
|
|
||||||
|
|
||||||
Or, if you have a higher-level driver file that customizes DocBook,
|
|
||||||
use the FPI in the parameter entity declaration:
|
|
||||||
|
|
||||||
<!ENTITY % DocBookDTD PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
|
|
||||||
%DocBookDTD;
|
|
||||||
|
|
||||||
The DocBook DTD is accompanied by an SGML declaration.
|
|
||||||
|
|
||||||
See the documentation for detailed information on the parameter
|
|
||||||
entity and module scheme used in DocBook, customizing DocBook and
|
|
||||||
planning for interchange, and changes made since the last release
|
|
||||||
of DocBook.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- ...................................................................... -->
|
|
||||||
<!-- Notation declarations ................................................ -->
|
|
||||||
|
|
||||||
<!ENTITY % local.notation.class "">
|
|
||||||
<!ENTITY % notation.class
|
|
||||||
"BMP| CGM-CHAR | CGM-BINARY | CGM-CLEAR | DITROFF | DVI
|
|
||||||
| EPS | EQN | FAX | GIF | GIF87a | GIF89a | IGES | PCX
|
|
||||||
| PIC | PS | SGML | TBL | TEX | TIFF | WMF | WPG
|
|
||||||
| linespecific
|
|
||||||
%local.notation.class;">
|
|
||||||
|
|
||||||
<!NOTATION BMP PUBLIC
|
|
||||||
"+//ISBN 0-7923-9432-1::Graphic Notation//NOTATION Microsoft Windows bitmap//EN">
|
|
||||||
<!NOTATION CGM-CHAR PUBLIC "ISO 8632/2//NOTATION Character encoding//EN">
|
|
||||||
<!NOTATION CGM-BINARY PUBLIC "ISO 8632/3//NOTATION Binary encoding//EN">
|
|
||||||
<!NOTATION CGM-CLEAR PUBLIC "ISO 8632/4//NOTATION Clear text encoding//EN">
|
|
||||||
<!NOTATION DITROFF SYSTEM "DITROFF">
|
|
||||||
<!NOTATION DVI SYSTEM "DVI">
|
|
||||||
<!NOTATION EPS PUBLIC
|
|
||||||
"+//ISBN 0-201-18127-4::Adobe//NOTATION PostScript Language Ref. Manual//EN">
|
|
||||||
<!-- EQN was SYSTEM "-//AT&T//NOTATION EQN-1//EN" -->
|
|
||||||
<!NOTATION EQN SYSTEM>
|
|
||||||
<!NOTATION FAX PUBLIC
|
|
||||||
"-//USA-DOD//NOTATION CCITT Group 4 Facsimile Type 1 Untiled Raster//EN">
|
|
||||||
<!NOTATION GIF SYSTEM "GIF">
|
|
||||||
<!NOTATION GIF87a PUBLIC
|
|
||||||
"-//CompuServe//NOTATION Graphics Interchange Format 87a//EN">
|
|
||||||
|
|
||||||
<!NOTATION GIF89a PUBLIC
|
|
||||||
"-//CompuServe//NOTATION Graphics Interchange Format 89a//EN">
|
|
||||||
<!NOTATION IGES PUBLIC
|
|
||||||
"-//USA-DOD//NOTATION (ASME/ANSI Y14.26M-1987) Initial Graphics Exchange Specification//EN">
|
|
||||||
<!NOTATION PCX PUBLIC
|
|
||||||
"+//ISBN 0-7923-9432-1::Graphic Notation//NOTATION ZSoft PCX bitmap//EN">
|
|
||||||
<!-- PIC was SYSTEM "-//AT&T//NOTATION EQN-1//EN" -->
|
|
||||||
<!NOTATION PIC SYSTEM>
|
|
||||||
<!NOTATION PS SYSTEM "PS">
|
|
||||||
<!NOTATION SGML PUBLIC
|
|
||||||
"ISO 8879:1986//NOTATION Standard Generalized Markup Language//EN">
|
|
||||||
<!-- TBL was SYSTEM "-//AT&T//NOTATION EQN-1//EN" -->
|
|
||||||
<!NOTATION TBL SYSTEM>
|
|
||||||
<!NOTATION TEX PUBLIC
|
|
||||||
"+//ISBN 0-201-13448-9::Knuth//NOTATION The TeXbook//EN">
|
|
||||||
<!NOTATION TIFF SYSTEM "TIFF">
|
|
||||||
<!NOTATION WMF PUBLIC
|
|
||||||
"+//ISBN 0-7923-9432-1::Graphic Notation//NOTATION Microsoft Windows Metafile//EN">
|
|
||||||
<!NOTATION WPG SYSTEM "WPG" --WordPerfect Graphic format-->
|
|
||||||
<!NOTATION linespecific SYSTEM
|
|
||||||
"line ends and leading white space must be preserved in output">
|
|
||||||
|
|
||||||
<!-- ...................................................................... -->
|
|
||||||
<!-- ISO character entity sets ............................................ -->
|
|
||||||
|
|
||||||
<!ENTITY % ISOamsa.module "INCLUDE">
|
|
||||||
<![ %ISOamsa.module; [
|
|
||||||
<!ENTITY % ISOamsa PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN">
|
|
||||||
%ISOamsa;
|
|
||||||
<!--end of ISOamsa.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOamsb.module "INCLUDE">
|
|
||||||
<![ %ISOamsb.module; [
|
|
||||||
<!ENTITY % ISOamsb PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN">
|
|
||||||
%ISOamsb;
|
|
||||||
<!--end of ISOamsb.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOamsc.module "INCLUDE">
|
|
||||||
<![ %ISOamsc.module; [
|
|
||||||
<!ENTITY % ISOamsc PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN">
|
|
||||||
%ISOamsc;
|
|
||||||
<!--end of ISOamsc.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOamsn.module "INCLUDE">
|
|
||||||
<![ %ISOamsn.module; [
|
|
||||||
<!ENTITY % ISOamsn PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN">
|
|
||||||
%ISOamsn;
|
|
||||||
<!--end of ISOamsn.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOamso.module "INCLUDE">
|
|
||||||
<![ %ISOamso.module; [
|
|
||||||
<!ENTITY % ISOamso PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN">
|
|
||||||
%ISOamso;
|
|
||||||
<!--end of ISOamso.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOamsr.module "INCLUDE">
|
|
||||||
<![ %ISOamsr.module; [
|
|
||||||
<!ENTITY % ISOamsr PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN">
|
|
||||||
%ISOamsr;
|
|
||||||
<!--end of ISOamsr.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISObox.module "INCLUDE">
|
|
||||||
<![ %ISObox.module; [
|
|
||||||
<!ENTITY % ISObox PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Box and Line Drawing//EN">
|
|
||||||
%ISObox;
|
|
||||||
<!--end of ISObox.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOcyr1.module "INCLUDE">
|
|
||||||
<![ %ISOcyr1.module; [
|
|
||||||
<!ENTITY % ISOcyr1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
|
|
||||||
%ISOcyr1;
|
|
||||||
<!--end of ISOcyr1.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOcyr2.module "INCLUDE">
|
|
||||||
<![ %ISOcyr2.module; [
|
|
||||||
<!ENTITY % ISOcyr2 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN">
|
|
||||||
%ISOcyr2;
|
|
||||||
<!--end of ISOcyr2.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOdia.module "INCLUDE">
|
|
||||||
<![ %ISOdia.module; [
|
|
||||||
<!ENTITY % ISOdia PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Diacritical Marks//EN">
|
|
||||||
%ISOdia;
|
|
||||||
<!--end of ISOdia.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOgrk1.module "INCLUDE">
|
|
||||||
<![ %ISOgrk1.module; [
|
|
||||||
<!ENTITY % ISOgrk1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Greek Letters//EN">
|
|
||||||
%ISOgrk1;
|
|
||||||
<!--end of ISOgrk1.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOgrk2.module "INCLUDE">
|
|
||||||
<![ %ISOgrk2.module; [
|
|
||||||
<!ENTITY % ISOgrk2 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Monotoniko Greek//EN">
|
|
||||||
%ISOgrk2;
|
|
||||||
<!--end of ISOgrk2.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOgrk3.module "INCLUDE">
|
|
||||||
<![ %ISOgrk3.module; [
|
|
||||||
<!ENTITY % ISOgrk3 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Greek Symbols//EN">
|
|
||||||
%ISOgrk3;
|
|
||||||
<!--end of ISOgrk3.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOgrk4.module "INCLUDE">
|
|
||||||
<![ %ISOgrk4.module; [
|
|
||||||
<!ENTITY % ISOgrk4 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN">
|
|
||||||
%ISOgrk4;
|
|
||||||
<!--end of ISOgrk4.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOlat1.module "INCLUDE">
|
|
||||||
<![ %ISOlat1.module; [
|
|
||||||
<!ENTITY % ISOlat1 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Latin 1//EN">
|
|
||||||
%ISOlat1;
|
|
||||||
<!--end of ISOlat1.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOlat2.module "INCLUDE">
|
|
||||||
<![ %ISOlat2.module; [
|
|
||||||
<!ENTITY % ISOlat2 PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Added Latin 2//EN">
|
|
||||||
%ISOlat2;
|
|
||||||
<!--end of ISOlat2.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOnum.module "INCLUDE">
|
|
||||||
<![ %ISOnum.module; [
|
|
||||||
<!ENTITY % ISOnum PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
|
|
||||||
%ISOnum;
|
|
||||||
<!--end of ISOnum.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOpub.module "INCLUDE">
|
|
||||||
<![ %ISOpub.module; [
|
|
||||||
<!ENTITY % ISOpub PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES Publishing//EN">
|
|
||||||
%ISOpub;
|
|
||||||
<!--end of ISOpub.module-->]]>
|
|
||||||
|
|
||||||
<!ENTITY % ISOtech.module "INCLUDE">
|
|
||||||
<![ %ISOtech.module; [
|
|
||||||
<!ENTITY % ISOtech PUBLIC
|
|
||||||
"ISO 8879:1986//ENTITIES General Technical//EN">
|
|
||||||
%ISOtech;
|
|
||||||
<!--end of ISOtech.module-->]]>
|
|
||||||
|
|
||||||
<!-- ...................................................................... -->
|
|
||||||
<!-- DTD modules .......................................................... -->
|
|
||||||
|
|
||||||
<!-- Information pool .............. -->
|
|
||||||
|
|
||||||
<!ENTITY % dbpool PUBLIC
|
|
||||||
"-//Davenport//ELEMENTS DocBook Information Pool V3.0//EN">
|
|
||||||
%dbpool;
|
|
||||||
|
|
||||||
<!-- Redeclaration placeholder ..... -->
|
|
||||||
|
|
||||||
<!ENTITY % intermod.redecl.module "IGNORE">
|
|
||||||
<![ %intermod.redecl.module; [
|
|
||||||
%rdbmods;
|
|
||||||
<!--end of intermod.redecl.module-->]]>
|
|
||||||
|
|
||||||
<!-- Document hierarchy ............ -->
|
|
||||||
|
|
||||||
<!ENTITY % dbhier PUBLIC
|
|
||||||
"-//Davenport//ELEMENTS DocBook Document Hierarchy V3.0//EN">
|
|
||||||
%dbhier;
|
|
||||||
<!-- ...................................................................... -->
|
|
||||||
<!-- Other general entities ............................................... -->
|
|
||||||
|
|
||||||
<!ENTITY % dbgenent PUBLIC
|
|
||||||
"-//Davenport//ENTITIES DocBook Additional General Entities V3.0//EN">
|
|
||||||
%dbgenent;
|
|
||||||
|
|
||||||
<!-- End of DocBook DTD V3.0 .............................................. -->
|
|
||||||
<!-- ...................................................................... -->
|
|
@ -1,15 +0,0 @@
|
|||||||
# $Id: Makefile,v 1.4 1997/02/22 13:56:25 peter Exp $
|
|
||||||
|
|
||||||
FILES= roff.cmap roff.sdata linuxdoc-roff.ts
|
|
||||||
FILES+= html.cmap html.sdata linuxdoc-html.ts
|
|
||||||
FILES+= docbook-html.ts
|
|
||||||
FILES+= transpec.dtd
|
|
||||||
NOOBJ= noobj
|
|
||||||
|
|
||||||
all clean cleandir depend lint tags:
|
|
||||||
|
|
||||||
afterinstall:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
|
|
||||||
${DESTDIR}${BINDIR}/${.CURDIR:T}
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 1996
|
|
||||||
John R. Fieber. All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions
|
|
||||||
are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY JOHN R. FIEBER AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL JOHN R. FIEBER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGE.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Character mappings for HTML -->
|
|
||||||
|
|
||||||
<map from="<" to="&lt;">
|
|
||||||
<map from=">" to="&gt;">
|
|
||||||
<map from="&" to="&amp;">
|
|
@ -1,566 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (c) 1994
|
|
||||||
Open Software Foundation, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
the software in this file and its documentation for any purpose without
|
|
||||||
fee, provided that the above copyright notice appears in all copies and
|
|
||||||
that both the copyright notice and this permission notice appear in
|
|
||||||
supporting documentation. Further, provided that the name of Open
|
|
||||||
Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
publicity pertaining to distribution of the software without prior
|
|
||||||
written permission from OSF. OSF makes no representations about the
|
|
||||||
suitability of this software for any purpose. It is provided "as is"
|
|
||||||
without express or implied warranty.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
SDATA entity mappings BACK to entity references.
|
|
||||||
I think this is only usefule for creating a normalized instance."
|
|
||||||
|
|
||||||
J.Bowe, 1993
|
|
||||||
|
|
||||||
Enhancement by John R Fieber, 1996
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Numeric and Special Graphic -->
|
|
||||||
|
|
||||||
<map from="[half ]" to="&half;">
|
|
||||||
<map from="[frac12]" to="&frac12;">
|
|
||||||
<map from="[frac14]" to="&frac14;">
|
|
||||||
<map from="[frac34]" to="&frac34;">
|
|
||||||
<map from="[frac18]" to="&frac18;">
|
|
||||||
<map from="[frac38]" to="&frac38;">
|
|
||||||
<map from="[frac58]" to="&frac58;">
|
|
||||||
<map from="[frac78]" to="&frac78;">
|
|
||||||
<map from="[sup1 ]" to="&sup1;">
|
|
||||||
<map from="[sup2 ]" to="&sup2;">
|
|
||||||
<map from="[sup3 ]" to="&sup3;">
|
|
||||||
<map from="[plus ]" to="+">
|
|
||||||
<map from="[plusmn]" to="&plusmn;">
|
|
||||||
<map from="[lt ]" to="&lt;">
|
|
||||||
<map from="[equals]" to="=">
|
|
||||||
<map from="[gt ]" to="&gt;">
|
|
||||||
<map from="[divide]" to="/">
|
|
||||||
<map from="[times ]" to="&times;">
|
|
||||||
<map from="[curren]" to="&curren;">
|
|
||||||
<map from="[pound ]" to="&pound;">
|
|
||||||
<map from="[dollar]" to="&#36;">
|
|
||||||
<map from="[cent ]" to="&cent;">
|
|
||||||
<map from="[yen ]" to="&yen;">
|
|
||||||
<map from="[num ]" to="#">
|
|
||||||
<map from="[percnt]" to="%">
|
|
||||||
<map from="[amp ]" to="&amp;">
|
|
||||||
<map from="[ast ]" to="*">
|
|
||||||
<map from="[commat]" to="&commat;">
|
|
||||||
<map from="[lsqb ]" to="[">
|
|
||||||
<map from="[bsol ]" to="\">
|
|
||||||
<map from="[rsqb ]" to="]">
|
|
||||||
<map from="[lcub ]" to="{">
|
|
||||||
<map from="[horbar]" to="&horbar;">
|
|
||||||
<map from="[verbar]" to="|">
|
|
||||||
<map from="[rcub ]" to="}">
|
|
||||||
<map from="[micro ]" to="&micro;">
|
|
||||||
<map from="[ohm ]" to="&ohm;">
|
|
||||||
<map from="[deg ]" to="&deg;">
|
|
||||||
<map from="[ordm ]" to="&ordm;">
|
|
||||||
<map from="[ordf ]" to="&ordf;">
|
|
||||||
<map from="[sect ]" to="&sect;">
|
|
||||||
<map from="[para ]" to="&para;">
|
|
||||||
<map from="[middot]" to="&middot;">
|
|
||||||
<map from="[larr ]" to="&larr;">
|
|
||||||
<map from="[rarr ]" to="&rarr;">
|
|
||||||
<map from="[uarr ]" to="&uarr;">
|
|
||||||
<map from="[darr ]" to="&darr;">
|
|
||||||
<map from="[copy ]" to="&copy;">
|
|
||||||
<map from="[reg ]" to="&reg;">
|
|
||||||
<map from="[trade ]" to="&trade;">
|
|
||||||
<map from="[brvbar]" to="&brvbar;">
|
|
||||||
<map from="[not ]" to="&not;">
|
|
||||||
<map from="[sung ]" to="&sung;">
|
|
||||||
<map from="[excl ]" to="&excl;">
|
|
||||||
<map from="[iexcl ]" to="&iexcl;">
|
|
||||||
<map from="[quot ]" to="&quot;">
|
|
||||||
<map from="[apos ]" to="'">
|
|
||||||
<map from="[lpar ]" to="(">
|
|
||||||
<map from="[rpar ]" to=")">
|
|
||||||
<map from="[comma ]" to=",">
|
|
||||||
<map from="[lowbar]" to="_">
|
|
||||||
<map from="[hyphen]" to="-">
|
|
||||||
<map from="[period]" to=".">
|
|
||||||
<map from="[sol ]" to="/">
|
|
||||||
<map from="[colon ]" to=":">
|
|
||||||
<map from="[semi ]" to=";">
|
|
||||||
<map from="[quest ]" to="?">
|
|
||||||
<map from="[iquest]" to="&iquest;">
|
|
||||||
<map from="[laquo ]" to="&laquo;">
|
|
||||||
<map from="[raquo ]" to="&raquo;">
|
|
||||||
<map from="[lsquo ]" to="`">
|
|
||||||
<map from="[rsquo ]" to="'">
|
|
||||||
<map from="[ldquo ]" to="``">
|
|
||||||
<map from="[rdquo ]" to="''">
|
|
||||||
<map from="[nbsp ]" to="&nbsp;">
|
|
||||||
<map from="[shy ]" to="&shy;">
|
|
||||||
|
|
||||||
<!-- Publishing -->
|
|
||||||
|
|
||||||
<map from="[emsp ]" to="&nbsp;&nbsp;">
|
|
||||||
<map from="[ensp ]" to="&nbsp;">
|
|
||||||
<map from="[emsp3 ]" to="&nbsp;">
|
|
||||||
<map from="[emsp4 ]" to="&nbsp;">
|
|
||||||
<map from="[numsp ]" to="&nbsp;">
|
|
||||||
<map from="[puncsp]" to="&puncsp;">
|
|
||||||
<map from="[thinsp]" to="&nbsp;">
|
|
||||||
<map from="[hairsp]" to="">
|
|
||||||
<map from="[mdash ]" to="--">
|
|
||||||
<map from="[ndash ]" to="-">
|
|
||||||
<map from="[dash ]" to="-">
|
|
||||||
<map from="[blank ]" to="&blank;">
|
|
||||||
<map from="[hellip]" to="...">
|
|
||||||
<map from="[nldr ]" to="&nldr;">
|
|
||||||
<map from="[frac13]" to="&frac13;">
|
|
||||||
<map from="[frac23]" to="&frac23;">
|
|
||||||
<map from="[frac15]" to="&frac15;">
|
|
||||||
<map from="[frac25]" to="&frac25;">
|
|
||||||
<map from="[frac35]" to="&frac35;">
|
|
||||||
<map from="[frac45]" to="&frac45;">
|
|
||||||
<map from="[frac16]" to="&frac16;">
|
|
||||||
<map from="[frac56]" to="&frac56;">
|
|
||||||
<map from="[incare]" to="&incare;">
|
|
||||||
<map from="[block ]" to="&block;">
|
|
||||||
<map from="[uhblk ]" to="&uhblk;">
|
|
||||||
<map from="[lhblk ]" to="&lhblk;">
|
|
||||||
<map from="[blk14 ]" to="&blk14;">
|
|
||||||
<map from="[blk12 ]" to="&blk12;">
|
|
||||||
<map from="[blk34 ]" to="&blk34;">
|
|
||||||
<map from="[marker]" to="&marker;">
|
|
||||||
<map from="[cir ]" to="&cir;">
|
|
||||||
<map from="[squ ]" to="&squ;">
|
|
||||||
<map from="[rect ]" to="&rect;">
|
|
||||||
<map from="[utri ]" to="&utri;">
|
|
||||||
<map from="[dtri ]" to="&dtri;">
|
|
||||||
<map from="[star ]" to="&star;">
|
|
||||||
<map from="[bull ]" to="*">
|
|
||||||
<map from="[squf ]" to="&squf;">
|
|
||||||
<map from="[utrif ]" to="&utrif;">
|
|
||||||
<map from="[dtrif ]" to="&dtrif;">
|
|
||||||
<map from="[ltrif ]" to="&ltrif;">
|
|
||||||
<map from="[rtrif ]" to="&rtrif;">
|
|
||||||
<map from="[clubs ]" to="&clubs;">
|
|
||||||
<map from="[diams ]" to="&diams;">
|
|
||||||
<map from="[hearts]" to="&hearts;">
|
|
||||||
<map from="[spades]" to="&spades;">
|
|
||||||
<map from="[malt ]" to="&malt;">
|
|
||||||
<map from="[dagger]" to="&dagger;">
|
|
||||||
<map from="[Dagger]" to="&Dagger;">
|
|
||||||
<map from="[check ]" to="&check;">
|
|
||||||
<map from="[ballot]" to="&ballot;">
|
|
||||||
<map from="[sharp ]" to="&sharp;">
|
|
||||||
<map from="[flat ]" to="&flat;">
|
|
||||||
<map from="[male ]" to="&male;">
|
|
||||||
<map from="[female]" to="&female;">
|
|
||||||
<map from="[phone ]" to="&phone;">
|
|
||||||
<map from="[telrec]" to="&telrec;">
|
|
||||||
<map from="[copysr]" to="&copysr;">
|
|
||||||
<map from="[caret ]" to="&caret;">
|
|
||||||
<map from="[lsquor]" to="&lsquor;">
|
|
||||||
<map from="[ldquor]" to="&ldquor;">
|
|
||||||
<map from="[fflig ]" to="&fflig;">
|
|
||||||
<map from="[filig ]" to="&filig;">
|
|
||||||
<map from="[fjlig ]" to="&fjlig;">
|
|
||||||
<map from="[ffilig]" to="&ffilig;">
|
|
||||||
<map from="[ffllig]" to="&ffllig;">
|
|
||||||
<map from="[fllig ]" to="&fllig;">
|
|
||||||
<map from="[mldr ]" to="&mldr;">
|
|
||||||
<map from="[rdquor]" to="&rdquor;">
|
|
||||||
<map from="[rsquor]" to="&rsquor;">
|
|
||||||
<map from="[vellip]" to="...">
|
|
||||||
<map from="[hybull]" to="&hybull;">
|
|
||||||
<map from="[loz ]" to="&loz;">
|
|
||||||
<map from="[lozf ]" to="&lozf;">
|
|
||||||
<map from="[ltri ]" to="&ltri;">
|
|
||||||
<map from="[rtri ]" to="&rtri;">
|
|
||||||
<map from="[starf ]" to="&starf;">
|
|
||||||
<map from="[natur ]" to="&natur;">
|
|
||||||
<map from="[rx ]" to="&rx;">
|
|
||||||
<map from="[sext ]" to="&sext;">
|
|
||||||
<map from="[target]" to="&target;">
|
|
||||||
<map from="[dlcrop]" to="&dlcrop;">
|
|
||||||
<map from="[drcrop]" to="&drcrop;">
|
|
||||||
<map from="[ulcrop]" to="&ulcrop;">
|
|
||||||
<map from="[urcrop]" to="&urcrop;">
|
|
||||||
|
|
||||||
<!-- Added Latin 1 -->
|
|
||||||
|
|
||||||
<map from="[aacute]" to="&aacute;">
|
|
||||||
<map from="[Aacute]" to="&Aacute;">
|
|
||||||
<map from="[acirc ]" to="&acirc;">
|
|
||||||
<map from="[Acirc ]" to="&Acirc;">
|
|
||||||
<map from="[agrave]" to="&agrave;">
|
|
||||||
<map from="[Agrave]" to="&Agrave;">
|
|
||||||
<map from="[aring ]" to="&aring;">
|
|
||||||
<map from="[Aring ]" to="&Aring;">
|
|
||||||
<map from="[atilde]" to="&atilde;">
|
|
||||||
<map from="[Atilde]" to="&Atilde;">
|
|
||||||
<map from="[auml ]" to="&auml;">
|
|
||||||
<map from="[Auml ]" to="&Auml;">
|
|
||||||
<map from="[aelig ]" to="&aelig;">
|
|
||||||
<map from="[AElig ]" to="&AElig;">
|
|
||||||
<map from="[ccedil]" to="&ccedil;">
|
|
||||||
<map from="[Ccedil]" to="&Ccedil;">
|
|
||||||
<map from="[eth ]" to="&eth;">
|
|
||||||
<map from="[ETH ]" to="&ETH;">
|
|
||||||
<map from="[eacute]" to="&eacute;">
|
|
||||||
<map from="[Eacute]" to="&Eacute;">
|
|
||||||
<map from="[ecirc ]" to="&ecirc;">
|
|
||||||
<map from="[Ecirc ]" to="&Ecirc;">
|
|
||||||
<map from="[egrave]" to="&egrave;">
|
|
||||||
<map from="[Egrave]" to="&Egrave;">
|
|
||||||
<map from="[euml ]" to="&euml;">
|
|
||||||
<map from="[Euml ]" to="&Euml;">
|
|
||||||
<map from="[iacute]" to="&iacute;">
|
|
||||||
<map from="[Iacute]" to="&Iacute;">
|
|
||||||
<map from="[icirc ]" to="&icirc;">
|
|
||||||
<map from="[Icirc ]" to="&Icirc;">
|
|
||||||
<map from="[igrave]" to="&igrave;">
|
|
||||||
<map from="[Igrave]" to="&Igrave;">
|
|
||||||
<map from="[iuml ]" to="&iuml;">
|
|
||||||
<map from="[Iuml ]" to="&Iuml;">
|
|
||||||
<map from="[ntilde]" to="&ntilde;">
|
|
||||||
<map from="[Ntilde]" to="&Ntilde;">
|
|
||||||
<map from="[oacute]" to="&oacute;">
|
|
||||||
<map from="[Oacute]" to="&Oacute;">
|
|
||||||
<map from="[ocirc ]" to="&ocirc;">
|
|
||||||
<map from="[Ocirc ]" to="&Ocirc;">
|
|
||||||
<map from="[ograve]" to="&ograve;">
|
|
||||||
<map from="[Ograve]" to="&Ograve;">
|
|
||||||
<map from="[oslash]" to="&oslash;">
|
|
||||||
<map from="[Oslash]" to="&Oslash;">
|
|
||||||
<map from="[otilde]" to="&otilde;">
|
|
||||||
<map from="[Otilde]" to="&Otilde;">
|
|
||||||
<map from="[ouml ]" to="&ouml;">
|
|
||||||
<map from="[Ouml ]" to="&Ouml;">
|
|
||||||
<map from="[szlig ]" to="&szlig;">
|
|
||||||
<map from="[thorn ]" to="&thorn;">
|
|
||||||
<map from="[THORN ]" to="&THORN;">
|
|
||||||
<map from="[uacute]" to="&uacute;">
|
|
||||||
<map from="[Uacute]" to="&Uacute;">
|
|
||||||
<map from="[ucirc ]" to="&ucirc;">
|
|
||||||
<map from="[Ucirc ]" to="&Ucirc;">
|
|
||||||
<map from="[ugrave]" to="&ugrave;">
|
|
||||||
<map from="[Ugrave]" to="&Ugrave;">
|
|
||||||
<map from="[uuml ]" to="&uuml;">
|
|
||||||
<map from="[Uuml ]" to="&Uuml;">
|
|
||||||
<map from="[yacute]" to="&yacute;">
|
|
||||||
<map from="[Yacute]" to="&Yacute;">
|
|
||||||
<map from="[yuml ]" to="&yuml;">
|
|
||||||
|
|
||||||
<!-- Added Latin 2 -->
|
|
||||||
|
|
||||||
<map from="[abreve]" to="&abreve;">
|
|
||||||
<map from="[Abreve]" to="&Abreve;">
|
|
||||||
<map from="[amacr ]" to="&amacr;">
|
|
||||||
<map from="[Amacr ]" to="&Amacr;">
|
|
||||||
<map from="[aogon ]" to="&aogon;">
|
|
||||||
<map from="[Aogon ]" to="&Aogon;">
|
|
||||||
<map from="[cacute]" to="&cacute;">
|
|
||||||
<map from="[Cacute]" to="&Cacute;">
|
|
||||||
<map from="[ccaron]" to="&ccaron;">
|
|
||||||
<map from="[Ccaron]" to="&Ccaron;">
|
|
||||||
<map from="[ccirc ]" to="&ccirc;">
|
|
||||||
<map from="[Ccirc ]" to="&Ccirc;">
|
|
||||||
<map from="[cdot ]" to="&cdot;">
|
|
||||||
<map from="[Cdot ]" to="&Cdot;">
|
|
||||||
<map from="[dcaron]" to="&dcaron;">
|
|
||||||
<map from="[Dcaron]" to="&Dcaron;">
|
|
||||||
<map from="[dstrok]" to="&dstrok;">
|
|
||||||
<map from="[Dstrok]" to="&Dstrok;">
|
|
||||||
<map from="[ecaron]" to="&ecaron;">
|
|
||||||
<map from="[Ecaron]" to="&Ecaron;">
|
|
||||||
<map from="[edot ]" to="&edot;">
|
|
||||||
<map from="[Edot ]" to="&Edot;">
|
|
||||||
<map from="[emacr ]" to="&emacr;">
|
|
||||||
<map from="[Emacr ]" to="&Emacr;">
|
|
||||||
<map from="[eogon ]" to="&eogon;">
|
|
||||||
<map from="[Eogon ]" to="&Eogon;">
|
|
||||||
<map from="[gacute]" to="&gacute;">
|
|
||||||
<map from="[gbreve]" to="&gbreve;">
|
|
||||||
<map from="[Gbreve]" to="&Gbreve;">
|
|
||||||
<map from="[Gcedil]" to="&Gcedil;">
|
|
||||||
<map from="[gcirc ]" to="&gcirc;">
|
|
||||||
<map from="[Gcirc ]" to="&Gcirc;">
|
|
||||||
<map from="[gdot ]" to="&gdot;">
|
|
||||||
<map from="[Gdot ]" to="&Gdot;">
|
|
||||||
<map from="[hcirc ]" to="&hcirc;">
|
|
||||||
<map from="[Hcirc ]" to="&Hcirc;">
|
|
||||||
<map from="[hstrok]" to="&hstrok;">
|
|
||||||
<map from="[Hstrok]" to="&Hstrok;">
|
|
||||||
<map from="[Idot ]" to="&Idot;">
|
|
||||||
<map from="[Imacr ]" to="&Imacr;">
|
|
||||||
<map from="[imacr ]" to="&imacr;">
|
|
||||||
<map from="[ijlig ]" to="&ijlig;">
|
|
||||||
<map from="[IJlig ]" to="&IJlig;">
|
|
||||||
<map from="[inodot]" to="&inodot;">
|
|
||||||
<map from="[iogon ]" to="&iogon;">
|
|
||||||
<map from="[Iogon ]" to="&Iogon;">
|
|
||||||
<map from="[itilde]" to="&itilde;">
|
|
||||||
<map from="[Itilde]" to="&Itilde;">
|
|
||||||
<map from="[jcirc ]" to="&jcirc;">
|
|
||||||
<map from="[Jcirc ]" to="&Jcirc;">
|
|
||||||
<map from="[kcedil]" to="&kcedil;">
|
|
||||||
<map from="[Kcedil]" to="&Kcedil;">
|
|
||||||
<map from="[kgreen]" to="&kgreen;">
|
|
||||||
<map from="[lacute]" to="&lacute;">
|
|
||||||
<map from="[Lacute]" to="&Lacute;">
|
|
||||||
<map from="[lcaron]" to="&lcaron;">
|
|
||||||
<map from="[Lcaron]" to="&Lcaron;">
|
|
||||||
<map from="[lcedil]" to="&lcedil;">
|
|
||||||
<map from="[Lcedil]" to="&Lcedil;">
|
|
||||||
<map from="[lmidot]" to="&lmidot;">
|
|
||||||
<map from="[Lmidot]" to="&Lmidot;">
|
|
||||||
<map from="[lstrok]" to="&lstrok;">
|
|
||||||
<map from="[Lstrok]" to="&Lstrok;">
|
|
||||||
<map from="[nacute]" to="&nacute;">
|
|
||||||
<map from="[Nacute]" to="&Nacute;">
|
|
||||||
<map from="[eng ]" to="&eng;">
|
|
||||||
<map from="[ENG ]" to="&ENG;">
|
|
||||||
<map from="[napos ]" to="&napos;">
|
|
||||||
<map from="[ncaron]" to="&ncaron;">
|
|
||||||
<map from="[Ncaron]" to="&Ncaron;">
|
|
||||||
<map from="[ncedil]" to="&ncedil;">
|
|
||||||
<map from="[Ncedil]" to="&Ncedil;">
|
|
||||||
<map from="[odblac]" to="&odblac;">
|
|
||||||
<map from="[Odblac]" to="&Odblac;">
|
|
||||||
<map from="[Omacr ]" to="&Omacr;">
|
|
||||||
<map from="[omacr ]" to="&omacr;">
|
|
||||||
<map from="[oelig ]" to="&oelig;">
|
|
||||||
<map from="[OElig ]" to="&OElig;">
|
|
||||||
<map from="[racute]" to="&racute;">
|
|
||||||
<map from="[Racute]" to="&Racute;">
|
|
||||||
<map from="[rcaron]" to="&rcaron;">
|
|
||||||
<map from="[Rcaron]" to="&Rcaron;">
|
|
||||||
<map from="[rcedil]" to="&rcedil;">
|
|
||||||
<map from="[Rcedil]" to="&Rcedil;">
|
|
||||||
<map from="[sacute]" to="&sacute;">
|
|
||||||
<map from="[Sacute]" to="&Sacute;">
|
|
||||||
<map from="[scaron]" to="&scaron;">
|
|
||||||
<map from="[Scaron]" to="&Scaron;">
|
|
||||||
<map from="[scedil]" to="&scedil;">
|
|
||||||
<map from="[Scedil]" to="&Scedil;">
|
|
||||||
<map from="[scirc ]" to="&scirc;">
|
|
||||||
<map from="[Scirc ]" to="&Scirc;">
|
|
||||||
<map from="[tcaron]" to="&tcaron;">
|
|
||||||
<map from="[Tcaron]" to="&Tcaron;">
|
|
||||||
<map from="[tcedil]" to="&tcedil;">
|
|
||||||
<map from="[Tcedil]" to="&Tcedil;">
|
|
||||||
<map from="[tstrok]" to="&tstrok;">
|
|
||||||
<map from="[Tstrok]" to="&Tstrok;">
|
|
||||||
<map from="[ubreve]" to="&ubreve;">
|
|
||||||
<map from="[Ubreve]" to="&Ubreve;">
|
|
||||||
<map from="[udblac]" to="&udblac;">
|
|
||||||
<map from="[Udblac]" to="&Udblac;">
|
|
||||||
<map from="[umacr ]" to="&umacr;">
|
|
||||||
<map from="[Umacr ]" to="&Umacr;">
|
|
||||||
<map from="[uogon ]" to="&uogon;">
|
|
||||||
<map from="[Uogon ]" to="&Uogon;">
|
|
||||||
<map from="[uring ]" to="&uring;">
|
|
||||||
<map from="[Uring ]" to="&Uring;">
|
|
||||||
<map from="[utilde]" to="&utilde;">
|
|
||||||
<map from="[Utilde]" to="&Utilde;">
|
|
||||||
<map from="[wcirc ]" to="&wcirc;">
|
|
||||||
<map from="[Wcirc ]" to="&Wcirc;">
|
|
||||||
<map from="[ycirc ]" to="&ycirc;">
|
|
||||||
<map from="[Ycirc ]" to="&Ycirc;">
|
|
||||||
<map from="[Yuml ]" to="&Yuml;">
|
|
||||||
<map from="[zacute]" to="&zacute;">
|
|
||||||
<map from="[Zacute]" to="&Zacute;">
|
|
||||||
<map from="[zcaron]" to="&zcaron;">
|
|
||||||
<map from="[Zcaron]" to="&Zcaron;">
|
|
||||||
<map from="[zdot ]" to="&zdot;">
|
|
||||||
<map from="[Zdot ]" to="&Zdot;">
|
|
||||||
|
|
||||||
<!-- Greek Letters -->
|
|
||||||
|
|
||||||
<map from="[agr ]" to="&agr;">
|
|
||||||
<map from="[Agr ]" to="&Agr;">
|
|
||||||
<map from="[bgr ]" to="&bgr;">
|
|
||||||
<map from="[Bgr ]" to="&Bgr;">
|
|
||||||
<map from="[ggr ]" to="&ggr;">
|
|
||||||
<map from="[Ggr ]" to="&Ggr;">
|
|
||||||
<map from="[dgr ]" to="&dgr;">
|
|
||||||
<map from="[Dgr ]" to="&Dgr;">
|
|
||||||
<map from="[egr ]" to="&egr;">
|
|
||||||
<map from="[Egr ]" to="&Egr;">
|
|
||||||
<map from="[zgr ]" to="&zgr;">
|
|
||||||
<map from="[Zgr ]" to="&Zgr;">
|
|
||||||
<map from="[eegr ]" to="&eegr;">
|
|
||||||
<map from="[EEgr ]" to="&EEgr;">
|
|
||||||
<map from="[thgr ]" to="&thgr;">
|
|
||||||
<map from="[THgr ]" to="&THgr;">
|
|
||||||
<map from="[igr ]" to="&igr;">
|
|
||||||
<map from="[Igr ]" to="&Igr;">
|
|
||||||
<map from="[kgr ]" to="&kgr;">
|
|
||||||
<map from="[Kgr ]" to="&Kgr;">
|
|
||||||
<map from="[lgr ]" to="&lgr;">
|
|
||||||
<map from="[Lgr ]" to="&Lgr;">
|
|
||||||
<map from="[mgr ]" to="&mgr;">
|
|
||||||
<map from="[Mgr ]" to="&Mgr;">
|
|
||||||
<map from="[ngr ]" to="&ngr;">
|
|
||||||
<map from="[Ngr ]" to="&Ngr;">
|
|
||||||
<map from="[xgr ]" to="&xgr;">
|
|
||||||
<map from="[Xgr ]" to="&Xgr;">
|
|
||||||
<map from="[ogr ]" to="&ogr;">
|
|
||||||
<map from="[Ogr ]" to="&Ogr;">
|
|
||||||
<map from="[pgr ]" to="&pgr;">
|
|
||||||
<map from="[Pgr ]" to="&Pgr;">
|
|
||||||
<map from="[rgr ]" to="&rgr;">
|
|
||||||
<map from="[Rgr ]" to="&Rgr;">
|
|
||||||
<map from="[sgr ]" to="&sgr;">
|
|
||||||
<map from="[Sgr ]" to="&Sgr;">
|
|
||||||
<map from="[sfgr ]" to="&sfgr;">
|
|
||||||
<map from="[tgr ]" to="&tgr;">
|
|
||||||
<map from="[Tgr ]" to="&Tgr;">
|
|
||||||
<map from="[ugr ]" to="&ugr;">
|
|
||||||
<map from="[Ugr ]" to="&Ugr;">
|
|
||||||
<map from="[phgr ]" to="&phgr;">
|
|
||||||
<map from="[PHgr ]" to="&PHgr;">
|
|
||||||
<map from="[khgr ]" to="&khgr;">
|
|
||||||
<map from="[KHgr ]" to="&KHgr;">
|
|
||||||
<map from="[psgr ]" to="&psgr;">
|
|
||||||
<map from="[PSgr ]" to="&PSgr;">
|
|
||||||
<map from="[ohgr ]" to="&ohgr;">
|
|
||||||
<map from="[OHgr ]" to="&OHgr;">
|
|
||||||
|
|
||||||
<!-- Greek Symbols -->
|
|
||||||
|
|
||||||
<map from="[alpha ]" to="&alpha;">
|
|
||||||
<map from="[beta ]" to="&beta;">
|
|
||||||
<map from="[gamma ]" to="&gamma;">
|
|
||||||
<map from="[Gamma ]" to="&Gamma;">
|
|
||||||
<map from="[gammad]" to="&gammad;">
|
|
||||||
<map from="[delta ]" to="&delta;">
|
|
||||||
<map from="[Delta ]" to="&Delta;">
|
|
||||||
<map from="[epsi ]" to="&epsi;">
|
|
||||||
<map from="[epsiv ]" to="&epsiv;">
|
|
||||||
<map from="[epsis ]" to="&epsis;">
|
|
||||||
<map from="[zeta ]" to="&zeta;">
|
|
||||||
<map from="[eta ]" to="&eta;">
|
|
||||||
<map from="[thetas]" to="&thetas;">
|
|
||||||
<map from="[Theta ]" to="&Theta;">
|
|
||||||
<map from="[thetav]" to="&thetav;">
|
|
||||||
<map from="[iota ]" to="&iota;">
|
|
||||||
<map from="[kappa ]" to="&kappa;">
|
|
||||||
<map from="[kappav]" to="&kappav;">
|
|
||||||
<map from="[lambda]" to="&lambda;">
|
|
||||||
<map from="[Lambda]" to="&Lambda;">
|
|
||||||
<map from="[mu ]" to="&mu;">
|
|
||||||
<map from="[nu ]" to="&nu;">
|
|
||||||
<map from="[xi ]" to="&xi;">
|
|
||||||
<map from="[Xi ]" to="&Xi;">
|
|
||||||
<map from="[pi ]" to="&pi;">
|
|
||||||
<map from="[piv ]" to="&piv;">
|
|
||||||
<map from="[Pi ]" to="&Pi;">
|
|
||||||
<map from="[rho ]" to="&rho;">
|
|
||||||
<map from="[rhov ]" to="&rhov;">
|
|
||||||
<map from="[sigma ]" to="&sigma;">
|
|
||||||
<map from="[Sigma ]" to="&Sigma;">
|
|
||||||
<map from="[sigmav]" to="&sigmav;">
|
|
||||||
<map from="[tau ]" to="&tau;">
|
|
||||||
<map from="[upsi ]" to="&upsi;">
|
|
||||||
<map from="[Upsi ]" to="&Upsi;">
|
|
||||||
<map from="[phis ]" to="&phis;">
|
|
||||||
<map from="[Phi ]" to="&Phi;">
|
|
||||||
<map from="[phiv ]" to="&phiv;">
|
|
||||||
<map from="[chi ]" to="&chi;">
|
|
||||||
<map from="[psi ]" to="&psi;">
|
|
||||||
<map from="[Psi ]" to="&Psi;">
|
|
||||||
<map from="[omega ]" to="&omega;">
|
|
||||||
<map from="[Omega ]" to="&Omega;">
|
|
||||||
|
|
||||||
<!-- General Technical -->
|
|
||||||
|
|
||||||
<map from="[aleph ]" to="&aleph;">
|
|
||||||
<map from="[and ]" to="&and;">
|
|
||||||
<map from="[ang90 ]" to="&ang90;">
|
|
||||||
<map from="[angsph]" to="&angsph;">
|
|
||||||
<map from="[ap ]" to="&ap;">
|
|
||||||
<map from="[becaus]" to="&becaus;">
|
|
||||||
<map from="[bottom]" to="&bottom;">
|
|
||||||
<map from="[cap ]" to="&cap;">
|
|
||||||
<map from="[cong ]" to="&cong;">
|
|
||||||
<map from="[conint]" to="&conint;">
|
|
||||||
<map from="[cup ]" to="&cup;">
|
|
||||||
<map from="[equiv ]" to="&equiv;">
|
|
||||||
<map from="[exist ]" to="&exist;">
|
|
||||||
<map from="[forall]" to="&forall;">
|
|
||||||
<map from="[fnof ]" to="&fnof;">
|
|
||||||
<map from="[ge ]" to="&ge;">
|
|
||||||
<map from="[iff ]" to="&iff;">
|
|
||||||
<map from="[infin ]" to="&infin;">
|
|
||||||
<map from="[int ]" to="&int;">
|
|
||||||
<map from="[isin ]" to="&isin;">
|
|
||||||
<map from="[lang ]" to="&lang;">
|
|
||||||
<map from="[lArr ]" to="&lArr;">
|
|
||||||
<map from="[le ]" to="&le;">
|
|
||||||
<map from="[minus ]" to="-">
|
|
||||||
<map from="[mnplus]" to="&mnplus;">
|
|
||||||
<map from="[nabla ]" to="&nabla;">
|
|
||||||
<map from="[ne ]" to="&ne;">
|
|
||||||
<map from="[ni ]" to="&ni;">
|
|
||||||
<map from="[or ]" to="&or;">
|
|
||||||
<map from="[par ]" to="&par;">
|
|
||||||
<map from="[part ]" to="&part;">
|
|
||||||
<map from="[permil]" to="&permil;">
|
|
||||||
<map from="[perp ]" to="&perp;">
|
|
||||||
<map from="[prime ]" to="&prime;">
|
|
||||||
<map from="[Prime ]" to="&Prime;">
|
|
||||||
<map from="[prop ]" to="&prop;">
|
|
||||||
<map from="[radic ]" to="&radic;">
|
|
||||||
<map from="[rang ]" to="&rang;">
|
|
||||||
<map from="[rArr ]" to="&rArr;">
|
|
||||||
<map from="[sim ]" to="&sim;">
|
|
||||||
<map from="[sime ]" to="&sime;">
|
|
||||||
<map from="[square]" to="&square;">
|
|
||||||
<map from="[sub ]" to="&sub;">
|
|
||||||
<map from="[sube ]" to="&sube;">
|
|
||||||
<map from="[sup ]" to="&sup;">
|
|
||||||
<map from="[supe ]" to="&supe;">
|
|
||||||
<map from="[there4]" to="&there4;">
|
|
||||||
<map from="[Verbar]" to="&Verbar;">
|
|
||||||
<map from="[angst ]" to="&angst;">
|
|
||||||
<map from="[bernou]" to="&bernou;">
|
|
||||||
<map from="[compfn]" to="&compfn;">
|
|
||||||
<map from="[Dot ]" to="&Dot;">
|
|
||||||
<map from="[DotDot]" to="&DotDot;">
|
|
||||||
<map from="[hamilt]" to="&hamilt;">
|
|
||||||
<map from="[lagran]" to="&lagran;">
|
|
||||||
<map from="[lowast]" to="&lowast;">
|
|
||||||
<map from="[notin ]" to="&notin;">
|
|
||||||
<map from="[order ]" to="&order;">
|
|
||||||
<map from="[phmmat]" to="&phmmat;">
|
|
||||||
<map from="[tdot ]" to="&tdot;">
|
|
||||||
<map from="[tprime]" to="&tprime;">
|
|
||||||
<map from="[wedgeq]" to="&wedgeq;">
|
|
||||||
|
|
||||||
<!-- Diacritical Marks -->
|
|
||||||
|
|
||||||
<map from="[acute ]" to="&acute;">
|
|
||||||
<map from="[breve ]" to="&breve;">
|
|
||||||
<map from="[caron ]" to="&caron;">
|
|
||||||
<map from="[cedil ]" to="&cedil;">
|
|
||||||
<map from="[circ ]" to="&circ;">
|
|
||||||
<map from="[dblac ]" to="&dblac;">
|
|
||||||
<map from="[die ]" to="&die;">
|
|
||||||
<map from="[dot ]" to="&dot;">
|
|
||||||
<map from="[grave ]" to="&grave;">
|
|
||||||
<map from="[macr ]" to="&macr;">
|
|
||||||
<map from="[ogon ]" to="&ogon;">
|
|
||||||
<map from="[ring ]" to="&ring;">
|
|
||||||
<map from="[tilde ]" to="~">
|
|
||||||
<map from="[uml ]" to="&uml;">
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,37 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 1996
|
|
||||||
John R. Fieber. All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions
|
|
||||||
are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY JOHN R. FIEBER AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL JOHN R. FIEBER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGE.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Character mapping for groff. -->
|
|
||||||
|
|
||||||
<map from="\" to="\\">
|
|
||||||
<map from="^" to="\(ha">
|
|
||||||
<map from="." to="\&.">
|
|
||||||
<map from="'" to="\N'39'">
|
|
||||||
<map from='"' to="\N'34'">
|
|
@ -1,623 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 1996
|
|
||||||
Chuck Robey. All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions
|
|
||||||
are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY CHUCK ROBEY AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL CHUCK ROBEY OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGE.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
ISO SDATA entity translations for groff.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Numeric and Special Graphic -->
|
|
||||||
|
|
||||||
<map from="[half ]" to="\(12">
|
|
||||||
<map from="[frac12]" to="\(12">
|
|
||||||
<map from="[frac14]" to="\(14">
|
|
||||||
<map from="[frac34]" to="\(34">
|
|
||||||
<map from="[frac18]" to="1/8">
|
|
||||||
<map from="[frac38]" to="3/8">
|
|
||||||
<map from="[frac58]" to="5/8">
|
|
||||||
<map from="[frac78]" to="7/8">
|
|
||||||
<map from="[sup1 ]" to="\(S1">
|
|
||||||
<map from="[sup2 ]" to="\(S2">
|
|
||||||
<map from="[sup3 ]" to="\(S3">
|
|
||||||
<map from="[plus ]" to="\N'43'">
|
|
||||||
<map from="[plusmn]" to="\(+-">
|
|
||||||
<map from="[lt ]" to="<">
|
|
||||||
<map from="[equals]" to="=">
|
|
||||||
<map from="[gt ]" to=">">
|
|
||||||
<map from="[divide]" to="\(di">
|
|
||||||
<map from="[times ]" to="\N'215'">
|
|
||||||
<map from="[curren]" to="\(Cs">
|
|
||||||
<map from="[pound ]" to="\(Po">
|
|
||||||
<map from="[dollar]" to="\N'36'">
|
|
||||||
<map from="[cent ]" to="\(ct">
|
|
||||||
<map from="[yen ]" to="\(Ye">
|
|
||||||
<map from="[num ]" to="#">
|
|
||||||
<map from="[percnt]" to="%">
|
|
||||||
<map from="[amp ]" to="&">
|
|
||||||
<map from="[ast ]" to="*">
|
|
||||||
<map from="[commat]" to="@">
|
|
||||||
<map from="[lsqb ]" to="\(lB">
|
|
||||||
<map from="[bsol ]" to="\(rs">
|
|
||||||
<map from="[rsqb ]" to="\(rB">
|
|
||||||
<map from="[lcub ]" to="\(rC">
|
|
||||||
<map from="[horbar]" to="\(em">
|
|
||||||
<map from="[verbar]" to="\(bv">
|
|
||||||
<map from="[rcub ]" to="\(rC">
|
|
||||||
<map from="[micro ]" to="\N'181'">
|
|
||||||
<map from="[ohm ]" to="\(*W">
|
|
||||||
<map from="[deg ]" to="\N'176'">
|
|
||||||
<map from="[ordm ]" to="\(Om">
|
|
||||||
<map from="[ordf ]" to="\(Of">
|
|
||||||
<map from="[sect ]" to="\N'167'">
|
|
||||||
<map from="[para ]" to="\(ps">
|
|
||||||
<map from="[middot]" to="\(md">
|
|
||||||
<map from="[larr ]" to="\(<-">
|
|
||||||
<map from="[rarr ]" to="\(->">
|
|
||||||
<map from="[uarr ]" to="\(ua">
|
|
||||||
<map from="[darr ]" to="\(da">
|
|
||||||
<map from="[copy ]" to="\(co">
|
|
||||||
<map from="[reg ]" to="\(rg">
|
|
||||||
<map from="[trade ]" to="\(tm">
|
|
||||||
<map from="[brvbar]" to="\N'166'">
|
|
||||||
<map from="[not ]" to="\N'172'">
|
|
||||||
<!-- <map from="[sung ]" to=""> --> <!-- =music note (sung text sign) -->
|
|
||||||
<map from="[excl ]" to="\N'33'">
|
|
||||||
<map from="[iexcl ]" to="\(r!">
|
|
||||||
<map from="[quot ]" to="\N'39'">
|
|
||||||
<map from="[apos ]" to="\N'39'">
|
|
||||||
<map from="[lpar ]" to="\N'40'">
|
|
||||||
<map from="[rpar ]" to="\N'41'">
|
|
||||||
<map from="[comma ]" to="\(bq">
|
|
||||||
<map from="[lowbar]" to="\(ru">
|
|
||||||
<map from="[hyphen]" to="\(en">
|
|
||||||
<map from="[period]" to="\N'46'">
|
|
||||||
<map from="[sol ]" to="\(sl">
|
|
||||||
<map from="[colon ]" to="\N'58'">
|
|
||||||
<map from="[semi ]" to="\N'59'">
|
|
||||||
<map from="[quest ]" to="\N'63'">
|
|
||||||
<map from="[iquest]" to="\(r?">
|
|
||||||
<map from="[laquo ]" to="\(Fo">
|
|
||||||
<map from="[raquo ]" to="\(Fc">
|
|
||||||
<map from="[lsquo ]" to="\(oq">
|
|
||||||
<map from="[rsquo ]" to="\N'39'">
|
|
||||||
<map from="[ldquo ]" to="\(lq">
|
|
||||||
<map from="[rdquo ]" to="\(rq">
|
|
||||||
<map from="[nbsp ]" to="\ ">
|
|
||||||
<map from="[shy ]" to="\(hy">
|
|
||||||
|
|
||||||
<!-- Publishing -->
|
|
||||||
|
|
||||||
<map from="[emsp ]" to="\~">
|
|
||||||
<map from="[ensp ]" to="\~">
|
|
||||||
<map from="[emsp3 ]" to="\~">
|
|
||||||
<map from="[emsp4 ]" to="\~">
|
|
||||||
<map from="[numsp ]" to="\0">
|
|
||||||
<map from="[puncsp]" to="\|">
|
|
||||||
<map from="[thinsp]" to="\!">
|
|
||||||
<map from="[hairsp]" to="\\^">
|
|
||||||
<map from="[mdash ]" to="\(em">
|
|
||||||
<map from="[ndash ]" to="\(en">
|
|
||||||
<map from="[dash ]" to="\-">
|
|
||||||
<map from="[blank ]" to="\ ">
|
|
||||||
<map from="[hellip]" to="\&...">
|
|
||||||
<map from="[nldr ]" to="\&..">
|
|
||||||
<map from="[frac13]" to="1/3">
|
|
||||||
<map from="[frac23]" to="2/3">
|
|
||||||
<map from="[frac15]" to="1/5">
|
|
||||||
<map from="[frac25]" to="2/5">
|
|
||||||
<map from="[frac35]" to="3/5">
|
|
||||||
<map from="[frac45]" to="4/5">
|
|
||||||
<map from="[frac16]" to="1/6">
|
|
||||||
<map from="[frac56]" to="5/6">
|
|
||||||
<!--
|
|
||||||
<map from="[incare]" to="=in-care-of symbol">
|
|
||||||
<map from="[block ]" to="=full block">
|
|
||||||
<map from="[uhblk ]" to="=upper half block">
|
|
||||||
<map from="[lhblk ]" to="=lower half block">
|
|
||||||
<map from="[blk14 ]" to="=25% shaded block">
|
|
||||||
<map from="[blk12 ]" to="=50% shaded block">
|
|
||||||
<map from="[blk34 ]" to="=75% shaded block">
|
|
||||||
<map from="[marker]" to="=histogram marker">
|
|
||||||
-->
|
|
||||||
<map from="[cir ]" to="\(ci">
|
|
||||||
<map from="[squ ]" to="\(sq">
|
|
||||||
<!--
|
|
||||||
<map from="[rect ]" to="=rectangle, open">
|
|
||||||
<map from="[utri ]" to="/triangle =up triangle, open">
|
|
||||||
<map from="[dtri ]" to="/triangledown =down triangle, open">
|
|
||||||
-->
|
|
||||||
<map from="[star ]" to="\(**">
|
|
||||||
<map from="[bull ]" to="\(bu">
|
|
||||||
<!--
|
|
||||||
<map from="[squf ]" to="/blacksquare =sq bullet, filled">
|
|
||||||
<map from="[utrif ]" to="/blacktriangle =up tri, filled">
|
|
||||||
<map from="[dtrif ]" to="/blacktriangledown =dn tri, filled">
|
|
||||||
<map from="[ltrif ]" to="/blacktriangleleft R: =l tri, filled">
|
|
||||||
<map from="[rtrif ]" to="/blacktriangleright R: =r tri, filled">
|
|
||||||
-->
|
|
||||||
<map from="[clubs ]" to="\(CL">
|
|
||||||
<map from="[diams ]" to="\(DI">
|
|
||||||
<map from="[hearts]" to="\(HE">
|
|
||||||
<map from="[spades]" to="\(SP">
|
|
||||||
<!--
|
|
||||||
<map from="[malt ]" to="/maltese =maltese cross">
|
|
||||||
-->
|
|
||||||
<map from="[dagger]" to="\(dg">
|
|
||||||
<map from="[Dagger]" to="\(dd">
|
|
||||||
<map from="[check ]" to="\(OK">
|
|
||||||
<!--
|
|
||||||
<map from="[ballot]" to="=ballot cross">
|
|
||||||
<map from="[sharp ]" to="/sharp =musical sharp">
|
|
||||||
<map from="[flat ]" to="/flat =musical flat">
|
|
||||||
<map from="[male ]" to="=male symbol">
|
|
||||||
<map from="[female]" to="=female symbol">
|
|
||||||
<map from="[phone ]" to="=telephone symbol">
|
|
||||||
<map from="[telrec]" to="=telephone recorder symbol">
|
|
||||||
<map from="[copysr]" to="=sound recording copyright sign">
|
|
||||||
-->
|
|
||||||
<map from="[caret ]" to="\^">
|
|
||||||
<map from="[lsquor]" to="\N'44'">
|
|
||||||
<map from="[ldquor]" to="\(Bq">
|
|
||||||
<map from="[fflig ]" to="\(ff">
|
|
||||||
<map from="[filig ]" to="\(fi">
|
|
||||||
<!--
|
|
||||||
<map from="[fjlig ]" to="small fj ligature">
|
|
||||||
-->
|
|
||||||
<map from="[ffilig]" to="\(Fi">
|
|
||||||
<map from="[ffllig]" to="\(Fl">
|
|
||||||
<map from="[fllig ]" to="\(fl">
|
|
||||||
<!--
|
|
||||||
<map from="[mldr ]" to="em leader">
|
|
||||||
-->
|
|
||||||
<map from="[rdquor]" to="\(lq">
|
|
||||||
<map from="[rsquor]" to="\(oq">
|
|
||||||
<!--
|
|
||||||
<map from="[vellip]" to="vertical ellipsis">
|
|
||||||
<map from="[hybull]" to="rectangle, filled (hyphen bullet)">
|
|
||||||
-->
|
|
||||||
<map from="[loz ]" to="/(lz">
|
|
||||||
<!--
|
|
||||||
<map from="[lozf ]" to="/blacklozenge - lozenge, filled">
|
|
||||||
<map from="[ltri ]" to="/triangleleft B: l triangle, open">
|
|
||||||
<map from="[rtri ]" to="/triangleright B: r triangle, open">
|
|
||||||
<map from="[starf ]" to="/bigstar - star, filled">
|
|
||||||
<map from="[natur ]" to="/natural - music natural">
|
|
||||||
<map from="[rx ]" to="pharmaceutical prescription (Rx)">
|
|
||||||
<map from="[sext ]" to="sextile (6-pointed star)">
|
|
||||||
<map from="[target]" to="register mark or target">
|
|
||||||
<map from="[dlcrop]" to="downward left crop mark">
|
|
||||||
<map from="[drcrop]" to="downward right crop mark">
|
|
||||||
<map from="[ulcrop]" to="upward left crop mark">
|
|
||||||
<map from="[urcrop]" to="upward right crop mark">
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Added Latin 1 -->
|
|
||||||
|
|
||||||
<map from="[aacute]" to="\('a">
|
|
||||||
<map from="[Aacute]" to="\('A">
|
|
||||||
<map from="[acirc ]" to="\(^a">
|
|
||||||
<map from="[Acirc ]" to="\(^A">
|
|
||||||
<map from="[agrave]" to="\(`a">
|
|
||||||
<map from="[Agrave]" to="\(`A">
|
|
||||||
<map from="[aring ]" to="\(oa">
|
|
||||||
<map from="[Aring ]" to="\(oA">
|
|
||||||
<map from="[atilde]" to="\(~a">
|
|
||||||
<map from="[Atilde]" to="\(~A">
|
|
||||||
<map from="[auml ]" to="\(:a">
|
|
||||||
<map from="[Auml ]" to="\(:A">
|
|
||||||
<map from="[aelig ]" to="\(ae">
|
|
||||||
<map from="[AElig ]" to="\(AE">
|
|
||||||
<map from="[ccedil]" to="\(,c">
|
|
||||||
<map from="[Ccedil]" to="\(,C">
|
|
||||||
<map from="[eth ]" to="\(Sd">
|
|
||||||
<map from="[ETH ]" to="\(-D">
|
|
||||||
<map from="[eacute]" to="\('e">
|
|
||||||
<map from="[Eacute]" to="\('E">
|
|
||||||
<map from="[ecirc ]" to="\(^e">
|
|
||||||
<map from="[Ecirc ]" to="\(^E">
|
|
||||||
<map from="[egrave]" to="\(`e">
|
|
||||||
<map from="[Egrave]" to="\(`E">
|
|
||||||
<map from="[euml ]" to="\(:e">
|
|
||||||
<map from="[Euml ]" to="\(:E">
|
|
||||||
<map from="[iacute]" to="\('i">
|
|
||||||
<map from="[Iacute]" to="\('I">
|
|
||||||
<map from="[icirc ]" to="\(^i">
|
|
||||||
<map from="[Icirc ]" to="\(^I">
|
|
||||||
<map from="[igrave]" to="\(`i">
|
|
||||||
<map from="[Igrave]" to="\(`I">
|
|
||||||
<map from="[iuml ]" to="\(:i">
|
|
||||||
<map from="[Iuml ]" to="\(:I">
|
|
||||||
<map from="[ntilde]" to="\(~n">
|
|
||||||
<map from="[Ntilde]" to="\(~N">
|
|
||||||
<map from="[oacute]" to="\('o">
|
|
||||||
<map from="[Oacute]" to="\('O">
|
|
||||||
<map from="[ocirc ]" to="\(^o">
|
|
||||||
<map from="[Ocirc ]" to="\(^O">
|
|
||||||
<map from="[ograve]" to="\(`o">
|
|
||||||
<map from="[Ograve]" to="\(`O">
|
|
||||||
<map from="[oslash]" to="\(/o">
|
|
||||||
<map from="[Oslash]" to="\(/O">
|
|
||||||
<map from="[otilde]" to="\(~o">
|
|
||||||
<map from="[Otilde]" to="\(~O">
|
|
||||||
<map from="[ouml ]" to="\(:o">
|
|
||||||
<map from="[Ouml ]" to="\(:O">
|
|
||||||
<map from="[szlig ]" to="\(ss">
|
|
||||||
<map from="[thorn ]" to="\(Tp">
|
|
||||||
<map from="[THORN ]" to="\(TP">
|
|
||||||
<map from="[uacute]" to="\('u">
|
|
||||||
<map from="[Uacute]" to="\('U">
|
|
||||||
<map from="[ucirc ]" to="\(^u">
|
|
||||||
<map from="[Ucirc ]" to="\(^U">
|
|
||||||
<map from="[ugrave]" to="\(`u">
|
|
||||||
<map from="[Ugrave]" to="\(`U">
|
|
||||||
<map from="[uuml ]" to="\(:u">
|
|
||||||
<map from="[Uuml ]" to="\(:U">
|
|
||||||
<map from="[yacute]" to="\('y">
|
|
||||||
<map from="[Yacute]" to="\('Y">
|
|
||||||
<map from="[yuml ]" to="\(:y">
|
|
||||||
<map from="[Yuml ]" to="\(:Y">
|
|
||||||
|
|
||||||
<!-- Added Latin 2 -->
|
|
||||||
|
|
||||||
<map from="[abreve]" to="\o'a\(ab'">
|
|
||||||
<map from="[Abreve]" to="\o'A\s+3\(ab\s-3'">
|
|
||||||
<map from="[amacr ]" to="\o'a\(a-'">
|
|
||||||
<map from="[Amacr ]" to="\o'A\s+3\(a-\s-3'">
|
|
||||||
<map from="[aogon ]" to="\o'a\N'184''">
|
|
||||||
<map from="[Aogon ]" to="\o'A\N'184''">
|
|
||||||
<map from="[cacute]" to="\o'c\(aa'">
|
|
||||||
<map from="[Cacute]" to="\o'C\s+3\(aa\s-3'">
|
|
||||||
<map from="[ccaron]" to="\o'c\(ah'">
|
|
||||||
<map from="[Ccaron]" to="\o'C\s+3\(ah\s-3'">
|
|
||||||
<map from="[ccirc ]" to="\o'c\(a^'">
|
|
||||||
<map from="[Ccirc ]" to="\o'C\s+3\(a^\s-3'">
|
|
||||||
<map from="[cdot ]" to="\o'c\(a.'">
|
|
||||||
<map from="[Cdot ]" to="\o'C\s+3\(a.\s-3'">
|
|
||||||
<map from="[dcaron]" to="\o'd\(ah'">
|
|
||||||
<map from="[Dcaron]" to="\o'D\s+3\(ah\s-3'">
|
|
||||||
<map from="[dstrok]" to="d\h'-3p'\(hy">
|
|
||||||
<map from="[Dstrok]" to="\(-D">
|
|
||||||
<map from="[ecaron]" to="\o'e\(ah'">
|
|
||||||
<map from="[Ecaron]" to="\o'E\s+3\(ah\s-3'">
|
|
||||||
<map from="[edot ]" to="\o'e\(a.'">
|
|
||||||
<map from="[Edot ]" to="\o'E\s+3\(a.\s-3'">
|
|
||||||
<map from="[emacr ]" to="\o'e\(a-'">
|
|
||||||
<map from="[Emacr ]" to="\o'E\s+3\(a-\s-3'">
|
|
||||||
<map from="[eogon ]" to="\o'e\N'184''">
|
|
||||||
<map from="[Eogon ]" to="\o'E\N'184''">
|
|
||||||
<map from="[gacute]" to="\o'g\(aa'">
|
|
||||||
<map from="[gbreve]" to="\o'g\(ab'">
|
|
||||||
<map from="[Gbreve]" to="\o'G\s+3\(ab\s-3'">
|
|
||||||
<map from="[Gcedil]" to="\o'G\s+3\(ac\s-3'">
|
|
||||||
<map from="[gcirc ]" to="\o'g\(a^'">
|
|
||||||
<map from="[Gcirc ]" to="\o'G\s+3\(a^\s-3'">
|
|
||||||
<map from="[gdot ]" to="\o'g\(a.'">
|
|
||||||
<map from="[Gdot ]" to="\o'G\s+3\(a.\s-3'">
|
|
||||||
<map from="[hcirc ]" to="\s-1\zh\s+3\(a^\s-2">
|
|
||||||
<map from="[Hcirc ]" to="\o'\s-1H\s+4\(a^\s-3'">
|
|
||||||
<map from="[hstrok]" to="\o'h\(a-'">
|
|
||||||
<map from="[Hstrok]" to="\o'H\s-2\(a-\s+2'">
|
|
||||||
<map from="[Idot ]" to="\o'I\s+3\(a.\s-3'">
|
|
||||||
<map from="[Imacr ]" to="\o'I\s+3\(a-\s-3'">
|
|
||||||
<map from="[imacr ]" to="\o'i\(a-'">
|
|
||||||
<map from="[ijlig ]" to="\(ij">
|
|
||||||
<map from="[IJlig ]" to="\(IJ">
|
|
||||||
<map from="[inodot]" to="\(.i">
|
|
||||||
<map from="[iogon ]" to="\o'i\N'184''">
|
|
||||||
<map from="[Iogon ]" to="\o'I\N'184''">
|
|
||||||
<map from="[itilde]" to="\o'i\(a~'">
|
|
||||||
<map from="[Itilde]" to="\o'I\s+3\(a~\s-3'">
|
|
||||||
<map from="[jcirc ]" to="\o'j\(a^'">
|
|
||||||
<map from="[Jcirc ]" to="\o'J\s+3\(a^\s-3'">
|
|
||||||
<map from="[kcedil]" to="\o'k\(ac'">
|
|
||||||
<map from="[Kcedil]" to="\o'K\(ac'">
|
|
||||||
<map from="[kgreen]" to="\s-3\(*K\s+3">
|
|
||||||
<map from="[lacute]" to="\o'l\s+3\(aa\s-3'">
|
|
||||||
<map from="[Lacute]" to="\o'L\s+3\(aa\s-3'">
|
|
||||||
<map from="[lcaron]" to="\o'l\s+3\(ah\s-3'">
|
|
||||||
<map from="[Lcaron]" to="\o'L\s+3\(ah\s-3'">
|
|
||||||
<map from="[lcedil]" to="\o'l\(ac'">
|
|
||||||
<map from="[Lcedil]" to="\o'L\(ac'">
|
|
||||||
<map from="[lmidot]" to="\zl\h'2p'\(md">
|
|
||||||
<map from="[Lmidot]" to="\o'L\(md'">
|
|
||||||
<map from="[lstrok]" to="\(/l">
|
|
||||||
<map from="[Lstrok]" to="\(/L">
|
|
||||||
<map from="[nacute]" to="\o'n\(aa'">
|
|
||||||
<map from="[Nacute]" to="\o'N\s+3\(aa\s-3'">
|
|
||||||
<!--
|
|
||||||
<map from="[eng ]" to="=small eng, Lapp">
|
|
||||||
<map from="[ENG ]" to="=capital ENG, Lapp">
|
|
||||||
-->
|
|
||||||
<map from="[napos ]" to="n'">
|
|
||||||
<map from="[ncaron]" to="\o'n\(ah'">
|
|
||||||
<map from="[Ncaron]" to="\o'N\s+3\(ah\s-3'">
|
|
||||||
<map from="[ncedil]" to="\o'n\(ac'">
|
|
||||||
<map from="[Ncedil]" to="\o'N\(ac'">
|
|
||||||
<map from="[odblac]" to="\o'o\(a"'">
|
|
||||||
<map from="[Odblac]" to="\o'O\s+3\(a"\s-3'">
|
|
||||||
<map from="[Omacr ]" to="\o'O\s+3\(a-\s-3'">
|
|
||||||
<map from="[omacr ]" to="\o'o\(a-'">
|
|
||||||
<map from="[oelig ]" to="\(oe">
|
|
||||||
<map from="[OElig ]" to="\(OE">
|
|
||||||
<map from="[racute]" to="\o'r\(aa'">
|
|
||||||
<map from="[Racute]" to="\o'R\s+3\(aa\s-3'">
|
|
||||||
<map from="[rcaron]" to="\o'r\(ah'">
|
|
||||||
<map from="[Rcaron]" to="\o'R\s+3\(ah\s-3'">
|
|
||||||
<map from="[rcedil]" to="\o'r\(ac'">
|
|
||||||
<map from="[Rcedil]" to="\o'R\(ac'">
|
|
||||||
<map from="[sacute]" to="\o's\(aa'">
|
|
||||||
<map from="[Sacute]" to="\o'S\s+3\(aa\s-3'">
|
|
||||||
<map from="[scaron]" to="\o's\(ah'">
|
|
||||||
<map from="[Scaron]" to="\o'S\s+3\(ah\s-3'">
|
|
||||||
<map from="[scedil]" to="\o's\(ac'">
|
|
||||||
<map from="[Scedil]" to="\o'S\(ac'">
|
|
||||||
<map from="[scirc ]" to="\o's\(a^'">
|
|
||||||
<map from="[Scirc ]" to="\o'S\s+3\(a^\s-3'">
|
|
||||||
<map from="[tcaron]" to="\o't\(ah'">
|
|
||||||
<map from="[Tcaron]" to="\o'T\s+3\(ah\s-3'">
|
|
||||||
<map from="[tcedil]" to="\o't\(ac'">
|
|
||||||
<map from="[Tcedil]" to="\o'T\(ac'">
|
|
||||||
<map from="[tstrok]" to="\o't\(hy'">
|
|
||||||
<map from="[Tstrok]" to="\o'T\(hy'">
|
|
||||||
<map from="[ubreve]" to="\o'u\(ab">
|
|
||||||
<map from="[Ubreve]" to="\o'U\s+3\(ab\s-3'">
|
|
||||||
<map from="[udblac]" to="\o'u\(a"'">
|
|
||||||
<map from="[Udblac]" to="\o'U\s+3\(a"\s-3'">
|
|
||||||
<map from="[umacr ]" to="\o'u\(a-'">
|
|
||||||
<map from="[Umacr ]" to="\o'U\s+3\(a-\s-3'">
|
|
||||||
<map from="[uogon ]" to="\o'u\N'184''">
|
|
||||||
<map from="[Uogon ]" to="\o'U\N'184''">
|
|
||||||
<map from="[uring ]" to="\o'u\(ao'">
|
|
||||||
<map from="[Uring ]" to="\o'U\s+3\(ao\s-3'">
|
|
||||||
<map from="[utilde]" to="\o'u\(a~'">
|
|
||||||
<map from="[Utilde]" to="\o'U\s+3\(a~\s-3'">
|
|
||||||
<map from="[wcirc ]" to="\o'w\(a^'">
|
|
||||||
<map from="[Wcirc ]" to="\o'W\s+3\(a^\s-3'">
|
|
||||||
<map from="[ycirc ]" to="\o'y\(a^'">
|
|
||||||
<map from="[Ycirc ]" to="\o'Y\s+3\(a^\s-3'">
|
|
||||||
<map from="[Yuml ]" to="\o'Y\s+3\(ad\s-3'">
|
|
||||||
<map from="[zacute]" to="\o'z\(aa'">
|
|
||||||
<map from="[Zacute]" to="\o'Z\s+3\(aa\s-3'">
|
|
||||||
<map from="[zcaron]" to="\o'z\(ah'">
|
|
||||||
<map from="[Zcaron]" to="\o'Z\s+3\(ah\s-3'">
|
|
||||||
<map from="[zdot ]" to="\o'z\(a.'">
|
|
||||||
<map from="[Zdot ]" to="\o'Z\s+3\(a.\s-3'">
|
|
||||||
|
|
||||||
<!-- Greek Letters -->
|
|
||||||
|
|
||||||
<map from="[agr ]" to="\(*a">
|
|
||||||
<map from="[Agr ]" to="\(*A">
|
|
||||||
<map from="[bgr ]" to="\(*b">
|
|
||||||
<map from="[Bgr ]" to="\(*B">
|
|
||||||
<map from="[ggr ]" to="\(*g">
|
|
||||||
<map from="[Ggr ]" to="\(*G">
|
|
||||||
<map from="[dgr ]" to="\(*d">
|
|
||||||
<map from="[Dgr ]" to="\(*D">
|
|
||||||
<map from="[egr ]" to="\(*e">
|
|
||||||
<map from="[Egr ]" to="\(*E">
|
|
||||||
<map from="[zgr ]" to="\(*z">
|
|
||||||
<map from="[Zgr ]" to="\(*Z">
|
|
||||||
<map from="[eegr ]" to="\(*y">
|
|
||||||
<map from="[EEgr ]" to="\(*Y">
|
|
||||||
<map from="[thgr ]" to="\(*h">
|
|
||||||
<map from="[THgr ]" to="\(*H">
|
|
||||||
<map from="[igr ]" to="\(*i">
|
|
||||||
<map from="[Igr ]" to="\(*I">
|
|
||||||
<map from="[kgr ]" to="\(*k">
|
|
||||||
<map from="[Kgr ]" to="\(*K">
|
|
||||||
<map from="[lgr ]" to="\(*l">
|
|
||||||
<map from="[Lgr ]" to="\(*L">
|
|
||||||
<map from="[mgr ]" to="\(*m">
|
|
||||||
<map from="[Mgr ]" to="\(*M">
|
|
||||||
<map from="[ngr ]" to="\(*n">
|
|
||||||
<map from="[Ngr ]" to="\(*N">
|
|
||||||
<map from="[xgr ]" to="\(*c">
|
|
||||||
<map from="[Xgr ]" to="\(*C">
|
|
||||||
<map from="[ogr ]" to="\(*o">
|
|
||||||
<map from="[Ogr ]" to="\(*O">
|
|
||||||
<map from="[pgr ]" to="\(*p">
|
|
||||||
<map from="[Pgr ]" to="\(*P">
|
|
||||||
<map from="[rgr ]" to="\(*r">
|
|
||||||
<map from="[Rgr ]" to="\(*R">
|
|
||||||
<map from="[sgr ]" to="\(*s">
|
|
||||||
<map from="[Sgr ]" to="\(*S">
|
|
||||||
<map from="[sfgr ]" to="\(ts">
|
|
||||||
<map from="[tgr ]" to="\(*t">
|
|
||||||
<map from="[Tgr ]" to="\(*T">
|
|
||||||
<map from="[ugr ]" to="\(*u">
|
|
||||||
<map from="[Ugr ]" to="\(*U">
|
|
||||||
<map from="[phgr ]" to="\(*f">
|
|
||||||
<map from="[PHgr ]" to="\(*F">
|
|
||||||
<map from="[khgr ]" to="\(*x">
|
|
||||||
<map from="[KHgr ]" to="\(*X">
|
|
||||||
<map from="[psgr ]" to="\(*q">
|
|
||||||
<map from="[PSgr ]" to="\(*Q">
|
|
||||||
<map from="[ohgr ]" to="\(*w">
|
|
||||||
<map from="[OHgr ]" to="\(*W">
|
|
||||||
|
|
||||||
<!-- Greek Symbols -->
|
|
||||||
|
|
||||||
<map from="[alpha ]" to="\(*a">
|
|
||||||
<map from="[beta ]" to="\(*b">
|
|
||||||
<map from="[gamma ]" to="\(*g">
|
|
||||||
<map from="[Gamma ]" to="\(*G">
|
|
||||||
<!--
|
|
||||||
<map from="[gammad]" to="/digamma">
|
|
||||||
-->
|
|
||||||
<map from="[delta ]" to="\(*d">
|
|
||||||
<map from="[Delta ]" to="\(*D">
|
|
||||||
<map from="[epsi ]" to="\(*e">
|
|
||||||
<!--
|
|
||||||
<map from="[epsiv ]" to="/varepsilon">
|
|
||||||
-->
|
|
||||||
<map from="[epsis ]" to="\(*e">
|
|
||||||
<map from="[zeta ]" to="\(*z">
|
|
||||||
<map from="[eta ]" to="\(*y">
|
|
||||||
<map from="[thetas]" to="\(*h">
|
|
||||||
<map from="[Theta ]" to="\(*H">
|
|
||||||
<map from="[thetav]" to="\(+h">
|
|
||||||
<map from="[iota ]" to="\(*i">
|
|
||||||
<map from="[kappa ]" to="\(*k">
|
|
||||||
<!--
|
|
||||||
<map from="[kappav]" to="/varkappa">
|
|
||||||
-->
|
|
||||||
<map from="[lambda]" to="\(*l">
|
|
||||||
<map from="[Lambda]" to="\(*L">
|
|
||||||
<map from="[mu ]" to="\(*m">
|
|
||||||
<map from="[nu ]" to="\(*n">
|
|
||||||
<map from="[xi ]" to="\(*c">
|
|
||||||
<map from="[Xi ]" to="\(*C">
|
|
||||||
<map from="[pi ]" to="\(*p">
|
|
||||||
<!--
|
|
||||||
<map from="[piv ]" to="\[+p]">
|
|
||||||
-->
|
|
||||||
<map from="[Pi ]" to="\(*P">
|
|
||||||
<map from="[rho ]" to="\(*r">
|
|
||||||
<!--
|
|
||||||
<map from="[rhov ]" to="/varrho">
|
|
||||||
-->
|
|
||||||
<map from="[sigma ]" to="\(*s">
|
|
||||||
<map from="[Sigma ]" to="\(*S">
|
|
||||||
<map from="[sigmav]" to="\(ts">
|
|
||||||
<map from="[tau ]" to="\(*t">
|
|
||||||
<map from="[upsi ]" to="\(*u">
|
|
||||||
<map from="[Upsi ]" to="\(*U">
|
|
||||||
<map from="[phis ]" to="\(*f">
|
|
||||||
<map from="[Phi ]" to="\(*F">
|
|
||||||
<map from="[phiv ]" to="\(+f">
|
|
||||||
<map from="[chi ]" to="\(*x">
|
|
||||||
<map from="[psi ]" to="\(*q">
|
|
||||||
<map from="[Psi ]" to="\(*X">
|
|
||||||
<map from="[omega ]" to="\(*w">
|
|
||||||
<map from="[Omega ]" to="\(*W">
|
|
||||||
|
|
||||||
<!-- General Technical -->
|
|
||||||
|
|
||||||
<map from="[aleph ]" to="\[Ah]">
|
|
||||||
<map from="[and ]" to="\[AN]">
|
|
||||||
<!--
|
|
||||||
<map from="[ang90 ]" to="=right (90 degree) angle">
|
|
||||||
<map from="[angsph]" to="/sphericalangle =angle-spherical">
|
|
||||||
-->
|
|
||||||
<map from="[ap ]" to="\(ap">
|
|
||||||
<!--
|
|
||||||
<map from="[becaus]" to="/because R: =because">
|
|
||||||
<map from="[bottom]" to="/bot B: =perpendicular">
|
|
||||||
-->
|
|
||||||
<map from="[cap ]" to="\(ca">
|
|
||||||
<map from="[cong ]" to="\(=~">
|
|
||||||
<!--
|
|
||||||
<map from="[conint]" to="/oint L: =contour integral operator">
|
|
||||||
-->
|
|
||||||
<map from="[cup ]" to="\(cu">
|
|
||||||
<map from="[equiv ]" to="\(==">
|
|
||||||
<map from="[exist ]" to="\(te">
|
|
||||||
<map from="[forall]" to="\[fa]">
|
|
||||||
<!--
|
|
||||||
<map from="[fnof ]" to="=function of (italic small f)">
|
|
||||||
-->
|
|
||||||
<map from="[ge ]" to="\(>=">
|
|
||||||
<map from="[iff ]" to="\[hA]">
|
|
||||||
<map from="[infin ]" to="\(if">
|
|
||||||
<!--
|
|
||||||
<map from="[int ]" to="/int L: =integral operator">
|
|
||||||
-->
|
|
||||||
<map from="[isin ]" to="\(mo">
|
|
||||||
<map from="[lang ]" to="\[la]">
|
|
||||||
<map from="[lArr ]" to="\(lA">
|
|
||||||
<map from="[le ]" to="\(<=">
|
|
||||||
<map from="[minus ]" to="\(mi">
|
|
||||||
<!--
|
|
||||||
<map from="[mnplus]" to="/mp B: =minus-or-plus sign">
|
|
||||||
-->
|
|
||||||
<map from="[nabla ]" to="\(gr">
|
|
||||||
<map from="[ne ]" to="\(!=">
|
|
||||||
<map from="[ni ]" to="\(st">
|
|
||||||
<map from="[or ]" to="\(OR">
|
|
||||||
<map from="[par ]" to="\(ba\(ba">
|
|
||||||
<!--
|
|
||||||
<map from="[part ]" to="\(pd">
|
|
||||||
<map from="[permil]" to="=per thousand">
|
|
||||||
<map from="[perp ]" to="/perp R: =perpendicular">
|
|
||||||
<map from="[prime ]" to="/prime =prime or minute">
|
|
||||||
<map from="[Prime ]" to="=double prime or second">
|
|
||||||
-->
|
|
||||||
<map from="[prop ]" to="\(pt">
|
|
||||||
<!--
|
|
||||||
<map from="[radic ]" to="/surd =radical">
|
|
||||||
<map from="[rang ]" to="/rangle C: =right angle bracket">
|
|
||||||
<map from="[rArr ]" to="/Rightarrow A: =implies">
|
|
||||||
<map from="[sim ]" to="/sim R: =similar">
|
|
||||||
<map from="[sime ]" to="/simeq R: =similar, equals">
|
|
||||||
-->
|
|
||||||
<map from="[square]" to="\(sq">
|
|
||||||
<map from="[sub ]" to="\(sb">
|
|
||||||
<map from="[sube ]" to="\(ib">
|
|
||||||
<map from="[sup ]" to="\(sp">
|
|
||||||
<map from="[supe ]" to="\(ip">
|
|
||||||
<!--
|
|
||||||
<map from="[there4]" to="/therefore R: =therefore">
|
|
||||||
<map from="[Verbar]" to="/Vert =dbl vertical bar">
|
|
||||||
<map from="[angst ]" to="Angstrom =capital A, ring">
|
|
||||||
<map from="[bernou]" to="Bernoulli function (script capital B)">
|
|
||||||
<map from="[compfn]" to="B: composite function (small circle)">
|
|
||||||
<map from="[Dot ]" to="=dieresis or umlaut mark">
|
|
||||||
<map from="[DotDot]" to="four dots above">
|
|
||||||
<map from="[hamilt]" to="Hamiltonian (script capital H)">
|
|
||||||
<map from="[lagran]" to="Lagrangian (script capital L)">
|
|
||||||
<map from="[lowast]" to="low asterisk">
|
|
||||||
<map from="[notin ]" to="N: negated set membership">
|
|
||||||
<map from="[order ]" to="order of (script small o)">
|
|
||||||
<map from="[phmmat]" to="physics M-matrix (script capital M)">
|
|
||||||
<map from="[tdot ]" to="three dots above">
|
|
||||||
<map from="[tprime]" to="triple prime">
|
|
||||||
<map from="[wedgeq]" to="R: corresponds to (wedge, equals)">
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Diacritical Marks -->
|
|
||||||
|
|
||||||
<map from="[acute ]" to="\&'">
|
|
||||||
<map from="[breve ]" to="\(ab">
|
|
||||||
<map from="[caron ]" to="\(ah">
|
|
||||||
<map from="[cedil ]" to="\(ac">
|
|
||||||
<!--
|
|
||||||
<map from="#[circ ]" to="\(a^">
|
|
||||||
-->
|
|
||||||
<map from="[circ ]" to="\(ha">
|
|
||||||
<map from="[dblac ]" to='\(a"'>
|
|
||||||
<map from="[die ]" to="\(ad">
|
|
||||||
<map from="[dot ]" to="\(a.">
|
|
||||||
<map from="[grave ]" to="`">
|
|
||||||
<map from="[macr ]" to="\(a-">
|
|
||||||
<map from="[ogon ]" to="\N'184'">
|
|
||||||
<map from="[ring ]" to="\(ao">
|
|
||||||
<map from="[tilde ]" to="~">
|
|
||||||
<map from="[uml ]" to="\(ad">
|
|
@ -1,97 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 1996
|
|
||||||
John R. Fieber. All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions
|
|
||||||
are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY JOHN R. FIEBER AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL JOHN R. FIEBER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGE.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
This DTD defines the format for instant(1) translation specification
|
|
||||||
files. A translation specification contains:
|
|
||||||
|
|
||||||
* Character mappings, useful for dealing with characters that
|
|
||||||
are magic for the formatter, such as backslash (\) is for
|
|
||||||
TeX.
|
|
||||||
|
|
||||||
* Sdata mappings. For example, the ISO entity sets define
|
|
||||||
special characters as sdata string, ö is [ouml ]. These
|
|
||||||
sdata strings are marked in the output of the sgml parser
|
|
||||||
and the mapping turn them into something useful for the
|
|
||||||
formatter.
|
|
||||||
|
|
||||||
* A set of translation rules.
|
|
||||||
|
|
||||||
See the transpec(5) man page for details.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT transpec - - ((cmap | smap | var)*, rule+)>
|
|
||||||
|
|
||||||
<!ELEMENT (cmap, smap) - - (map*)>
|
|
||||||
<!ATTLIST (cmap, smap) id ID #IMPLIED>
|
|
||||||
|
|
||||||
<!ELEMENT map - o EMPTY>
|
|
||||||
<!ATTLIST map from CDATA #REQUIRED
|
|
||||||
to CDATA #REQUIRED>
|
|
||||||
|
|
||||||
<!ELEMENT var - o (#PCDATA)>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
A rule consists of an expression to determine if the rule should
|
|
||||||
be applied to a given element (match), and the action that should
|
|
||||||
be taken if the element matches. Each rule can be named. The
|
|
||||||
cmap and smap attributes can specify an alternate to the default
|
|
||||||
character and data mapping.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ELEMENT rule - o (match, action?)>
|
|
||||||
<!ATTLIST rule id CDATA #IMPLIED -- XXX should be ID notCDATA -->
|
|
||||||
|
|
||||||
<!ELEMENT match - o (gi | attval | content | context | nthchild
|
|
||||||
| pattset | relation | varval | varreval)+>
|
|
||||||
<!ELEMENT gi - o (#PCDATA)>
|
|
||||||
<!ELEMENT attval - o (#PCDATA)>
|
|
||||||
<!ELEMENT content - o (#PCDATA)>
|
|
||||||
<!ELEMENT context - o (#PCDATA)>
|
|
||||||
<!ELEMENT nthchild - o (#PCDATA)>
|
|
||||||
<!ELEMENT pattset - o (#PCDATA)>
|
|
||||||
<!ELEMENT relation - o (#PCDATA)>
|
|
||||||
<!ELEMENT varval - o (#PCDATA)>
|
|
||||||
<!ELEMENT varreval - o (#PCDATA)>
|
|
||||||
|
|
||||||
|
|
||||||
<!ELEMENT action - o (do | end | ignore | incr | message | replace
|
|
||||||
| quit | set | start)+>
|
|
||||||
<!ELEMENT do - o (#PCDATA)>
|
|
||||||
<!ELEMENT end - - (#PCDATA)>
|
|
||||||
<!ELEMENT ignore - o (#PCDATA)>
|
|
||||||
<!ELEMENT incr - o (#PCDATA)>
|
|
||||||
<!ELEMENT message - o (#PCDATA)>
|
|
||||||
<!ELEMENT replace - - (#PCDATA)>
|
|
||||||
<!ELEMENT quit - o (#PCDATA)>
|
|
||||||
<!ELEMENT set - o (#PCDATA)>
|
|
||||||
<!ELEMENT start - - (#PCDATA)>
|
|
@ -1,5 +1,5 @@
|
|||||||
# From: @(#)Makefile 8.3 (Berkeley) 1/7/94
|
# From: @(#)Makefile 8.3 (Berkeley) 1/7/94
|
||||||
# $Id: Makefile,v 1.85 1997/05/29 15:03:32 wpaul Exp $
|
# $Id: Makefile,v 1.86 1997/07/05 14:22:14 peter Exp $
|
||||||
|
|
||||||
# XXX MISSING: deroff diction graph learn plot
|
# XXX MISSING: deroff diction graph learn plot
|
||||||
# spell spline struct units xsend
|
# spell spline struct units xsend
|
||||||
@ -19,7 +19,7 @@ SUBDIR= apply ar at banner basename biff brandelf cal calendar \
|
|||||||
nm nohup opieinfo opiekey opiepasswd pagesize passwd paste pr printenv \
|
nm nohup opieinfo opiekey opiepasswd pagesize passwd paste pr printenv \
|
||||||
printf quota ranlib rdist renice rev rlogin rpcgen \
|
printf quota ranlib rdist renice rev rlogin rpcgen \
|
||||||
rpcinfo rs rsh rup ruptime rusers rwall \
|
rpcinfo rs rsh rup ruptime rusers rwall \
|
||||||
rwho script sed sgmlfmt sgmls shar showmount size soelim split \
|
rwho script sed shar showmount size soelim split \
|
||||||
strings strip su symorder talk tconv tcopy tee tftp time \
|
strings strip su symorder talk tconv tcopy tee tftp time \
|
||||||
tip tn3270 top touch tput tr true tset tsort tty ul uname \
|
tip tn3270 top touch tput tr true tset tsort tty ul uname \
|
||||||
unexpand unifdef uniq units unvis users uudecode uuencode vacation \
|
unexpand unifdef uniq units unvis users uudecode uuencode vacation \
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
MAN1= sgmlfmt.1
|
|
||||||
|
|
||||||
afterinstall:
|
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
||||||
${.CURDIR}/sgmlfmt.pl ${DESTDIR}${BINDIR}/sgmlfmt
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
|
@ -1,172 +0,0 @@
|
|||||||
.Dd May 9, 1997
|
|
||||||
.Os FreeBSD 2.2
|
|
||||||
.Dt SGMLFMT 1
|
|
||||||
.Sh NAME
|
|
||||||
.Nm sgmlfmt
|
|
||||||
.Nd Formats linuxdoc and DocBook SGML documents.
|
|
||||||
.Sh SYNOPSIS
|
|
||||||
.Nm
|
|
||||||
.Op Fl d Ar doctype
|
|
||||||
.Fl f Ar format
|
|
||||||
.Op Fl i Ar name ...
|
|
||||||
.Op Fl links
|
|
||||||
.Op Fl e Ar encoding
|
|
||||||
.Op Fl hdr Ar file
|
|
||||||
.Op Fl ftr Ar file
|
|
||||||
.Ar file
|
|
||||||
.Sh DESCRIPTION
|
|
||||||
The
|
|
||||||
.Nm
|
|
||||||
command reads SGML files tagged according to the linuxdoc or
|
|
||||||
DocBook DTD,
|
|
||||||
validates them using the
|
|
||||||
.Xr sgmls 1
|
|
||||||
parser and then converts them to the specified output format.
|
|
||||||
Linuxdoc input files must include the following document type
|
|
||||||
declaration before any uncommented text:
|
|
||||||
.Bd -literal -offset indent
|
|
||||||
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
|
|
||||||
.Ed
|
|
||||||
.Pp
|
|
||||||
Options for
|
|
||||||
.Nm
|
|
||||||
include the following:
|
|
||||||
.Bl -tag -width Ds
|
|
||||||
.It Fl d Ar doctype
|
|
||||||
Specifies the SGML document type of the source file. Currently
|
|
||||||
supported document types are
|
|
||||||
.Ar linuxdoc
|
|
||||||
and
|
|
||||||
.Ar docbook .
|
|
||||||
If no
|
|
||||||
.Fl d
|
|
||||||
option is specified, the default is
|
|
||||||
.Ar linuxdoc .
|
|
||||||
.It Fl f Ar format
|
|
||||||
Determines the output format which can be one of the following:
|
|
||||||
.Bl -tag -width Ds
|
|
||||||
.It Ar ascii
|
|
||||||
Generates a single output file with the extension
|
|
||||||
.Pa .ascii
|
|
||||||
suitable for viewing on an ASCII terminal.
|
|
||||||
.It Ar html
|
|
||||||
Generates a set of linked HTML files suitable for use with an
|
|
||||||
HTML browser. A top level file,
|
|
||||||
.Pa file.html ,
|
|
||||||
contains the title, author, date, abstract and brief table of
|
|
||||||
contents for the document. A file
|
|
||||||
.Pa file_toc.html
|
|
||||||
contains a complete table of contents. A series of files named
|
|
||||||
.Pa file1.html ,
|
|
||||||
.Pa file2.html ...
|
|
||||||
.Pa filen.html
|
|
||||||
contain the actual text of the document.
|
|
||||||
.It Ar koi8-r
|
|
||||||
Generates a single output file with the extension
|
|
||||||
.Pa .koi8-r
|
|
||||||
suitable for viewing on an terminal supporting the KOI8-R
|
|
||||||
character encoding.
|
|
||||||
.It Ar latin1
|
|
||||||
Generates a single output file with the extension
|
|
||||||
.Pa .latin1
|
|
||||||
suitable for viewing on an terminal supporting the ISO8859-1
|
|
||||||
character encoding.
|
|
||||||
.It Ar ps
|
|
||||||
Generates a single output file with the extension
|
|
||||||
.Pa .ps
|
|
||||||
suitable for printing or display on a PostScript compatible device.
|
|
||||||
.It Ar roff
|
|
||||||
Generates a single output file with the extension
|
|
||||||
.Pa .roff
|
|
||||||
suitable processing with
|
|
||||||
.Xr groff 1 .
|
|
||||||
This is actually an intermediate conversion used by the
|
|
||||||
.Fl f Ar ascii ,
|
|
||||||
.Fl f Ar latin1 ,
|
|
||||||
.Fl f Ar koi8-r ,
|
|
||||||
and
|
|
||||||
.Fl f Ar ps
|
|
||||||
format options.
|
|
||||||
.El
|
|
||||||
.It Fl i Ar name
|
|
||||||
Pretend that
|
|
||||||
.Dl <!ENTITY % name "INCLUDE">
|
|
||||||
occurs at the start of the document type declaration subset in
|
|
||||||
the document entity. Since repeated definitions of an entity are
|
|
||||||
ignored, this definition will take precedence over any other
|
|
||||||
definitions of this entity in the document type declaration.
|
|
||||||
Multiple
|
|
||||||
.Fl i
|
|
||||||
options are allowed. If the declaration replaces the reserved
|
|
||||||
name INCLUDE then the new reserved name will be the replacement
|
|
||||||
text of the entity. Typically the document type declaration will
|
|
||||||
contain
|
|
||||||
.Dl <!ENTITY % name "IGNORE">
|
|
||||||
and will use
|
|
||||||
.Li %name;
|
|
||||||
in the status keyword specification of a
|
|
||||||
marked section declaration. In this case the effect of the
|
|
||||||
option will be to cause the marked section not to be ignored.
|
|
||||||
.It Fl links
|
|
||||||
When used with the
|
|
||||||
.Fl f Ar html
|
|
||||||
option, this option generates a shell script named
|
|
||||||
.Pa file.ln .
|
|
||||||
For each
|
|
||||||
.Li <label id="foo">
|
|
||||||
in the document source,
|
|
||||||
.Pa file.ln
|
|
||||||
generates a symbolic link
|
|
||||||
.Pa foo.html
|
|
||||||
pointing to the numbered
|
|
||||||
.Pa .html
|
|
||||||
file containing the reference. Since the number of the file
|
|
||||||
containing a particular section can change when a document
|
|
||||||
is modified, this provides a convenient hook by which separate
|
|
||||||
documents can provide links into another document without the
|
|
||||||
links becoming invalid when the target document is modified.
|
|
||||||
When creating a symbolic link, any occurrence of a slash (/) in label
|
|
||||||
is replaced with percent (%), while any occurrence of a space is replaced
|
|
||||||
with an underscore (_).
|
|
||||||
.It Fl e Ar encoding
|
|
||||||
When used with the
|
|
||||||
.Fl f Ar html
|
|
||||||
option, specifies document encoding to use for the generated
|
|
||||||
HTML files. If this option is not specified, iso-8859-1 is used.
|
|
||||||
.It Fl hdr Ar file
|
|
||||||
When used with the
|
|
||||||
.Fl f Ar html
|
|
||||||
option, the specified file will be inserted at the beginning of the
|
|
||||||
body element of each generated HTML file.
|
|
||||||
.It Fl ftr Ar file
|
|
||||||
When used with the
|
|
||||||
.Fl f Ar html
|
|
||||||
option, the specified file will be inserted at the end of the
|
|
||||||
body element of each generated HTML file.
|
|
||||||
.El
|
|
||||||
.Pp
|
|
||||||
In all cases, the output files are created in the current working
|
|
||||||
directory.
|
|
||||||
.Sh FILES
|
|
||||||
.Pa /usr/share/sgml/transpec
|
|
||||||
- directory containing translation specification files for
|
|
||||||
.Xr instant 1 .
|
|
||||||
.Pp
|
|
||||||
.Sh SEE ALSO
|
|
||||||
.Xr groff 1 ,
|
|
||||||
.Xr instant 1 ,
|
|
||||||
.Xr sgmls 1 ,
|
|
||||||
.Xr transpec 5
|
|
||||||
.Sh HISTORY
|
|
||||||
The
|
|
||||||
.Nm
|
|
||||||
command appeared in Version 2.0.5 FreeBSD UNIX.
|
|
||||||
.Sh AUTHORS
|
|
||||||
The
|
|
||||||
.Nm
|
|
||||||
command was written by John Fieber
|
|
||||||
.Aq jfieber@FreeBSD.org .
|
|
||||||
The linuxdoc DTD was written by Matt Welsh
|
|
||||||
.Aq mdw@cs.cornell.edu
|
|
||||||
and based on the Qwertz DTD written by Tom Gordon
|
|
||||||
.Aq thomas.gordon@gmd.de .
|
|
@ -1,749 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
# $Id: sgmlfmt.pl,v 1.25 1997/05/10 20:41:11 jfieber Exp $
|
|
||||||
|
|
||||||
# Copyright (C) 1996
|
|
||||||
# John R. Fieber. All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer.
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer in the
|
|
||||||
# documentation and/or other materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY JOHN R. FIEBER AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
# ARE DISCLAIMED. IN NO EVENT SHALL JOHN R. FIEBER OR CONTRIBUTORS BE LIABLE
|
|
||||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
# SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
# Format an sgml document tagged according to the linuxdoc DTD.
|
|
||||||
# by John Fieber <jfieber@freebsd.org> for the FreeBSD documentation
|
|
||||||
# project.
|
|
||||||
|
|
||||||
|
|
||||||
require 'newgetopt.pl';
|
|
||||||
|
|
||||||
#
|
|
||||||
# The SGML parser, and translation engine.
|
|
||||||
#
|
|
||||||
|
|
||||||
$sgmls = "sgmls";
|
|
||||||
$instant = "instant";
|
|
||||||
|
|
||||||
#
|
|
||||||
# Things to clean up if we exit abnormally
|
|
||||||
#
|
|
||||||
|
|
||||||
@cleanfiles = ();
|
|
||||||
|
|
||||||
#
|
|
||||||
# Interrupt handler, remove scratch files.
|
|
||||||
#
|
|
||||||
|
|
||||||
sub sighandler {
|
|
||||||
local($sig) = @_;
|
|
||||||
unlink @cleanfiles;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$SIG{'HUP'} = 'sighandler';
|
|
||||||
$SIG{'INT'} = 'sighandler';
|
|
||||||
$SIG{'QUIT'} = 'sighandler';
|
|
||||||
|
|
||||||
#
|
|
||||||
# Display a usage message.
|
|
||||||
#
|
|
||||||
|
|
||||||
sub usage {
|
|
||||||
print "Usage:\n";
|
|
||||||
print "sgmlfmt [-d <doctype>] -f <format> [-i <namea> ...] [-links]\n";
|
|
||||||
print " [-e encoding] [-hdr file] [-ftr file] file\n";
|
|
||||||
print "where <doctype> is one of: linuxdoc (default), docbook.\n";
|
|
||||||
print "and <format> is one of: ascii, html, koi8-r, latin1, ps, roff\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Look for the file specified on the command line
|
|
||||||
#
|
|
||||||
|
|
||||||
sub getfile {
|
|
||||||
local($filearg) = @_;
|
|
||||||
if (-f "$filearg.sgml") {
|
|
||||||
$file = "$filearg.sgml";
|
|
||||||
}
|
|
||||||
elsif (-f $filearg) {
|
|
||||||
$file = $filearg;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
$fileroot = $file;
|
|
||||||
$fileroot =~ s/.*\///; # drop the path
|
|
||||||
$fileroot =~ s/\.[^\.]*$//; # drop the extension
|
|
||||||
$filepath = $file;
|
|
||||||
$filepath =~ s/\/*[^\/]*$//;
|
|
||||||
if ($filepath ne "") {
|
|
||||||
$ENV{"SGML_PATH"} .= ":$filepath/%S:%S";
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# A function to run sgmls and instant on the input file.
|
|
||||||
#
|
|
||||||
# Arguments:
|
|
||||||
# 1. A file handle for the output
|
|
||||||
# 2. A translation file
|
|
||||||
#
|
|
||||||
|
|
||||||
sub sgmlparse {
|
|
||||||
local($ifhandle, $replacement) = @_;
|
|
||||||
$defines = join(" -i ", @opt_i);
|
|
||||||
if ($defines ne "") {
|
|
||||||
$defines = "-i $defines";
|
|
||||||
}
|
|
||||||
open($ifhandle, "$sgmls $defines $decl $file | " .
|
|
||||||
"$instant -Dfilename=$fileroot $instantopts -t ${dtd}-${replacement}.ts |");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Generate roff output
|
|
||||||
#
|
|
||||||
|
|
||||||
sub gen_roff {
|
|
||||||
@cleanfiles = (@cleanfiles, "${fileroot}.roff");
|
|
||||||
open (outfile, ">$fileroot.roff");
|
|
||||||
&sgmlparse(infile, "roff");
|
|
||||||
while (<infile>) {
|
|
||||||
print outfile;
|
|
||||||
}
|
|
||||||
close(infile);
|
|
||||||
close(outfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Generate something from roff output
|
|
||||||
#
|
|
||||||
|
|
||||||
sub do_groff {
|
|
||||||
local($driver, $postproc) = @_;
|
|
||||||
@cleanfiles = (@cleanfiles, "${fileroot}.trf", "${fileroot}.tmp",
|
|
||||||
"${fileroot}.qrf", "${fileroot}.${driver}");
|
|
||||||
open (outfile, ">$fileroot.trf");
|
|
||||||
&sgmlparse(infile, "roff");
|
|
||||||
while (<infile>) {
|
|
||||||
print outfile;
|
|
||||||
}
|
|
||||||
close(infile);
|
|
||||||
close(outfile);
|
|
||||||
system("groff -T ${driver} -t ${fileroot}.trf ${postproc} > ${fileroot}.${driver}");
|
|
||||||
|
|
||||||
# If foo.tmp has been created, then there are cross references
|
|
||||||
# in the file and we need a second pass to resolve them correctly.
|
|
||||||
|
|
||||||
if (stat("${fileroot}.tmp")) {
|
|
||||||
system("groff -T ${driver} -t ${fileroot}.trf ${postproc} > ${fileroot}.${driver}");
|
|
||||||
unlink("${fileroot}.qrf");
|
|
||||||
}
|
|
||||||
unlink("${fileroot}.trf");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Generate HTML output.
|
|
||||||
#
|
|
||||||
# HTML is generated in two passes.
|
|
||||||
#
|
|
||||||
# The first pass takes the output from sgmlsasp and gathers information
|
|
||||||
# about the structure of the document that is used in the sceond pass
|
|
||||||
# for splitting the file into separate files. Targets for cross
|
|
||||||
# references are also stored in this pass.
|
|
||||||
#
|
|
||||||
# Based on the information from the first pass, the second pass
|
|
||||||
# generates a numbered series of HTML files, a "toplevel" file
|
|
||||||
# containing the title, author, abstract and a brief table of
|
|
||||||
# contents. A detailed table of contents is also generated. The
|
|
||||||
# second pass generates links for cross references and URLs.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Tunable parameters
|
|
||||||
#
|
|
||||||
$maxlevel = 3; # max section depth
|
|
||||||
$num_depth = 4; # depth of numbering
|
|
||||||
$m_depth = 2; # depth of menus
|
|
||||||
|
|
||||||
|
|
||||||
$sc = 0; # section counter
|
|
||||||
$filecount = 0; # file counter
|
|
||||||
|
|
||||||
$doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">";
|
|
||||||
$BODY = "<BODY text=\"#000000\" bgcolor=\"#ffffff\">";
|
|
||||||
|
|
||||||
# Other variables:
|
|
||||||
#
|
|
||||||
# st_xxxx - Section Table. Arrays containing information about a
|
|
||||||
# given section. To be accesssed via the section counter $sc.
|
|
||||||
#
|
|
||||||
# st_ol - The output level of the given section. I.E. how many
|
|
||||||
# levels from the table of contents does it lie in terms
|
|
||||||
# of HTML files which is distinct from <sect1>, <sect2> etc.
|
|
||||||
# levels.
|
|
||||||
#
|
|
||||||
# st_sl - The absolute depth of a section. Contrast st_ol.
|
|
||||||
#
|
|
||||||
# st_num - The section number in the form X.Y.Z....
|
|
||||||
#
|
|
||||||
# st_file - The HTML file the section belongs to.
|
|
||||||
#
|
|
||||||
# st_header - The text of the section title.
|
|
||||||
#
|
|
||||||
# st_parent - The section number of the given sections parent.
|
|
||||||
|
|
||||||
sub gen_html {
|
|
||||||
local($i, $sl);
|
|
||||||
|
|
||||||
# Remove any lingering link file
|
|
||||||
unlink("${fileroot}.ln");
|
|
||||||
|
|
||||||
$tmpfile = "/tmp/sgmlf.$$";
|
|
||||||
@cleanfiles = (@cleanfiles, "$tmpfile", "${fileroot}.html",
|
|
||||||
"${fileroot}_toc.html", "${fileroot}.ln");
|
|
||||||
open(bar, ">$tmpfile");
|
|
||||||
# print STDERR "(Pass 1...";
|
|
||||||
&sgmlparse(foo, "html");
|
|
||||||
while (<foo>) {
|
|
||||||
print bar;
|
|
||||||
# count up the number of files to be generated
|
|
||||||
# and gather assorted info about the document structure
|
|
||||||
if (/^<\@\@sect>/) {
|
|
||||||
$sl++; # current section level
|
|
||||||
$sc++; # current section number
|
|
||||||
$st_sl[$sc] = $sl;
|
|
||||||
|
|
||||||
# In case this section has subsections, set the parent
|
|
||||||
# pointer for this level to point at this section.
|
|
||||||
$parent_pointer[$sl] = $sc;
|
|
||||||
|
|
||||||
# Figure out who is the parent if this section.
|
|
||||||
$st_parent[$sc] = $parent_pointer[$sl - 1];
|
|
||||||
|
|
||||||
# Per level counters
|
|
||||||
$counter[$sl]++;
|
|
||||||
$counter[$sl + 1] = 0;
|
|
||||||
|
|
||||||
# calculate the section number in the form x.y.z.
|
|
||||||
if ($sl <= $num_depth) {
|
|
||||||
$st_num[$sc] = $st_num[$st_parent[$sc]] . "$counter[$sl].";
|
|
||||||
}
|
|
||||||
|
|
||||||
# calculate the file number and output level
|
|
||||||
if ($sl <= $maxlevel) {
|
|
||||||
$filecount++;
|
|
||||||
$st_ol[$sc] = $sl;
|
|
||||||
@cleanfiles = (@cleanfiles, "${fileroot}${filecount}.html");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$st_ol[$sc] = $maxlevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
$st_file[$sc] = $filecount;
|
|
||||||
|
|
||||||
# Calculate the highest level node in which this
|
|
||||||
# node should appear as a menu item.
|
|
||||||
$st_pl[$sc] = $sl - $m_depth;
|
|
||||||
if ($st_pl[$sc] < 0) {
|
|
||||||
$st_pl[$sc] = 0;
|
|
||||||
}
|
|
||||||
if ($st_pl[$sc] > $maxlevel) {
|
|
||||||
$st_pl[$sc] = $maxlevel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (/^<\@\@endsect>/) {
|
|
||||||
$sl--;
|
|
||||||
}
|
|
||||||
|
|
||||||
# record section titles
|
|
||||||
if (/^<\@\@head>/) {
|
|
||||||
chop;
|
|
||||||
s/^<\@\@head>//;
|
|
||||||
$st_header[$sc] = $_;
|
|
||||||
}
|
|
||||||
|
|
||||||
# record the section number that a label occurs in
|
|
||||||
if (/^<\@\@label>/) {
|
|
||||||
chop;
|
|
||||||
s/^<\@\@label>//;
|
|
||||||
if ($references{$_} eq "") {
|
|
||||||
$references{$_} = "$filecount";
|
|
||||||
if ($opt_links) {
|
|
||||||
&extlink($_, "${fileroot}${filecount}.html");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print STDERR "Warning: the label `$_' is multiply-defined.\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(bar);
|
|
||||||
|
|
||||||
open(foofile, $tmpfile);
|
|
||||||
&html2html(foofile, "boo");
|
|
||||||
|
|
||||||
unlink($tmpfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# HTML conversion, pass number 2
|
|
||||||
#
|
|
||||||
|
|
||||||
sub html2html {
|
|
||||||
local($infile, $outfile) = @_;
|
|
||||||
local($i);
|
|
||||||
|
|
||||||
$sc = 0;
|
|
||||||
push(@scs, $sc);
|
|
||||||
|
|
||||||
open(tocfile, ">${fileroot}_toc.html");
|
|
||||||
print tocfile "$doctype\n<HTML>\n";
|
|
||||||
|
|
||||||
while (<$infile>) {
|
|
||||||
# change `<' and `>' to `<' and `>' in <pre></pre>
|
|
||||||
if (/<pre>/.../<\/pre>/) {
|
|
||||||
s/</\</g;
|
|
||||||
s/\<([\/]*)pre>/<\1pre>/g;
|
|
||||||
s/>/\>/g;
|
|
||||||
s/<([\/]*)pre\>/<\1pre>/g;
|
|
||||||
}
|
|
||||||
|
|
||||||
# remove extraneous empty paragraphs (it is arguable that this
|
|
||||||
# is really a bug with the DTD, but changing it would break
|
|
||||||
# almost every document written to this DTD.)
|
|
||||||
s/<p><\/p>//;
|
|
||||||
|
|
||||||
tagsw: {
|
|
||||||
# titles and headings
|
|
||||||
if (s/^<\@\@title>//) {
|
|
||||||
chop;
|
|
||||||
$st_header[0] = $_;
|
|
||||||
$st_parent[0] = -1;
|
|
||||||
$t = $st_header[0];
|
|
||||||
$t =~ s|<[a-zA-Z/][^>]*>||g;
|
|
||||||
print tocfile "<HEAD>\n$html_encoding\n<TITLE>$t</TITLE>\n" .
|
|
||||||
"</HEAD>\n";
|
|
||||||
print tocfile "<H1>$st_header[0]</H1>\n";
|
|
||||||
|
|
||||||
$header[$st_ol[$sc]] =
|
|
||||||
"$doctype\n<HTML>\n<HEAD>\n$html_encoding\n<TITLE>$t</TITLE>\n" .
|
|
||||||
"</HEAD>\n$BODY\n";
|
|
||||||
$header[$st_ol[$sc]] .= $html_header;
|
|
||||||
$header[$st_ol[$sc]] .= "\n<H1>$st_header[0]</H1>\n";
|
|
||||||
|
|
||||||
$footer[$st_ol[$sc]] = "\n";
|
|
||||||
$footer[$st_ol[$sc]] .= $html_footer;
|
|
||||||
$footer[$st_ol[$sc]] .= "\n</BODY>\n</HTML>\n";
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# HEADER begin
|
|
||||||
#
|
|
||||||
if (s/^<\@\@head>//) {
|
|
||||||
chop;
|
|
||||||
|
|
||||||
if ($part == 1) {
|
|
||||||
$text[0] .= "<H1>Part $partnum:<BR>$_";
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
$href = "\"${fileroot}$st_file[$sc].html#$sc\"";
|
|
||||||
|
|
||||||
# set up headers and footers
|
|
||||||
if ($st_sl[$sc] > 0 && $st_sl[$sc] <= $maxlevel) {
|
|
||||||
$t = $_;
|
|
||||||
$t =~ s|<[a-zA-Z/][^>]*>||g;
|
|
||||||
$header[$st_ol[$sc]] =
|
|
||||||
"$doctype\n<HTML>\n<HEAD>\n$html_encoding\n<TITLE>$t</TITLE>\n" .
|
|
||||||
"</HEAD>\n$BODY\n";
|
|
||||||
$header[$st_ol[$sc]] .= $html_header;
|
|
||||||
$header[$st_ol[$sc]] .= "\n$navbar[$st_ol[$sc]]\n<HR NOSHADE>\n";
|
|
||||||
$footer[$st_ol[$sc]] = "<HR NOSHADE>\n$navbar[$st_ol[$sc]]\n";
|
|
||||||
$footer[$st_ol[$sc]] .= $html_footer;
|
|
||||||
$footer[$st_ol[$sc]] .= "\n</BODY>\n</HTML>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add this to the master table of contents
|
|
||||||
print tocfile "<DD>$st_num[$sc] " .
|
|
||||||
"<A HREF=$href>$_";
|
|
||||||
|
|
||||||
# Calculate the <H?> level to use in the HTML file
|
|
||||||
$hlevel = $st_sl[$sc] - $st_ol[$sc] + 2;
|
|
||||||
$shlevel = $st_sl[$sc] - $st_ol[$sc] + 3;
|
|
||||||
|
|
||||||
$i = $st_ol[$sc];
|
|
||||||
|
|
||||||
# Add the section header
|
|
||||||
$text[$i] .= "<H$hlevel><A NAME=\"$sc\"></A>$st_num[$sc] $_";
|
|
||||||
$i--;
|
|
||||||
|
|
||||||
# And also to the parent
|
|
||||||
if ($st_sl[$sc] == $st_ol[$sc] && $i >= 0) {
|
|
||||||
$text[$i] .= "<H$shlevel>$st_num[$sc] " .
|
|
||||||
"<A HREF=$href>$_";
|
|
||||||
$i--;
|
|
||||||
}
|
|
||||||
|
|
||||||
# and to the grandparents
|
|
||||||
for (; $i >= $st_pl[$sc]; $i--) {
|
|
||||||
$text[$i] .= "<DD>$st_num[$sc] " .
|
|
||||||
"<A HREF=$href>$_";
|
|
||||||
}
|
|
||||||
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# HEADER end
|
|
||||||
#
|
|
||||||
if (s/^<\@\@endhead>//) {
|
|
||||||
if ($part == 1) {
|
|
||||||
$text[0] .= "</H1>\n";
|
|
||||||
$part = 0;
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
print tocfile "</A>\n";
|
|
||||||
|
|
||||||
$i = $st_ol[$sc];
|
|
||||||
|
|
||||||
# Close the section header
|
|
||||||
$text[$i] .= "</H$hlevel>\n";
|
|
||||||
$i--;
|
|
||||||
|
|
||||||
# in the parent...
|
|
||||||
if ($st_sl[$sc] == $st_ol[$sc] && $i >= 0) {
|
|
||||||
$text[$i] .= "</A></H$shlevel>\n";
|
|
||||||
$i--;
|
|
||||||
}
|
|
||||||
|
|
||||||
# in the grandparent...
|
|
||||||
for (; $i >= $st_pl[$sc]; $i--) {
|
|
||||||
$text[$i] .= "</A></DD>\n";
|
|
||||||
}
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
# sectioning
|
|
||||||
if (s/^<\@\@part>//) {
|
|
||||||
$part = 1;
|
|
||||||
$partnum++;
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# BEGINNING of a section
|
|
||||||
#
|
|
||||||
if (s/^<\@\@sect>//) {
|
|
||||||
# Increment the section counter and save it on a stack
|
|
||||||
# for future reference.
|
|
||||||
$sc++;
|
|
||||||
push(@scs, $sc);
|
|
||||||
|
|
||||||
# Set up the navigation bar
|
|
||||||
if ($st_file[$sc] > $st_file[$sc - 1]) {
|
|
||||||
&navbar($st_file[$sc], $filecount, $sc);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prepare for menu entries in the table of contents and
|
|
||||||
# parent file(s).
|
|
||||||
if ($st_sl[$sc - 1] < $st_sl[$sc]) {
|
|
||||||
print tocfile "<DL>\n";
|
|
||||||
$i = $st_ol[$sc] - 1 - ($st_sl[$sc] == $st_ol[$sc]);
|
|
||||||
for (; $i >= $st_pl[$sc]; $i--) {
|
|
||||||
$text[$i] .= "<DL>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# END of a section
|
|
||||||
#
|
|
||||||
if (s/^<\@\@endsect>//) {
|
|
||||||
|
|
||||||
# Remember the section number! Subsections may have
|
|
||||||
# altered the global $sc variable.
|
|
||||||
local ($lsc) = pop(@scs);
|
|
||||||
|
|
||||||
# Close off subsection menus we may have created in
|
|
||||||
# parent file(s).
|
|
||||||
if ($st_sl[$lsc] > $st_sl[$sc + 1]) {
|
|
||||||
print tocfile "</DL>\n";
|
|
||||||
if ($st_sl[$lsc] > 1) {
|
|
||||||
print tocfile "</DD>\n";
|
|
||||||
}
|
|
||||||
$i = $st_ol[$lsc] - 1 - ($st_sl[$lsc] == $st_ol[$lsc]);
|
|
||||||
for (; $i >= $st_pl[$lsc]; $i--) {
|
|
||||||
$text[$i] .= "</DL>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# If this section is below $maxlevel, write it now.
|
|
||||||
if ($st_sl[$lsc] <= $maxlevel) {
|
|
||||||
open(SECOUT, ">${fileroot}$st_file[$lsc].html");
|
|
||||||
print SECOUT "$header[$st_ol[$lsc]] $text[$st_ol[$lsc]] " .
|
|
||||||
"$footer[$st_ol[$lsc]]";
|
|
||||||
$text[$st_ol[$lsc]] = "";
|
|
||||||
close(SECOUT);
|
|
||||||
}
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
# cross references
|
|
||||||
if (s/^<\@\@label>//) {
|
|
||||||
chop;
|
|
||||||
$text[$st_ol[$sc]] .= "<A NAME=\"$_\"></A>";
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
if (s/^<\@\@ref>//) {
|
|
||||||
chop;
|
|
||||||
$refname = $_;
|
|
||||||
if ($references{$_} eq "") {
|
|
||||||
print "Warning: Reference to $_ has no defined target\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$text[$st_ol[$sc]] .=
|
|
||||||
"<A HREF=\"${fileroot}$references{$_}.html#$_\">";
|
|
||||||
}
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
if (s/^<\@\@endref>//) {
|
|
||||||
$text[$st_ol[$sc]] .= "</A>";
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
if (s/^<\@\@refnam>//) {
|
|
||||||
$text[$st_ol[$sc]] .= "$refname";
|
|
||||||
last tagsw;
|
|
||||||
}
|
|
||||||
|
|
||||||
# If nothing else did anything with this line, just print it.
|
|
||||||
$text[$st_ol[$sc]] .= "$_";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print tocfile "</HTML>\n";
|
|
||||||
open(SECOUT, ">$fileroot.html");
|
|
||||||
print SECOUT "$header[0] $text[0] $footer[0]";
|
|
||||||
close(SECOUT);
|
|
||||||
close tocfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
# navbar
|
|
||||||
#
|
|
||||||
# Generate a navigation bar to go on the top and bottom of the page.
|
|
||||||
|
|
||||||
sub navbar {
|
|
||||||
local ($fnum, $fmax, $sc) = @_;
|
|
||||||
local ($i, $itext, $prv, $nxt, $colon);
|
|
||||||
|
|
||||||
$colon = "<b>:</b>";
|
|
||||||
|
|
||||||
# Generate the section hierarchy
|
|
||||||
|
|
||||||
$navbar[$st_ol[$sc]] =
|
|
||||||
"<A HREF=\"${fileroot}.html\"><EM>$st_header[0]</EM></A>\n";
|
|
||||||
$i = $st_parent[$sc];
|
|
||||||
while ($i > 0) {
|
|
||||||
$itext = " $colon <A HREF=\"${fileroot}$st_file[$i].html\"><EM>$st_header[$i]</EM></A>\n$itext";
|
|
||||||
$i = $st_parent[$i];
|
|
||||||
}
|
|
||||||
$navbar[$st_ol[$sc]] .= "$itext $colon <EM>$st_header[$sc]</EM><BR>\n";
|
|
||||||
|
|
||||||
# Generate previous and next pointers
|
|
||||||
|
|
||||||
# Previous pointer must be in a different file AND must be at the
|
|
||||||
# same or higher section level. If the current node is the
|
|
||||||
# beginning of a chapter, then previous will go to the beginning
|
|
||||||
# of the previous chapter, not the end of the previous chapter.
|
|
||||||
|
|
||||||
$prv = $sc;
|
|
||||||
while ($prv >= 0 && $st_file[$prv] >= $st_file[$sc] - 1) {
|
|
||||||
$prv--;
|
|
||||||
}
|
|
||||||
$prv++;
|
|
||||||
$navbar[$st_ol[$sc]] .=
|
|
||||||
"<b>Previous:</b> <A HREF=\"${fileroot}$st_file[$prv].html\"><EM>$st_header[$prv]</EM></A><BR>\n";
|
|
||||||
|
|
||||||
# Then next pointer must be in a higher numbered file OR the home
|
|
||||||
# page of the document.
|
|
||||||
|
|
||||||
$nxt = $sc;
|
|
||||||
if ($st_file[$nxt] == $filecount) {
|
|
||||||
$nxt = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
while ($st_file[$nxt] == $st_file[$sc]) {
|
|
||||||
$nxt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$navbar[$st_ol[$sc]] .=
|
|
||||||
"<b>Next:</b> <A HREF=\"${fileroot}$st_file[$nxt].html\"><EM>$st_header[$nxt]</EM></A>\n";
|
|
||||||
|
|
||||||
$navbar[$st_ol[$sc]] .= "\n";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Generate html output from docbook input
|
|
||||||
#
|
|
||||||
|
|
||||||
sub docbook_html {
|
|
||||||
@cleanfiles = (@cleanfiles, "${fileroot}.html");
|
|
||||||
open (outfile, ">$fileroot.html");
|
|
||||||
&sgmlparse(infile, "html");
|
|
||||||
while (<infile>) {
|
|
||||||
print outfile;
|
|
||||||
}
|
|
||||||
close(infile);
|
|
||||||
close(outfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
# extlink
|
|
||||||
#
|
|
||||||
# Build a shell script to create symbolic links from the name in
|
|
||||||
# a reference to the numbered
|
|
||||||
# html file. Since the file number that any given section has is
|
|
||||||
# subject to change as the document goes through revisions, this allows
|
|
||||||
# for a fixed target that separate documents can hook into.
|
|
||||||
#
|
|
||||||
# Slashes (/) in the reference are converted to percents (%) while
|
|
||||||
# spaces ( ) are converted to underscores (_);
|
|
||||||
|
|
||||||
sub extlink {
|
|
||||||
local ($ref, $fn) = @_;
|
|
||||||
|
|
||||||
$ref =~ s/\//%/g;
|
|
||||||
$ref =~ s/ /_/g;
|
|
||||||
|
|
||||||
$file = "$ref.html";
|
|
||||||
|
|
||||||
if (!fileno(LINKFILE)) {
|
|
||||||
open(LINKFILE, ">${fileroot}.ln");
|
|
||||||
}
|
|
||||||
|
|
||||||
print LINKFILE "ln -fs $fn $file\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Now, read the command line and take appropriate action
|
|
||||||
|
|
||||||
sub main {
|
|
||||||
# Check arguments
|
|
||||||
if (!&NGetOpt('d=s', 'f=s', 'links', 'i:s@', 'hdr=s', 'ftr=s', 'e=s')) {
|
|
||||||
&usage;
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
if (@ARGV == 0) {
|
|
||||||
print "An input file must be specified.\n";
|
|
||||||
&usage;
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
if (&getfile($ARGV[0]) == 0) {
|
|
||||||
print "Cannot locate specified file: $ARGV[0]\n";
|
|
||||||
&usage;
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Figure out which DTD we are using
|
|
||||||
if ($opt_d eq "docbook") {
|
|
||||||
$dtd = "docbook";
|
|
||||||
$decl = "/usr/share/sgml/docbook/docbook.dcl";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$dtd = "linuxdoc";
|
|
||||||
$decl = "/usr/share/sgml/FreeBSD/linuxdoc.dcl";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generate the output
|
|
||||||
if ($opt_f eq 'html') {
|
|
||||||
# Set the character encoding
|
|
||||||
if (! $opt_e) {
|
|
||||||
$opt_e = "iso-8859-1";
|
|
||||||
}
|
|
||||||
$html_encoding = "<META HTTP-EQUIV=\"Content-Type\" " .
|
|
||||||
"CONTENT=\"text/html; charset=" . $opt_e . "\">";
|
|
||||||
|
|
||||||
if ($dtd eq "docbook") {
|
|
||||||
if ($opt_hdr) {$instantopts .= " -D \"inchdr=${opt_hdr}\"";}
|
|
||||||
if ($opt_ftr) {$instantopts .= " -D \"incftr=${opt_ftr}\"";}
|
|
||||||
&docbook_html();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($opt_hdr) {$html_header = &gethf($opt_hdr);}
|
|
||||||
if ($opt_ftr) {$html_footer = &gethf($opt_ftr);}
|
|
||||||
&gen_html();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($opt_f eq 'roff') {
|
|
||||||
&gen_roff();
|
|
||||||
}
|
|
||||||
elsif ($opt_f eq 'ascii') {
|
|
||||||
&do_groff("ascii", "| col");
|
|
||||||
}
|
|
||||||
elsif ($opt_f eq 'latin1') {
|
|
||||||
&do_groff("latin1", "| col");
|
|
||||||
}
|
|
||||||
elsif ($opt_f eq 'koi8-r') {
|
|
||||||
&do_groff("koi8-r", "| col");
|
|
||||||
}
|
|
||||||
elsif ($opt_f eq 'ps') {
|
|
||||||
&do_groff("ps", "");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($opt_f eq "") {
|
|
||||||
print "An output format must be specified with the -f
|
|
||||||
option.\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print "\"$opt_f\" is an unknown output format.\n";
|
|
||||||
}
|
|
||||||
&usage;
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&main;
|
|
||||||
|
|
||||||
exit 0;
|
|
||||||
|
|
||||||
sub getdate {
|
|
||||||
@months = ("January", "February", "March", "April", "May","June",
|
|
||||||
"July", "August", "September", "October", "November", "December");
|
|
||||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
|
||||||
$year += 1900;
|
|
||||||
return "$months[$mon] $mday, $year";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub gethf {
|
|
||||||
local ($file) = @_;
|
|
||||||
|
|
||||||
$date = &getdate;
|
|
||||||
$data = "";
|
|
||||||
|
|
||||||
if (open(IN, $file)) {
|
|
||||||
while (<IN>) {
|
|
||||||
s/\@\@UPDATE\@\@/Updated $date/;
|
|
||||||
$data .= $_;
|
|
||||||
}
|
|
||||||
close(IN);
|
|
||||||
}
|
|
||||||
return $data;
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
LICENSE AND DISCLAIMER OF WARRANTIES
|
|
||||||
|
|
||||||
Standard Generalized Markup Language Users' Group (SGMLUG)
|
|
||||||
SGML Parser Materials
|
|
||||||
|
|
||||||
1. License
|
|
||||||
|
|
||||||
SGMLUG hereby grants to any user: (1) an irrevocable royalty-free,
|
|
||||||
worldwide, non-exclusive license to use, execute, reproduce, display,
|
|
||||||
perform and distribute copies of, and to prepare derivative works
|
|
||||||
based upon these materials; and (2) the right to authorize others to
|
|
||||||
do any of the foregoing.
|
|
||||||
|
|
||||||
2. Disclaimer of Warranties
|
|
||||||
|
|
||||||
(a) The SGML Parser Materials are provided "as is" to any USER. USER
|
|
||||||
assumes responsibility for determining the suitability of the SGML
|
|
||||||
Parser Materials for its use and for results obtained. SGMLUG makes
|
|
||||||
no warranty that any errors have been eliminated from the SGML Parser
|
|
||||||
Materials or that they can be eliminated by USER. SGMLUG shall not
|
|
||||||
provide any support maintenance or other aid to USER or its licensees
|
|
||||||
with respect to SGML Parser Materials. SGMLUG shall not be
|
|
||||||
responsible for losses of any kind resulting from use of the SGML
|
|
||||||
Parser Materials including (without limitation) any liability for
|
|
||||||
business expense, machine downtime, or damages caused to USER or third
|
|
||||||
parties by any deficiency, defect, error, or malfunction.
|
|
||||||
|
|
||||||
(b) SGMLUG DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, ARISING OUT
|
|
||||||
OF OR RELATING TO THE SGML PARSER MATERIALS OR ANY USE THEREOF,
|
|
||||||
INCLUDING (WITHOUT LIMITATION) ANY WARRANTY WHATSOEVER AS TO THE
|
|
||||||
FITNESS FOR A PARTICULAR USE OR THE MERCHANTABILITY OF THE SGML PARSER
|
|
||||||
MATERIALS.
|
|
||||||
|
|
||||||
(c) In no event shall SGMLUG be liable to USER or third parties
|
|
||||||
licensed by USER for any indirect, special, incidental, or
|
|
||||||
consequential damages (including lost profits).
|
|
||||||
(d) SGMLUG has no knowledge of any conditions that would impair its right
|
|
||||||
to license the SGML Parser Materials. Notwithstanding the foregoing,
|
|
||||||
SGMLUG does not make any warranties or representations that the
|
|
||||||
SGML Parser Materials are free of claims by third parties of patent,
|
|
||||||
copyright infringement or the like, nor does SGMLUG assume any
|
|
||||||
liability in respect of any such infringement of rights of third
|
|
||||||
parties due to USER's operation under this license.
|
|
@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Bmake file for sgmls
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
SUBDIR= libsgmls sgmls instant
|
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Bmakefile for rast
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
.if exists(${.CURDIR}/../../Makefile.inc)
|
|
||||||
.include "${.CURDIR}/../../Makefile.inc"
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if exists(${.OBJDIR}/../libsgmls)
|
|
||||||
LIBSGMLS= ${.OBJDIR}/../libsgmls/libsgmls.a
|
|
||||||
.else
|
|
||||||
LIBSGMLS= ${.CURDIR}/../libsgmls/libsgmls.a
|
|
||||||
.endif
|
|
||||||
|
|
@ -1,138 +0,0 @@
|
|||||||
$Id$
|
|
||||||
|
|
||||||
This the sgmls release 1.1 SGML parser written by James Clark
|
|
||||||
jjc@jclark.com, repackaged for FreeBSD. The original source may be
|
|
||||||
obtained from ftp://ftp.jclark.com/.
|
|
||||||
|
|
||||||
Pieces removed include:
|
|
||||||
* Test documents: Compiled on FreeBSD, sgmls passes all tests.
|
|
||||||
* sgml-mode.el: The sole file covered by the GNU GPL. This is not
|
|
||||||
installed anyway and anyone wishing to do serious SGML editing
|
|
||||||
would be best to get the psgml package.
|
|
||||||
* Makefiles and config files for other operating systems (vms, dos,
|
|
||||||
cms).
|
|
||||||
* Formatted versions of the man pages.
|
|
||||||
|
|
||||||
|
|
||||||
20-Apr-1995 John Fieber <jfieber@freebsd.org>
|
|
||||||
|
|
||||||
|
|
||||||
The original README and TODO follow.
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
This is sgmls, an SGML parser derived from the ARCSGML parser
|
|
||||||
materials which were written by Charles F. Goldfarb. (These are
|
|
||||||
available for anonymous ftp from ftp.ifi.uio.no [128.240.88.1] in the
|
|
||||||
directory SIGhyper/SGMLUG/distrib.)
|
|
||||||
|
|
||||||
The version number is given in the file version.c.
|
|
||||||
|
|
||||||
The file INSTALL contains installation instructions.
|
|
||||||
|
|
||||||
The file NEWS describes recent user-visible changes.
|
|
||||||
|
|
||||||
The file sgmls.man contains a Unix manual page; sgmls.txt is the
|
|
||||||
formatted version of this.
|
|
||||||
|
|
||||||
The file sgml-mode.el contains a very simple SGML mode for GNU Emacs.
|
|
||||||
|
|
||||||
The files sgmls.c and sgmls.h contain a small library for parsing the
|
|
||||||
output of sgmls. This is used by sgmlsasp, which translates the
|
|
||||||
output of sgmls using an ASP replacement file, and by rast, which
|
|
||||||
translates the output of sgmls to the format of a RAST result. The
|
|
||||||
files sgmlsasp.man and rast.man contain Unix manual pages for sgmlsasp
|
|
||||||
and rast; sgmlsasp.txt and rast.txt are the formatted versions of
|
|
||||||
these.
|
|
||||||
|
|
||||||
The file LICENSE contains the license which applies to arcsgml and
|
|
||||||
accordingly to those parts of sgmls derived from arcsgml. See also
|
|
||||||
the copyright notice at the beginning of sgmlxtrn.c. The parts that
|
|
||||||
were written by me are in the public domain (any files that were
|
|
||||||
written entirely by me contain a comment to that effect.) The file
|
|
||||||
sgml-mode.el is covered by the GNU GPL.
|
|
||||||
|
|
||||||
Please report any bugs to me. When reporting bugs, please include the
|
|
||||||
version number, details of your machine, OS and compiler, and a
|
|
||||||
complete self-contained file that will allow me to reproduce the bug.
|
|
||||||
|
|
||||||
James Clark
|
|
||||||
jjc@jclark.com
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
Warn about mixed content models where #PCDATA can't occur everywhere.
|
|
||||||
|
|
||||||
Perhaps there should be a configuration option saying what a control
|
|
||||||
character is for the purpose of SHUNCHAR CONTROLS.
|
|
||||||
|
|
||||||
Should the current character that is printed in error messages be
|
|
||||||
taken from be taken from the file entity or the current entity?
|
|
||||||
|
|
||||||
Refine SYS_ action. If we distinguish DELNONCH in lexmark, lexgrp,
|
|
||||||
lexsd, we can have separate action that ignores the following
|
|
||||||
character as well.
|
|
||||||
|
|
||||||
Should RSs in CDATA/SDATA entities be ignored as specified in 322:1-2?
|
|
||||||
Similarily, do the rules on REs in 322:3-11 apply to CDATA/SDATA
|
|
||||||
entities? (I don't think they count as being `in content'.)
|
|
||||||
|
|
||||||
What should the entity manager do when it encounters code 13 in an
|
|
||||||
input file? (Currently it treats it as an RE.)
|
|
||||||
|
|
||||||
Document when invalid exclusions are detected.
|
|
||||||
|
|
||||||
Option not to perform capacity checking.
|
|
||||||
|
|
||||||
Give a warning if the recommendation of 422:1-3 is contravened.
|
|
||||||
|
|
||||||
Should an empty CDATA/RCDATA marked section be allowed in the document
|
|
||||||
type declaration subset?
|
|
||||||
|
|
||||||
Include example of use of SGML_PATH in documentation.
|
|
||||||
|
|
||||||
Try to detect the situation in 310:8-10 (but see 282:1-2).
|
|
||||||
|
|
||||||
Resize hash tables if they become too full.
|
|
||||||
|
|
||||||
Say something in the man page about message catalogues.
|
|
||||||
|
|
||||||
Consider whether support for SHORTREF NONE requires further changes
|
|
||||||
(other than disallowing short reference mapping declaration).
|
|
||||||
|
|
||||||
Fake /dev/fd/N and /dev/stdin for systems that don't provide it.
|
|
||||||
|
|
||||||
Improve the effficiency of the entity manager by not closing and
|
|
||||||
reopening files. If we run out of FILEs choose the stream with the
|
|
||||||
fewest bytes remaining to be read, and read the rest of it into
|
|
||||||
memory. Each entity level will have its own read buffer.
|
|
||||||
|
|
||||||
Support multi-line error messages: automatically indent after
|
|
||||||
newline. (We could output to a temporary file first, then copy to
|
|
||||||
stderr replacing newlines by newline+indent).
|
|
||||||
|
|
||||||
Option that says to output out of context things.
|
|
||||||
|
|
||||||
Divide up formal public identifier errors. Give these errors their
|
|
||||||
own type code.
|
|
||||||
|
|
||||||
Consider whether, when OMITTAG is NO, we need to change interpretation
|
|
||||||
of an empty start-tag (7.4.1.1).
|
|
||||||
|
|
||||||
Possibly turn errors 70 and 136 into warnings.
|
|
||||||
|
|
||||||
Make things work with NORMSEP > 2. Would need to keep track of number
|
|
||||||
of CDATA and SDATA entities in CDATA attributes.
|
|
||||||
|
|
||||||
Handle `SCOPE INSTANCE'.
|
|
||||||
|
|
||||||
In entgen.c, truncate filenames for OSs that don't do this themselves.
|
|
||||||
|
|
||||||
Provide an option that specifies that maximum number of errors; when
|
|
||||||
this limit is exceeded sgmls would exit.
|
|
||||||
|
|
||||||
Document non-portable assumptions in the code.
|
|
||||||
|
|
||||||
Option to write out SGML declaration. In this case make it write out
|
|
||||||
APPINFO parameter.
|
|
||||||
|
|
||||||
Allow there to be catalogs mapping public ids to filenames.
|
|
||||||
Environment variable SGML_CATALOG containing list of filenames of
|
|
||||||
catalogs.
|
|
617
usr.bin/sgmls/configure
vendored
617
usr.bin/sgmls/configure
vendored
@ -1,617 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Generate config.h from unix.cfg.
|
|
||||||
|
|
||||||
trap 'rm -f doit doit.c doit.o doit.log config.out; exit 1' 1 2 3 15
|
|
||||||
|
|
||||||
on=
|
|
||||||
off=
|
|
||||||
CC=${CC-cc}
|
|
||||||
|
|
||||||
# Normally we use VARARGS if __STDC__ is not defined.
|
|
||||||
# Test whether this assumption is wrong.
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#ifdef __STDC__
|
|
||||||
#include <stdarg.h>
|
|
||||||
int foo(char *s,...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, s);
|
|
||||||
va_end(ap);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int foo = 0;
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
|
|
||||||
$CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
if test $? -ne 0
|
|
||||||
then
|
|
||||||
on="$on VARARGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <stddef.h>
|
|
||||||
int foo = 0;
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
off="$off STDDEF_H_MISSING"
|
|
||||||
else
|
|
||||||
on="$on STDDEF_H_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <stdlib.h>
|
|
||||||
int foo = 0;
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
off="$off STDLIB_H_MISSING"
|
|
||||||
else
|
|
||||||
on="$on STDLIB_H_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <limits.h>
|
|
||||||
int foo = 0;
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
off="$off LIMITS_H_MISSING"
|
|
||||||
else
|
|
||||||
on="$on LIMITS_H_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <vfork.h>
|
|
||||||
int foo = 0;
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
on="$on HAVE_VFORK_H"
|
|
||||||
else
|
|
||||||
off="$off HAVE_VFORK_H"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <unistd.h>
|
|
||||||
int foo = 0;
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
on="$on HAVE_UNISTD_H"
|
|
||||||
else
|
|
||||||
off="$off HAVE_UNISTD_H"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
int foo = 0;
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
on="$on HAVE_SYS_STAT_H"
|
|
||||||
else
|
|
||||||
off="$off HAVE_SYS_STAT_H"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
/* Exit normally unless we need to use isascii. */
|
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
static int whoops()
|
|
||||||
{
|
|
||||||
_exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
#ifdef isascii
|
|
||||||
#ifdef SIGSEGV
|
|
||||||
signal(SIGSEGV, whoops);
|
|
||||||
#endif
|
|
||||||
#ifdef SIGBUS
|
|
||||||
signal(SIGBUS, whoops);
|
|
||||||
#endif
|
|
||||||
#ifdef SIGIOT
|
|
||||||
signal(SIGIOT, whoops);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 128; c < 256; c++) {
|
|
||||||
if (c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || c == '5'
|
|
||||||
|| c == '6' || c == '7' || c == '8' || c == '9') {
|
|
||||||
if (!isdigit(c) || isalpha(c) || iscntrl(c) || isspace(c) || ispunct(c))
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
else if (isdigit(c))
|
|
||||||
exit(1);
|
|
||||||
else if (isalpha(c)) {
|
|
||||||
if (iscntrl(c) || isspace(c) || ispunct(c)
|
|
||||||
|| (islower(c) && toupper(c) != c && !isupper(toupper(c)))
|
|
||||||
|| (isupper(c) && tolower(c) != c && !islower(tolower(c))))
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
else if (islower(c) || isupper(c))
|
|
||||||
exit(1);
|
|
||||||
else if (iscntrl(c)) {
|
|
||||||
if (ispunct(c))
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* isascii */
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
# This tries to find the symbol that looks like the array
|
|
||||||
# used by <ctype.h>, and sees if its length appears to be 128
|
|
||||||
# rather than 256.
|
|
||||||
if test 1 = `(nm -n doit 2>/dev/null) | awk '
|
|
||||||
BEGIN {
|
|
||||||
weight["0"] = 0;
|
|
||||||
weight["1"] = 1;
|
|
||||||
weight["2"] = 2;
|
|
||||||
weight["3"] = 3;
|
|
||||||
weight["4"] = 4;
|
|
||||||
weight["5"] = 5;
|
|
||||||
weight["6"] = 6;
|
|
||||||
weight["7"] = 7;
|
|
||||||
weight["8"] = 8;
|
|
||||||
weight["9"] = 9;
|
|
||||||
weight["a"] = weight["A"] = 10;
|
|
||||||
weight["b"] = weight["B"] = 11;
|
|
||||||
weight["c"] = weight["C"] = 12;
|
|
||||||
weight["d"] = weight["D"] = 13;
|
|
||||||
weight["e"] = weight["E"] = 14;
|
|
||||||
weight["f"] = weight["F"] = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
/^[0-9a-zA-Z]* D .*ctype/ && ctype_nr == 0 {
|
|
||||||
ctype_nr = NR;
|
|
||||||
addr = 0;
|
|
||||||
len = length($1);
|
|
||||||
for (i = 1; i <= len; i++)
|
|
||||||
addr = addr*16 + weight[substr($1, i, 1)];
|
|
||||||
}
|
|
||||||
|
|
||||||
/^[0-9a-zA-Z]* D / && NR == ctype_nr + 1 {
|
|
||||||
next_addr = 0;
|
|
||||||
len = length($1);
|
|
||||||
for (i = 1; i <= len; i++)
|
|
||||||
next_addr = next_addr*16 + weight[substr($1, i, 1)];
|
|
||||||
}
|
|
||||||
|
|
||||||
END {
|
|
||||||
size = next_addr - addr;
|
|
||||||
if (size >= 128 && size < 256)
|
|
||||||
print "1";
|
|
||||||
else
|
|
||||||
print "0";
|
|
||||||
}'`
|
|
||||||
then
|
|
||||||
on="$on USE_ISASCII"
|
|
||||||
else
|
|
||||||
if ((yes | man 3 ctype) 2>/dev/null) \
|
|
||||||
| sed -e 's/.//g' -e 's/ *$//' -e '/de-$/N' \
|
|
||||||
-e 's/-\n//g' -e '/defined$/N' -e '/only$/N' \
|
|
||||||
-e '/where$/N' -e '/isascii$/N' -e '/is$/N' \
|
|
||||||
-e 's/\n/ /g' -e 's/ */ /g' \
|
|
||||||
| grep "defined only where isascii is true" >/dev/null
|
|
||||||
then
|
|
||||||
on="$on USE_ISASCII"
|
|
||||||
else
|
|
||||||
off="$off USE_ISASCII"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
on="$on USE_ISASCII"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
remove("foo");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
off="$off REMOVE_MISSING"
|
|
||||||
else
|
|
||||||
on="$on REMOVE_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
getopt(argc, argv, "v");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on HAVE_GETOPT"
|
|
||||||
else
|
|
||||||
off="$off HAVE_GETOPT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
access("foo", 4);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on HAVE_ACCESS"
|
|
||||||
else
|
|
||||||
off="$off HAVE_ACCESS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
vfork();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on HAVE_VFORK"
|
|
||||||
else
|
|
||||||
off="$off HAVE_VFORK"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
|
|
||||||
if (argc == 0) {
|
|
||||||
int status;
|
|
||||||
waitpid(-1, &status, 0);
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on HAVE_WAITPID"
|
|
||||||
else
|
|
||||||
off="$off HAVE_WAITPID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <string.h>
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
strerror(0);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
off="$off STRERROR_MISSING"
|
|
||||||
else
|
|
||||||
on="$on STRERROR_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <strings.h>
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
bcopy((char *)0, (char *)0, 0);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
# Only use BSD_STRINGS if ANSI string functions don't work.
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <string.h>
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
memcpy((char *)0, (char *)0, 0);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
off="$off BSD_STRINGS"
|
|
||||||
else
|
|
||||||
on="$on BSD_STRINGS"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
off="$off BSD_STRINGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <signal.h>
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0)
|
|
||||||
raise(SIGINT);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
off="$off RAISE_MISSING"
|
|
||||||
else
|
|
||||||
on="$on RAISE_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <stdio.h>
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0) {
|
|
||||||
fpos_t pos;
|
|
||||||
fsetpos(stdin, &pos);
|
|
||||||
fgetpos(stdin, &pos);
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
off="$off FPOS_MISSING"
|
|
||||||
else
|
|
||||||
on="$on FPOS_MISSING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0) {
|
|
||||||
pid_t pid;
|
|
||||||
int status;
|
|
||||||
long n = sysconf(_SC_OPEN_MAX);
|
|
||||||
pid = waitpid(-1, &status, 0);
|
|
||||||
WIFSTOPPED(status);
|
|
||||||
WIFSIGNALED(status);
|
|
||||||
WIFEXITED(status);
|
|
||||||
WEXITSTATUS(status);
|
|
||||||
WTERMSIG(status);
|
|
||||||
WSTOPSIG(status);
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on POSIX"
|
|
||||||
else
|
|
||||||
off="$off POSIX"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
static int whoops()
|
|
||||||
{
|
|
||||||
_exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
char buf[30];
|
|
||||||
#ifdef SIGSEGV
|
|
||||||
signal(SIGSEGV, whoops);
|
|
||||||
#endif
|
|
||||||
#ifdef SIGBUS
|
|
||||||
signal(SIGBUS, whoops);
|
|
||||||
#endif
|
|
||||||
#ifdef SIGIOT
|
|
||||||
signal(SIGIOT, whoops);
|
|
||||||
#endif
|
|
||||||
sprintf(buf, "%2$s%2$s%1$s%1$s", "bar", "foo");
|
|
||||||
exit(!!strcmp(buf, "foofoobarbar"));
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on HAVE_EXTENDED_PRINTF"
|
|
||||||
else
|
|
||||||
off="$off HAVE_EXTENDED_PRINTF"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <nl_types.h>
|
|
||||||
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
if (argc == 0) {
|
|
||||||
nl_catd d = catopen("foo", 0);
|
|
||||||
catgets(d, 1, 1, "default");
|
|
||||||
catclose(d);
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
on="$on HAVE_CAT"
|
|
||||||
else
|
|
||||||
off="$off HAVE_CAT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
char c = UCHAR_MAX;
|
|
||||||
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
#if CHAR_MIN < 0
|
|
||||||
exit(!(c < 0));
|
|
||||||
#else
|
|
||||||
exit(!(c > 0));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
char_signed=
|
|
||||||
else
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 512; i++) {
|
|
||||||
char c = (char)i;
|
|
||||||
if (c < 0)
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
|
|
||||||
then
|
|
||||||
char_signed=0
|
|
||||||
else
|
|
||||||
char_signed=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
|
|
||||||
typedef void VOID;
|
|
||||||
|
|
||||||
extern VOID bar();
|
|
||||||
|
|
||||||
VOID foo()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
void_ret=void
|
|
||||||
else
|
|
||||||
void_ret=int
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
cat >doit.c <<\EOF
|
|
||||||
|
|
||||||
void *foo()
|
|
||||||
{
|
|
||||||
static char *buf;
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if $CC $CFLAGS -c doit.c >doit.log 2>&1
|
|
||||||
then
|
|
||||||
if test -s doit.log
|
|
||||||
then
|
|
||||||
void_star="char \*"
|
|
||||||
else
|
|
||||||
void_star="void \*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
void_star="char \*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
edit=
|
|
||||||
|
|
||||||
rm -f doit.c doit doit.log doit.o
|
|
||||||
|
|
||||||
for var in $on
|
|
||||||
do
|
|
||||||
edit="$edit -e 's;^/\\* *\\(#define $var [^/]*\\) *\\*/;\\1;'"
|
|
||||||
done
|
|
||||||
for var in $off
|
|
||||||
do
|
|
||||||
edit="$edit -e 's;^#define $var [^/]*;/* & */;'"
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$char_signed"
|
|
||||||
then
|
|
||||||
edit="$edit -e 's;^/\\* *\\(#define CHAR_SIGNED $char_signed\\) *\\*/;\\1;'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
edit="$edit -e 's/^typedef .*VOID;/typedef $void_ret VOID;/'"
|
|
||||||
edit="$edit -e 's/^typedef .*UNIV;/typedef ${void_star}UNIV;/'"
|
|
||||||
|
|
||||||
if test "X$(PREFIX)" != "X/usr/local"
|
|
||||||
then
|
|
||||||
edit="$edit -e '/DEFAULT_PATH/s;/usr/local;$PREFIX;g'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval sed $edit unix.cfg ">config.out"
|
|
||||||
|
|
||||||
mv config.out config.h
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,15 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
PROG= instant
|
|
||||||
SRCS= browse.c info.c main.c tables.c traninit.c translate.c
|
|
||||||
SRCS+= tranvar.c util.c
|
|
||||||
|
|
||||||
CFLAGS+= -I${.CURDIR}/../libsgmls -I${.CURDIR}/../sgmls
|
|
||||||
|
|
||||||
LDADD= ${LIBSGMLS} -lcompat
|
|
||||||
DPADD= ${LIBSGMLS} ${LIBCOMPAT}
|
|
||||||
|
|
||||||
MAN1= instant.1
|
|
||||||
MAN5= transpec.5
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
|
@ -1,150 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 1994
|
|
||||||
# Open Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
# the software in this file and its documentation for any purpose without
|
|
||||||
# fee, provided that the above copyright notice appears in all copies and
|
|
||||||
# that both the copyright notice and this permission notice appear in
|
|
||||||
# supporting documentation. Further, provided that the name of Open
|
|
||||||
# Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
# publicity pertaining to distribution of the software without prior
|
|
||||||
# written permission from OSF. OSF makes no representations about the
|
|
||||||
# suitability of this software for any purpose. It is provided "as is"
|
|
||||||
# without express or implied warranty.
|
|
||||||
#
|
|
||||||
|
|
||||||
instant - a formatting application for OSF SGML instances
|
|
||||||
____________________________________________________________________________
|
|
||||||
|
|
||||||
Requirements
|
|
||||||
|
|
||||||
ANSI C compiler (gcc is one)
|
|
||||||
|
|
||||||
sgmls 1.1 -- sgml parser from James Clark. Based on Goldfarb's ARC parser.
|
|
||||||
|
|
||||||
Vanilla unix make
|
|
||||||
|
|
||||||
POSIX C libraries
|
|
||||||
|
|
||||||
|
|
||||||
Files for instant program
|
|
||||||
|
|
||||||
Module Function
|
|
||||||
------ --------
|
|
||||||
browse.c interactive browser
|
|
||||||
general.h general definitions
|
|
||||||
info.c print information about the instances
|
|
||||||
main.c main entry, arg parsing, instance reading
|
|
||||||
tables.c table-specific formatting routines (TeX and tbl)
|
|
||||||
traninit.c translator initialization (read spec, etc.)
|
|
||||||
translate.c main translator
|
|
||||||
translate.h structure definitions for translation code
|
|
||||||
tranvar.c routines for handling "special variables"
|
|
||||||
util.c general utilities
|
|
||||||
|
|
||||||
|
|
||||||
Also required
|
|
||||||
|
|
||||||
1. Translation spec (transpec) files. (../transpecs/*.ts)
|
|
||||||
2. SDATA mapping files for mapping sdata entities. (../transpecs/*.sdata)
|
|
||||||
3. Character mapping files for mapping characters. (../transpecs/*.cmap)
|
|
||||||
|
|
||||||
|
|
||||||
Platforms tried on
|
|
||||||
|
|
||||||
OSF1 1.3 (i486)
|
|
||||||
Ultrix 4.2 (mips)
|
|
||||||
HP-UX 9.01 (hp 9000/700)
|
|
||||||
AIX 3.2 (rs6000)
|
|
||||||
SunOS [missing strerror()]
|
|
||||||
|
|
||||||
____________________________________________________________________________
|
|
||||||
|
|
||||||
General outline of program
|
|
||||||
------- ------- -- -------
|
|
||||||
|
|
||||||
To summarize in a sentence, instant reads the output of sgmls, builds a tree
|
|
||||||
of the instnace in memory, then traverses the tree in in-order, processing
|
|
||||||
the nodes according to a translation spec.
|
|
||||||
|
|
||||||
Element tree storage
|
|
||||||
------- ---- -------
|
|
||||||
|
|
||||||
The first thing instant must do is read the ESIS (output of sgmls) from the
|
|
||||||
specified file or stdin, forming a tree in memory. (Nothing makes sense
|
|
||||||
without an instance...) Each element of the instance is a node in the tree,
|
|
||||||
stored as a structure called Element_t. Elements contain content (what
|
|
||||||
else?), which is a mixture of data (#PCDATA, #CDATA, #RCDATA - all the same
|
|
||||||
in the ESIS), child elements, and PIs. Each 'chunk' of content is referred
|
|
||||||
to by a Content_t structure. A Content_t contains an enum that can point to
|
|
||||||
a string (data or PI), another Element_t. For example, if a <p> element
|
|
||||||
contains some characters, an <emphasis> element, some more characters,
|
|
||||||
a <function> element, then some more characters, it has 5 Content_t children
|
|
||||||
as an array.
|
|
||||||
|
|
||||||
Element_t's have pointers to their parents, and a next element in a linked
|
|
||||||
list (they're stored as a linked list, for cases when you'd want to quickly
|
|
||||||
travers all the nodes, in no particular order).
|
|
||||||
For convenience, Element_t's have an array of pointers to it's child
|
|
||||||
Element_t's. These are just pointers to the same thing contained in the
|
|
||||||
Content_t array, without the intervening data or PIs. This makes it easier
|
|
||||||
for the program to traverse the elements of the tree (it does not have to
|
|
||||||
be concerned with skipping data, etc.). There is an analagous array of
|
|
||||||
pointers for the data content, an array of (char *)'s. This makes it easier
|
|
||||||
to consider the immediate character content of an element.
|
|
||||||
|
|
||||||
Attributes are kept as an array of name-value mappings (using the typedef
|
|
||||||
Mapping_t). ID attributes are also stored in a separate list of ID value -
|
|
||||||
element pointer pairs so that it is quick to find an element by ID.
|
|
||||||
|
|
||||||
Other information kept about each element (in the Element_t struct) includes
|
|
||||||
the line number in the EISI where the element occurs, the input filename.
|
|
||||||
(These depend on sgmls being run with the "-l" option.) Also stored is
|
|
||||||
an element's order in its parent's collection of children and an element's
|
|
||||||
depth in the tree.
|
|
||||||
|
|
||||||
Translation specs
|
|
||||||
----------- -----
|
|
||||||
|
|
||||||
A translation spec is read into a linked list in memory. As the instance
|
|
||||||
tree is traversed, the transpecs are searched in order for a match. As a
|
|
||||||
rule, one should position the less specific transpecs later in the file.
|
|
||||||
Also, specs for seldom-used element are best placed later in the file, since
|
|
||||||
it takes cpu cycles to skip over them for each of the more-used elements.
|
|
||||||
|
|
||||||
During translation of a particular element, the list of Content_t structures
|
|
||||||
are processed in order. If a content 'chunk' is data, it is printed to
|
|
||||||
the output stream. If it is an element, the translation routine is called
|
|
||||||
for that elemen, recursively. Hence, in-order traversal.
|
|
||||||
|
|
||||||
Miscellaneous information displays
|
|
||||||
------------- ----------- --------
|
|
||||||
|
|
||||||
There are several informational display options available. They include:
|
|
||||||
- a list of element usage (-u) -- lists each element in the instance,
|
|
||||||
it's attributes, number of children, parent, data content 'nodes'.
|
|
||||||
- statistics about elements (-S) -- lists elements, number of times
|
|
||||||
each is used, percent of elements that this is, total char content
|
|
||||||
in that element, average number of characters in they element.
|
|
||||||
- show context of each element (-x) -- lists each element and its
|
|
||||||
context, looking up the tree (this is the same context that
|
|
||||||
would match the Context field of a transpec).
|
|
||||||
- show the hierarchy of the instance (-h) -- show an ascii 'tree' of
|
|
||||||
the instance, where elements deeper in the tree are indented more.
|
|
||||||
Numbers after the element name in parentheses are the number of
|
|
||||||
element content nodes and the number of data content nodes.
|
|
||||||
|
|
||||||
Interactive browser
|
|
||||||
----------- -------
|
|
||||||
|
|
||||||
Originally, the interactive browser was intended as a debugging aid for
|
|
||||||
the code developer. It was a way to examine a particular node of the
|
|
||||||
instance tree or process a subtree without being distracted by the rest
|
|
||||||
of the instance. Many of the commands test functionality of the query
|
|
||||||
and search code (such as testing whether a certain element has a given
|
|
||||||
relationship to the current position in the tree).
|
|
||||||
|
|
||||||
|
|
||||||
____________________________________________________________________________
|
|
||||||
|
|
@ -1,462 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Module for interactive browsing.
|
|
||||||
*
|
|
||||||
* Entry points for this module:
|
|
||||||
* Browse() interactive browser
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/browse.c,v 1.2 1996/06/02 21:46:10 fld Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
static void PrElemPlusID(Element_t *);
|
|
||||||
static void ls_node(Element_t *, int, char **);
|
|
||||||
static void do_query(Element_t *, char *, char *);
|
|
||||||
static void do_find(Element_t *, char **);
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
||||||
static char *br_help_msg[] = {
|
|
||||||
" ls List info about current element in tree",
|
|
||||||
" (context, children, attributes, etc.)",
|
|
||||||
" cd N ... Change to Nth elememt child, where N is shown by 'ls'.",
|
|
||||||
" N may also be '/' (top) or '..' (up).",
|
|
||||||
" cd id I Change to elememt whose ID is I",
|
|
||||||
" data N Show data of Nth data node",
|
|
||||||
" where Show current position in the tree",
|
|
||||||
" id I Show path to element with id I",
|
|
||||||
" (using '?' for I will lists all IDs and their paths)",
|
|
||||||
" find S Find elements matching spec S. Recognized syntaxes:",
|
|
||||||
" find attr <name> <value>",
|
|
||||||
" find cont <string>",
|
|
||||||
" find parent <gi-name>",
|
|
||||||
" find child <gi-name>",
|
|
||||||
" find gi <gi-name>",
|
|
||||||
" q rel gi Query: report if elem 'gi' has relation to current elem",
|
|
||||||
" ('rel' is one of 'child parent ancestor descendant",
|
|
||||||
" sibling sibling+ sibling+1 sibling- sibling-1 cousin')",
|
|
||||||
"",
|
|
||||||
" tran [outfile]",
|
|
||||||
" Translate into 'outfile' (stdout)",
|
|
||||||
" stat Print statistics (how often elements occur, etc.)",
|
|
||||||
" sum Print elem usage summary (# of children, depth, etc.)",
|
|
||||||
" tree Print document hierarchy as a tree",
|
|
||||||
" cont Print context of each element",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
||||||
void
|
|
||||||
Browse()
|
|
||||||
{
|
|
||||||
char buf[256], *cmd, **av, **sv;
|
|
||||||
char *Prompt;
|
|
||||||
Element_t *ce; /* current element */
|
|
||||||
Element_t *e;
|
|
||||||
int i, n, ac;
|
|
||||||
|
|
||||||
if (slave) Prompt = "=>\n";
|
|
||||||
else Prompt = "=> ";
|
|
||||||
|
|
||||||
ce = DocTree;
|
|
||||||
while (fputs(Prompt, stdout)) {
|
|
||||||
if (!fgets(buf, 256, stdin)) break;
|
|
||||||
stripNL(buf);
|
|
||||||
if (buf[0] == EOS) {
|
|
||||||
fputs(Prompt, stdout);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ac = 20;
|
|
||||||
av = Split(buf, &ac, S_ALVEC);
|
|
||||||
if (ac > 0) cmd = av[0];
|
|
||||||
if (!cmd || !(*cmd)) continue;
|
|
||||||
|
|
||||||
if (!strcmp(cmd, "ls")) ls_node(ce, ac, av);
|
|
||||||
|
|
||||||
else if (!strcmp(cmd, "cd")) {
|
|
||||||
if (av[1]) {
|
|
||||||
if (ac == 3 && !strcmp(av[1], "id")) {
|
|
||||||
if ((e = FindElemByID(av[2]))) ce = e;
|
|
||||||
else printf("Element with ID '%s' not found.\n", av[2]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
for (i=1; i<ac; i++) {
|
|
||||||
if (!strcmp(av[i], "..")) {
|
|
||||||
if (ce->parent) ce = ce->parent;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!strcmp(av[i], "/")) {
|
|
||||||
if (ce->parent) ce = DocTree;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!isdigit(*av[i])) {
|
|
||||||
printf("Expecting digit, '..', or '/', got '%s'.\n",
|
|
||||||
av[i]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
n = atoi(av[i]);
|
|
||||||
if (n < ce->necont) ce = ce->econt[n];
|
|
||||||
else {
|
|
||||||
printf("Must be in range 0 - %d.\n", ce->necont);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (!strcmp(cmd, "data")) {
|
|
||||||
if (av[1] && isdigit(*av[1])) {
|
|
||||||
n = atoi(av[1]);
|
|
||||||
if (n < ce->ndcont) {
|
|
||||||
printf(ce->dcont[n]);
|
|
||||||
fputs("\n", stdout);
|
|
||||||
}
|
|
||||||
else if (ce->ndcont == 0)
|
|
||||||
printf("No data at this node.\n");
|
|
||||||
else printf("Must be in range 0 - %d.\n", ce->ndcont);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* show where we are in the tree */
|
|
||||||
else if (!strcmp(cmd, "where")) PrintLocation(ce, stdout);
|
|
||||||
|
|
||||||
/* show where we are in the tree */
|
|
||||||
else if (!strcmp(cmd, "pwd")) PrElemPlusID(ce);
|
|
||||||
|
|
||||||
/* perform query with yes/no answer */
|
|
||||||
else if (!strcmp(cmd, "q") && av[1] && av[2])
|
|
||||||
do_query(ce, av[1], av[2]);
|
|
||||||
|
|
||||||
/* perform query printing paths to matching elements */
|
|
||||||
else if (!strcmp(cmd, "find") && av[1] && av[2])
|
|
||||||
do_find(ce, av);
|
|
||||||
|
|
||||||
/* list locations where specified ID(s) occur */
|
|
||||||
else if (!strcmp(cmd, "id")) {
|
|
||||||
if (ac <= 1) continue;
|
|
||||||
if (*av[1] == '?') PrintIDList();
|
|
||||||
else {
|
|
||||||
/* short: "id i1 i2 ...", long: "id -l i1 i2 ..." */
|
|
||||||
if (!strcmp(av[1], "-l")) n = 2;
|
|
||||||
else n = 1;
|
|
||||||
for (i=n; i<ac; i++) {
|
|
||||||
if ((e = FindElemByID(av[i]))) {
|
|
||||||
if (n == 2) { /* long (multiline) format */
|
|
||||||
if (n != i) putchar('\n');
|
|
||||||
PrintLocation(e, stdout);
|
|
||||||
}
|
|
||||||
else PrElemPlusID(e);
|
|
||||||
}
|
|
||||||
else printf("Element with ID '%s' not found.\n", av[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* show and set variables */
|
|
||||||
else if (!strcmp(cmd, "show") && av[1]) {
|
|
||||||
printf("%s\n", FindMappingVal(Variables, av[1]));
|
|
||||||
}
|
|
||||||
else if (!strcmp(cmd, "set") && av[1] && av[2]) {
|
|
||||||
SetMappingNV(Variables, av[1], av[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* print summary of tag usage */
|
|
||||||
else if (!strcmp(cmd, "sum")) {
|
|
||||||
if (ac > 1) PrintElemSummary(ce);
|
|
||||||
else PrintElemSummary(DocTree);
|
|
||||||
}
|
|
||||||
/* print element tree */
|
|
||||||
else if (!strcmp(cmd, "tree")) {
|
|
||||||
if (ac > 1) PrintElemTree(ce);
|
|
||||||
else PrintElemTree(DocTree);
|
|
||||||
}
|
|
||||||
/* print statistics */
|
|
||||||
else if (!strcmp(cmd, "stat")) {
|
|
||||||
if (ac > 1) PrintStats(ce);
|
|
||||||
else PrintStats(DocTree);
|
|
||||||
}
|
|
||||||
/* print context of each element of tree */
|
|
||||||
else if (!strcmp(cmd, "cont")) {
|
|
||||||
if (ac > 1) PrintContext(ce);
|
|
||||||
else PrintContext(DocTree);
|
|
||||||
}
|
|
||||||
/* print translation, given transpec */
|
|
||||||
else if (!strcmp(cmd, "tran")) {
|
|
||||||
FILE *fp;
|
|
||||||
if (ac > 1){
|
|
||||||
if (!(fp = fopen(av[1], "w"))) {
|
|
||||||
perror("Can not open output file");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else fp = stdout;
|
|
||||||
DoTranslate(ce, fp);
|
|
||||||
if (ac > 1) fclose(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (!strcmp(cmd, "help") || *cmd == '?') {
|
|
||||||
sv = br_help_msg;
|
|
||||||
while (*sv) puts(*sv++);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* quit (control-D also works) */
|
|
||||||
else if (!strcmp(cmd, "quit")) break;
|
|
||||||
|
|
||||||
else
|
|
||||||
fprintf(stderr, "Unknown command '%s' - ingored.\n", cmd);
|
|
||||||
}
|
|
||||||
putc(NL, stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Do the "ls" command.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* Arg count from command line (this command, not the shell command).
|
|
||||||
* Arg vector.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
ls_node(
|
|
||||||
Element_t *e,
|
|
||||||
int ac,
|
|
||||||
char **av
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
char buf[LINESIZE];
|
|
||||||
|
|
||||||
if (ac > 1 && !strcmp(av[1], "-n")) {
|
|
||||||
for(i=0; i<e->ncont; i++) {
|
|
||||||
if (IsContElem(e,i)) printf("%s\n", ContElem(e,i)->gi);
|
|
||||||
else if (IsContData(e,i)) printf("#data %s\n", ContData(e,i));
|
|
||||||
else if (IsContPI(e,i)) printf("#pi %s\n", ContData(e,i));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Element: %s\tLineNumber: %d\n", e->gi, e->lineno);
|
|
||||||
if (e->parent)
|
|
||||||
printf("Context: %s\n", FindContext(e, 20, buf));
|
|
||||||
|
|
||||||
if (e->natts) {
|
|
||||||
printf("%d attributes:\n", e->natts);
|
|
||||||
for (i=0; i<e->natts; i++)
|
|
||||||
printf("\t%2d: %s = '%s'\n", i, e->atts[i].name, e->atts[i].sval);
|
|
||||||
}
|
|
||||||
if (e->entity) {
|
|
||||||
printf("Entity & notation information:\n");
|
|
||||||
if (e->entity->ename)
|
|
||||||
printf("Entity name: %s\n", e->entity->ename);
|
|
||||||
if (e->entity->nname)
|
|
||||||
printf("Notation name: %s\n", e->entity->nname);
|
|
||||||
if (e->entity->sysid)
|
|
||||||
printf("Sys id: %s\n", e->entity->sysid);
|
|
||||||
if (e->entity->pubid)
|
|
||||||
printf("Pub id: %s\n", e->entity->pubid);
|
|
||||||
if (e->entity->fname)
|
|
||||||
printf("Filename: %s\n", e->entity->fname);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e->my_eorder >= 0)
|
|
||||||
printf("My order among my siblings: %d\n", e->my_eorder);
|
|
||||||
|
|
||||||
if (e->necont) {
|
|
||||||
printf("%d child element nodes:\n", e->necont);
|
|
||||||
for(i=0; i<e->necont; i++) printf("\t%2d: %s\n", i, e->econt[i]->gi);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e->ndcont) {
|
|
||||||
printf("%d child data nodes:\n", e->ndcont);
|
|
||||||
for(i=0; i<e->ndcont; i++) {
|
|
||||||
if (strlen(e->dcont[i]) < 40)
|
|
||||||
printf("\t%2d: %s\n", i, e->dcont[i]);
|
|
||||||
else
|
|
||||||
printf("\t%2d: %-40.40s...\n", i, e->dcont[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Perform query. Syntax: find relationship gi. Tells whether gi has
|
|
||||||
* given relationship to current element. Result (message) sent to stdout.
|
|
||||||
* Args:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* Pointer to name of relationship. (see FindRelByName() for names)
|
|
||||||
* Pointer to GI to look for.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
do_query(
|
|
||||||
Element_t *e,
|
|
||||||
char *rel,
|
|
||||||
char *gi
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *cp;
|
|
||||||
Relation_t r;
|
|
||||||
Element_t *ep;
|
|
||||||
|
|
||||||
for (cp=gi; *cp; cp++) if (islower(*cp)) *cp = toupper(*cp);
|
|
||||||
|
|
||||||
if ((r = FindRelByName(rel)) == REL_Unknown) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ep = QRelation(e, gi, r);
|
|
||||||
printf("%s, '%s' is%s %s of '%s'.\n", (ep ? "Yes" : "No"), gi,
|
|
||||||
(ep ? "" : " not"), rel, e->gi);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print path to the element and its ID (if it has one) on a single line.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
PrElemPlusID(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char buf[LINESIZE];
|
|
||||||
|
|
||||||
if (e->id) printf("%s -- ID=%s\n", FindElementPath(e, buf), e->id);
|
|
||||||
else printf("%s\n", FindElementPath(e, buf));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print path to the element and its ID (if it has one) on a single line.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
match_gi(
|
|
||||||
Element_t *e,
|
|
||||||
char **av
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!strcmp(av[1], e->gi)) PrElemPlusID(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Shorthand for defining simple finctions, which are just interfaces to
|
|
||||||
* calling QRelation(). DescendTree() only passes ptr to element. */
|
|
||||||
#define MATCH(Fun,Rel) \
|
|
||||||
static void Fun(Element_t *e, char **av) \
|
|
||||||
{ if (QRelation(e, av[1], Rel)) PrElemPlusID(e); }
|
|
||||||
|
|
||||||
MATCH(match_parent, REL_Parent)
|
|
||||||
MATCH(match_child, REL_Child)
|
|
||||||
MATCH(match_anc, REL_Ancestor)
|
|
||||||
MATCH(match_desc, REL_Descendant)
|
|
||||||
MATCH(match_sib, REL_Sibling)
|
|
||||||
|
|
||||||
static void
|
|
||||||
match_attr(
|
|
||||||
Element_t *e,
|
|
||||||
char **av
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *atval;
|
|
||||||
|
|
||||||
if ((atval = FindAttValByName(e, av[1])) && !strcmp(av[2], atval))
|
|
||||||
PrElemPlusID(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
match_cont(
|
|
||||||
Element_t *e,
|
|
||||||
char **av
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i=0; i<e->ncont; i++) {
|
|
||||||
if (IsContData(e,i) && strstr(ContData(e,i), av[1])) {
|
|
||||||
PrElemPlusID(e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find an element, given the criteria on its command line.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
do_find(
|
|
||||||
Element_t *e,
|
|
||||||
char **av
|
|
||||||
)
|
|
||||||
{
|
|
||||||
av++;
|
|
||||||
if (!strcmp(av[0], ".")) av++;
|
|
||||||
else e = DocTree;
|
|
||||||
if (!strcmp(av[0], "gi")) DescendTree(e, match_gi, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "attr")) DescendTree(e, match_attr, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "parent")) DescendTree(e, match_parent, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "child")) DescendTree(e, match_child, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "cont")) DescendTree(e, match_cont, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "sib")) DescendTree(e, match_sib, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "desc")) DescendTree(e, match_desc, 0, 0, av);
|
|
||||||
else if (!strcmp(av[0], "anc")) DescendTree(e, match_anc, 0, 0, av);
|
|
||||||
else fprintf(stderr, "Unknown find command: %s.\n", av[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
@ -1,329 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Common definitions for "instant" program.
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef STORAGE
|
|
||||||
#ifndef lint
|
|
||||||
static char *gen_h_RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/general.h,v 1.5 1996/06/11 20:25:03 fld Exp $";
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* string/numeric/character definitions */
|
|
||||||
|
|
||||||
#define EOS '\0'
|
|
||||||
#define NL '\n'
|
|
||||||
#define TAB '\t'
|
|
||||||
#define CR '\r'
|
|
||||||
#define ANCHOR '^'
|
|
||||||
|
|
||||||
/* bigmask/flags for the Split() function */
|
|
||||||
#define S_STRDUP 0x01
|
|
||||||
#define S_ALVEC 0x02
|
|
||||||
|
|
||||||
/* Command codes (1st char of esis lines) from sgmls. See its manpage. */
|
|
||||||
#define CMD_DATA '-'
|
|
||||||
#define CMD_OPEN '('
|
|
||||||
#define CMD_CLOSE ')'
|
|
||||||
#define CMD_ATT 'A'
|
|
||||||
#define CMD_D_ATT 'D'
|
|
||||||
#define CMD_NOTATION 'N'
|
|
||||||
#define CMD_EXT_ENT 'E'
|
|
||||||
#define CMD_INT_ENT 'I'
|
|
||||||
#define CMD_SYSID 's'
|
|
||||||
#define CMD_PUBID 'p'
|
|
||||||
#define CMD_FILENAME 'f'
|
|
||||||
#define CMD_LINE 'L'
|
|
||||||
#define CMD_PI '?'
|
|
||||||
#define CMD_SUBDOC 'S'
|
|
||||||
#define CMD_SUBDOC_S '{'
|
|
||||||
#define CMD_SUBDOC_E '}'
|
|
||||||
#define CMD_EXT_REF '&'
|
|
||||||
#define CMD_APPINFO '#'
|
|
||||||
#define CMD_CONFORM 'C'
|
|
||||||
|
|
||||||
/* Some sizes */
|
|
||||||
#define MAX_DEPTH 40
|
|
||||||
#define LINESIZE 60000
|
|
||||||
|
|
||||||
/* Name of library env variable, and default value. */
|
|
||||||
#ifndef TPT_LIB
|
|
||||||
#define TPT_LIB "TPT_LIB"
|
|
||||||
#endif
|
|
||||||
#ifndef DEF_TPT_LIB
|
|
||||||
#define DEF_TPT_LIB "/usr/share/sgml/transpec"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Relationships - for querying */
|
|
||||||
typedef enum {
|
|
||||||
REL_None, REL_Parent, REL_Child, REL_Ancestor, REL_Descendant,
|
|
||||||
REL_Sibling, REL_Preceding, REL_ImmPreceding, REL_Following,
|
|
||||||
REL_ImmFollowing, REL_Cousin, REL_Unknown
|
|
||||||
} Relation_t;
|
|
||||||
|
|
||||||
/* Initial map sizes (IMS) */
|
|
||||||
#define IMS_relations 3
|
|
||||||
#define IMS_setvar 3
|
|
||||||
#define IMS_incvar 3
|
|
||||||
#define IMS_sdata 50
|
|
||||||
#define IMS_sdatacache 30
|
|
||||||
#define IMS_variables 20
|
|
||||||
#define IMS_attnames 50
|
|
||||||
#define IMS_elemnames 50
|
|
||||||
|
|
||||||
/* ----- typedef and other misc definitions ----- */
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
#define TRUE (1 == 1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FALSE
|
|
||||||
#define FALSE (1 == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef short bool;
|
|
||||||
|
|
||||||
|
|
||||||
/* ----- structure definitions ----- */
|
|
||||||
|
|
||||||
/* We use this for variables, attributes, etc., so the caller only needs an
|
|
||||||
* opaque handle to the thing below, not worrying about array management. */
|
|
||||||
typedef struct {
|
|
||||||
char *name; /* name of the thing */
|
|
||||||
char *sval; /* string value */
|
|
||||||
} Mapping_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int n_alloc; /* number of elements allocated */
|
|
||||||
int n_used; /* number of elements used */
|
|
||||||
int slot_incr; /* increment for allocating slots */
|
|
||||||
int flags; /* info about this set of mappings */
|
|
||||||
Mapping_t *maps; /* array of mappings */
|
|
||||||
} Map_t;
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
||||||
/* Information about an entity reference. Not all fields will be used
|
|
||||||
* at once. */
|
|
||||||
typedef struct _ent {
|
|
||||||
char *type; /* entity type */
|
|
||||||
char *ename; /* entity name */
|
|
||||||
char *nname; /* notation name */
|
|
||||||
char *sysid; /* sys id */
|
|
||||||
char *pubid; /* pub id */
|
|
||||||
char *fname; /* filename */
|
|
||||||
struct _ent *next; /* next in linked list */
|
|
||||||
} Entity_t;
|
|
||||||
|
|
||||||
/* Content (child nodes) of an element (node in the tree) -- both data
|
|
||||||
* and other elements. */
|
|
||||||
typedef struct {
|
|
||||||
char type; /* element, data, or pi? */
|
|
||||||
union {
|
|
||||||
struct _elem *elem; /* direct children of this elem */
|
|
||||||
char *data; /* character data of this elem */
|
|
||||||
} ch;
|
|
||||||
} Content_t;
|
|
||||||
|
|
||||||
/* An element (node in the tree) */
|
|
||||||
typedef struct _elem {
|
|
||||||
char *gi; /* element GI */
|
|
||||||
Content_t *cont; /* content - element & data children */
|
|
||||||
int ncont; /* # of content/children */
|
|
||||||
struct _elem **econt; /* element children */
|
|
||||||
int necont; /* # of element children */
|
|
||||||
char **dcont; /* character data children */
|
|
||||||
int ndcont; /* # of data children */
|
|
||||||
Mapping_t *atts; /* array of attributes */
|
|
||||||
int natts; /* # of attributes */
|
|
||||||
Entity_t *entity; /* ext entity & notation info */
|
|
||||||
char *id; /* for linking */
|
|
||||||
int index; /* an internal bookkeeping mechanism */
|
|
||||||
int depth; /* how deep in tree */
|
|
||||||
int lineno; /* line number */
|
|
||||||
char *infile; /* input filename */
|
|
||||||
int my_eorder; /* order of this elem of its parent */
|
|
||||||
struct _elem *parent; /* this elem's direct parent */
|
|
||||||
struct _elem *next; /* kept in linked list */
|
|
||||||
void *trans; /* pointer to translation spec */
|
|
||||||
/* I'm not crazy about this, but it works */
|
|
||||||
int gen_trans[2]; /* refs to generated trans specs */
|
|
||||||
int processed; /* was this node processed? */
|
|
||||||
} Element_t;
|
|
||||||
|
|
||||||
/* For mapping of element IDs to elements themselves. */
|
|
||||||
typedef struct id_s {
|
|
||||||
char *id; /* ID of the element */
|
|
||||||
Element_t *elem; /* pointer to it */
|
|
||||||
struct id_s *next;
|
|
||||||
} ID_t;
|
|
||||||
|
|
||||||
/* ----- global variable declarations ----- */
|
|
||||||
|
|
||||||
#ifdef STORAGE
|
|
||||||
# define def
|
|
||||||
#else
|
|
||||||
# define def extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
def Element_t *DocTree; /* root of document tree */
|
|
||||||
def char **UsedElem; /* a unique list of used elem names */
|
|
||||||
def int nUsedElem; /* number of used elem names */
|
|
||||||
def char **UsedAtt; /* a unique list of used attrib names */
|
|
||||||
def int nUsedAtt; /* number of used attrib names */
|
|
||||||
def ID_t *IDList; /* list of IDs used in the doc */
|
|
||||||
def Map_t *Variables; /* general, global variables */
|
|
||||||
def Map_t *SDATAmap; /* SDATA mappings */
|
|
||||||
def Map_t *PImap; /* Processing Instruction mappings */
|
|
||||||
def Entity_t *Entities; /* list of entities */
|
|
||||||
|
|
||||||
def FILE *outfp; /* where output is written */
|
|
||||||
def char *tpt_lib; /* TPT library directory */
|
|
||||||
def int verbose; /* flag - verbose output? */
|
|
||||||
def int warnings; /* flag - show warnings? */
|
|
||||||
def int interactive; /* flag - interactive browsing? */
|
|
||||||
def int slave; /* are we slave to another process? */
|
|
||||||
def int fold_case; /* flag - fold case of GIs? */
|
|
||||||
|
|
||||||
/* ----- some macros for convenience and ease of code reading ----- */
|
|
||||||
|
|
||||||
#define stripNL(s) { char *_cp; if ((_cp=strchr(s, NL))) *_cp = EOS; }
|
|
||||||
|
|
||||||
/* Similar to calloc(), malloc(), and realloc(), but check for success.
|
|
||||||
* Args to all:
|
|
||||||
* (1) number of 'elements' to allocate
|
|
||||||
* (2) variable to point at allocated space
|
|
||||||
* (3) type of 'element'
|
|
||||||
* Eg: Calloc(5, e, Element_t) replaces
|
|
||||||
* if (!(e = (Element_t *)calloc(5, sizeof(Element_t))) {
|
|
||||||
* ... handle error ... ;
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
#define Calloc(N,V,T) \
|
|
||||||
{ if (!((V) = (T *)calloc((size_t)N, sizeof(T)))) { \
|
|
||||||
perror("Calloc failed -- out of memory. Bailing out."); exit(1); \
|
|
||||||
}; memset((void *) (V), 0, (size_t) sizeof(T)); }
|
|
||||||
#define Malloc(N,V,T) \
|
|
||||||
{ if (!((V) = (T *)malloc((size_t)N*sizeof(T)))) { \
|
|
||||||
perror("Malloc failed -- out of memory. Bailing out."); exit(1); \
|
|
||||||
}; memset((void *) (V), 0, (size_t) sizeof(T)); }
|
|
||||||
#define Realloc(N,V,T) \
|
|
||||||
{ if (!((V) = (T *)realloc(V,(size_t)N*sizeof(T)))) { \
|
|
||||||
perror("Realloc failed -- out of memory. Bailing out."); exit(1); \
|
|
||||||
} }
|
|
||||||
|
|
||||||
/* similar to strcmp(), but check first chars first, for efficiency */
|
|
||||||
#define StrEq(s1,s2) (s1[0] == s2[0] && !strcmp(s1,s2))
|
|
||||||
|
|
||||||
/* similar to isspace(), but check for blank or tab - without overhead
|
|
||||||
* of procedure call */
|
|
||||||
#define IsWhite(c) (c == ' ' || c == TAB || c == NL)
|
|
||||||
|
|
||||||
#define ContType(e,i) (e->cont[i].type)
|
|
||||||
#define ContData(e,i) (e->cont[i].ch.data)
|
|
||||||
#define ContElem(e,i) (e->cont[i].ch.elem)
|
|
||||||
#define IsContData(e,i) (e->cont[i].type == CMD_DATA)
|
|
||||||
#define IsContElem(e,i) (e->cont[i].type == CMD_OPEN)
|
|
||||||
#define IsContPI(e,i) (e->cont[i].type == CMD_PI)
|
|
||||||
|
|
||||||
/* ----- function prototypes ----- */
|
|
||||||
|
|
||||||
/* things defined in util.c */
|
|
||||||
Element_t *QRelation(Element_t *, char *, Relation_t);
|
|
||||||
Relation_t FindRelByName(char *);
|
|
||||||
char *FindAttValByName(Element_t *, char *);
|
|
||||||
char *FindContext(Element_t *, int, char *);
|
|
||||||
char *AddElemName(char *);
|
|
||||||
char *AddAttName(char *);
|
|
||||||
char *ExpandString(char *);
|
|
||||||
void OutputString(char *, FILE *, int);
|
|
||||||
char *LookupSDATA(char *);
|
|
||||||
FILE *OpenFile(char *);
|
|
||||||
char *FilePath(char *);
|
|
||||||
char *FindElementPath(Element_t *, char *);
|
|
||||||
char *NearestOlderElem(Element_t *, char *);
|
|
||||||
void PrintLocation(Element_t *, FILE *);
|
|
||||||
char **Split(char *, int *, int);
|
|
||||||
void DescendTree(Element_t *, void(*)(), void(*)(), void(*)(), void *);
|
|
||||||
Map_t *NewMap(int);
|
|
||||||
Mapping_t *FindMapping(Map_t *, const char *);
|
|
||||||
char *FindMappingVal(Map_t *, const char *);
|
|
||||||
void SetMapping(Map_t *, const char *);
|
|
||||||
void SetMappingNV(Map_t *, const char *, const char *);
|
|
||||||
void AddID(Element_t *, char *);
|
|
||||||
Element_t *FindElemByID(char *);
|
|
||||||
|
|
||||||
/* things defined in translate.c */
|
|
||||||
void DoTranslate(Element_t*, FILE *);
|
|
||||||
void ExpandVariables(char*, char*, Element_t*);
|
|
||||||
|
|
||||||
/* things defined in traninit.c */
|
|
||||||
void ReadTransSpec(char *);
|
|
||||||
|
|
||||||
/* things defined in tranvar.c */
|
|
||||||
char *Get_A_C_value(const char *);
|
|
||||||
|
|
||||||
/* things defined in info.c */
|
|
||||||
void PrintContext(Element_t *e);
|
|
||||||
void PrintElemSummary(Element_t *);
|
|
||||||
void PrintElemTree(Element_t *);
|
|
||||||
void PrintStats(Element_t *);
|
|
||||||
void PrintIDList();
|
|
||||||
|
|
||||||
/* things defined in table.c */
|
|
||||||
void CALStable(Element_t *, FILE *, char **, int);
|
|
||||||
|
|
||||||
/* ----- other declarations ----- */
|
|
||||||
|
|
||||||
#ifdef ultrix
|
|
||||||
#define strdup(s) strcpy((char *)malloc(strlen(s)+1), s)
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Hypermedia-related facilities.
|
|
||||||
*
|
|
||||||
* Entry points for this module:
|
|
||||||
* AddID(elem, idval) add elem-id pair to list of known ids
|
|
||||||
* FindElemByID(idval) find elem by id
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/hyper.c,v 1.2 1996/06/02 21:46:10 fld Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <memory.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
||||||
void
|
|
||||||
AddID(Element *e, char *idval)
|
|
||||||
{
|
|
||||||
static ID *id_last;
|
|
||||||
if (!IDList) {
|
|
||||||
Calloc(1, id_last, ID);
|
|
||||||
IDList = id_last;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Calloc(1, id_last->next, ID);
|
|
||||||
id_last = id_last->next;
|
|
||||||
}
|
|
||||||
id_last->elem = e;
|
|
||||||
id_last->id = idval;
|
|
||||||
}
|
|
||||||
|
|
||||||
Element *
|
|
||||||
FindElemByID(char *idval)
|
|
||||||
{
|
|
||||||
ID *id;
|
|
||||||
for (id=IDList; id; id=id->next)
|
|
||||||
if (!strcmp(id->id, idval)) return id->elem;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
@ -1,300 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Functions for printing information about an instance in the 'instant'
|
|
||||||
* program. Most of these are fairly short and simple.
|
|
||||||
*
|
|
||||||
* Entry points for this module:
|
|
||||||
* PrintElemSummary(elem) print summary info of each element
|
|
||||||
* PrintContext(elem) print context of each element
|
|
||||||
* PrintElemTree(elem) print tree of document
|
|
||||||
* PrintStats(elem) print statistics about doc tree
|
|
||||||
* PrintIDList(elem) print list of IDs and element context
|
|
||||||
* Most Print*() functions start at subtree pointed to by 'elem'.
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/info.c,v 1.2 1996/06/02 21:46:10 fld Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print a summary of each tag use in the instance. Things like depth in
|
|
||||||
* the tree, number of children, parent, attributes.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Do the actual printing. Print the info about the node. If null,
|
|
||||||
* print a header for the columns.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure of the node to print.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
print_summ(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i, n, dsize;
|
|
||||||
char *hfmt="%-18.18s %4s %5s %4s %4s %s\n";
|
|
||||||
char *fmt ="%-18.18s %4d %5d %4d %4d %s\n";
|
|
||||||
|
|
||||||
if (e == NULL) {
|
|
||||||
fprintf(outfp, hfmt, "Element", "Att", "Data", "Chd", "Dep", "Parent");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (i=0,n=0; i<e->ncont; i++) if (IsContElem(e,i)) n++;
|
|
||||||
for (i=0,dsize=0; i<e->ncont; i++)
|
|
||||||
if (IsContElem(e,i)) dsize += strlen(e->cont[i].ch.data);
|
|
||||||
fprintf(outfp, fmt, e->gi, e->natts, dsize, n, e->depth,
|
|
||||||
e->parent ? e->parent->gi : "-");
|
|
||||||
|
|
||||||
for (i=0; i<e->natts; i++) {
|
|
||||||
fprintf(outfp, "%45d: %s = %s\n", i, e->atts[i].name,
|
|
||||||
e->atts[i].sval ? e->atts[i].sval : "empty");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Descend the tree, calling processing routine.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure at top of tree to traverse.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
PrintElemSummary(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
print_summ(0);
|
|
||||||
DescendTree(e, print_summ, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print the context of each tag in the instance (i.e. the tag with its
|
|
||||||
* ancestors).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Do the actual printing. Print the context of the node.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure of the node to print.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
print_context(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char buf[LINESIZE];
|
|
||||||
|
|
||||||
fprintf(outfp, "%-22s %s\n", e->gi, FindContext(e, 10, buf));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Descend the tree, calling processing routine.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure at top of tree to traverse.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
PrintContext(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fprintf(outfp, "%-22s %s\n", "Element", "Context");
|
|
||||||
fprintf(outfp, "%-22s %s\n", "---------------", "-----------");
|
|
||||||
DescendTree(e, print_context, 0, 0, 0);
|
|
||||||
|
|
||||||
putc(NL, outfp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print tree of the instance. GI's are printed indented by their depth
|
|
||||||
* in the tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Do the actual printing. Print the element name, indented the right amount.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure of the node to print.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
print_indent(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i, ne, nd;
|
|
||||||
for(i=0; i<e->depth; i++) fputs(". ", outfp);
|
|
||||||
for(i=0,ne=0; i<e->ncont; i++) if (IsContElem(e,i)) ne++;
|
|
||||||
for(i=0,nd=0; i<e->ncont; i++) if IsContData(e,i) nd++;
|
|
||||||
fprintf(outfp, "%s (%d,%d)\n", e->gi, ne, nd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Descend the tree, calling processing routine.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure at top of tree to traverse.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
PrintElemTree(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
DescendTree(e, print_indent, 0, 0, 0);
|
|
||||||
putc(NL, outfp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print some statistics about the instance.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Accumulate the totals for the statistics.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure of the node to print.
|
|
||||||
* Pointer to the total number of elements.
|
|
||||||
* Pointer to the total amount of content data.
|
|
||||||
* Pointer to the maximum depth of tree.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
acc_tots(
|
|
||||||
Element_t *e,
|
|
||||||
int *tot_el,
|
|
||||||
int *tot_data,
|
|
||||||
int *max_depth
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for(i=0; i<e->necont; i++)
|
|
||||||
acc_tots(e->econt[i], tot_el, tot_data, max_depth);
|
|
||||||
for (i=0; i<e->necont; i++) (*tot_el)++;
|
|
||||||
for (i=0; i<e->ndcont; i++) (*tot_data) += strlen(e->dcont[i]);
|
|
||||||
if (e->depth > (*max_depth)) *max_depth = e->depth;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Descend the tree (recursively), collecting the statistics.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure of the node to print.
|
|
||||||
* Pointer to the total number of elements.
|
|
||||||
* Pointer to the total amount of content data.
|
|
||||||
* Pointer to the maximum depth of tree.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
elem_usage(
|
|
||||||
Element_t *e,
|
|
||||||
char *name,
|
|
||||||
int *n_used,
|
|
||||||
int *nchars
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
if (!strcmp(name, e->gi)) {
|
|
||||||
(*n_used)++;
|
|
||||||
for (i=0; i<e->ncont; i++)
|
|
||||||
if (IsContData(e,i)) (*nchars) += strlen(ContData(e,i));
|
|
||||||
}
|
|
||||||
for(i=0; i<e->necont; i++)
|
|
||||||
elem_usage(e->econt[i], name, n_used, nchars);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Descend the tree, calling processing routine.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element structure at top of tree to traverse.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
PrintStats(
|
|
||||||
Element_t *top
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i, n;
|
|
||||||
int dif_el=0, tot_el=0, tot_data=0, nchars, max_depth=0;
|
|
||||||
float pct;
|
|
||||||
|
|
||||||
fprintf(outfp, "%-22s %s %s\n", "Element name", "Occurrances", "Character Content");
|
|
||||||
fprintf(outfp, "%-22s %s %s\n", "---------------", "-----------", "-----------------");
|
|
||||||
|
|
||||||
acc_tots(top, &tot_el, &tot_data, &max_depth);
|
|
||||||
|
|
||||||
for (i=0; i<nUsedElem; i++) {
|
|
||||||
n = 0;
|
|
||||||
nchars = 0;
|
|
||||||
elem_usage(top, UsedElem[i], &n, &nchars);
|
|
||||||
if (n > 0) {
|
|
||||||
pct = 100.0 * (float)n / (float)tot_el;
|
|
||||||
fprintf(outfp, "%-22s %4d %4.1f%% %6d %4d\n", UsedElem[i],
|
|
||||||
n, pct, nchars, (nchars/n));
|
|
||||||
dif_el++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(outfp, "\nTotal of %d elements used, %d different ones.\n",
|
|
||||||
tot_el, dif_el);
|
|
||||||
fprintf(outfp, "Total character data: %d.\n", tot_data);
|
|
||||||
fprintf(outfp, "Maximum element depth: %d.\n", max_depth);
|
|
||||||
putc(NL, outfp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print list of: ID, GI, input file, line number, separated by colons.
|
|
||||||
* This is better for other programs to manipulate (like for keeping a
|
|
||||||
* database of IDs in documents) than humans to read.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
PrintIDList()
|
|
||||||
{
|
|
||||||
ID_t *id;
|
|
||||||
Element_t *ep;
|
|
||||||
|
|
||||||
for (id=IDList; id; id=id->next) {
|
|
||||||
ep = id->elem;
|
|
||||||
fprintf(outfp, "%s:%s:%s:%d\n", id->id, ep->gi,
|
|
||||||
ep->infile?ep->infile:"-", ep->lineno);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
@ -1,183 +0,0 @@
|
|||||||
...\"
|
|
||||||
...\" Copyright (c) 1994
|
|
||||||
...\" Open Software Foundation, Inc.
|
|
||||||
...\"
|
|
||||||
...\" Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
...\" the software in this file and its documentation for any purpose without
|
|
||||||
...\" fee, provided that the above copyright notice appears in all copies and
|
|
||||||
...\" that both the copyright notice and this permission notice appear in
|
|
||||||
...\" supporting documentation. Further, provided that the name of Open
|
|
||||||
...\" Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
...\" publicity pertaining to distribution of the software without prior
|
|
||||||
...\" written permission from OSF. OSF makes no representations about the
|
|
||||||
...\" suitability of this software for any purpose. It is provided "as is"
|
|
||||||
...\" without express or implied warranty.
|
|
||||||
...\"
|
|
||||||
...\" Copyright (c) 1996 X Consortium
|
|
||||||
...\" Copyright (c) 1996 Dalrymple Consulting
|
|
||||||
...\"
|
|
||||||
...\" Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
...\" of this software and associated documentation files (the "Software"), to deal
|
|
||||||
...\" in the Software without restriction, including without limitation the rights
|
|
||||||
...\" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
...\" copies of the Software, and to permit persons to whom the Software is
|
|
||||||
...\" furnished to do so, subject to the following conditions:
|
|
||||||
...\"
|
|
||||||
...\" The above copyright notice and this permission notice shall be included in
|
|
||||||
...\" all copies or substantial portions of the Software.
|
|
||||||
...\"
|
|
||||||
...\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
...\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
...\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
...\" X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
...\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
...\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
...\" OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
...\"
|
|
||||||
...\" Except as contained in this notice, the names of the X Consortium and
|
|
||||||
...\" Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
...\" promote the sale, use or other dealings in this Software without prior
|
|
||||||
...\" written authorization.
|
|
||||||
...\"
|
|
||||||
...\" Translated with /usr/local/lib/tpt/ref-man.ts by fld on cord, Wed 07 Feb 1996, 21:59
|
|
||||||
.Dd September 5, 1996
|
|
||||||
.Os FreeBSD 2.2
|
|
||||||
.Dt SGMLFMT 1
|
|
||||||
.Sh "NAME"
|
|
||||||
instant - manipulates ESIS from parsed SGML instance
|
|
||||||
.Sh "Synopsis"
|
|
||||||
.na
|
|
||||||
.Pp
|
|
||||||
\fBinstant\fP [ \fB-bhuvxHISW\fP ] [ \fB-t\fP \fIfile\fP] [ \fB-o\fP \fIfile\fP] [ \fB-D\fP \fIvariable\fP\fB=\fP\fIvalue\fP ...] [ \fB-i\fP \fIid\fP] [ \fB-l\fP \fIdirectory\fP] [\fIfile\fP]
|
|
||||||
.ad
|
|
||||||
.Sh "DESCRIPTION"
|
|
||||||
.Pp
|
|
||||||
The \fBinstant\fP program manipulates an SGML document instance in a variety of ways,
|
|
||||||
including translating into a form suitable for a formatting application and printing information about this instance.
|
|
||||||
Input to \fBinstant\fP is the output of \fBsgmls\fP, whose format is called Element Structure Information Set (ESIS).
|
|
||||||
.Sh "FLAGS"
|
|
||||||
.Pp
|
|
||||||
The following are the possible command line options to \fBinstant\fP. Output is sent to the standard output, except where otherwise noted.
|
|
||||||
.\"'br\" labeled list
|
|
||||||
.Bl -tag -width Ds
|
|
||||||
.It "\fB-t\fP \fIfile\fP"
|
|
||||||
Translate the SGML instance to another form, usually suitable for a formatting application.
|
|
||||||
The \fIfile\fP is called a translation spec, which specifies how the tags are to be translated. See \fBtranspec\fP(4).
|
|
||||||
By convention, names for \fIfile\fP use the suffix \fB.ts\fP, for \fItranslation spec\fP.
|
|
||||||
.It "\fB-d\fP"
|
|
||||||
"Data hack" \(em strip newline at the beginning of data records
|
|
||||||
.It "\fB-f \fIlength\fR"
|
|
||||||
Set the threshold for the length, in characters,
|
|
||||||
of an <Entry>, over which it is called a block of filled text, to \fIlength\fR.
|
|
||||||
.It "\fB-o\fP \fIfile\fP "
|
|
||||||
Write all output (except error and warning messages) to file \fIfile\fP. By default, output goes to stdout.
|
|
||||||
.It "\fB-h\fP"
|
|
||||||
Print a text representation of the hierarchy of the instance elements.
|
|
||||||
The deeper an element is in the tree, the more it is indented. The data content is not printed.
|
|
||||||
.It "\fB-u\fP"
|
|
||||||
Print a summary of the usage of each element in the instance.
|
|
||||||
Information given includes attributes, number of children, and depth in the hierarchy.
|
|
||||||
.It "\fB-S\fP"
|
|
||||||
Print some statistics about element usage in the instance, including how often each element is used
|
|
||||||
and how much PCDATA is contained.
|
|
||||||
.It "\fB-x\fP"
|
|
||||||
Print the context of each element in the instance, from each element to the root of the document tree.
|
|
||||||
.It "\fB-v\fP"
|
|
||||||
Validate the SGML instance based on the set of constraints or descriptions in the transpec file.
|
|
||||||
This flags tells \fBinstant\fP to turn off normal output, leaving only diagnostics.
|
|
||||||
.It "\fB-l\fP \fIdirectory\fP"
|
|
||||||
Try to read the translation specs or other files from in the directory \fIdirectory\fP
|
|
||||||
if not found in the current directory.
|
|
||||||
This is called the library directory.
|
|
||||||
The environment variable \fITPT_LIB\fP may also be used to specify this.
|
|
||||||
.It "\fB-b\fP"
|
|
||||||
Interactive browser mode. The user is prompted for actions,
|
|
||||||
which include moving among and examining the various nodes in the hierarchy of the instance, displaying information about them, etc.
|
|
||||||
.It "\fB-I\fP"
|
|
||||||
List the IDs of all elements in the instance that have an ID. The format is more suitable for other programs than humans.
|
|
||||||
Lines show the ID, element GI, filename, and line, separated by colons.
|
|
||||||
(This depends on the \fB-l\fP option to \fBsgmls\fP which provide filenames and line numbers.)
|
|
||||||
.It "\fB-i\fP \fIid\fP"
|
|
||||||
When translating the instance, begin processing at the element whose ID is \fIid\fP instead of the topmost element.
|
|
||||||
.It "\fB-D\fP \fIvariable\fP\fB=\fP\fIvalue\fP"
|
|
||||||
Define the variable \fIvariable\fP with value \fIvalue\fP.
|
|
||||||
.It "\fB-W\fP"
|
|
||||||
Do not print warning messages.
|
|
||||||
.It "\fB-H\fP"
|
|
||||||
Print a help message briefly describing the options.
|
|
||||||
.It "\fIfile\fP"
|
|
||||||
Read the instance from the file \fIfile\fP.
|
|
||||||
This is expected to be the output of the program \fBsgmls\fP.
|
|
||||||
If not specified, \fBinstant\fP reads the instance from its standard input.
|
|
||||||
.El
|
|
||||||
.\"'br\" labeled list end
|
|
||||||
.Pp
|
|
||||||
In some cases it makes no sense to combine options.
|
|
||||||
This is especially true if one of the options is to perform a translation. No checking is done for this.
|
|
||||||
.Sh "INTERACTIVE BROWSER"
|
|
||||||
.Pp
|
|
||||||
These are the commands to the interactive browser:
|
|
||||||
.Bl -tag -width Ds
|
|
||||||
.\"'br\" labeled list
|
|
||||||
.It "\fBcd\fP \fIargs ...\fP"
|
|
||||||
Change to a different element in the hierarchy.
|
|
||||||
\fBcd\fP \fBid\fP \fIid\fP will change to the element whose ID is \fIid\fP.
|
|
||||||
\fBcd\fP \fIN\fP will change to the \fIN\fPth child element of the current element.
|
|
||||||
Several values of \fIN\fP may be specified, so the program will change to successively descending elements in the hierarchy.
|
|
||||||
The string \fB..\fP may appear for \fIN\fP to move up a level in the hierarchy (like in a unix file system).
|
|
||||||
A \fB/\fP may be specified for \fIN\fP to change to the top of the hierarchy.
|
|
||||||
.It "\fBcont\fP"
|
|
||||||
Print the context of each element.
|
|
||||||
.It "\fBdata\fP \fIN\fP"
|
|
||||||
Show the data content (PCDATA, RCDATA, and DATA) of child node N.
|
|
||||||
.It "\fBfind\fP \fIspec\fP"
|
|
||||||
Find paths to elements matching \fIspec\fP, where \fIspec\fP may be one of:
|
|
||||||
.Bl -tag -width Ds
|
|
||||||
.\".RS +\n(INu
|
|
||||||
.It "\fBparent\fP \fIgi\fP"
|
|
||||||
Find all elements whose parent element is \fIgi\fP.
|
|
||||||
.It "\fBchild\fP \fIgi\fP"
|
|
||||||
Find all elements which have a child element \fIgi\fP.
|
|
||||||
.It "\fBgi\fP \fIgi\fP"
|
|
||||||
Find all elements whose name is \fIgi\fP.
|
|
||||||
.It "\fBattr\fP \fIname\fP \fIvalue\fP"
|
|
||||||
Find all elements that have a attribute \fIname\fP that have a value \fIvalue\fP.
|
|
||||||
.\".RE
|
|
||||||
.El
|
|
||||||
.It "\fBid\fP \fIID\fP"
|
|
||||||
Show location of element whose ID is \fIID\fP.
|
|
||||||
If \fIID\fP is \fB?\fP, it will list all IDs with the paths to them.
|
|
||||||
.It "\fBls\fP"
|
|
||||||
List information about the current element in the hierarchy.
|
|
||||||
This includes element name, line number in instance, context, attributes and their values, child elements, data directly within this element,
|
|
||||||
and the order of the current element among its siblings.
|
|
||||||
.It "\fBq\fP \fIrelation\fP \fIelement\fP"
|
|
||||||
Report whether or not the current element has the relation \fIrelation\fP to the named element \fIelement\fP.
|
|
||||||
Values of \fIrelation\fP are the same as for \fB_followrel\fP in \fBtranspec\fP reference page.
|
|
||||||
.It "\fBstat\fP"
|
|
||||||
Show statistics about the hierarchy.
|
|
||||||
.It "\fBsum\fP"
|
|
||||||
Show a tag usage summary about the hierarchy.
|
|
||||||
.It "\fBtran\fP \fIoutfile\fP"
|
|
||||||
Write translated output to file \fIoutfile\fP.
|
|
||||||
If \fIoutfile\fP is not specified, output is sent to stdout.
|
|
||||||
.It "\fBtree\fP"
|
|
||||||
Print a textual representation of the hierarchy of the instance, where deeper elements are indented more.
|
|
||||||
.It "\fBwhere\fP"
|
|
||||||
Show current position in the hierarchy.
|
|
||||||
.It "<\fBcontrol-D\fP>"
|
|
||||||
Exits the program.
|
|
||||||
.El
|
|
||||||
.Pp
|
|
||||||
The \fBstat\fP, \fBsum\fP, \fBtree\fP, \fBcont\fP commands take an optional first argument (of any value),
|
|
||||||
which means to only consider the entire instance instead of the hierarchy from the current element.
|
|
||||||
.Sh "FILES"
|
|
||||||
.Bl -tag -width Ds
|
|
||||||
.It "\fIfile\fP\fB.ts\fP"
|
|
||||||
Translation specification file.
|
|
||||||
.El
|
|
||||||
.Sh "SEE ALSO"
|
|
||||||
.Pp
|
|
||||||
.Xr transpec 5 ,
|
|
||||||
.Xr sgmls 1 ,
|
|
||||||
Standard Generalized Markup Language (SGML), ISO 8879.
|
|
@ -1,710 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Program to read an SGML document instance, creating any of several things:
|
|
||||||
*
|
|
||||||
* "translated" output for formatting applications (given a trans. spec)
|
|
||||||
* validation report (given a appropriate trans spec)
|
|
||||||
* tree of the document's structure
|
|
||||||
* statistics about the element usage
|
|
||||||
* summary of the elements used
|
|
||||||
* context of each element used
|
|
||||||
* IDs of each element
|
|
||||||
*
|
|
||||||
* A C structure is created for each element, which includes:
|
|
||||||
* name, attributes, parent, children, content
|
|
||||||
* The tree is descended, and the desired actions performed.
|
|
||||||
*
|
|
||||||
* Takes input from James Clark's "sgmls" program (v. 1.1).
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /home/ncvs/src/usr.bin/sgmls/instant/main.c,v 1.1.1.1 1996/09/08 01:55:10 jfieber Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <memory.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
#define STORAGE
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
static int do_context, do_tree, do_summ, do_stats, do_validate, do_idlist;
|
|
||||||
static int do_DATAhack = 0;
|
|
||||||
static char *this_prog;
|
|
||||||
static char *in_file, *out_file;
|
|
||||||
static char *tranfile;
|
|
||||||
static char *start_id;
|
|
||||||
static char *last_file;
|
|
||||||
static int last_lineno;
|
|
||||||
|
|
||||||
extern int BOFTTextThresh;
|
|
||||||
|
|
||||||
/* forward references */
|
|
||||||
static void HandleArgs(int, char *[]);
|
|
||||||
static void Initialize1();
|
|
||||||
static void Initialize2();
|
|
||||||
static void ReadInstance(char *);
|
|
||||||
static void DoHelpMessage();
|
|
||||||
extern void Browse();
|
|
||||||
|
|
||||||
/* external reference to version number */
|
|
||||||
char _HeadVeRsIoN_[] = "1.0 (FreeBSD)";
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Program entry point. Look at args, read instance, dispatch to the
|
|
||||||
* correct routines to do the work, and finish.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
|
||||||
main(
|
|
||||||
int ac,
|
|
||||||
char *av[]
|
|
||||||
)
|
|
||||||
{
|
|
||||||
setlocale(LC_ALL, "");
|
|
||||||
Initialize1(av[0]);
|
|
||||||
HandleArgs(ac, av);
|
|
||||||
Initialize2();
|
|
||||||
|
|
||||||
if (tranfile) ReadTransSpec(tranfile);
|
|
||||||
ReadInstance(in_file);
|
|
||||||
|
|
||||||
if (interactive) {
|
|
||||||
Browse(); /* this will handle interactive commands */
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* Perform tasks based on command line flags... */
|
|
||||||
if (tranfile) {
|
|
||||||
Element_t *e;
|
|
||||||
/* If user wants to start at a particular ID, point to that
|
|
||||||
* element. Else, point to the top of the tree. */
|
|
||||||
if (start_id) {
|
|
||||||
if (!(e=FindElemByID(start_id))) {
|
|
||||||
fprintf(stderr, "Error: Can not find element with ID %s\n",
|
|
||||||
start_id);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else e = DocTree;
|
|
||||||
/* If we're doing validation, make output file pointer null.
|
|
||||||
* This means that we generate no output, except error messages. */
|
|
||||||
if (do_validate) outfp = NULL;
|
|
||||||
if (tranfile)
|
|
||||||
DoTranslate(e, outfp);
|
|
||||||
else
|
|
||||||
fprintf(stderr, "Translation spec file not specified. Skipping translation.\n");
|
|
||||||
}
|
|
||||||
if (do_summ) PrintElemSummary(DocTree);
|
|
||||||
if (do_tree) PrintElemTree(DocTree);
|
|
||||||
if (do_stats) PrintStats(DocTree);
|
|
||||||
if (do_context) PrintContext(DocTree);
|
|
||||||
if (do_idlist) PrintIDList();
|
|
||||||
}
|
|
||||||
if (out_file && outfp) fclose(outfp);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Initialization stuff done before dealing with args.
|
|
||||||
* Arguments:
|
|
||||||
* Name of program (string).
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
Initialize1(
|
|
||||||
char *myname
|
|
||||||
)
|
|
||||||
{
|
|
||||||
time_t tnow;
|
|
||||||
struct tm *nowtm;
|
|
||||||
char *cp, buf[100];
|
|
||||||
extern int gethostname(char *, int); /* not in a system .h file... */
|
|
||||||
|
|
||||||
/* where we try to find data/library files */
|
|
||||||
if (!(tpt_lib=getenv(TPT_LIB))) tpt_lib = DEF_TPT_LIB;
|
|
||||||
|
|
||||||
/* set some global variables */
|
|
||||||
warnings = 1;
|
|
||||||
fold_case = 1;
|
|
||||||
this_prog = myname;
|
|
||||||
|
|
||||||
/* setup global variable mapping */
|
|
||||||
Variables = NewMap(IMS_variables);
|
|
||||||
|
|
||||||
/* set some pre-defined variables */
|
|
||||||
SetMappingNV(Variables, "user", (cp=getenv("USER")) ? cp : "UnknownUser" );
|
|
||||||
time(&tnow);
|
|
||||||
nowtm = localtime(&tnow);
|
|
||||||
strftime(buf, 100, "%a %d %b %Y, %R", nowtm);
|
|
||||||
SetMappingNV(Variables, "date", buf);
|
|
||||||
if (gethostname(buf, 100) < 0) strcpy(buf, "unknown-host");
|
|
||||||
SetMappingNV(Variables, "host", buf);
|
|
||||||
SetMappingNV(Variables, "transpec", tranfile ? tranfile : "??");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialization stuff done after dealing with args. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
Initialize2()
|
|
||||||
{
|
|
||||||
SetMappingNV(Variables, "transpec", tranfile ? tranfile : "??");
|
|
||||||
|
|
||||||
/* If user wants to send output to a file, open the file, and set
|
|
||||||
* the file pointer. Else we send output to standard out. */
|
|
||||||
if (out_file) {
|
|
||||||
if (!(outfp = fopen(out_file, "w"))) {
|
|
||||||
fprintf(stderr, "Could not open output '%s' file for writing.\n%s",
|
|
||||||
out_file, strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else outfp = stdout;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Set a variable. If it is one of the "known" variables, set the
|
|
||||||
* variable in the C code (this program).
|
|
||||||
* Arguments:
|
|
||||||
* Variable name/value string - separated by an '=' (eg, "myname=Sally").
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
CmdLineSetVariable(
|
|
||||||
char *var
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *cp, buf[100], **tok;
|
|
||||||
int n;
|
|
||||||
|
|
||||||
/* Turn '=' into a space, to isolate the name. Then set variable. */
|
|
||||||
strcpy(buf, var);
|
|
||||||
if ((cp=strchr(buf, '='))) {
|
|
||||||
/* we have "var=value" */
|
|
||||||
*cp = ' ';
|
|
||||||
n = 2;
|
|
||||||
tok = Split(buf, &n, 0);
|
|
||||||
/* see if variable name matches one of our internal ones */
|
|
||||||
if (!strcmp(tok[0], "verbose")) verbose = atoi(tok[1]);
|
|
||||||
else if (!strcmp(tok[0], "warnings")) warnings = atoi(tok[1]);
|
|
||||||
else if (!strcmp(tok[0], "foldcase")) fold_case = atoi(tok[1]);
|
|
||||||
else SetMappingNV(Variables, tok[0], tok[1]);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "Expected an '=' in variable assignment: %s. Ignored\n",
|
|
||||||
var);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Bounce through arguments, setting variables and flags.
|
|
||||||
* Arguments:
|
|
||||||
* Argc and Argv, as passed to main().
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
HandleArgs(
|
|
||||||
int ac,
|
|
||||||
char *av[]
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int c, errflag=0;
|
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
|
|
||||||
while ((c=getopt(ac, av, "df:t:v:o:huSxIl:bHVWi:D:Z")) != -1) {
|
|
||||||
switch (c) {
|
|
||||||
case 't': tranfile = optarg; break;
|
|
||||||
case 'v': do_validate = 1; break;
|
|
||||||
case 'h': do_tree = 1; break;
|
|
||||||
case 'u': do_summ = 1; break;
|
|
||||||
case 'S': do_stats = 1; break;
|
|
||||||
case 'x': do_context = 1; break;
|
|
||||||
case 'I': do_idlist = 1; break;
|
|
||||||
case 'l': tpt_lib = optarg; break;
|
|
||||||
case 'i': start_id = optarg; break;
|
|
||||||
case 'o': out_file = optarg; break;
|
|
||||||
case 'd': do_DATAhack = 1; break;
|
|
||||||
case 'f': BOFTTextThresh = atoi(optarg); break;
|
|
||||||
case 'b': interactive = 1; break;
|
|
||||||
case 'W': warnings = 0; break;
|
|
||||||
case 'V': verbose = 1; break;
|
|
||||||
case 'Z': slave = 1; break;
|
|
||||||
case 'H': DoHelpMessage(); exit(0); break;
|
|
||||||
case 'D': CmdLineSetVariable(optarg); break;
|
|
||||||
case '?': errflag = 1; break;
|
|
||||||
}
|
|
||||||
if (errflag) {
|
|
||||||
fprintf(stderr, "Try '%s -H' for help.\n", this_prog);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* input (ESIS) file name */
|
|
||||||
if (optind < ac) in_file = av[optind];
|
|
||||||
|
|
||||||
/* If doing interactive/browsing, we can't take ESIS from stdin. */
|
|
||||||
if (interactive && !in_file) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"You must specify ESIS file on cmd line for browser mode.\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Simply print out a help/usage message.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char *help_msg[] = {
|
|
||||||
"",
|
|
||||||
" -t file Print translated output using translation spec in <file>",
|
|
||||||
" -v Validate using translation spec specified with -t",
|
|
||||||
" -i id Consider only subtree starting at element with ID <id>",
|
|
||||||
" -b Interactive browser",
|
|
||||||
" -S Print statistics (how often elements occur, etc.)",
|
|
||||||
" -u Print element usage summary (# of children, depth, etc.)",
|
|
||||||
" -x Print context of each element",
|
|
||||||
" -h Print document hierarchy as a tree",
|
|
||||||
" -o file Write output to <file>. Default is standard output.",
|
|
||||||
" -l dir Set library directory to <dir>. (or env. variable TPT_LIB)",
|
|
||||||
" -I List all IDs used in the instance",
|
|
||||||
" -W Do not print warning messages",
|
|
||||||
" -H Print this help message",
|
|
||||||
" -Dvar=val Set variable 'var' to value 'val'",
|
|
||||||
" file Take input from named file. If not specified, assume stdin.",
|
|
||||||
" File should be output from the 'sgmls' program (ESIS).",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
DoHelpMessage()
|
|
||||||
{
|
|
||||||
char **s = help_msg;
|
|
||||||
printf("usage: %s [option ...] [file]", this_prog);
|
|
||||||
while (*s) puts(*s++);
|
|
||||||
printf("\nVersion: %s\n", _HeadVeRsIoN_);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Remember an external entity for future reference.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to entity structure to remember.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
AddEntity(
|
|
||||||
Entity_t *ent
|
|
||||||
)
|
|
||||||
{
|
|
||||||
static Entity_t *last_ent;
|
|
||||||
|
|
||||||
if (!Entities) {
|
|
||||||
Malloc(1, Entities, Entity_t);
|
|
||||||
last_ent = Entities;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Malloc(1, last_ent->next, Entity_t);
|
|
||||||
last_ent = last_ent->next;
|
|
||||||
}
|
|
||||||
*last_ent = *ent;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find an entity, given its entity name.
|
|
||||||
* Arguments:
|
|
||||||
* Name of entity to retrieve.
|
|
||||||
*/
|
|
||||||
static Entity_t *
|
|
||||||
FindEntity(
|
|
||||||
char *ename
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Entity_t *n;
|
|
||||||
for (n=Entities; n; n=n->next)
|
|
||||||
if (StrEq(ename, n->ename)) return n;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Accumulate lines up to the open tag. Attributes, line number,
|
|
||||||
* entity info, notation info, etc., all come before the open tag.
|
|
||||||
*/
|
|
||||||
static Element_t *
|
|
||||||
AccumElemInfo(
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char buf[LINESIZE+1];
|
|
||||||
int c;
|
|
||||||
int i, na;
|
|
||||||
char *cp, *atval;
|
|
||||||
Mapping_t a[100];
|
|
||||||
Element_t *e;
|
|
||||||
Entity_t ent, *ent2;
|
|
||||||
char **tok;
|
|
||||||
static int Index=0;
|
|
||||||
static Element_t *last_e;
|
|
||||||
|
|
||||||
|
|
||||||
Calloc(1, e, Element_t);
|
|
||||||
memset(&ent, 0, sizeof ent); /* clean space for entity info */
|
|
||||||
|
|
||||||
/* Also, keep a linked list of elements, so we can easily scan through */
|
|
||||||
if (last_e) last_e->next = e;
|
|
||||||
last_e = e;
|
|
||||||
|
|
||||||
e->index = Index++; /* just a unique number for identification */
|
|
||||||
|
|
||||||
/* in case these are not set for this element in the ESIS */
|
|
||||||
e->lineno = last_lineno;
|
|
||||||
e->infile = last_file;
|
|
||||||
|
|
||||||
na = 0;
|
|
||||||
while (1) {
|
|
||||||
if ((c = getc(fp)) == EOF) break;
|
|
||||||
fgets(buf, LINESIZE, fp);
|
|
||||||
stripNL(buf);
|
|
||||||
switch (c) {
|
|
||||||
case EOF: /* End of input */
|
|
||||||
fprintf(stderr, "Error: Unexpectedly reached end of ESIS.\n");
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_OPEN: /* (gi */
|
|
||||||
e->gi = AddElemName(buf);
|
|
||||||
if (na > 0) {
|
|
||||||
Malloc(na, e->atts, Mapping_t);
|
|
||||||
memcpy(e->atts, a, na*sizeof(Mapping_t));
|
|
||||||
e->natts = na;
|
|
||||||
na = 0;
|
|
||||||
}
|
|
||||||
/* Check if this elem has a notation attr. If yes, and there
|
|
||||||
is no notation specified, recall the previous one. (feature
|
|
||||||
of sgmls - it does not repeat notation stuff if we the same
|
|
||||||
is used twice in a row) */
|
|
||||||
if (((atval=FindAttValByName(e, "NAME")) ||
|
|
||||||
(atval=FindAttValByName(e, "ENTITYREF")) ||
|
|
||||||
(atval=FindAttValByName(e, "EXTERNAL"))) && /* HACK */
|
|
||||||
(ent2=FindEntity(atval))) {
|
|
||||||
e->entity = ent2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return e;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_ATT: /* Aname val */
|
|
||||||
i = 3;
|
|
||||||
tok = Split(buf, &i, 0);
|
|
||||||
if (!strcmp(tok[1], "IMPLIED"))
|
|
||||||
break; /* skip IMPLIED atts. */
|
|
||||||
else if (!strcmp(tok[1], "CDATA"))
|
|
||||||
{
|
|
||||||
/* CDATA attributes must have ESIS escape
|
|
||||||
sequences and SDATA entities expanded. */
|
|
||||||
char *val = ExpandString(tok[2]);
|
|
||||||
a[na].name = AddAttName(tok[0]);
|
|
||||||
a[na].sval = AddAttName(val);
|
|
||||||
free(val);
|
|
||||||
na++;
|
|
||||||
}
|
|
||||||
else if (!strcmp(tok[1], "TOKEN") ||
|
|
||||||
!strcmp(tok[1], "ENTITY") ||!strcmp(tok[1], "NOTATION"))
|
|
||||||
{
|
|
||||||
a[na].name = AddAttName(tok[0]);
|
|
||||||
a[na].sval = AddAttName(tok[2]);
|
|
||||||
na++;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "Error: Bad attr line (%d): A%s %s...\n",
|
|
||||||
e->lineno, tok[0], tok[1]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_LINE: /* Llineno */
|
|
||||||
/* These lines come in 2 forms: "L123" and "L123 file.sgml".
|
|
||||||
* Filename is given only at 1st occurance. Remember it.
|
|
||||||
*/
|
|
||||||
if ((cp = strchr(buf, ' '))) {
|
|
||||||
cp++;
|
|
||||||
last_file = strdup(cp);
|
|
||||||
}
|
|
||||||
last_lineno = e->lineno = atoi(buf);
|
|
||||||
e->infile = last_file;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_DATA: /* -data */
|
|
||||||
fprintf(stderr, "Error: Data in AccumElemInfo, line %d:\n%c%s\n",
|
|
||||||
e->lineno, c,buf);
|
|
||||||
/*return e;*/
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_D_ATT: /* Dename name val */
|
|
||||||
|
|
||||||
case CMD_NOTATION: /* Nnname */
|
|
||||||
case CMD_PI: /* ?pi */
|
|
||||||
/* This should be reworked soon, as it
|
|
||||||
forces all PI's before the first GI
|
|
||||||
to be ignored. -CSS */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_EXT_ENT: /* Eename typ nname */
|
|
||||||
i = 3;
|
|
||||||
tok = Split(buf, &i, 0);
|
|
||||||
ent.ename = strdup(tok[0]);
|
|
||||||
ent.type = strdup(tok[1]);
|
|
||||||
ent.nname = strdup(tok[2]);
|
|
||||||
AddEntity(&ent);
|
|
||||||
break;
|
|
||||||
case CMD_INT_ENT: /* Iename typ text */
|
|
||||||
fprintf(stderr, "Error: Got CMD_INT_ENT in AccumElemInfo: %s\n", buf);
|
|
||||||
break;
|
|
||||||
case CMD_SYSID: /* ssysid */
|
|
||||||
ent.sysid = strdup(buf);
|
|
||||||
break;
|
|
||||||
case CMD_PUBID: /* ppubid */
|
|
||||||
ent.pubid = strdup(buf);
|
|
||||||
break;
|
|
||||||
case CMD_FILENAME: /* ffilename */
|
|
||||||
ent.fname = strdup(buf);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_CLOSE: /* )gi */
|
|
||||||
case CMD_SUBDOC: /* Sename */
|
|
||||||
case CMD_SUBDOC_S: /* {ename */
|
|
||||||
case CMD_SUBDOC_E: /* }ename */
|
|
||||||
case CMD_EXT_REF: /* &name */
|
|
||||||
case CMD_APPINFO: /* #text */
|
|
||||||
case CMD_CONFORM: /* C */
|
|
||||||
default:
|
|
||||||
fprintf(stderr, "Error: Unexpected input in AccumElemInfo, %d:\n%c%s\n",
|
|
||||||
e->lineno, c,buf);
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(stderr, "Error: End of AccumElemInfo - should not be here: %s\n",
|
|
||||||
e->gi);
|
|
||||||
/* return e;*/
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read ESIS lines.
|
|
||||||
* Limitation? Max 5000 children per node. (done for efficiency --
|
|
||||||
* should do some malloc and bookkeeping games later).
|
|
||||||
*/
|
|
||||||
|
|
||||||
static Element_t *
|
|
||||||
ReadESIS(
|
|
||||||
FILE *fp,
|
|
||||||
int depth
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *buf;
|
|
||||||
int i, c, ncont;
|
|
||||||
Element_t *e;
|
|
||||||
Content_t cont[5000];
|
|
||||||
|
|
||||||
Malloc( LINESIZE+1, buf, char );
|
|
||||||
|
|
||||||
/* Read input stream - the output of "sgmls", called "ESIS". */
|
|
||||||
e = AccumElemInfo(fp);
|
|
||||||
e->depth = depth;
|
|
||||||
|
|
||||||
ncont = 0;
|
|
||||||
while (1) {
|
|
||||||
if ((c = getc(fp)) == EOF) break;
|
|
||||||
switch (c) {
|
|
||||||
case EOF: /* End of input */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_DATA: /* -data */
|
|
||||||
fgets(buf, LINESIZE, fp);
|
|
||||||
stripNL(buf);
|
|
||||||
if (do_DATAhack && (buf[0] == '\\') && (buf[1] == 'n')) {
|
|
||||||
if ( ! buf[2] )
|
|
||||||
break;
|
|
||||||
buf[0] = ' ';
|
|
||||||
memcpy(&buf[1], &buf[2], strlen(buf)-1);
|
|
||||||
}
|
|
||||||
cont[ncont].ch.data = ExpandString(buf);
|
|
||||||
cont[ncont].type = CMD_DATA;
|
|
||||||
ncont++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_PI: /* ?pi */
|
|
||||||
fgets(buf, LINESIZE, fp);
|
|
||||||
stripNL(buf);
|
|
||||||
cont[ncont].type = CMD_PI;
|
|
||||||
cont[ncont].ch.data = strdup(buf);
|
|
||||||
ncont++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_CLOSE: /* )gi */
|
|
||||||
fgets(buf, LINESIZE, fp);
|
|
||||||
stripNL(buf);
|
|
||||||
if (ncont) {
|
|
||||||
e->ncont = ncont;
|
|
||||||
Malloc(ncont, e->cont, Content_t);
|
|
||||||
for (i=0; i<ncont; i++) e->cont[i] = cont[i];
|
|
||||||
}
|
|
||||||
free(buf);
|
|
||||||
return e;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_OPEN: /* (gi */
|
|
||||||
/*fprintf(stderr, "+++++ OPEN +++\n");*/
|
|
||||||
/* break;*/
|
|
||||||
|
|
||||||
case CMD_ATT: /* Aname val */
|
|
||||||
case CMD_D_ATT: /* Dename name val */
|
|
||||||
case CMD_NOTATION: /* Nnname */
|
|
||||||
case CMD_EXT_ENT: /* Eename typ nname */
|
|
||||||
case CMD_INT_ENT: /* Iename typ text */
|
|
||||||
case CMD_SYSID: /* ssysid */
|
|
||||||
case CMD_PUBID: /* ppubid */
|
|
||||||
case CMD_FILENAME: /* ffilename */
|
|
||||||
ungetc(c, fp);
|
|
||||||
cont[ncont].ch.elem = ReadESIS(fp, depth+1);
|
|
||||||
cont[ncont].type = CMD_OPEN;
|
|
||||||
cont[ncont].ch.elem->parent = e;
|
|
||||||
ncont++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_LINE: /* Llineno */
|
|
||||||
fgets(buf, LINESIZE, fp);
|
|
||||||
break; /* ignore these here */
|
|
||||||
|
|
||||||
case CMD_SUBDOC: /* Sename */
|
|
||||||
case CMD_SUBDOC_S: /* {ename */
|
|
||||||
case CMD_SUBDOC_E: /* }ename */
|
|
||||||
case CMD_EXT_REF: /* &name */
|
|
||||||
case CMD_APPINFO: /* #text */
|
|
||||||
case CMD_CONFORM: /* C */
|
|
||||||
default:
|
|
||||||
fgets(buf, LINESIZE, fp);
|
|
||||||
fprintf(stderr, "Error: Unexpected input at %d: '%c%s'\n",
|
|
||||||
e->lineno, c, buf);
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(stderr, "Error: End of ReadESIS - should not be here: %s\n", e->gi);
|
|
||||||
free(buf);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Read input stream, creating a tree in memory of the elements and data.
|
|
||||||
* Arguments:
|
|
||||||
* Filename where instance's ESIS is.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
ReadInstance(
|
|
||||||
char *filename
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i, n;
|
|
||||||
FILE *fp;
|
|
||||||
Element_t *e;
|
|
||||||
char *idatt;
|
|
||||||
|
|
||||||
if (filename) { /* if we specified input file. else stdin */
|
|
||||||
if ((fp=fopen(filename, "r")) == NULL) {
|
|
||||||
perror(filename);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else fp = stdin;
|
|
||||||
last_file = filename;
|
|
||||||
DocTree = ReadESIS(fp, 0);
|
|
||||||
if (filename) fclose(fp);
|
|
||||||
|
|
||||||
/* Traverse tree, filling in econt and figuring out which child
|
|
||||||
* (ie. what birth order) each element is. */
|
|
||||||
DocTree->my_eorder = -1;
|
|
||||||
for (e=DocTree; e; e=e->next) {
|
|
||||||
|
|
||||||
/* count element children */
|
|
||||||
for (i=0,n=0; i<e->ncont; i++) if (IsContElem(e,i)) n++;
|
|
||||||
if (n > 0) Calloc(n, e->econt, Element_t *);
|
|
||||||
for (i=0; i<e->ncont; i++)
|
|
||||||
if (IsContElem(e,i)) e->econt[e->necont++] = ContElem(e,i);
|
|
||||||
|
|
||||||
/* count data children */
|
|
||||||
for (i=0,n=0; i<e->ncont; i++) if (IsContData(e,i)) n++;
|
|
||||||
if (n > 0) Calloc(n, e->dcont, char *);
|
|
||||||
for (i=0; i<e->ncont; i++)
|
|
||||||
if (IsContData(e,i)) e->dcont[e->ndcont++] = ContData(e,i);
|
|
||||||
|
|
||||||
/* where in child order order */
|
|
||||||
for (i=0; i<e->necont; i++)
|
|
||||||
e->econt[i]->my_eorder = i;
|
|
||||||
|
|
||||||
/* Does this element have an ID? */
|
|
||||||
for (i=0; i<e->natts; i++) {
|
|
||||||
if ((idatt=FindAttValByName(e, "ID"))) {
|
|
||||||
AddID(e, idatt);
|
|
||||||
/* remember ID value for quick reference */
|
|
||||||
e->id = idatt;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
File diff suppressed because it is too large
Load Diff
@ -1,577 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Program to manipulate SGML instances.
|
|
||||||
*
|
|
||||||
* This module contains the initialization routines for translation module.
|
|
||||||
* They mostly deal with reading data files (translation specs, SDATA
|
|
||||||
* mappings, character mappings).
|
|
||||||
*
|
|
||||||
* Entry points:
|
|
||||||
* ReadTransSpec(transfile) read/store translation spec from file
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /usr/local/home/jfieber/src/cvsroot/nsgmlfmt/traninit.c,v 1.1.1.1 1996/01/16 05:14:10 jfieber Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <memory.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <regexp.h>
|
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
#include "translate.h"
|
|
||||||
|
|
||||||
#include "sgmls.h"
|
|
||||||
#include "config.h"
|
|
||||||
#include "std.h"
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
#define TRUE (1 == 1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
|
|
||||||
/* forward references */
|
|
||||||
void RememberTransSpec(Trans_t *, int);
|
|
||||||
static void do_data(char *gi, struct sgmls_data *v, int n);
|
|
||||||
static void build_ts(char *gi, char* cp);
|
|
||||||
void AddCharMap(const char *from, const char* to);
|
|
||||||
void AddSDATA(const char *from, const char *to);
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Read the translation specs from the input file, storing in memory.
|
|
||||||
* Arguments:
|
|
||||||
* Name of translation spec file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static Trans_t T;
|
|
||||||
|
|
||||||
|
|
||||||
static
|
|
||||||
void input_error(num, str, lineno)
|
|
||||||
int num;
|
|
||||||
char *str;
|
|
||||||
unsigned long lineno;
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Error at input line %lu: %s\n", lineno, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ReadTransSpec(
|
|
||||||
char *transfile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
FILE *fp;
|
|
||||||
struct sgmls *sp;
|
|
||||||
struct sgmls_event e;
|
|
||||||
char gi[LINESIZE];
|
|
||||||
char buf[LINESIZE];
|
|
||||||
char buf2[LINESIZE];
|
|
||||||
char *command;
|
|
||||||
char *sgmls = "sgmls ";
|
|
||||||
char maptype = '\0';
|
|
||||||
|
|
||||||
(void)sgmls_set_errhandler(input_error);
|
|
||||||
transfile = FilePath(transfile);
|
|
||||||
if (!transfile)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Error: Could not locate specified transfile\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX this is a quick, gross hack. Should write a parse() function. */
|
|
||||||
Malloc(strlen(sgmls) + strlen(transfile) + 2, command, char);
|
|
||||||
sprintf(command, "%s %s", sgmls, transfile);
|
|
||||||
fp = popen(command, "r");
|
|
||||||
|
|
||||||
sp = sgmls_create(fp);
|
|
||||||
while (sgmls_next(sp, &e))
|
|
||||||
switch (e.type) {
|
|
||||||
case SGMLS_EVENT_DATA:
|
|
||||||
do_data(gi, e.u.data.v, e.u.data.n);
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_ENTITY:
|
|
||||||
fprintf(stderr, "Hm... got an entity\n");
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_PI:
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_START:
|
|
||||||
if (strncmp("RULE", e.u.start.gi, 4) == 0) {
|
|
||||||
/* A new transpec, so clear the data structure
|
|
||||||
* and look for an ID attribute.
|
|
||||||
*/
|
|
||||||
struct sgmls_attribute *attr = e.u.start.attributes;
|
|
||||||
memset(&T, 0, sizeof T);
|
|
||||||
while (attr) {
|
|
||||||
if (attr->type == SGMLS_ATTR_CDATA
|
|
||||||
&& strncmp("ID", attr->name, 2) == 0) {
|
|
||||||
strncpy(buf, attr->value.data.v->s,
|
|
||||||
MIN(attr->value.data.v->len, LINESIZE));
|
|
||||||
buf[MIN(attr->value.data.v->len, LINESIZE - 1)] = '\0';
|
|
||||||
T.my_id = atoi(buf);
|
|
||||||
}
|
|
||||||
attr = attr->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strncmp("CMAP", e.u.start.gi, 4) == 0)
|
|
||||||
maptype = 'c';
|
|
||||||
else if (strncmp("SMAP", e.u.start.gi, 4) == 0)
|
|
||||||
maptype = 's';
|
|
||||||
else if (strncmp("MAP", e.u.start.gi, 3) == 0) {
|
|
||||||
struct sgmls_attribute *attr = e.u.start.attributes;
|
|
||||||
char *from = 0;
|
|
||||||
char *to = 0;
|
|
||||||
|
|
||||||
while (attr) {
|
|
||||||
if (attr->value.data.v && strncmp("FROM", attr->name, 4) == 0) {
|
|
||||||
strncpy(buf, attr->value.data.v->s,
|
|
||||||
MIN(attr->value.data.v->len, LINESIZE - 1));
|
|
||||||
buf[MIN(attr->value.data.v->len, LINESIZE - 1)] = '\0';
|
|
||||||
}
|
|
||||||
if (attr->value.data.v && strncmp("TO", attr->name, 2) == 0) {
|
|
||||||
strncpy(buf2, attr->value.data.v->s,
|
|
||||||
MIN(attr->value.data.v->len, LINESIZE - 1));
|
|
||||||
buf2[MIN(attr->value.data.v->len, LINESIZE - 1)] = '\0';
|
|
||||||
}
|
|
||||||
attr = attr->next;
|
|
||||||
}
|
|
||||||
if (maptype == 'c')
|
|
||||||
AddCharMap(buf, buf2);
|
|
||||||
else if (maptype == 's')
|
|
||||||
AddSDATA(buf, buf2);
|
|
||||||
else
|
|
||||||
fprintf(stderr, "Unknown map type!\n");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
strncpy(gi, e.u.start.gi, 512);
|
|
||||||
sgmls_free_attributes(e.u.start.attributes);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_END:
|
|
||||||
if (strncmp("RULE", e.u.start.gi, 4) == 0)
|
|
||||||
RememberTransSpec(&T, e.lineno);
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_SUBSTART:
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_SUBEND:
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_APPINFO:
|
|
||||||
break;
|
|
||||||
case SGMLS_EVENT_CONFORMING:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
sgmls_free(sp);
|
|
||||||
pclose(fp);
|
|
||||||
free(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void do_data(char *gi, struct sgmls_data *v, int n)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
char *cp;
|
|
||||||
static char *buf = 0;
|
|
||||||
static int buf_size = 0;
|
|
||||||
int buf_pos = 0;
|
|
||||||
|
|
||||||
|
|
||||||
/* figure out how much space this element will really
|
|
||||||
take, inculding expanded sdata entities. */
|
|
||||||
|
|
||||||
if (!buf)
|
|
||||||
{
|
|
||||||
buf_size = 1024;
|
|
||||||
Malloc(buf_size, buf, char);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
char *s;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
/* Mark the current position. If this is SDATA
|
|
||||||
we will have to return here. */
|
|
||||||
int tmp_buf_pos = buf_pos;
|
|
||||||
|
|
||||||
/* Make sure the buffer is big enough. */
|
|
||||||
if (buf_size - buf_pos <= v[i].len)
|
|
||||||
{
|
|
||||||
buf_size += v[i].len * (n - i);
|
|
||||||
Realloc(buf_size, buf, char);
|
|
||||||
}
|
|
||||||
|
|
||||||
s = v[i].s;
|
|
||||||
len = v[i].len;
|
|
||||||
for (; len > 0; len--, s++)
|
|
||||||
{
|
|
||||||
if (*s != RSCHAR) {
|
|
||||||
if (*s == RECHAR)
|
|
||||||
buf[buf_pos] = '\n';
|
|
||||||
else
|
|
||||||
buf[buf_pos] = *s;
|
|
||||||
buf_pos++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (v[i].is_sdata)
|
|
||||||
{
|
|
||||||
char *p;
|
|
||||||
buf[buf_pos] = '\0';
|
|
||||||
p = LookupSDATA(buf + tmp_buf_pos);
|
|
||||||
if (p)
|
|
||||||
{
|
|
||||||
if (buf_size - tmp_buf_pos <= strlen(p))
|
|
||||||
{
|
|
||||||
buf_size += strlen(p) * (n - i);
|
|
||||||
Realloc(buf_size, buf, char);
|
|
||||||
}
|
|
||||||
strcpy(buf + tmp_buf_pos, p);
|
|
||||||
buf_pos = tmp_buf_pos + strlen(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Clean up the trailing end of the data. */
|
|
||||||
buf[buf_pos] = '\0';
|
|
||||||
buf_pos--;
|
|
||||||
while (buf_pos > 0 && isspace(buf[buf_pos]) && buf[buf_pos] != '\n')
|
|
||||||
buf_pos--;
|
|
||||||
if (buf[buf_pos] == '\n')
|
|
||||||
buf[buf_pos] = '\0';
|
|
||||||
|
|
||||||
/* Skip over whitespace at the beginning of the data. */
|
|
||||||
cp = buf;
|
|
||||||
while (*cp && isspace(*cp))
|
|
||||||
cp++;
|
|
||||||
build_ts(gi, cp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Set a transpec parameter
|
|
||||||
* Arguments:
|
|
||||||
* gi - the parameter to set
|
|
||||||
* cp - the value of the parameter
|
|
||||||
*/
|
|
||||||
static void build_ts(char *gi, char* cp)
|
|
||||||
{
|
|
||||||
if (strcmp("GI", gi) == 0)
|
|
||||||
{
|
|
||||||
char *cp2;
|
|
||||||
/* if we are folding the case of GIs, make all upper (unless
|
|
||||||
it's an internal pseudo-GI name, which starts with '_') */
|
|
||||||
if (fold_case && cp[0] != '_' && cp[0] != '#')
|
|
||||||
{
|
|
||||||
for (cp2=cp; *cp2; cp2++)
|
|
||||||
if (islower(*cp2)) *cp2 = toupper(*cp2);
|
|
||||||
}
|
|
||||||
T.gi = AddElemName(cp);
|
|
||||||
}
|
|
||||||
else if (strcmp("START", gi) == 0)
|
|
||||||
T.starttext = strdup(cp);
|
|
||||||
else if (strcmp("END", gi) == 0)
|
|
||||||
T.endtext = strdup(cp);
|
|
||||||
else if (strcmp("RELATION", gi) == 0)
|
|
||||||
{
|
|
||||||
if (!T.relations)
|
|
||||||
T.relations = NewMap(IMS_relations);
|
|
||||||
SetMapping(T.relations, cp);
|
|
||||||
}
|
|
||||||
else if (strcmp("REPLACE", gi) == 0)
|
|
||||||
T.replace = strdup(cp);
|
|
||||||
else if (strcmp("ATTVAL", gi) == 0)
|
|
||||||
{
|
|
||||||
if (!T.nattpairs)
|
|
||||||
{
|
|
||||||
Malloc(1, T.attpair, AttPair_t);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Realloc((T.nattpairs+1), T.attpair, AttPair_t);
|
|
||||||
/* we'll split name/value pairs later */
|
|
||||||
T.attpair[T.nattpairs].name = strdup(cp);
|
|
||||||
T.nattpairs++;
|
|
||||||
}
|
|
||||||
else if (strcmp("CONTEXT", gi) == 0)
|
|
||||||
T.context = strdup(cp);
|
|
||||||
else if (strcmp("MESSAGE", gi) == 0)
|
|
||||||
T.message = strdup(cp);
|
|
||||||
else if (strcmp("DO", gi) == 0)
|
|
||||||
T.use_id = atoi(cp);
|
|
||||||
else if (strcmp("CONTENT", gi) == 0)
|
|
||||||
T.content = strdup(cp);
|
|
||||||
else if (strcmp("PATTSET", gi) == 0)
|
|
||||||
T.pattrset = strdup(cp);
|
|
||||||
else if (strcmp("VERBATIM", gi) == 0)
|
|
||||||
T.verbatim = TRUE;
|
|
||||||
else if (strcmp("IGNORE", gi) == 0)
|
|
||||||
{
|
|
||||||
if (!strcmp(cp, "all"))
|
|
||||||
T.ignore = IGN_ALL;
|
|
||||||
else if (!strcmp(cp, "data"))
|
|
||||||
T.ignore = IGN_DATA;
|
|
||||||
else if (!strcmp(cp, "children"))
|
|
||||||
T.ignore = IGN_CHILDREN;
|
|
||||||
else
|
|
||||||
fprintf(stderr, "Bad 'Ignore:' arg in transpec %s: %s\n",
|
|
||||||
gi, cp);
|
|
||||||
}
|
|
||||||
else if (strcmp("VARVAL", gi) == 0)
|
|
||||||
{
|
|
||||||
char **tok;
|
|
||||||
int i = 2;
|
|
||||||
tok = Split(cp, &i, S_STRDUP);
|
|
||||||
T.var_name = tok[0];
|
|
||||||
T.var_value = tok[1];
|
|
||||||
}
|
|
||||||
else if (strcmp("VARREVAL", gi) == 0)
|
|
||||||
{
|
|
||||||
char buf[1000];
|
|
||||||
char **tok;
|
|
||||||
int i = 2;
|
|
||||||
tok = Split(cp, &i, S_STRDUP);
|
|
||||||
T.var_RE_name = tok[0];
|
|
||||||
ExpandVariables(tok[1], buf, 0);
|
|
||||||
if (!(T.var_RE_value=regcomp(buf))) {
|
|
||||||
fprintf(stderr, "Regex error in VarREValue Content: %s\n",
|
|
||||||
tok[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strcmp("SET", gi) == 0)
|
|
||||||
{
|
|
||||||
if (!T.set_var)
|
|
||||||
T.set_var = NewMap(IMS_setvar);
|
|
||||||
SetMapping(T.set_var, cp);
|
|
||||||
}
|
|
||||||
else if (strcmp("INCR", gi) == 0)
|
|
||||||
{
|
|
||||||
if (!T.incr_var)
|
|
||||||
T.incr_var = NewMap(IMS_incvar);
|
|
||||||
SetMapping(T.incr_var, cp);
|
|
||||||
}
|
|
||||||
else if (strcmp("NTHCHILD", gi) == 0)
|
|
||||||
T.nth_child = atoi(cp);
|
|
||||||
else if (strcmp("VAR", gi) == 0)
|
|
||||||
SetMapping(Variables, cp);
|
|
||||||
else if (strcmp("QUIT", gi) == 0)
|
|
||||||
T.quit = strdup(cp);
|
|
||||||
else
|
|
||||||
fprintf(stderr, "Unknown translation spec (skipping it): %s\n", gi);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Store translation spec 't' in memory.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to translation spec to remember.
|
|
||||||
* Line number where translation spec ends.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
RememberTransSpec(
|
|
||||||
Trans_t *t,
|
|
||||||
int lineno
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *cp;
|
|
||||||
int i, do_regex;
|
|
||||||
static Trans_t *last_t;
|
|
||||||
char buf[1000];
|
|
||||||
|
|
||||||
/* If context testing, check some details and set things up for later. */
|
|
||||||
if (t->context) {
|
|
||||||
/* See if the context specified is a regular expression.
|
|
||||||
* If so, compile the reg expr. It is assumed to be a regex if
|
|
||||||
* it contains a character other than what's allowed for GIs in the
|
|
||||||
* OSF sgml declaration (alphas, nums, '-', and '.').
|
|
||||||
*/
|
|
||||||
for (do_regex=0,cp=t->context; *cp; cp++) {
|
|
||||||
if (!isalnum(*cp) && *cp != '-' && *cp != '.' && *cp != ' ') {
|
|
||||||
do_regex = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (do_regex) {
|
|
||||||
t->depth = MAX_DEPTH;
|
|
||||||
if (!(t->context_re=regcomp(t->context))) {
|
|
||||||
fprintf(stderr, "Regex error in Context: %s\n", t->context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* If there's only one item in context, it's the parent. Treat
|
|
||||||
* it specially, since it's faster to just check parent gi.
|
|
||||||
*/
|
|
||||||
cp = t->context;
|
|
||||||
if (!strchr(cp, ' ')) {
|
|
||||||
t->parent = t->context;
|
|
||||||
t->context = NULL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* Figure out depth of context string */
|
|
||||||
t->depth = 0;
|
|
||||||
while (*cp) {
|
|
||||||
if (*cp) t->depth++;
|
|
||||||
while (*cp && !IsWhite(*cp)) cp++; /* find end of gi */
|
|
||||||
while (*cp && IsWhite(*cp)) cp++; /* skip space */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compile regular expressions for each attribute */
|
|
||||||
for (i=0; i<t->nattpairs; i++) {
|
|
||||||
/* Initially, name points to "name value". Split them... */
|
|
||||||
cp = t->attpair[i].name;
|
|
||||||
while (*cp && !IsWhite(*cp)) cp++; /* point past end of name */
|
|
||||||
if (*cp) { /* value found */
|
|
||||||
*cp++ = EOS; /* terminate name */
|
|
||||||
while (*cp && IsWhite(*cp)) cp++; /* point to value */
|
|
||||||
ExpandVariables(cp, buf, 0); /* expand any variables */
|
|
||||||
t->attpair[i].val = strdup(buf);
|
|
||||||
}
|
|
||||||
else { /* value not found */
|
|
||||||
t->attpair[i].val = ".";
|
|
||||||
}
|
|
||||||
if (!(t->attpair[i].rex=regcomp(t->attpair[i].val))) {
|
|
||||||
fprintf(stderr, "Regex error in AttValue: %s %s\n",
|
|
||||||
t->attpair[i].name, t->attpair[i].val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compile regular expression for content */
|
|
||||||
t->content_re = 0;
|
|
||||||
if (t->content) {
|
|
||||||
ExpandVariables(t->content, buf, 0);
|
|
||||||
if (!(t->content_re=regcomp(buf)))
|
|
||||||
fprintf(stderr, "Regex error in Content: %s\n",
|
|
||||||
t->content);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If multiple GIs, break up into a vector, then remember it. We either
|
|
||||||
* sture the individual, or the list - not both. */
|
|
||||||
if (t->gi && strchr(t->gi, ' ')) {
|
|
||||||
t->gilist = Split(t->gi, 0, S_ALVEC);
|
|
||||||
t->gi = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now, store structure in linked list. */
|
|
||||||
if (!TrSpecs) {
|
|
||||||
Malloc(1, TrSpecs, Trans_t);
|
|
||||||
last_t = TrSpecs;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Malloc(1, last_t->next, Trans_t);
|
|
||||||
last_t = last_t->next;
|
|
||||||
}
|
|
||||||
*last_t = *t;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Add an entry to the character mapping table, allocating or
|
|
||||||
* expanding the table if necessary.
|
|
||||||
* Arguments:
|
|
||||||
* Character to map
|
|
||||||
* String to map the character to
|
|
||||||
* A 'c' or an 's' for character or sdata map
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
AddCharMap(
|
|
||||||
const char *from,
|
|
||||||
const char* to
|
|
||||||
)
|
|
||||||
{
|
|
||||||
static int n_alloc = 0;
|
|
||||||
|
|
||||||
if (from && to) {
|
|
||||||
if (nCharMap >= n_alloc) {
|
|
||||||
n_alloc += 32;
|
|
||||||
if (!CharMap) {
|
|
||||||
Malloc(n_alloc, CharMap, Mapping_t);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Realloc(n_alloc, CharMap, Mapping_t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CharMap[nCharMap].name = strdup(from);
|
|
||||||
CharMap[nCharMap].sval = strdup(to);
|
|
||||||
nCharMap++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Add an entry to the SDATA mapping table.
|
|
||||||
* Arguments:
|
|
||||||
* String to map
|
|
||||||
* String to map to
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
AddSDATA(
|
|
||||||
const char *from,
|
|
||||||
const char *to
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (from && to) {
|
|
||||||
if (!SDATAmap)
|
|
||||||
SDATAmap = NewMap(IMS_sdata);
|
|
||||||
SetMappingNV(SDATAmap, from, to);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
@ -1,881 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Program to manipulate SGML instances.
|
|
||||||
*
|
|
||||||
* This module is for "translating" an instance to another form, usually
|
|
||||||
* suitable for a formatting application.
|
|
||||||
*
|
|
||||||
* Entry points for this module:
|
|
||||||
* DoTranslate(elem, fp)
|
|
||||||
* ExpandVariables(in, out, e)
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/translate.c,v 1.11 1996/06/15 22:49:00 fld Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <memory.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <regexp.h>
|
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
#define STORAGE
|
|
||||||
#include "translate.h"
|
|
||||||
|
|
||||||
static Trans_t NullTrans; /* an empty one */
|
|
||||||
|
|
||||||
/* forward references */
|
|
||||||
void ProcesOutputSpec(char *, Element_t *, FILE *, int);
|
|
||||||
static void WasProcessed(Element_t *);
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Translate the subtree starting at 'e'. Output goes to 'fp'.
|
|
||||||
* This is the entry point for translating an instance.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
DoTranslate(
|
|
||||||
Element_t *e,
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Trans_t *t, *tn;
|
|
||||||
|
|
||||||
/* Find transpec for each node. */
|
|
||||||
DescendTree(e, PrepTranspecs, 0, 0, 0);
|
|
||||||
|
|
||||||
/* Stuff to do at start of processing */
|
|
||||||
if ((t = FindTransByName("_Start"))) {
|
|
||||||
if (t->starttext) ProcesOutputSpec(t->starttext, 0, fp, 1);
|
|
||||||
if (t->replace) ProcesOutputSpec(t->replace, 0, fp, 1);
|
|
||||||
if (t->message) ProcesOutputSpec(t->message, 0, stderr, 0);
|
|
||||||
if (t->endtext) ProcesOutputSpec(t->endtext, 0, fp, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Translate topmost/first element. This is recursive. */
|
|
||||||
TransElement(e, fp, NULL);
|
|
||||||
|
|
||||||
/* Stuff to do at end of processing */
|
|
||||||
if ((t = FindTransByName("_End"))) {
|
|
||||||
if (t->starttext) ProcesOutputSpec(t->starttext, 0, fp, 1);
|
|
||||||
if (t->replace) ProcesOutputSpec(t->replace, 0, fp, 1);
|
|
||||||
if (t->message) ProcesOutputSpec(t->message, 0, stderr, 0);
|
|
||||||
if (t->endtext) ProcesOutputSpec(t->endtext, 0, fp, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Warn about unprocessed elements in this doc tree, if verbose mode. */
|
|
||||||
if (verbose)
|
|
||||||
DescendTree(e, WasProcessed, 0, 0, 0);
|
|
||||||
|
|
||||||
/* Clean up. This is not yet complete, which is no big deal (since the
|
|
||||||
* program is normally done at this point anyway. */
|
|
||||||
for (t=TrSpecs; t; ) {
|
|
||||||
tn = t->next;
|
|
||||||
/* free the contents of t here ... */
|
|
||||||
(void)free((void* )t);
|
|
||||||
t = tn;
|
|
||||||
}
|
|
||||||
TrSpecs = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Print warning about unprocessed elements in this doc tree (if they
|
|
||||||
* were not explicitely ignored).
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
WasProcessed(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Trans_t *t;
|
|
||||||
t = e->trans;
|
|
||||||
if (!e->processed && (t && !t->ignore)) {
|
|
||||||
fprintf(stderr, "Warning: element '%s' was not processed:\n", e->gi);
|
|
||||||
PrintLocation(e, stderr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* For each element find transpec.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
PrepTranspecs(
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Trans_t *t;
|
|
||||||
t = FindTrans(e, 0);
|
|
||||||
e->trans = t;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Copy a buffer/string into another, expanding regular variables and immediate
|
|
||||||
* variables. (Special variables are done later.)
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to string to expand.
|
|
||||||
* Pointer to expanded string. (return)
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
ExpandVariables(
|
|
||||||
char *in,
|
|
||||||
char *out,
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
register int i, j;
|
|
||||||
char *ip, *vp, *op;
|
|
||||||
char *def_val, *s, *atval, *modifier;
|
|
||||||
char vbuf[500];
|
|
||||||
int lev;
|
|
||||||
|
|
||||||
ip = in;
|
|
||||||
op = out;
|
|
||||||
while (*ip) {
|
|
||||||
/* start of regular variable? */
|
|
||||||
if (*ip == '$' && *(ip+1) == L_CURLY && *(ip+2) != '_') {
|
|
||||||
ip++;
|
|
||||||
ip++; /* point at variable name */
|
|
||||||
vp = vbuf;
|
|
||||||
/* Look for matching (closing) curly. (watch for nesting)
|
|
||||||
* We store the variable content in a tmp buffer, so we don't
|
|
||||||
* clobber the input buffer.
|
|
||||||
*/
|
|
||||||
lev = 0;
|
|
||||||
while (*ip) {
|
|
||||||
if (*ip == L_CURLY) lev++;
|
|
||||||
if (*ip == R_CURLY) {
|
|
||||||
if (lev == 0) {
|
|
||||||
ip++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else lev--;
|
|
||||||
}
|
|
||||||
*vp++ = *ip++; /* copy to variable buffer */
|
|
||||||
}
|
|
||||||
*vp = EOS;
|
|
||||||
/* vbuf now contains the variable name (stuff between curlys). */
|
|
||||||
if (lev != 0) {
|
|
||||||
fprintf(stderr, "Botched variable use: %s\n", in);
|
|
||||||
/* copy rest of string if we can't recover ?? */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* Now, expand variable. */
|
|
||||||
vp = vbuf;
|
|
||||||
|
|
||||||
/* Check for immediate variables -- like _special variables but
|
|
||||||
* interpreted right now. These start with a "+" */
|
|
||||||
|
|
||||||
if ( *vp == '+' ) {
|
|
||||||
|
|
||||||
if ( ! strcmp(vp, "+content") ) {
|
|
||||||
for ( i=0; i<e->ncont; i++ ) {
|
|
||||||
if ( IsContData(e, i) ) {
|
|
||||||
j = strlen(ContData(e,i));
|
|
||||||
memcpy(op, ContData(e,i), j);
|
|
||||||
op += j;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "warning: ${+current} skipped element content\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "unknown immediate variable: %s\n", vp);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
/* See if this variable has a default [ format: ${varname def} ] */
|
|
||||||
|
|
||||||
def_val = vp;
|
|
||||||
while (*def_val && *def_val != ' ') def_val++;
|
|
||||||
if (*def_val) *def_val++ = EOS;
|
|
||||||
else def_val = 0;
|
|
||||||
/* def_val now points to default, if it exists, null if not. */
|
|
||||||
|
|
||||||
modifier = vp;
|
|
||||||
while (*modifier && *modifier != ':') modifier++;
|
|
||||||
if (*modifier) *modifier++ = EOS;
|
|
||||||
else modifier = 0;
|
|
||||||
/* modifier now points to modifier if it exists, null if not. */
|
|
||||||
|
|
||||||
s = 0;
|
|
||||||
/* if attribute of current elem with this name found, use value */
|
|
||||||
if (e && (atval = FindAttValByName(e, vp)))
|
|
||||||
s = atval;
|
|
||||||
else /* else try for (global) variable with this name */
|
|
||||||
s = FindMappingVal(Variables, vp);
|
|
||||||
|
|
||||||
/* If we found a value, copy it to the output buffer. */
|
|
||||||
|
|
||||||
if (s) {
|
|
||||||
if ( modifier && *modifier == 'l' ) {
|
|
||||||
while (*s) {
|
|
||||||
*op = tolower(*s);
|
|
||||||
op++, *s++;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
while (*s) *op++ = *s++;
|
|
||||||
} else
|
|
||||||
if (def_val) {
|
|
||||||
while (*def_val) *op++ = *def_val++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*op++ = *ip++;
|
|
||||||
}
|
|
||||||
*op = EOS; /* terminate string */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Process an "output" translation spec - one of StartText, EndText,
|
|
||||||
* Replace, Message. (These are the ones that produce output.)
|
|
||||||
* Steps done:
|
|
||||||
* Expand attributes and regular varaibles in input string.
|
|
||||||
* Pass thru string, accumulating chars to be sent to output stream.
|
|
||||||
* If we find the start of a special variable, output what we've
|
|
||||||
* accumulated, then find the special variable's "bounds" (ie, the
|
|
||||||
* stuff between the curly brackets), and expand that by passing to
|
|
||||||
* ExpandSpecialVar(). Continue until done the input string.
|
|
||||||
* Arguments:
|
|
||||||
* Input buffer (string) to be expanded and output.
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
* Flag saying whether to track the character position we're on
|
|
||||||
* (passed to OutputString).
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
ProcesOutputSpec(
|
|
||||||
char *ib,
|
|
||||||
Element_t *e,
|
|
||||||
FILE *fp,
|
|
||||||
int track_pos
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char obuf[LINESIZE];
|
|
||||||
char vbuf[LINESIZE];
|
|
||||||
char *dest, vname[LINESIZE], *cp;
|
|
||||||
int esc;
|
|
||||||
|
|
||||||
obuf[0] = EOS; /* start with empty output buffer */
|
|
||||||
|
|
||||||
ExpandVariables(ib, vbuf, e); /* expand regular variables */
|
|
||||||
ib = vbuf;
|
|
||||||
dest = obuf;
|
|
||||||
|
|
||||||
esc = 0;
|
|
||||||
while (*ib) {
|
|
||||||
/* If not a $, it's a regular char. Just copy it and go to next. */
|
|
||||||
if (*ib != '$') { /* look for att/variable marker */
|
|
||||||
*dest++ = *ib++; /* it's not. just copy character */
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We have a $. What we have must be a "special variable" since
|
|
||||||
* regular variables have already been expanded, or just a lone $. */
|
|
||||||
|
|
||||||
if (ib[1] != L_CURLY) { /* just a stray dollar sign (no variable) */
|
|
||||||
*dest++ = *ib++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ib++; /* point past $ */
|
|
||||||
|
|
||||||
/* Output what we have in buffer so far. */
|
|
||||||
*dest = EOS; /* terminate string */
|
|
||||||
if (obuf[0]) OutputString(obuf, fp, track_pos);
|
|
||||||
dest = obuf; /* ready for new stuff in buffer */
|
|
||||||
|
|
||||||
if (!strchr(ib, R_CURLY)) {
|
|
||||||
fprintf(stderr, "Mismatched braces in TranSpec: %s\n", ib);
|
|
||||||
/* how do we recover from this? */
|
|
||||||
}
|
|
||||||
ib++;
|
|
||||||
cp = vname;
|
|
||||||
while (*ib && *ib != R_CURLY) *cp++ = *ib++;
|
|
||||||
*cp = EOS; /* terminate att/var name */
|
|
||||||
ib++; /* point past closing curly */
|
|
||||||
/* we now have special variable name (stuff in curly {}'s) in vname */
|
|
||||||
ExpandSpecialVar(&vname[1], e, fp, track_pos);
|
|
||||||
}
|
|
||||||
*dest = EOS; /* terminate string in output buffer */
|
|
||||||
|
|
||||||
if (obuf[0]) OutputString(obuf, fp, track_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Find the translation spec for the given tag.
|
|
||||||
* Returns pointer to first spec that matches (name, depth, etc., of tag).
|
|
||||||
* Arguments:
|
|
||||||
* e -- Pointer to element under consideration.
|
|
||||||
* specID -- name of specid that we're looking for
|
|
||||||
* Return:
|
|
||||||
* Pointer to translation spec that matches given element's context.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Trans_t *
|
|
||||||
FindTrans(
|
|
||||||
Element_t *e,
|
|
||||||
int specID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char context[LINESIZE], buf[LINESIZE], *cp, **vec, *atval;
|
|
||||||
int i, a, match;
|
|
||||||
Trans_t *t, *tt;
|
|
||||||
|
|
||||||
/* loop through all transpecs */
|
|
||||||
for (t=TrSpecs; t; t=t->next)
|
|
||||||
{
|
|
||||||
/* Only one of gi or gilist will be set. */
|
|
||||||
/* Check if elem name matches */
|
|
||||||
if (t->gi && !StrEq(t->gi, e->gi) && !specID) continue;
|
|
||||||
|
|
||||||
/* test if we're looking for a specific specID and then if
|
|
||||||
* this is it.. */
|
|
||||||
if (specID)
|
|
||||||
if (!t->my_id || (specID != t->my_id))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Match one in the list of GIs? */
|
|
||||||
if (t->gilist) {
|
|
||||||
for (match=0,vec=t->gilist; *vec; vec++) {
|
|
||||||
if (StrEq(*vec, e->gi)) {
|
|
||||||
match = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!match) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check context */
|
|
||||||
|
|
||||||
/* Special case of context */
|
|
||||||
if (t->parent)
|
|
||||||
if (!QRelation(e, t->parent, REL_Parent)) continue;
|
|
||||||
|
|
||||||
if (t->context) { /* no context specified -> a match */
|
|
||||||
FindContext(e, t->depth, context);
|
|
||||||
|
|
||||||
/* If reg expr set, do regex compare; else just string compare. */
|
|
||||||
if (t->context_re) {
|
|
||||||
if (! regexec(t->context_re, context)) continue;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* Is depth of spec deeper than element's depth? */
|
|
||||||
if (t->depth > e->depth) continue;
|
|
||||||
|
|
||||||
/* See if context of element matches "context" of transpec */
|
|
||||||
match = ( (t->context[0] == context[0]) &&
|
|
||||||
!strcmp(t->context, context) );
|
|
||||||
if (!match) continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check attributes. Loop through list, comparing each. */
|
|
||||||
if (t->nattpairs) { /* no att specified -> a match */
|
|
||||||
for (match=1,a=0; a<t->nattpairs; a++) {
|
|
||||||
if (!(atval = FindAttValByName(e, t->attpair[a].name))) {
|
|
||||||
match = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!regexec(t->attpair[a].rex, atval)) match = 0;
|
|
||||||
}
|
|
||||||
if (!match) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check relationships: child, parent, ancestor, sib, ... */
|
|
||||||
if (t->relations) {
|
|
||||||
Mapping_t *r;
|
|
||||||
match = 1;
|
|
||||||
for (r=t->relations->maps,i=0; i<t->relations->n_used; i++) {
|
|
||||||
if (!CheckRelation(e, r[i].name, r[i].sval, 0, 0, RA_Current)) {
|
|
||||||
match = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!match) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check this element's parent's attribute */
|
|
||||||
if (t->pattrset && e->parent) {
|
|
||||||
char *p, **tok;
|
|
||||||
|
|
||||||
i = 2;
|
|
||||||
match = 1;
|
|
||||||
tok = Split(t->pattrset, &i, S_STRDUP);
|
|
||||||
if ( i == 2 ) {
|
|
||||||
p = FindAttValByName(e->parent, tok[0]);
|
|
||||||
ExpandVariables(tok[1], buf, 0);
|
|
||||||
if ( !p || strcmp(p, buf) )
|
|
||||||
match = 0;
|
|
||||||
} else {
|
|
||||||
if (!FindAttValByName(e->parent, t->pattrset))
|
|
||||||
match = 0;
|
|
||||||
}
|
|
||||||
free(tok[0]);
|
|
||||||
if (!match) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check this element's "birth order" */
|
|
||||||
if (t->nth_child) {
|
|
||||||
/* First one is called "1" by the user. Internally called "0". */
|
|
||||||
i = t->nth_child;
|
|
||||||
if (i > 0) { /* positive # -- count from beginning */
|
|
||||||
if (e->my_eorder != (i-1)) continue;
|
|
||||||
}
|
|
||||||
else { /* negative # -- count from end */
|
|
||||||
i = e->parent->necont - i;
|
|
||||||
if (e->my_eorder != i) continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check that variables match */
|
|
||||||
if (t->var_name) {
|
|
||||||
cp = FindMappingVal(Variables, t->var_name);
|
|
||||||
if (!cp || strcmp(cp, t->var_value)) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check for variable regular expression match */
|
|
||||||
if ( t->var_RE_name ) {
|
|
||||||
cp = FindMappingVal(Variables, t->var_RE_name);
|
|
||||||
if (!cp || !regexec(t->var_RE_value, cp)) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check content */
|
|
||||||
if (t->content) { /* no att specified -> a match */
|
|
||||||
for (match=0,i=0; i<e->ndcont; i++) {
|
|
||||||
if (regexec(t->content_re, e->dcont[i])) {
|
|
||||||
match = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!match) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------- at this point we've passed all criteria -------- */
|
|
||||||
|
|
||||||
/* See if we should be using another transpec's actions. */
|
|
||||||
if (t->use_id) {
|
|
||||||
if (t->use_id < 0) return &NullTrans; /* missing? */
|
|
||||||
/* see if we have a pointer to that transpec */
|
|
||||||
if (t->use_trans) return t->use_trans;
|
|
||||||
for (tt=TrSpecs; tt; tt=tt->next) {
|
|
||||||
if (t->use_id == tt->my_id) {
|
|
||||||
/* remember pointer for next time */
|
|
||||||
t->use_trans = tt;
|
|
||||||
return t->use_trans;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
t->use_id = -1; /* flag it as missing */
|
|
||||||
fprintf(stderr, "Warning: transpec ID (%d) not found for %s.\n",
|
|
||||||
t->use_id, e->gi);
|
|
||||||
return &NullTrans;
|
|
||||||
}
|
|
||||||
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this point, we have not found a matching spec. See if there
|
|
||||||
* is a wildcard, and if so, use it. (Wildcard GI is named "*".) */
|
|
||||||
if ((t = FindTransByName("*"))) return t;
|
|
||||||
|
|
||||||
if (warnings && !specID)
|
|
||||||
fprintf(stderr, "Warning: transpec not found for %s\n", e->gi);
|
|
||||||
|
|
||||||
/* default spec - pass character data and descend node */
|
|
||||||
return &NullTrans;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Find translation spec by (GI) name. Returns the first one that matches.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to name of transpec (the "gi" field of the Trans structure).
|
|
||||||
* Return:
|
|
||||||
* Pointer to translation spec that matches name.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Trans_t *
|
|
||||||
FindTransByName(
|
|
||||||
char *s
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Trans_t *t;
|
|
||||||
|
|
||||||
for (t=TrSpecs; t; t=t->next) {
|
|
||||||
/* check if tag name matches (first check 1st char, for efficiency) */
|
|
||||||
if (t->gi) {
|
|
||||||
if (*(t->gi) != *s) continue; /* check 1st character */
|
|
||||||
if (!strcmp(t->gi, s)) return t;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find translation spec by its ID (SpecID).
|
|
||||||
* Arguments:
|
|
||||||
* Spec ID (an int).
|
|
||||||
* Return:
|
|
||||||
* Pointer to translation spec that matches name.
|
|
||||||
*/
|
|
||||||
Trans_t *
|
|
||||||
FindTranByID(int n)
|
|
||||||
{
|
|
||||||
Trans_t *t;
|
|
||||||
|
|
||||||
for (t=TrSpecs; t; t=t->next)
|
|
||||||
if (n == t->my_id) return t;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Process a "chunk" of content data of an element.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to data content to process
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
DoData(
|
|
||||||
char *data,
|
|
||||||
FILE *fp,
|
|
||||||
int verbatim
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!fp) return;
|
|
||||||
OutputString(data, fp, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Handle a processing instruction. This is done similarly to elements,
|
|
||||||
* where we find a transpec, then do what it says. Differences: PI names
|
|
||||||
* start with '_' in the spec file (if a GI does not start with '_', it
|
|
||||||
* may be forced to upper case, sgmls keeps PIs as mixed case); the args
|
|
||||||
* to the PI are treated as the data of an element. Note that a PI wildcard
|
|
||||||
* is "_*"
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to the PI.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
DoPI(
|
|
||||||
char *pi,
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char buf[250], **tok;
|
|
||||||
int n;
|
|
||||||
Trans_t *t;
|
|
||||||
|
|
||||||
buf[0] = '_';
|
|
||||||
strcpy(&buf[1], pi);
|
|
||||||
n = 2;
|
|
||||||
tok = Split(buf, &n, 0);
|
|
||||||
if ((t = FindTransByName(tok[0])) ||
|
|
||||||
(t = FindTransByName("_*"))) {
|
|
||||||
if (t->replace) ProcesOutputSpec(t->replace, 0, fp, 1);
|
|
||||||
else {
|
|
||||||
if (t->starttext) ProcesOutputSpec(t->starttext, 0, fp, 1);
|
|
||||||
if (t->ignore != IGN_DATA) /* skip data nodes? */
|
|
||||||
if (n > 1) OutputString(tok[1], fp, 1);
|
|
||||||
if (t->endtext) ProcesOutputSpec(t->endtext, 0, fp, 1);
|
|
||||||
}
|
|
||||||
if (t->message) ProcesOutputSpec(t->message, 0, stderr, 0);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* If not found, just print the PI in square brackets, along
|
|
||||||
* with a warning message. */
|
|
||||||
fprintf(fp, "[%s]", pi);
|
|
||||||
if (warnings) fprintf(stderr, "Warning: Unrecognized PI: [%s]\n", pi);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Set and increment variables, as appropriate, if the transpec says to.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to translation spec for current element.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
set_and_increment(
|
|
||||||
Trans_t *t,
|
|
||||||
Element_t *e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Mapping_t *m;
|
|
||||||
int i, inc, n;
|
|
||||||
char *cp, buf[50];
|
|
||||||
char ebuf[500];
|
|
||||||
|
|
||||||
/* set/reset variables */
|
|
||||||
if (t->set_var) {
|
|
||||||
for (m=t->set_var->maps,i=0; i<t->set_var->n_used; i++) {
|
|
||||||
ExpandVariables(m[i].sval, ebuf, e); /* do some expansion */
|
|
||||||
SetMappingNV(Variables, m[i].name, ebuf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* increment counters */
|
|
||||||
if (t->incr_var) {
|
|
||||||
for (m=t->incr_var->maps,i=0; i<t->incr_var->n_used; i++) {
|
|
||||||
cp = FindMappingVal(Variables, m[i].name);
|
|
||||||
/* if not set at all, set to 1 */
|
|
||||||
if (!cp) SetMappingNV(Variables, m[i].name, "1");
|
|
||||||
else {
|
|
||||||
if (isdigit(*cp) || (*cp == '-' && isdigit(cp[1]))) {
|
|
||||||
n = atoi(cp);
|
|
||||||
if (m[i].sval && isdigit(*m[i].sval)) inc = atoi(m[i].sval);
|
|
||||||
else inc = 1;
|
|
||||||
sprintf(buf, "%d", (n + inc));
|
|
||||||
SetMappingNV(Variables, m[i].name, buf);
|
|
||||||
} else
|
|
||||||
if (!*(cp+1) && isalpha(*cp)) {
|
|
||||||
buf[0] = *cp + 1;
|
|
||||||
buf[1] = 0;
|
|
||||||
SetMappingNV(Variables, m[i].name, buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Translate one element.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
* Pointer to translation spec for current element, or null.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
TransElement(
|
|
||||||
Element_t *e,
|
|
||||||
FILE *fp,
|
|
||||||
Trans_t *t
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!t) t = ((e && e->trans) ? e->trans : &NullTrans);
|
|
||||||
|
|
||||||
/* see if we should quit. */
|
|
||||||
if (t->quit) {
|
|
||||||
fprintf(stderr, "Quitting at location:\n");
|
|
||||||
PrintLocation(e, fp);
|
|
||||||
fprintf(stderr, "%s\n", t->quit);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See if we want to replace subtree (do text, don't descend subtree) */
|
|
||||||
if (t->replace) {
|
|
||||||
ProcesOutputSpec(t->replace, e, fp, 1);
|
|
||||||
if (t->message) ProcesOutputSpec(t->message, e, stderr, 0);
|
|
||||||
set_and_increment(t, e); /* adjust variables, if appropriate */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (t->starttext) ProcesOutputSpec(t->starttext, e, fp, 1);
|
|
||||||
if (t->message) ProcesOutputSpec(t->message, e, stderr, 0);
|
|
||||||
|
|
||||||
/* Process data for this node and descend child elements/nodes. */
|
|
||||||
if (t->ignore != IGN_ALL) {
|
|
||||||
/* Is there a "generated" node at the front of this one? */
|
|
||||||
if (e->gen_trans[0]) {
|
|
||||||
Trans_t *tp;
|
|
||||||
if ((tp = FindTranByID(e->gen_trans[0]))) {
|
|
||||||
if (tp->starttext) ProcesOutputSpec(tp->starttext, e, fp, 1);
|
|
||||||
if (tp->message) ProcesOutputSpec(tp->message, e, stderr, 0);
|
|
||||||
if (tp->endtext) ProcesOutputSpec(tp->endtext, e, fp, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Loop thruthe "nodes", whether data, child element, or PI. */
|
|
||||||
for (i=0; i<e->ncont; i++) {
|
|
||||||
if (IsContElem(e,i)) {
|
|
||||||
if (t->ignore != IGN_CHILDREN) /* skip child nodes? */
|
|
||||||
TransElement(ContElem(e,i), fp, NULL);
|
|
||||||
}
|
|
||||||
else if (IsContData(e,i)) {
|
|
||||||
if (t->ignore != IGN_DATA) /* skip data nodes? */
|
|
||||||
DoData(ContData(e,i), fp, t->verbatim);
|
|
||||||
}
|
|
||||||
else if (IsContPI(e,i))
|
|
||||||
DoPI(e->cont[i].ch.data, fp);
|
|
||||||
}
|
|
||||||
/* Is there a "generated" node at the end of this one? */
|
|
||||||
if (e->gen_trans[1]) {
|
|
||||||
Trans_t *tp;
|
|
||||||
if ((tp = FindTranByID(e->gen_trans[1]))) {
|
|
||||||
if (tp->starttext) ProcesOutputSpec(tp->starttext, e, fp, 1);
|
|
||||||
if (tp->message) ProcesOutputSpec(tp->message, e, stderr, 0);
|
|
||||||
if (tp->endtext) ProcesOutputSpec(tp->endtext, e, fp, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set_and_increment(t, e); /* adjust variables, if appropriate */
|
|
||||||
|
|
||||||
if (t->endtext) ProcesOutputSpec(t->endtext, e, fp, 1);
|
|
||||||
|
|
||||||
e->processed = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Check if element matches specified relationship, and, if it does, perform
|
|
||||||
* action on either current element or matching element (depends on flag).
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* Pointer to relationship name.
|
|
||||||
* Pointer to related element name (GI).
|
|
||||||
* Pointer to action to take (string - turned into an int).
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
* Flag saying whether to do action on related element (RA_Related)
|
|
||||||
* or on current element (RA_Current).
|
|
||||||
* Return:
|
|
||||||
* Bool, saying whether (1) or not (0) relationship matches.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
|
||||||
CheckRelation(
|
|
||||||
Element_t *e,
|
|
||||||
char *relname, /* relationship name */
|
|
||||||
char *related, /* related element */
|
|
||||||
char *actname, /* action to take */
|
|
||||||
FILE *fp,
|
|
||||||
RelAction_t flag
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Element_t *ep;
|
|
||||||
Relation_t r;
|
|
||||||
|
|
||||||
if ((r = FindRelByName(relname)) == REL_Unknown) return 0;
|
|
||||||
if (!(ep=QRelation(e, related, r))) return 0;
|
|
||||||
|
|
||||||
if (!actname) return 1; /* no action - return what we found */
|
|
||||||
|
|
||||||
switch (flag) {
|
|
||||||
case RA_Related: TranTByAction(ep, actname, fp); break;
|
|
||||||
case RA_Current: TranTByAction(e, actname, fp); break;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Perform action given by a SpecID on the given element.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* SpecID of action to perform.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
TranByAction(
|
|
||||||
Element_t *e,
|
|
||||||
int n,
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Trans_t *t;
|
|
||||||
|
|
||||||
t = FindTranByID(n);
|
|
||||||
if (!t) {
|
|
||||||
fprintf(stderr, "Could not find named action for %d.\n", n);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TransElement(e, fp, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Perhaps perform action given by a SpecID on the given element.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* SpecID of action to perform. Unlike TranByAction, this is the argument
|
|
||||||
* as it occurred in the transpec (ASCII) and may end with the letter
|
|
||||||
* "t" which means that the transpec mustpass criteria selection.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
TranTByAction(
|
|
||||||
Element_t *e,
|
|
||||||
char *strn,
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
Trans_t *t;
|
|
||||||
|
|
||||||
n = atoi(strn);
|
|
||||||
if ( strn[strlen(strn)-1] != 't' ) {
|
|
||||||
t = FindTranByID(n);
|
|
||||||
if (!t) {
|
|
||||||
fprintf(stderr, "Could not find named action for %d.\n", n);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
t = FindTrans(e, n);
|
|
||||||
if ( !t || !t->my_id )
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TransElement(e, fp, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
@ -1,153 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* Program to manipulate SGML instances.
|
|
||||||
*
|
|
||||||
* These are data definitions for the "translating" portion of the program.
|
|
||||||
*
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef STORAGE
|
|
||||||
#ifndef lint
|
|
||||||
static char *tr_h_RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/translate.h,v 1.3 1996/06/02 21:47:32 fld Exp $";
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define L_CURLY '{'
|
|
||||||
#define R_CURLY '}'
|
|
||||||
|
|
||||||
/* things to ignore when processing an element */
|
|
||||||
#define IGN_NONE 0
|
|
||||||
#define IGN_ALL 1
|
|
||||||
#define IGN_DATA 2
|
|
||||||
#define IGN_CHILDREN 3
|
|
||||||
|
|
||||||
/* for CheckRelation() */
|
|
||||||
typedef enum { RA_Current, RA_Related } RelAction_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char *name; /* attribute name string */
|
|
||||||
char *val; /* attribute value string */
|
|
||||||
regexp *rex; /* attribute value reg expr (compiled) */
|
|
||||||
} AttPair_t;
|
|
||||||
|
|
||||||
typedef struct _Trans {
|
|
||||||
/* criteria */
|
|
||||||
char *gi; /* element name of tag under consideration */
|
|
||||||
char **gilist; /* list of element names (multiple gi's) */
|
|
||||||
char *context; /* context in tree - looking depth levels up */
|
|
||||||
regexp *context_re; /* tree heirarchy looking depth levels up */
|
|
||||||
int depth; /* number of levels to look up the tree */
|
|
||||||
AttPair_t *attpair; /* attr name-value pairs */
|
|
||||||
int nattpairs; /* number of name-value pairs */
|
|
||||||
char *parent; /* GI has this element as parent */
|
|
||||||
int nth_child; /* GI is Nth child of this of parent element */
|
|
||||||
char *content; /* element has this string in content */
|
|
||||||
regexp *content_re; /* content reg expr (compiled) */
|
|
||||||
char *pattrset; /* is this attr set (any value) in parent? */
|
|
||||||
char *var_name; /* variable name */
|
|
||||||
char *var_value; /* variable value */
|
|
||||||
char *var_RE_name; /* variable name (for VarREValue) */
|
|
||||||
regexp *var_RE_value; /* variable value (compiled, for VarREValue) */
|
|
||||||
Map_t *relations; /* various relations to check */
|
|
||||||
|
|
||||||
/* actions */
|
|
||||||
char *starttext; /* string to output at the start tag */
|
|
||||||
char *endtext; /* string to output at the end tag */
|
|
||||||
char *replace; /* string to replace this subtree with */
|
|
||||||
char *message; /* message for stderr, if element encountered */
|
|
||||||
int ignore; /* flag - ignore content or data of element? */
|
|
||||||
int verbatim; /* flag - pass content verbatim or do cmap? */
|
|
||||||
char *var_reset;
|
|
||||||
char *increment; /* increment these variables */
|
|
||||||
Map_t *set_var; /* set these variables */
|
|
||||||
Map_t *incr_var; /* increment these variables */
|
|
||||||
char *quit; /* print message and exit */
|
|
||||||
|
|
||||||
/* pointers and bookkeeping */
|
|
||||||
int my_id; /* unique (hopefully) ID of this transpec */
|
|
||||||
int use_id; /* use transpec whose ID is this */
|
|
||||||
struct _Trans *use_trans; /* pointer to other transpec */
|
|
||||||
struct _Trans *next; /* linked list */
|
|
||||||
int lineno; /* line number of end of transpec */
|
|
||||||
} Trans_t;
|
|
||||||
|
|
||||||
#ifdef def
|
|
||||||
#undef def
|
|
||||||
#endif
|
|
||||||
#ifdef STORAGE
|
|
||||||
# define def
|
|
||||||
#else
|
|
||||||
# define def extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
def Trans_t *TrSpecs;
|
|
||||||
def Mapping_t *CharMap;
|
|
||||||
def int nCharMap;
|
|
||||||
|
|
||||||
/* prototypes for things defined in translate.c */
|
|
||||||
int CheckRelation(Element_t *, char *, char *, char *, FILE*, RelAction_t);
|
|
||||||
Trans_t *FindTrans(Element_t *, int);
|
|
||||||
Trans_t *FindTransByName(char *);
|
|
||||||
Trans_t *FindTransByID(int);
|
|
||||||
void PrepTranspecs(Element_t *);
|
|
||||||
void ProcessOneSpec(char *, Element_t *, FILE *, int);
|
|
||||||
void TransElement(Element_t *, FILE *, Trans_t *);
|
|
||||||
void TranByAction(Element_t *, int, FILE *);
|
|
||||||
void TranTByAction(Element_t *, char *, FILE *);
|
|
||||||
|
|
||||||
/* prototypes for things defined in tranvar.c */
|
|
||||||
void ExpandSpecialVar(char *, Element_t *, FILE *, int);
|
|
||||||
|
|
||||||
/* prototypes for things defined in tables.c */
|
|
||||||
void OSFtable(Element_t *, FILE *, char **, int);
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
@ -1,528 +0,0 @@
|
|||||||
...\"
|
|
||||||
...\"
|
|
||||||
...\" Copyright (c) 1994
|
|
||||||
...\" Open Software Foundation, Inc.
|
|
||||||
...\"
|
|
||||||
...\" Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
...\" the software in this file and its documentation for any purpose without
|
|
||||||
...\" fee, provided that the above copyright notice appears in all copies and
|
|
||||||
...\" that both the copyright notice and this permission notice appear in
|
|
||||||
...\" supporting documentation. Further, provided that the name of Open
|
|
||||||
...\" Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
...\" publicity pertaining to distribution of the software without prior
|
|
||||||
...\" written permission from OSF. OSF makes no representations about the
|
|
||||||
...\" suitability of this software for any purpose. It is provided "as is"
|
|
||||||
...\" without express or implied warranty.
|
|
||||||
...\"
|
|
||||||
...\" Copyright (c) 1996 X Consortium
|
|
||||||
...\" Copyright (c) 1996 Dalrymple Consulting
|
|
||||||
...\"
|
|
||||||
...\" Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
...\" of this software and associated documentation files (the "Software"), to deal
|
|
||||||
...\" in the Software without restriction, including without limitation the rights
|
|
||||||
...\" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
...\" copies of the Software, and to permit persons to whom the Software is
|
|
||||||
...\" furnished to do so, subject to the following conditions:
|
|
||||||
...\"
|
|
||||||
...\" The above copyright notice and this permission notice shall be included in
|
|
||||||
...\" all copies or substantial portions of the Software.
|
|
||||||
...\"
|
|
||||||
...\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
...\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
...\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
...\" X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
...\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
...\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
...\" OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
...\"
|
|
||||||
...\" Except as contained in this notice, the names of the X Consortium and
|
|
||||||
...\" Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
...\" promote the sale, use or other dealings in this Software without prior
|
|
||||||
...\" written authorization.
|
|
||||||
...\"
|
|
||||||
...\" Translated with /usr/local/lib/tpt/ref-man.ts by fld on cord, Wed 07 Feb 1996, 22:00
|
|
||||||
.TH "\fBtranspec\fP" "file format"
|
|
||||||
.SH "Name"
|
|
||||||
\fBtranspec\fP - translation specification for \fBinstant\fP
|
|
||||||
.SH "Synopsis"
|
|
||||||
.na
|
|
||||||
.PP
|
|
||||||
\fBfile.ts\fP
|
|
||||||
.ad
|
|
||||||
.SH "Description"
|
|
||||||
.PP
|
|
||||||
The \fBtranspec\fP file is used by the \fBinstant\fP program to translate an SGML document instance to a format suitable for a formatting application.
|
|
||||||
The convention is to name the file with the suffix \fB.ts\fP.
|
|
||||||
.PP
|
|
||||||
A \fBtranspec\fP file is composed of a number of individual translation specs.
|
|
||||||
Each translation spec (transpec) is made up of a number of fields, one per line.
|
|
||||||
Translation specs are separated by a line with a leading dash. Text after the dash is ignored.
|
|
||||||
Fields are composed of two parts, a name and a value, separated by a colon.
|
|
||||||
The colon must immediately follow the name, and any amount of whitespace (blanks and tabs) may be present between the colon and value.
|
|
||||||
Values should not be quoted, and you should be careful of trailing spaces.
|
|
||||||
(Trailing space will be considered part of the value.)
|
|
||||||
Quotes, if they appear, will be considered part of the value of the fields.
|
|
||||||
Lines that begin with whitespace (blanks and tabs) are a continuation of the previous line; the leading space is ignored.
|
|
||||||
These characteristics are very similar to those of e-mail headers.
|
|
||||||
Lines beginning with a \fB#\fP (number sign) are comments and blank lines are ignored.
|
|
||||||
.SH "Field Descriptions"
|
|
||||||
.PP
|
|
||||||
Some fields are for identifying criteria that determines if a particular spec matches an element in the instance.
|
|
||||||
Others specify what action is to take place when a match happens, such as sending text to the output stream.
|
|
||||||
.SS "Criteria fields"
|
|
||||||
.PP
|
|
||||||
Criteria fields restrict the conditions under which a single translation spec will apply.
|
|
||||||
If each field specified in a particular transpec matches an element under consideration in the document instance,
|
|
||||||
then that translation spec is said to match. The appropriate actions, as specified in that spec, are then taken.
|
|
||||||
The program, \fBinstant\fP, searches the list of transpecs in the order given in the file.
|
|
||||||
Therefore, the more restrictive specs (those with more criteria) should appear before less restrictive ones.
|
|
||||||
.PP
|
|
||||||
For quick reference, this is a brief summary of the possible criteria fields for translation. A complete discussion of each follows.
|
|
||||||
.P
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
l l l.
|
|
||||||
\fBField Label\fR@\fBField Value\fR@\fBDescription\fR
|
|
||||||
GI@gi ...@name of this GI
|
|
||||||
AttValue@attname reg-expr@current element has attribute with value
|
|
||||||
Content@reg-expr@is reg-expr in char content>
|
|
||||||
Context@context@element context, up the tree
|
|
||||||
NthChild@number@current element is Nth child of its parent
|
|
||||||
PAttSet@attname (val)@parent has this attribute set (optional to value val)
|
|
||||||
Relation@relationship gi@gi has relationship to current element
|
|
||||||
VarREValue@var REvalue@variable is set to regular expression value
|
|
||||||
VarValue@var value@variable is set to value
|
|
||||||
.TE
|
|
||||||
'br\" labeled list
|
|
||||||
.IP "\fBGI:\fP \fIgi\fP [...]"
|
|
||||||
\fIgi\fP is the name of the generic identifier, or element name, to consider.
|
|
||||||
More than one GI may appear in this field.
|
|
||||||
.IP "\fBAttValue:\fP \fIattname\fP \fIregular-expression\fP"
|
|
||||||
This is an attribute name-value pair, where \fIattname\fP is an attribute if the GI.
|
|
||||||
The \fIregular-expression\fP is of the form accepted by the unix program \fBegrep\fP.
|
|
||||||
This pair is compared to the corresponding attribute name-value pairs of the GI under consideration.
|
|
||||||
To simply test if an attribute us set, use \fB.\fP (a dot) for \fIregular-expression\fP.
|
|
||||||
There may be more than one of these lines for each transpec.
|
|
||||||
.IP "\fBContent:\fP \fIregular-expression\fP"
|
|
||||||
This specifies that the character content of GI contains a string matching the \fIregular-expression\fP.
|
|
||||||
.IP "\fBContext:\fP \fIcontext\fP"
|
|
||||||
This specifies the \fIcontext\fP in which to apply this translation spec.
|
|
||||||
It is either a list of generic identifiers or a regular expression describing a list of generic identifiers, looking up the hierarchy.
|
|
||||||
The first is the parent of the GI.
|
|
||||||
.IP "\fBNthChild:\fP \fInumber\fP"
|
|
||||||
This specifies that the GI is the \fInumber\fPth child element of its parent.
|
|
||||||
Children are numbered starting with \fB1\fP.
|
|
||||||
Negative numbers may be used to indicate order counting backwards.
|
|
||||||
For example, -1 denotes the last child.
|
|
||||||
.IP "\fBPAttSet:\fP \fIattname\fP"
|
|
||||||
This specifies that the parent has this attribute, \fIattname\fP, set to any value (not IMPLIED). A value to match may optionally
|
|
||||||
be specified after attname.
|
|
||||||
.IP "\fBRelation:\fP \fIrelationship\fP \fIgi\fP"
|
|
||||||
This specifies that the current element has the \fIrelationship\fP to the named \fIgi\fP.
|
|
||||||
The acceptable relationships are: \fBancestor\fP (anywhere up the tree), \fBchild\fP (immediate child),
|
|
||||||
\fBdescendant\fP (anywhere down the tree), \fBparent\fP (immediate ancestor), \fBsibling\fP (share same parent element),
|
|
||||||
\fBsibling+\fP (any later sibling), \fBsibling+1\fP (the immediately following sibling), \fBsibling-\fP (any earlier sibling),
|
|
||||||
\fBsibling-1\fP (the immediately following sibling).
|
|
||||||
.IP "\fBVarREValue:\fP \fIvarname\fP \fIREvalue\fP"
|
|
||||||
This specifies that the global variable \fIvarname\fP has the value \fIREvalue\fP,
|
|
||||||
where \fIREvalue\fP is a regular expression
|
|
||||||
(see the \fBVarValue\fP statement).
|
|
||||||
.IP "\fBVarValue:\fP \fIvarname\fP \fIvalue\fP"
|
|
||||||
This specifies that the global variable \fIvarname\fP has the (literal)
|
|
||||||
value \fIvalue\fP (see the \fBVarREValue\fP statement).
|
|
||||||
'br\" labeled list end
|
|
||||||
.PP
|
|
||||||
There are two special GIs.
|
|
||||||
If specified, \fB_Start\fP and \fB_End\fP are processed as if they were GIs in the instance at the start and end of the translation, respectively.
|
|
||||||
Their criteria are never checked. Only their actions are performed.
|
|
||||||
.SS "Action fields"
|
|
||||||
.PP
|
|
||||||
For quick reference, this is a brief summary of the action fields for translation. They are only performed if all the criteria are satisfied.
|
|
||||||
A complete discussion of each follows.
|
|
||||||
.P
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
l l l.
|
|
||||||
\fBField Label\fR@\fBField Value\fR@\fBDescription\fR
|
|
||||||
Action@spec-id@use transpec whose spec ID is `spec-id'
|
|
||||||
EndText@text@text for end of element
|
|
||||||
Increment@name@increment variable `name'
|
|
||||||
Ignore@key@flag for ignoring element's children and/or data
|
|
||||||
Message@text@text to send to stderr
|
|
||||||
Quit@text@print text and quit program
|
|
||||||
Replace@text@replace this subtree with text
|
|
||||||
Set@name value@set variable \fIname\fP to \fIvalue\fP
|
|
||||||
SpecID@spec-id@unique Spec ID (int) of this spec
|
|
||||||
StartText@text@text for start of element
|
|
||||||
.TE
|
|
||||||
'br\" labeled list
|
|
||||||
.IP "\fBAction:\fP \fIspec-id\fP"
|
|
||||||
Use the actions of the spec identified by the \fBSpecID\fP with matching identifier \fIspec-id\fP.
|
|
||||||
.IP "\fBEndText:\fP \fItext\fP"
|
|
||||||
This specifies text to be output when the end tag is processed.
|
|
||||||
.IP "\fBIgnore:\fP \fIkey\fP"
|
|
||||||
This specifies that the data or children for this element are to be ignored.
|
|
||||||
Set \fIkey\fP to \fBall\fP to ignore the element (data and child elements),
|
|
||||||
to \fBdata\fP to ignore the immediate character data content (child elements are still descended into),
|
|
||||||
and to \fBchildren\fP to process the immediate character data content but not descended into child elements.
|
|
||||||
Other actions specified in this transpec are still performed, however.
|
|
||||||
.IP "\fBIncrement:\fP \fIname\fP"
|
|
||||||
This is used to increment a variable whose value is a number.
|
|
||||||
If the variable is not a number, no action will be taken.
|
|
||||||
The variable must have been previously defined. This action is done immediately before \fBEndText\fP.
|
|
||||||
There may be more than one of these lines for each transpec.
|
|
||||||
.IP "\fBMessage:\fP \fItext\fP"
|
|
||||||
This specifies a string to be printed to the standard error when the matching element is processed.
|
|
||||||
It is intended for informing the user of the progress of the translation.
|
|
||||||
It is also used for validation of instances (see the \fB-v\fP flag of \fBinstant\fP(1));
|
|
||||||
a spec would be written to recognize a construct that is not allowed.
|
|
||||||
This action is done immediately after \fBStartText\fP.
|
|
||||||
Messages are also useful for debugging spec files; one is able to easily tell when a matching spec is processed,
|
|
||||||
without looking at the actual output of the translation.
|
|
||||||
Note that the spec writer is responsible for putting newlines (\fB\en\fP) in the message text.
|
|
||||||
.IP "\fBReplace:\fP \fItext\fP"
|
|
||||||
This specifies text to replace the current subtree with.
|
|
||||||
This is equivalent to \fBStartText\fP and \fBIgnore\fP.
|
|
||||||
.IP "\fBQuit:\fP \fItext\fP"
|
|
||||||
This specifies text to be printed to the standard error. The program then terminates with exit status 1.
|
|
||||||
This is intended for bailing out when an undesirable instance is encountered
|
|
||||||
(such as when it is known that the formatting application can never handle a class of components, like tables).
|
|
||||||
.IP "\fBSet:\fP \fIname\fP \fIvalue\fP"
|
|
||||||
This is used to set a variable whose name is \fIname\fP and value is \fIvalue\fP.
|
|
||||||
Names that would be valid for GIs in the document instance are valid for variable names.
|
|
||||||
\fIvalue\fP is the rest of the line and may be any string. This action is done immediately before \fBEndText\fP.
|
|
||||||
There may be more than one of these lines for each transpec.
|
|
||||||
See the discussion on variables below.
|
|
||||||
.IP "\fBSpecID:\fP \fIspec-id\fP"
|
|
||||||
This names the spec with the number \fIspec-id\fP. Other specs may refer to this one by this number by an \fBAction\fP field or an \fB_action\fP special variable.
|
|
||||||
This is used for cases where several specs to perform the exact same action.
|
|
||||||
.IP "\fBStartText:\fP \fItext\fP"
|
|
||||||
This specifies text to be output when the start tag is processed.
|
|
||||||
'br\" labeled list end
|
|
||||||
.SS "Other Fields"
|
|
||||||
.PP
|
|
||||||
These fields may appear anywhere. The action occurs when the translation spec file is read, before any elements are translated.
|
|
||||||
Theses are independent of any element processing.
|
|
||||||
'br\" labeled list
|
|
||||||
.IP "\fBVar:\fP \fIname\fP \fIvalue\fP"
|
|
||||||
This is used to define a variable whose name is \fIname\fP and value is \fIvalue\fP.
|
|
||||||
It is similar to \fBSet\fP, but it may occur anywhere in the file and takes effect when the spec file is read.
|
|
||||||
'br\" labeled list end
|
|
||||||
.SS "Text Strings"
|
|
||||||
.PP
|
|
||||||
The \fItext\fP referred to in the \fBStartText\fP, \fBEndText\fP, \fBReplace\fP,
|
|
||||||
and \fBMessage\fP actions is more than simple character strings.
|
|
||||||
Special sequences allow more complex output.
|
|
||||||
.PP
|
|
||||||
One type of special sequence is for C-style string processing.
|
|
||||||
Most special characters are escaped with a \e (backslash). Like in C or shell programs, to print a \e (backslash), you must escape it with another backslash. These special character strings are:
|
|
||||||
'br\" labeled list
|
|
||||||
.IP "\fB\en (backslash-n)\fP"
|
|
||||||
This specifies that a newline character is to be printed to the output stream.
|
|
||||||
.IP "\fB\er (backslash-r)\fP"
|
|
||||||
This specifies that a carriage return character is to be printed to the output stream.
|
|
||||||
.IP "\fB\et (backslash-t)\fP"
|
|
||||||
This specifies that a tab character is to be printed to the output stream.
|
|
||||||
.IP "\fB\es (backslash-s)\fP"
|
|
||||||
This specifies that a space is to be printed to the output stream.
|
|
||||||
This is useful for the end of a transpec line, where it can be difficult to tell if a blank is present at the end.
|
|
||||||
.IP "\fB\e007 (backslash-007)\fP"
|
|
||||||
This specifies that the character whose octal value is 007 is to be printed to the output stream.
|
|
||||||
This works for any octal character value.
|
|
||||||
.IP "\fB^ (caret)\fP"
|
|
||||||
This specifies the that position in the string will be at the start of a line in the output stream.
|
|
||||||
'br\" labeled list end
|
|
||||||
.PP
|
|
||||||
If the first token of the text string is \fB#include\fP, then the second token is taken to be a file name and that file is included.
|
|
||||||
If the file is not found, the library directory, as mentioned above, is searched.
|
|
||||||
If the text string starts with a \fB!\fP (exclamation point), the rest of the line is taken to be a command and the output of that command is inserted.
|
|
||||||
.PP
|
|
||||||
An element's attributes may also be used in the text of output fields.
|
|
||||||
To use an attribute value, precede its name with a \fB${\fP (dollar sign-left curly bracket) and follow it with a \fB}\fP (right curly bracket).
|
|
||||||
(This style is followed by the Bourne shell.) For example, \fB${TYPE}\fP.
|
|
||||||
If the attribute is not set (not IMPLIED), nothing will be printed to the output stream.
|
|
||||||
To specify a value to use if the attribute is not set, place the value after the attribute name, separated by a space.
|
|
||||||
To return the attribute value in lower-case, add a colon followed by
|
|
||||||
lower-case l (\fB${TYPE:l}\fP.
|
|
||||||
.SH "Variables"
|
|
||||||
.PP
|
|
||||||
Variables in \fBinstant\fP are similar to those in many other string-oriented programming languages, such as \fBsh\fP and \fBawk\fP.
|
|
||||||
They are set by: \fBVar:\fP \fIname\fP \fIvalue\fP and \fBSet:\fP \fIname\fP \fIvalue\fP.
|
|
||||||
Values may be set and reset to any string.
|
|
||||||
In a \fBVar\fP line, if the value begins with a \fB!\fP,
|
|
||||||
then the rest of the line is executed as a command, and its output is taken as the \fIvalue\fP.
|
|
||||||
.PP
|
|
||||||
A reference to the value of a variable follows the same syntax as
|
|
||||||
a reference to the value of an attribute: \fB${\fIname\fB}\fR.
|
|
||||||
If that variable has not been defined, a null value will be returned.
|
|
||||||
A default value can be returned instead of null for an undefined variable
|
|
||||||
by using the form: \fB${\fIname default\fB}\fR.
|
|
||||||
.PP
|
|
||||||
Variables may be used as attributes are, that is in any of the text strings mentioned above.
|
|
||||||
In fact, if an attribute name is referred to and it is not set for a given element,
|
|
||||||
\fBinstant\fP looks for a variable with the same name. This way global defaults can be set.
|
|
||||||
If you want to be sure that you are accessing a local variable value, not an attribute value, you can use lower or mixed case names.
|
|
||||||
Attribute names, as passed by \fBsgmls\fP, are in upper case.
|
|
||||||
.PP
|
|
||||||
Any number of \fBVar\fP actions may appear in the spec file. These set the values of the variables before any translation takes place.
|
|
||||||
The \fBSet\fP actions within transpecs are performed when that spec is processed when an element matches the given criteria.
|
|
||||||
.SS "Preset Variables"
|
|
||||||
.PP
|
|
||||||
Several variables are preset by \fBinstant\fP upon start of the program.
|
|
||||||
Their values may be overridden in transpec files or on the command line.
|
|
||||||
'br\" labeled list
|
|
||||||
.IP "\fBdate\fP"
|
|
||||||
This is the date and time that the program started. The format is: \f(CWTue 10 Aug 1993, 16:52\fP.
|
|
||||||
.IP "\fBhost\fP"
|
|
||||||
This is the name of the host where the program is run. It is what is returned by the \fBgethostname\fP library call.
|
|
||||||
.IP "\fBtranspec\fP"
|
|
||||||
This is the translation spec filename.
|
|
||||||
.IP "\fBuser\fP"
|
|
||||||
This is the login name of the user running the program.
|
|
||||||
'br\" labeled list end
|
|
||||||
.SS "Special Variables"
|
|
||||||
.PP
|
|
||||||
There is a collection of special variables called \fIspecial variables\fP.
|
|
||||||
These are identified by starting the names with a \fB_\fP (underscore).
|
|
||||||
This is a summary of the special variables. A complete discussion of each special variable follows.
|
|
||||||
\fBspec-id\fP refers to a number specified in a \fBSpecID\fP field.
|
|
||||||
When used in a special variable, it means to perform the action in that translation spec.
|
|
||||||
.PP
|
|
||||||
Note that when a \fIspec-id\fR is given in a special variable,
|
|
||||||
the default is to perform the translation spec named by the \fIspec-id\fR ignoring
|
|
||||||
of any criteria statements found there.
|
|
||||||
For most special variables that use a \fIspec-id\fP, postpending a "\fBt\fR" to
|
|
||||||
the \fIspec-id\fR (with no spaces between them, eg,
|
|
||||||
"\fB${_followrel child TITLE 15t}\fR"), will cause the criteria statements
|
|
||||||
in the named translation spec to evaluate successfully before that translation
|
|
||||||
spec will be processed.
|
|
||||||
.P
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
l l.
|
|
||||||
\fBVariable Usage\fR@\fBDescription\fR
|
|
||||||
\fB_action\fP \fIspec-id\fP@do spec with id spec-id
|
|
||||||
\fB_allatts\fP@print all attribute/value pairs
|
|
||||||
\fB_attval\fP \fIatt\fP [\fIvalue\fP] \fIspec-id\fP@use spec-id if attribute matches
|
|
||||||
\fB_chasetogi\fP \fIgi\fP \fIspec-id\fP@follow IDREFs until gi found
|
|
||||||
\fB_eachatt\fP \fIatt\fP \fIspec-id\fP [\fIspec-id\fP]@do spec-id for each word of attribute value
|
|
||||||
\fB_eachcon\fP \fIspec-id\fP [\fIspec-id\fP]@do spec-id for each word of content
|
|
||||||
\fB_env\fP \fIenv-variable\fP@return value of env variable
|
|
||||||
\fB_filename\fP@filename of notation
|
|
||||||
\fB_find\fP \fIrel\fP \fIgi\fP \fIspec-id\fP@find gi based on relationship
|
|
||||||
\fB_followlink\fP [\fIattname\fP] \fIspec-id\fP@follow IDREFs [attname] and use spec-id
|
|
||||||
\fB_followrel\fP \fIrel\fP \fIgi\fP \fIspec-id\fP [\fIspec-id\fP]@do spec-id on rel if it matches
|
|
||||||
\fB_gi\fP [\fBM|L|U\fP]@return GI name; M, L, U case
|
|
||||||
\fB_id\fP \fIid [\fP\fIspec-id\fP]@find element with ID and use spec-id
|
|
||||||
\fB_include\fP \fIfilename\fP@insert file here
|
|
||||||
\fB_infile\fP [\fBline\fP]@instance filename [and line number]
|
|
||||||
\fB_insertnode\fP S|E \fIspec-id\fP@do spec-id when element is traversed
|
|
||||||
\fB_isset\fP \fIvar\fP [\fIvalue\fP] \fIspec-id\fP@do spec-id if variable matches
|
|
||||||
\fB_location\fP@print location of current element
|
|
||||||
\fB_namelist\fP \fIspec-id\fP [\fIspec-id\fP]@content is namelist, do spec-id for each
|
|
||||||
\fB_nchild\fP [\fIgi\fP]@number of child elements [named \fIattname\fP]
|
|
||||||
\fB_osftable\fP \fIformat\fP [\fIflag\fP]@print table format specification
|
|
||||||
\fB_path\fP@print path to current element
|
|
||||||
\fB_pattr\fP \fIattname\fP@value of parent's attribute
|
|
||||||
\fB_pfind\fP \fIargs ...\fP@same as \fB_find\fP, but start at parent
|
|
||||||
\fB_relation\fP \fIrel\fP \fIgi\fP \fIspec-id\fP [\fIspec-id\fP]@do spec-id if relation matches
|
|
||||||
\fB_set\fP \fIvar\fP \fIvalue\fP@set variable to value
|
|
||||||
\fB_!\fP\fIcommand\fP@command to run
|
|
||||||
.TE
|
|
||||||
'br\" labeled list
|
|
||||||
.IP "\fB_action\fP \fIspec-id\fP"
|
|
||||||
Use the actions of the spec identified by the \fBSpecID\fP with matching identifier \fIspec-id\fP.
|
|
||||||
This behaves similarly to the \fBAction\fP action, but is in addition to the present translation spec.
|
|
||||||
.IP "\fB_allatts\fP"
|
|
||||||
Print all attribute name-value pairs of the current element to the output stream.
|
|
||||||
The name and value are separated by a \fB=\fP (equals sign), and the value is surrounded by quotes.
|
|
||||||
This can be useful for creating a normalized version of the instance.
|
|
||||||
.IP "\fB_attval\fP \fIattname\fP [\fIvalue\fP] \fIspec-id\fP"
|
|
||||||
If the current element has an attribute named \fIattname\fP, optionally whose value matches \fIvalue\fP,
|
|
||||||
use the actions of the transpec identified by \fIspec-id\fP.
|
|
||||||
.IP "\fB_chasetogi\fP \fIgi\fP \fIspec-id\fP"
|
|
||||||
Follow IDREF attributes until if finds an element whose GI is \fIgi\fP or which has a child element with that GI.
|
|
||||||
It will apply the transpec \fIspec-id\fP to that element.
|
|
||||||
By default, \fBinstant\fP assumes the attributes named \fBLINKEND\fP, \fBLINKENDS\fP, and \fBIDREF\fP are of type IDREF or IDREFS.
|
|
||||||
(This corresponds with the OSF DTDs.)
|
|
||||||
You can change this by setting the variable \fBlink_atts\fP to a space-separated list of attribute names.
|
|
||||||
.IP "\fB_eachatt\fP \fIatt\fP \fIspec-id\fP [\fIspec-id2\fP]"
|
|
||||||
The transpec named by \fIspec-id\fR is invoked once per each word
|
|
||||||
found in the value of the attribute \fIatt\fR.
|
|
||||||
Inside the target transpec, the current word being processed
|
|
||||||
is available in the variable named \fBeach_A\fR (\fB${each_A}\fR).
|
|
||||||
If \fIspec-id2\fP is specified, it will use \fIspec-id\fP for the first word
|
|
||||||
in the attribute and \fIspec-id2\fP for the others.
|
|
||||||
.IP "\fB_eachcon\fP \fIspec-id\fP [\fIspec-id2\fP]"
|
|
||||||
The transpec named by \fIspec-id\fR is invoked once per each word
|
|
||||||
found in the content of the current element.
|
|
||||||
Inside the target transpec, the current word being processed
|
|
||||||
is available in the variable named \fBeach_C\fR (\fB${each_C}\fR).
|
|
||||||
If \fIspec-id2\fP is specified, it will use \fIspec-id\fP for the first word
|
|
||||||
in the content and \fIspec-id2\fP for the others.
|
|
||||||
.IP "\fB_env\fP \fIenv-variable\fP"
|
|
||||||
Print the value of the environment variable \fIenv-variable\fP to the output stream.
|
|
||||||
.IP "\fB_filename\fP"
|
|
||||||
Print the filename of the notation associated with this element, if any.
|
|
||||||
This is used to get the filename of an external notation entity reference.
|
|
||||||
For example, to print the filename in the latex macro from the epsf macro package, use \f(CW\e\eepsfboxi{${_filename}}\fP.
|
|
||||||
.IP "\fB_find\fP [\fBtop\fP] \fIrelationship\fP \fIargs ...\fP \fIspec-id\fP"
|
|
||||||
Descend the document hierarchy finding elements that match one of several criteria.
|
|
||||||
When one is found, the action specified by \fIspec-id\fP is performed.
|
|
||||||
If \fBtop\fP is specified, the search starts at the top of the document hierarchy, rather than at the current element.
|
|
||||||
The possible values for \fIrelationship\fP are \fBgi\fP, \fBgi-parent\fP, \fBparent\fP, and \fBattr\fP,
|
|
||||||
and take different arguments.
|
|
||||||
Explanations may be best done by example:
|
|
||||||
\fB_find gi CHAPTER 123\fP means to find elements whose GI is CHAPTER, and perform action 123;
|
|
||||||
\fB_find gi-parent TITLE CHAPTER 124\fP means to find elements whose GI is TITLE and whose parent is CHAPTER, and perform action 124;
|
|
||||||
\fB_find parent BODY 125\fP means to find elements whose parent's GI is BODY, and perform action 125;
|
|
||||||
\fB_find attr TYPE UGLY 125\fP means to find elements whose attribute named TYPE is set to UGLY, and perform action 126.
|
|
||||||
.IP "\fB_followlink\fP [\fIattname\fP] \fIspec-id\fP"
|
|
||||||
When processing an element, \fBinstant\fP will follow the IDREF attributes until an element with no IDREF attributes is found.
|
|
||||||
It will then apply the transpec specified by \fIspec-id\fP to that element.
|
|
||||||
If specified, it will follow the link pointed to by \fIattname\fP.
|
|
||||||
By default, \fBinstant\fP assumes the attributes named \fBLINKEND\fP and \fBLINKENDS\fP are if type IDREF or IDREFS.
|
|
||||||
You can change this by setting the variable \fBlink_atts\fP to a space-separated list of attribute names.
|
|
||||||
.IP "\fB_followrel\fP \fIrelationship\fP \fIgi\fP \fIspec-id\fP [\fIspec-id2\fP]"
|
|
||||||
If the \fIgi\fP has the specified \fIrelationship\fP to the current element,
|
|
||||||
perform the action specified by \fIspec-id\fP on the related element.
|
|
||||||
If the \fIrelationship\fP to \fIgi\fP does not exist,
|
|
||||||
and \fIspec-id2\fP is present, perform \fIspec-id2\fP on the current element.
|
|
||||||
See the discussion of the criteria field \fBRelation\fP for acceptable relationship names.
|
|
||||||
.IP "\fB_gi\fP [\fBM|L|U\fP]"
|
|
||||||
Print the name of the current GI to the output stream.
|
|
||||||
If specified, \fBM\fP, \fBL\fP, or \fBU\fP will ensure the GI name is printed in mixed, lower, or upper case, respectively.
|
|
||||||
.IP "\fB_id\fP \fIid\fP [\fIspec-id\fP]"
|
|
||||||
Find the element with \fIid\fP and use \fIspec-id\fP, if set. If not set, use the spec for that element's context.
|
|
||||||
.IP "\fB_include\fP \fIfilename\fP"
|
|
||||||
Insert the file \fIfilename\fP into the output stream.
|
|
||||||
.IP "\fB_infile\fP [\fBline\fP]"
|
|
||||||
Print the name of the sgml instance file to the output stream. If \fBline\fP is specified, also print the line number.
|
|
||||||
This depends on \fBsgmls\fP being called with the \fB-l\fP option.
|
|
||||||
.IP "\fB_insertnode\fP \fBS\fP|\fBE\fP \fIspec-id\fP"
|
|
||||||
Do \fIspec-id\fP when the current element is traversed at a later pass.
|
|
||||||
This can be considered inserting a node, without content, into the hierarchy.
|
|
||||||
This is only useful if done to elements \fIbefore\fP they are processed.
|
|
||||||
Typically \fB_chasetogi\fP or \fB_followlink\fP is specified early in an instance's processing,
|
|
||||||
so that when the elements found by one of these actions are processed in their turn, the added actions are performed.
|
|
||||||
\fB_insertnode\fP would be specified as the action of a \fIspec-id\fP pointed to in a \fB_chasetogi\fP or \fB_followlink\fP usage.
|
|
||||||
.IP "\fB_location\fP"
|
|
||||||
The location of the current element is printed to the output stream in several ways: the path to the element (see \fB_path\fP),
|
|
||||||
a position hint, which is the nearest title, the line number, if the ESIS (output from \fBsgmls\fP) contains line numbers,
|
|
||||||
and the ID of the element, if it has one.
|
|
||||||
This is especially useful when using the \fBMessage\fP action to validate an instance.
|
|
||||||
.IP "\fB_namelist\fP \fIspec-id\fP [\fIspec-id2\fP]"
|
|
||||||
This assumes that the content of the current element is a namelist (a list of element IDs),
|
|
||||||
and applies the action based on \fIspec-id\fP for each element pointed to.
|
|
||||||
If \fIspec-id2\fP is specified, it will use \fIspec-id\fP for the first ID in the namelist and \fIspec-id2\fP for the others.
|
|
||||||
.IP "\fB_nchild\fP [\fIgi\fP]"
|
|
||||||
Print the number of child elements of the element to the output stream.
|
|
||||||
If \fIgi\fP is specified, print the number of child element with that name.
|
|
||||||
.IP "\fB_osftable\fP \fBtex\fP|\fBtbl\fP|\fBcheck\fP [\fIflag\fP]"
|
|
||||||
Print table markup into the output stream. The format depends on whether \fBtex\fP or \fBtbl\fP is specified.
|
|
||||||
The \fIflag\fP may be one of \fBcellstart\fP, \fBcellend\fP, \fBrowstart\fP, \fBrowend\fP, \fBtop\fP, or \fBbottom\fP.
|
|
||||||
The value determines what markup or text will be generated.
|
|
||||||
If \fBcellstart\fP is specified, the correct markup for the beginning of a cell is output.
|
|
||||||
If \fBtop\fP, \fBbottom\fP, or \fBrowend\fP are specified,
|
|
||||||
the correct markup for the end of the appropriate position is printed to the output stream.
|
|
||||||
If \fBcheck\fP is specified, the attributes and child elements are checked for errors and consistency.
|
|
||||||
.IP "\fB_path\fP"
|
|
||||||
Print the path to current GI to the output stream. A path is each element, going down the tree from the topmost element.
|
|
||||||
A number in parentheses after each element name shows which child element the next one is in the order of children for that element.
|
|
||||||
Ordering starts at 0.
|
|
||||||
For example: \f(CWOSF-BOOK(3) BODY(0) CHAPTER(4) SECTION\fP.
|
|
||||||
This says the path is \fB<OSF-BOOK>\fP's third child, \fB<BODY>\fP's zeroth,
|
|
||||||
and \fB<CHAPTER>\fP's fourth, which is named \fB<SECTION>\fP.
|
|
||||||
.IP "\fB_pattr\fP \fIname\fP"
|
|
||||||
Print the value of parent's attribute whose name is \fIname\fP to the output stream.
|
|
||||||
.IP "\fB_pfind\fP \fIrel\fP \fIgi\fP \fIspec-id\fP"
|
|
||||||
This is exactly the same as \fB_find\fP except that the search starts at the current element's parent.
|
|
||||||
.IP "\fB_relation\fP \fIrelationship\fP \fIgi\fP \fIspec-id\fP [\fIspec-id2\fP]"
|
|
||||||
If the \fIgi\fP has the specified \fIrelationship\fP to the current element,
|
|
||||||
perform the action specified by \fIspec-id\fP on the current element.
|
|
||||||
If the relationship test fails and \fIspec-id2\fP is specified, perform that action.
|
|
||||||
See the discussion of the criteria field \fBRelation\fP for acceptable relationship names.
|
|
||||||
.IP "\fB_set\fP \fIvarname\fP \fIvalue\fP"
|
|
||||||
Set the value of the variable \fIvarname\fP to \fIvalue\fP.
|
|
||||||
.IP "\fB_isset\fP \fIvarname\fP [\fIvalue\fP] \fIspec-id\fP"
|
|
||||||
If the value of the variable \fIvarname\fP is set to \fIvalue\fP, then perform action referred to by \fIspec-id\fP.
|
|
||||||
If \fIvalue\fP is not specified, action will be performed if \fIvarname\fP is set to any value.
|
|
||||||
.IP "\fB_!\fP \fIcommand\fP"
|
|
||||||
Run the command \fIcommand\fP, directing its standard output into the output stream.
|
|
||||||
'br\" labeled list end
|
|
||||||
.SS "Immediate Variables"
|
|
||||||
.PP
|
|
||||||
\fIImmediate variables\fR are like special variables, except that they
|
|
||||||
are expanded when the transpec is originally processed (special
|
|
||||||
variables are processed later, near when the final output is being generated).
|
|
||||||
The general syntax of immediate variables is \fB${+\fIimmediate_variable\ ...\fB}\fR.
|
|
||||||
.PP
|
|
||||||
There is currently only one immediate variable defined:
|
|
||||||
.IP "\fB+content\fP"
|
|
||||||
This special variable is replaced by the data content of the current element.
|
|
||||||
.SH "Examples"
|
|
||||||
.PP
|
|
||||||
The following will output the given string for elements whose generic identifier is \fBP\fP (for paragraph).
|
|
||||||
At the start of processing this element, the program ensures that the output starts on a new line,
|
|
||||||
the \fBtroff\fP macro \fB<.P>\fP is output, then a newline.
|
|
||||||
At the end of this element processing, the program ensures that the output starts on a new line.
|
|
||||||
.DS
|
|
||||||
.nf
|
|
||||||
.ft CW
|
|
||||||
GI: P
|
|
||||||
StartText: ^.P^
|
|
||||||
EndText: ^
|
|
||||||
-
|
|
||||||
.ft R
|
|
||||||
.fi
|
|
||||||
.DE
|
|
||||||
.PP
|
|
||||||
The following will output the given string for elements whose generic identifier is \fBCMD-ARGUMENT\fP and which have an
|
|
||||||
attribute \fBPRESENCE\fP set to the value \fBOPTIONAL\fP.
|
|
||||||
.DS
|
|
||||||
.nf
|
|
||||||
.ft CW
|
|
||||||
GI: CMD-ARGUMENT
|
|
||||||
AttValue: PRESENCE OPTIONAL
|
|
||||||
StartText: $\e\e[
|
|
||||||
EndText: $\e\e]
|
|
||||||
-
|
|
||||||
.ft R
|
|
||||||
.fi
|
|
||||||
.DE
|
|
||||||
.PP
|
|
||||||
The following prints the section number, title, and page number of the target of a cross reference.
|
|
||||||
Assume the cross reference points to a section element, which contains a title element.
|
|
||||||
The criteria for this spec to match is that the attribute \fBOSFROLE\fP is set to the value \fBgetfull\fP.
|
|
||||||
The action is to replace the content of the \fB<XREF>\fP element with the given string.
|
|
||||||
When processing the string, \fBinstant\fP will follow the IDREF attributes of \fB<XREF>\fP
|
|
||||||
until an element with no IDREF attributes is found. It will then apply the transpec numbered \fB87\fP to that element,
|
|
||||||
which will print the name of the GI in mixed case into the output stream.
|
|
||||||
It will then print the LaTeX reference instruction with the value of the \fBLINKEND\fP attribute as an argument.
|
|
||||||
(This will become the section number after processing by LaTeX.)
|
|
||||||
It will then follow IDREFs until if finds an element whose GI is \fBTITLE\fP or which has a child element with that GI.
|
|
||||||
It will apply the transpec numbered \fB1\fP to that element, which copies the title into the output stream where the cross reference occurs.
|
|
||||||
Finally, it will print the word \fBpage\fP followed by the LaTeX instruction to obtain the page number of a reference.
|
|
||||||
.DS
|
|
||||||
.nf
|
|
||||||
.ft CW
|
|
||||||
GI: XREF
|
|
||||||
AttValue: OSFROLE getfull
|
|
||||||
Replace: ${_followlink 87} \e\eref{${LINKEND}},\es
|
|
||||||
{\e\ebf ${_chasetogi TITLE 1}}, page \e\epageref{${LINKEND}}
|
|
||||||
-
|
|
||||||
# Print GI name, in mixed case
|
|
||||||
GI: _pr_gi_name
|
|
||||||
SpecID: 87
|
|
||||||
Ignore: 1
|
|
||||||
EndText: ${_gi M}
|
|
||||||
-
|
|
||||||
GI: _pass-text
|
|
||||||
SpecID: 1
|
|
||||||
-
|
|
||||||
.ft R
|
|
||||||
.fi
|
|
||||||
.DE
|
|
||||||
.SH "Related Information"
|
|
||||||
.PP
|
|
||||||
\fBinstant\fP(1), \fBsgmls\fP(1), \fBegrep\fP(1).
|
|
@ -1,763 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
|
|
||||||
* All rights reserved.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994
|
|
||||||
* Open Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted to use, copy, modify and freely distribute
|
|
||||||
* the software in this file and its documentation for any purpose without
|
|
||||||
* fee, provided that the above copyright notice appears in all copies and
|
|
||||||
* that both the copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation. Further, provided that the name of Open
|
|
||||||
* Software Foundation, Inc. ("OSF") not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without prior
|
|
||||||
* written permission from OSF. OSF makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1996 X Consortium
|
|
||||||
* Copyright (c) 1995, 1996 Dalrymple Consulting
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
* Except as contained in this notice, the names of the X Consortium and
|
|
||||||
* Dalrymple Consulting shall not be used in advertising or otherwise to
|
|
||||||
* promote the sale, use or other dealings in this Software without prior
|
|
||||||
* written authorization.
|
|
||||||
*/
|
|
||||||
/* ________________________________________________________________________
|
|
||||||
*
|
|
||||||
* instant - a program to manipulate SGML instances.
|
|
||||||
*
|
|
||||||
* This module is for handling "special variables". These act a lot like
|
|
||||||
* procedure calls
|
|
||||||
* ________________________________________________________________________
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
static char *RCSid =
|
|
||||||
"$Header: /usr/src/docbook-to-man/Instant/RCS/tranvar.c,v 1.5 1996/06/11 22:43:15 fld Exp $";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <memory.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <regexp.h>
|
|
||||||
#include "general.h"
|
|
||||||
#include "translate.h"
|
|
||||||
|
|
||||||
static char **idrefs; /* list of IDREF att names to follow */
|
|
||||||
static char *def_idrefs[] = { "LINKEND", "LINKENDS", "IDREF", 0 };
|
|
||||||
static char *each_A = 0; /* last seen _eachatt */
|
|
||||||
static char *each_C = 0; /* last seen _eachcon */
|
|
||||||
|
|
||||||
/* forward references */
|
|
||||||
void ChaseIDRefs(Element_t *, char *, char *, FILE *);
|
|
||||||
void Find(Element_t *, int, char **, FILE *);
|
|
||||||
void GetIDREFnames();
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Handle "special" variable - read file, run command, do action, etc.
|
|
||||||
* Arguments:
|
|
||||||
* Name of special variable to expand.
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
* Flag saying whether to track the character position we're on
|
|
||||||
* (passed to OutputString).
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
ExpandSpecialVar(
|
|
||||||
char *name,
|
|
||||||
Element_t *e,
|
|
||||||
FILE *fp,
|
|
||||||
int track_pos
|
|
||||||
)
|
|
||||||
{
|
|
||||||
FILE *infile;
|
|
||||||
char buf[LINESIZE], *cp, *atval;
|
|
||||||
char **tok;
|
|
||||||
int ntok, n, i, actioni;
|
|
||||||
char *action, *action1;
|
|
||||||
Element_t *ep;
|
|
||||||
Trans_t *t, *tt;
|
|
||||||
|
|
||||||
/* Run a command.
|
|
||||||
* Format: _! command args ... */
|
|
||||||
if (*name == '!') {
|
|
||||||
name++;
|
|
||||||
if ((infile = popen(name, "r"))) {
|
|
||||||
while (fgets(buf, LINESIZE, infile)) fputs(buf, fp);
|
|
||||||
pclose(infile);
|
|
||||||
fflush(fp);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "Could not start program '%s': %s",
|
|
||||||
name, strerror(errno));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See if caller wants one of the tokens from _eachatt or _eachcon.
|
|
||||||
* If so, output it and return. (Yes, I admit that this is a hack.)
|
|
||||||
*/
|
|
||||||
if (*name == 'A' && name[1] == EOS && each_A) {
|
|
||||||
OutputString(each_A, fp, track_pos);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (*name == 'C' && name[1] == EOS && each_C) {
|
|
||||||
OutputString(each_C, fp, track_pos);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ntok = 0;
|
|
||||||
tok = Split(name, &ntok, 0);
|
|
||||||
|
|
||||||
/* Include another file.
|
|
||||||
* Format: _include filename */
|
|
||||||
if (StrEq(tok[0], "include")) {
|
|
||||||
name = tok[1];
|
|
||||||
if (ntok > 1 ) {
|
|
||||||
if ((infile=OpenFile(name)) == NULL) {
|
|
||||||
sprintf(buf, "Can not open included file '%s'", name);
|
|
||||||
perror(buf);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
while (fgets(buf, LINESIZE, infile)) fputs(buf, fp);
|
|
||||||
fclose(infile);
|
|
||||||
}
|
|
||||||
else fprintf(stderr, "No file name specified for include\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print location (nearest title, line no, path).
|
|
||||||
* Format: _location */
|
|
||||||
else if (StrEq(tok[0], "location")) {
|
|
||||||
PrintLocation(e, fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print path to this element.
|
|
||||||
* Format: _path */
|
|
||||||
else if (StrEq(tok[0], "path")) {
|
|
||||||
(void)FindElementPath(e, buf);
|
|
||||||
OutputString(buf, fp, track_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print name of this element (gi).
|
|
||||||
* Format: _gi [M|L|U] */
|
|
||||||
else if (StrEq(tok[0], "gi")) {
|
|
||||||
strcpy(buf, e->gi);
|
|
||||||
if (ntok >= 2) {
|
|
||||||
if (*tok[1] == 'L' || *tok[1] == 'l' ||
|
|
||||||
*tok[1] == 'M' || *tok[1] == 'm') {
|
|
||||||
for (cp=buf; *cp; cp++)
|
|
||||||
if (isupper(*cp)) *cp = tolower(*cp);
|
|
||||||
}
|
|
||||||
if (*tok[1] == 'M' || *tok[1] == 'm')
|
|
||||||
if (islower(buf[0])) buf[0] = toupper(buf[0]);
|
|
||||||
}
|
|
||||||
OutputString(buf, fp, track_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print filename of this element's associated external entity.
|
|
||||||
* Format: _filename */
|
|
||||||
else if (StrEq(tok[0], "filename")) {
|
|
||||||
if (!e->entity) {
|
|
||||||
fprintf(stderr, "Expected ext entity (internal error? bug?):\n");
|
|
||||||
PrintLocation(e, stderr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!e->entity->fname) {
|
|
||||||
fprintf(stderr, "Expected filename (internal error? bug?):\n");
|
|
||||||
PrintLocation(e, stderr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
OutputString(e->entity->fname, fp, track_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Value of parent's attribute, by attr name.
|
|
||||||
* Format: _pattr attname */
|
|
||||||
else if (StrEq(tok[0], "pattr")) {
|
|
||||||
ep = e->parent;
|
|
||||||
if (!ep) {
|
|
||||||
fprintf(stderr, "Element does not have a parent:\n");
|
|
||||||
PrintLocation(ep, stderr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((atval = FindAttValByName(ep, tok[1]))) {
|
|
||||||
OutputString(atval, fp, track_pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Use an action, given transpec's SID.
|
|
||||||
* Format: _action action */
|
|
||||||
else if (StrEq(tok[0], "action")) {
|
|
||||||
TranTByAction(e, tok[1], fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Number of child elements of this element.
|
|
||||||
* Format: _nchild */
|
|
||||||
else if (StrEq(tok[0], "nchild")) {
|
|
||||||
if (ntok > 1) {
|
|
||||||
for (n=0,i=0; i<e->necont; i++)
|
|
||||||
if (StrEq(e->econt[i]->gi, tok[1])) n++;
|
|
||||||
}
|
|
||||||
else n = e->necont;
|
|
||||||
sprintf(buf, "%d", n);
|
|
||||||
OutputString(buf, fp, track_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* number of 1st child's child elements (grandchildren from first child).
|
|
||||||
* Format: _n1gchild */
|
|
||||||
else if (StrEq(tok[0], "n1gchild")) {
|
|
||||||
if (e->necont) {
|
|
||||||
sprintf(buf, "%d", e->econt[0]->necont);
|
|
||||||
OutputString(buf, fp, track_pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Chase this element's pointers until we hit the named GI.
|
|
||||||
* Do the action if it matches.
|
|
||||||
* Format: _chasetogi gi action */
|
|
||||||
else if (StrEq(tok[0], "chasetogi")) {
|
|
||||||
if (ntok < 3) {
|
|
||||||
fprintf(stderr, "Error: Not enough args for _chasetogi.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
actioni = atoi(tok[2]);
|
|
||||||
if (actioni) ChaseIDRefs(e, tok[1], tok[2], fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Follow link to element pointed to, then do action.
|
|
||||||
* Format: _followlink [attname] action. */
|
|
||||||
else if (StrEq(tok[0], "followlink")) {
|
|
||||||
char **s;
|
|
||||||
if (ntok > 2) {
|
|
||||||
if ((atval = FindAttValByName(e, tok[1]))) {
|
|
||||||
if ((ep = FindElemByID(atval))) {
|
|
||||||
TranTByAction(ep, tok[2], fp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else fprintf(stderr, "Error: Did not find attr: %s.\n", tok[1]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
GetIDREFnames();
|
|
||||||
for (s=idrefs; *s; s++) {
|
|
||||||
/* is this IDREF attr set? */
|
|
||||||
if ((atval = FindAttValByName(e, *s))) {
|
|
||||||
ntok = 0;
|
|
||||||
tok = Split(atval, &ntok, S_STRDUP);
|
|
||||||
/* we'll follow the first one... */
|
|
||||||
if ((ep = FindElemByID(tok[0]))) {
|
|
||||||
TranTByAction(ep, tok[1], fp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else fprintf(stderr, "Error: Can not find elem for ID: %s.\n",
|
|
||||||
tok[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(stderr, "Error: Element does not have IDREF attribute set:\n");
|
|
||||||
PrintLocation(e, stderr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Starting at this element, decend tree (in-order), finding GI.
|
|
||||||
* Do the action if it matches.
|
|
||||||
* Format: _find args ... */
|
|
||||||
else if (StrEq(tok[0], "find")) {
|
|
||||||
Find(e, ntok, tok, fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Starting at this element's parent, decend tree (in-order), finding GI.
|
|
||||||
* Do the action if it matches.
|
|
||||||
* Format: _pfind args ... */
|
|
||||||
else if (StrEq(tok[0], "pfind")) {
|
|
||||||
Find(e->parent ? e->parent : e, ntok, tok, fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Content is supposed to be a list of IDREFs. Follow each, doing action.
|
|
||||||
* If 2 actions are specified, use 1st for the 1st ID, 2nd for the rest.
|
|
||||||
* Format: _namelist action [action2] */
|
|
||||||
else if (StrEq(tok[0], "namelist")) {
|
|
||||||
int id;
|
|
||||||
action1 = tok[1];
|
|
||||||
if (ntok > 2) action = tok[2];
|
|
||||||
else action = action1;
|
|
||||||
for (i=0; i<e->ndcont; i++) {
|
|
||||||
n = 0;
|
|
||||||
tok = Split(e->dcont[i], &n, S_STRDUP);
|
|
||||||
for (id=0; id<n; id++) {
|
|
||||||
if (fold_case)
|
|
||||||
for (cp=tok[id]; *cp; cp++)
|
|
||||||
if (islower(*cp)) *cp = toupper(*cp);
|
|
||||||
if ((e = FindElemByID(tok[id]))) {
|
|
||||||
if (id) TranTByAction(e, action, fp);
|
|
||||||
else TranTByAction(e, action1, fp); /* first one */
|
|
||||||
}
|
|
||||||
else fprintf(stderr, "Error: Can not find ID: %s.\n", tok[id]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For each word in the element's content, do action.
|
|
||||||
* Format: _eachcon action [action] */
|
|
||||||
else if (StrEq(tok[0], "eachcon")) {
|
|
||||||
int id;
|
|
||||||
action1 = tok[1];
|
|
||||||
if (ntok > 3) action = tok[2];
|
|
||||||
else action = action1;
|
|
||||||
for (i=0; i<e->ndcont; i++) {
|
|
||||||
n = 0;
|
|
||||||
tok = Split(e->dcont[i], &n, S_STRDUP|S_ALVEC);
|
|
||||||
for (id=0; id<n; id++) {
|
|
||||||
each_C = tok[id];
|
|
||||||
TranTByAction(e, action, fp);
|
|
||||||
}
|
|
||||||
free(*tok);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* For each word in the given attribute's value, do action.
|
|
||||||
* Format: _eachatt attname action [action] */
|
|
||||||
else if (StrEq(tok[0], "eachatt")) {
|
|
||||||
int id;
|
|
||||||
action1 = tok[2];
|
|
||||||
if (ntok > 3) action = tok[3];
|
|
||||||
else action = action1;
|
|
||||||
if ((atval = FindAttValByName(e, tok[1]))) {
|
|
||||||
n = 0;
|
|
||||||
tok = Split(atval, &n, S_STRDUP|S_ALVEC);
|
|
||||||
for (id=0; id<n; id++) {
|
|
||||||
each_A = tok[id];
|
|
||||||
if (id) TranTByAction(e, action, fp);
|
|
||||||
else TranTByAction(e, action1, fp); /* first one */
|
|
||||||
}
|
|
||||||
free(*tok);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do action on this element if element has [relationship] with gi.
|
|
||||||
* Format: _relation relationship gi action [action] */
|
|
||||||
else if (StrEq(tok[0], "relation")) {
|
|
||||||
if (ntok >= 4) {
|
|
||||||
if (!CheckRelation(e, tok[1], tok[2], tok[3], fp, RA_Current)) {
|
|
||||||
/* action not done, see if alt action specified */
|
|
||||||
if (ntok >= 5)
|
|
||||||
TranTByAction(e, tok[4], fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do action on followed element if element has [relationship] with gi.
|
|
||||||
* If [relationship] is not met, do alternate action on this element.
|
|
||||||
* Format: _followrel relationship gi action [action] */
|
|
||||||
else if (StrEq(tok[0], "followrel")) {
|
|
||||||
if (ntok >= 4) {
|
|
||||||
if (!CheckRelation(e, tok[1], tok[2], tok[3], fp, RA_Related)) {
|
|
||||||
/* action not done, see if an alt action specified */
|
|
||||||
if (ntok >= 5)
|
|
||||||
TranTByAction(e, tok[4], fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find element with matching ID and do action. If action not specified,
|
|
||||||
* choose the right one appropriate for its context.
|
|
||||||
* Format: _id id [action] */
|
|
||||||
else if (StrEq(tok[0], "id")) {
|
|
||||||
if ((ep = FindElemByID(tok[1]))) {
|
|
||||||
if (ntok > 2) TranTByAction(ep, tok[2], fp);
|
|
||||||
else {
|
|
||||||
t = FindTrans(ep, 0);
|
|
||||||
TransElement(ep, fp, t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set variable to value.
|
|
||||||
* Format: _set name value */
|
|
||||||
else if (StrEq(tok[0], "set")) {
|
|
||||||
SetMappingNV(Variables, tok[1], tok[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do action if variable is set, optionally to value.
|
|
||||||
* If not set, do nothing.
|
|
||||||
* Format: _isset varname [value] action */
|
|
||||||
else if (StrEq(tok[0], "isset")) {
|
|
||||||
if ((cp = FindMappingVal(Variables, tok[1]))) {
|
|
||||||
if (ntok == 3) TranTByAction(e, tok[2], fp);
|
|
||||||
else if (ntok > 3 && !strcmp(cp, tok[2]))
|
|
||||||
TranTByAction(e, tok[3], fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Insert a node into the tree at start/end, pointing to action to perform.
|
|
||||||
* Format: _insertnode S|E action */
|
|
||||||
else if (StrEq(tok[0], "insertnode")) {
|
|
||||||
actioni = atoi(tok[2]);
|
|
||||||
if (*tok[1] == 'S') e->gen_trans[0] = actioni;
|
|
||||||
else if (*tok[1] == 'E') e->gen_trans[1] = actioni;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do an CALS DTD table spec for TeX or troff. Looks through attributes
|
|
||||||
* and determines what to output. "check" means to check consistency,
|
|
||||||
* and print error messages.
|
|
||||||
* This is (hopefully) the only hard-coded part of instant.
|
|
||||||
*
|
|
||||||
* This was originally written for the OSF DTDs and recoded by FLD for
|
|
||||||
* CALS tables (since no one will ever use the OSF tables). Although
|
|
||||||
* TeX was addressed first, it seems that a fresh approach was required,
|
|
||||||
* and so, tbl is the first to be really *fixed*. Once tbl is stable,
|
|
||||||
* and there is a need for TeX again, that part will be recoded.
|
|
||||||
*
|
|
||||||
* *Obsolete* form (viz, for TeX):
|
|
||||||
* Format: _calstable [clear|check|tex]
|
|
||||||
* [cellstart|cellend|rowstart|rowend|top|bottom]
|
|
||||||
*
|
|
||||||
* New, good form:
|
|
||||||
*
|
|
||||||
* Format: _calstable [tbl]
|
|
||||||
* [tablestart|tableend|tablegroup|tablefoot|rowstart|
|
|
||||||
* rowend|entrystart|entryend]
|
|
||||||
*/
|
|
||||||
|
|
||||||
else if (StrEq(tok[0], "calstable")) {
|
|
||||||
CALStable(e, fp, tok, ntok);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do action if element's attr is set, optionally to value.
|
|
||||||
* If not set, do nothing.
|
|
||||||
* Format: _attval att [value] action */
|
|
||||||
else if (StrEq(tok[0], "attval")) {
|
|
||||||
if ((atval = FindAttValByName(e, tok[1]))) {
|
|
||||||
if (ntok == 3) TranTByAction(e, tok[2], fp);
|
|
||||||
else if (ntok > 3 && !strcmp(atval, tok[2]))
|
|
||||||
TranTByAction(e, tok[3], fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Same thing, but look at parent */
|
|
||||||
else if (StrEq(tok[0], "pattval")) {
|
|
||||||
if ((atval = FindAttValByName(e->parent, tok[1]))) {
|
|
||||||
if (ntok == 3) {
|
|
||||||
TranTByAction(e, tok[2], fp);
|
|
||||||
}
|
|
||||||
if (ntok > 3 && !strcmp(atval, tok[2]))
|
|
||||||
TranTByAction(e, tok[3], fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print each attribute and value for the current element, hopefully
|
|
||||||
* in a legal sgml form: <elem-name att1="value1" att2="value2:> .
|
|
||||||
* Format: _allatts */
|
|
||||||
else if (StrEq(tok[0], "allatts")) {
|
|
||||||
for (i=0; i<e->natts; i++) {
|
|
||||||
if (i != 0) putc(' ', fp);
|
|
||||||
fputs(e->atts[i].name, fp);
|
|
||||||
fputs("=\"", fp);
|
|
||||||
fputs(e->atts[i].sval, fp);
|
|
||||||
putc('"', fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print the element's input filename, and optionally, the line number.
|
|
||||||
* Format: _infile [line] */
|
|
||||||
else if (StrEq(tok[0], "infile")) {
|
|
||||||
if (e->infile) {
|
|
||||||
if (ntok > 1 && !strcmp(tok[1], "root")) {
|
|
||||||
strcpy(buf, e->infile);
|
|
||||||
if ((cp = strrchr(buf, '.'))) *cp = EOS;
|
|
||||||
fputs(buf, fp);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fputs(e->infile, fp);
|
|
||||||
if (ntok > 1 && !strcmp(tok[1], "line"))
|
|
||||||
fprintf(fp, " %d", e->lineno);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else fputs("input-file??", fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get value of an environement variable */
|
|
||||||
else if (StrEq(tok[0], "env")) {
|
|
||||||
if (ntok > 1 && (cp = getenv(tok[1]))) {
|
|
||||||
OutputString(cp, fp, track_pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the element is not empty do specid.
|
|
||||||
* Format: _notempty spec-id */
|
|
||||||
else if (StrEq(tok[0], "notempty")) {
|
|
||||||
if (ntok > 1 && e->ncont) {
|
|
||||||
TranTByAction(e, tok[1], fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Something unknown */
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "Unknown special variable: %s\n", tok[0]);
|
|
||||||
tt = e->trans;
|
|
||||||
if (tt && tt->lineno)
|
|
||||||
fprintf(stderr, "Used in transpec, line %d\n", tt->lineno);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* return the value for the special variables _A (last processed _eachatt)
|
|
||||||
* and _C (last processed _eachcon)
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
|
||||||
Get_A_C_value(const char * name)
|
|
||||||
{
|
|
||||||
if ( !strcmp(name, "each_A") ) {
|
|
||||||
if ( each_A ) {
|
|
||||||
return each_A;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Requested value for unset _A variable\n");
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if ( !strcmp(name, "each_C") ) {
|
|
||||||
if ( each_C ) {
|
|
||||||
return each_C;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Requested value for unset _C variable\n");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Requested value for unknown special variable '%s'\n",
|
|
||||||
name);
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Chase IDs until we find an element whose GI matches. We also check
|
|
||||||
* child element names, not just the names of elements directly pointed
|
|
||||||
* at (by IDREF attributes).
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
GetIDREFnames()
|
|
||||||
{
|
|
||||||
char *cp;
|
|
||||||
|
|
||||||
if (!idrefs) {
|
|
||||||
/* did user or transpec set the variable */
|
|
||||||
if ((cp = FindMappingVal(Variables, "link_atts")))
|
|
||||||
idrefs = Split(cp, 0, S_STRDUP|S_ALVEC);
|
|
||||||
else
|
|
||||||
idrefs = def_idrefs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Chase ID references - follow IDREF(s) attributes until we find
|
|
||||||
* a GI named 'gi', then perform given action on that GI.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* Name of GI we're looking for.
|
|
||||||
* Spec ID of action to take.
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
ChaseIDRefs(
|
|
||||||
Element_t *e,
|
|
||||||
char *gi,
|
|
||||||
char * action,
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int ntok, i, ei;
|
|
||||||
char **tok, **s, *atval;
|
|
||||||
|
|
||||||
/* First, see if we got what we came for with this element */
|
|
||||||
if (StrEq(e->gi, gi)) {
|
|
||||||
TranTByAction(e, action, fp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
GetIDREFnames();
|
|
||||||
|
|
||||||
/* loop for each attribute of type IDREF(s) */
|
|
||||||
for (s=idrefs; *s; s++) {
|
|
||||||
/* is this IDREF attr set? */
|
|
||||||
if ((atval = FindAttValByName(e, *s))) {
|
|
||||||
ntok = 0;
|
|
||||||
tok = Split(atval, &ntok, 0);
|
|
||||||
for (i=0; i<ntok; i++) {
|
|
||||||
/* get element pointed to */
|
|
||||||
if ((e = FindElemByID(tok[i]))) {
|
|
||||||
/* OK, we found a matching GI name */
|
|
||||||
if (StrEq(e->gi, gi)) {
|
|
||||||
/* process using named action */
|
|
||||||
TranTByAction(e, action, fp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* this elem itself did not match, try its children */
|
|
||||||
for (ei=0; ei<e->necont; ei++) {
|
|
||||||
if (StrEq(e->econt[ei]->gi, gi)) {
|
|
||||||
TranTByAction(e->econt[ei], action, fp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* try this elem's IDREF attributes */
|
|
||||||
ChaseIDRefs(e, gi, action, fp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* should not happen, since parser checks ID/IDREFs */
|
|
||||||
fprintf(stderr, "Error: Could not find ID %s\n", atval);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* if the pointers didn't lead to the GI, give error */
|
|
||||||
if (!s)
|
|
||||||
fprintf(stderr, "Error: Could not find '%s'\n", gi);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
||||||
/* state to pass to recursive routines - so we don't have to use
|
|
||||||
* global variables. */
|
|
||||||
typedef struct {
|
|
||||||
char *gi;
|
|
||||||
char *gi2;
|
|
||||||
char action[10];
|
|
||||||
Element_t *elem;
|
|
||||||
FILE *fp;
|
|
||||||
} Descent_t;
|
|
||||||
|
|
||||||
static void
|
|
||||||
tr_find_gi(
|
|
||||||
Element_t *e,
|
|
||||||
Descent_t *ds
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (StrEq(ds->gi, e->gi))
|
|
||||||
if (ds->action[0]) TranTByAction(e, ds->action, ds->fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
tr_find_gipar(
|
|
||||||
Element_t *e,
|
|
||||||
Descent_t *ds
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (StrEq(ds->gi, e->gi) && e->parent &&
|
|
||||||
StrEq(ds->gi2, e->parent->gi))
|
|
||||||
if (ds->action[0]) TranTByAction(e, ds->action, ds->fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
tr_find_attr(
|
|
||||||
Element_t *e,
|
|
||||||
Descent_t *ds
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *atval;
|
|
||||||
if ((atval = FindAttValByName(e, ds->gi)) && StrEq(ds->gi2, atval))
|
|
||||||
TranTByAction(e, ds->action, ds->fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
tr_find_parent(
|
|
||||||
Element_t *e,
|
|
||||||
Descent_t *ds
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (QRelation(e, ds->gi, REL_Parent)) {
|
|
||||||
if (ds->action[0]) TranTByAction(e, ds->action, ds->fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
/* Descend tree, finding elements that match criteria, then perform
|
|
||||||
* given action.
|
|
||||||
* Arguments:
|
|
||||||
* Pointer to element under consideration.
|
|
||||||
* Number of tokens in special variable.
|
|
||||||
* Vector of tokens in special variable (eg, "find" "gi" "TITLE")
|
|
||||||
* FILE pointer to where to write output.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
Find(
|
|
||||||
Element_t *e,
|
|
||||||
int ac,
|
|
||||||
char **av,
|
|
||||||
FILE *fp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Descent_t DS; /* state passed to recursive routine */
|
|
||||||
|
|
||||||
memset(&DS, 0, sizeof(Descent_t));
|
|
||||||
DS.elem = e;
|
|
||||||
DS.fp = fp;
|
|
||||||
|
|
||||||
/* see if we should start at the top of instance tree */
|
|
||||||
if (StrEq(av[1], "top")) {
|
|
||||||
av++;
|
|
||||||
ac--;
|
|
||||||
e = DocTree;
|
|
||||||
}
|
|
||||||
if (ac < 4) {
|
|
||||||
fprintf(stderr, "Bad '_find' specification - missing args.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* Find elem whose GI is av[2] */
|
|
||||||
if (StrEq(av[1], "gi")) {
|
|
||||||
DS.gi = av[2];
|
|
||||||
strcpy(DS.action, av[3]);
|
|
||||||
DescendTree(e, tr_find_gi, 0, 0, &DS);
|
|
||||||
}
|
|
||||||
/* Find elem whose GI is av[2] and whose parent GI is av[3] */
|
|
||||||
else if (StrEq(av[1], "gi-parent")) {
|
|
||||||
DS.gi = av[2];
|
|
||||||
DS.gi2 = av[3];
|
|
||||||
strcpy(DS.action, av[4]);
|
|
||||||
DescendTree(e, tr_find_gipar, 0, 0, &DS);
|
|
||||||
}
|
|
||||||
/* Find elem whose parent GI is av[2] */
|
|
||||||
else if (StrEq(av[0], "parent")) {
|
|
||||||
DS.gi = av[2];
|
|
||||||
strcpy(DS.action, av[3]);
|
|
||||||
DescendTree(e, tr_find_parent, 0, 0, &DS);
|
|
||||||
}
|
|
||||||
/* Find elem whose attribute av[2] has value av[3] */
|
|
||||||
else if (StrEq(av[0], "attr")) {
|
|
||||||
DS.gi = av[2];
|
|
||||||
DS.gi2 = av[3];
|
|
||||||
strcpy(DS.action, av[4]);
|
|
||||||
DescendTree(e, tr_find_attr, 0, 0, &DS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ______________________________________________________________________ */
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# Bmakefile for libsgmls
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
LIB= sgmls
|
|
||||||
SRCS= sgmls.c
|
|
||||||
|
|
||||||
CFLAGS+= -I${.CURDIR}/../sgmls
|
|
||||||
|
|
||||||
NOMAN= noman
|
|
||||||
NOPROFILE= noprofile
|
|
||||||
|
|
||||||
install:
|
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,127 +0,0 @@
|
|||||||
/* sgmls.h
|
|
||||||
Interface to a library for reading output of sgmls. */
|
|
||||||
|
|
||||||
struct sgmls_data {
|
|
||||||
char *s;
|
|
||||||
unsigned len;
|
|
||||||
char is_sdata;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmls_notation {
|
|
||||||
char *name;
|
|
||||||
char *sysid;
|
|
||||||
char *pubid;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmls_internal_entity {
|
|
||||||
char *name;
|
|
||||||
struct sgmls_data data;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum sgmls_external_entity_type {
|
|
||||||
SGMLS_ENTITY_CDATA,
|
|
||||||
SGMLS_ENTITY_SDATA,
|
|
||||||
SGMLS_ENTITY_NDATA,
|
|
||||||
SGMLS_ENTITY_SUBDOC
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmls_external_entity {
|
|
||||||
char *name;
|
|
||||||
enum sgmls_external_entity_type type;
|
|
||||||
char **filenames;
|
|
||||||
int nfilenames;
|
|
||||||
char *pubid;
|
|
||||||
char *sysid;
|
|
||||||
struct sgmls_attribute *attributes;
|
|
||||||
struct sgmls_notation *notation;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmls_entity {
|
|
||||||
union {
|
|
||||||
struct sgmls_internal_entity internal;
|
|
||||||
struct sgmls_external_entity external;
|
|
||||||
} u;
|
|
||||||
char is_internal;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum sgmls_attribute_type {
|
|
||||||
SGMLS_ATTR_IMPLIED,
|
|
||||||
SGMLS_ATTR_CDATA,
|
|
||||||
SGMLS_ATTR_TOKEN,
|
|
||||||
SGMLS_ATTR_ENTITY,
|
|
||||||
SGMLS_ATTR_NOTATION
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmls_attribute {
|
|
||||||
struct sgmls_attribute *next;
|
|
||||||
char *name;
|
|
||||||
enum sgmls_attribute_type type;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
struct sgmls_data *v;
|
|
||||||
int n;
|
|
||||||
} data;
|
|
||||||
struct {
|
|
||||||
struct sgmls_entity **v;
|
|
||||||
int n;
|
|
||||||
} entity;
|
|
||||||
struct {
|
|
||||||
char **v;
|
|
||||||
int n;
|
|
||||||
} token;
|
|
||||||
struct sgmls_notation *notation;
|
|
||||||
} value;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum sgmls_event_type {
|
|
||||||
SGMLS_EVENT_DATA, /* data */
|
|
||||||
SGMLS_EVENT_ENTITY, /* external entity reference */
|
|
||||||
SGMLS_EVENT_PI, /* processing instruction */
|
|
||||||
SGMLS_EVENT_START, /* element start */
|
|
||||||
SGMLS_EVENT_END, /* element end */
|
|
||||||
SGMLS_EVENT_SUBSTART, /* subdocument start */
|
|
||||||
SGMLS_EVENT_SUBEND, /* subdocument end */
|
|
||||||
SGMLS_EVENT_APPINFO, /* appinfo */
|
|
||||||
SGMLS_EVENT_CONFORMING /* the document was conforming */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmls_event {
|
|
||||||
enum sgmls_event_type type;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
struct sgmls_data *v;
|
|
||||||
int n;
|
|
||||||
} data;
|
|
||||||
struct sgmls_external_entity *entity;
|
|
||||||
struct {
|
|
||||||
char *s;
|
|
||||||
unsigned len;
|
|
||||||
} pi;
|
|
||||||
struct {
|
|
||||||
char *gi;
|
|
||||||
struct sgmls_attribute *attributes;
|
|
||||||
} start;
|
|
||||||
struct {
|
|
||||||
char *gi;
|
|
||||||
} end;
|
|
||||||
char *appinfo;
|
|
||||||
} u;
|
|
||||||
char *filename; /* SGML filename */
|
|
||||||
unsigned long lineno; /* SGML lineno */
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
void sgmls_free_attributes(struct sgmls_attribute *);
|
|
||||||
struct sgmls *sgmls_create(FILE *);
|
|
||||||
int sgmls_next(struct sgmls *, struct sgmls_event *);
|
|
||||||
void sgmls_free(struct sgmls *);
|
|
||||||
typedef void sgmls_errhandler(int, char *, unsigned long);
|
|
||||||
sgmls_errhandler *sgmls_set_errhandler(sgmls_errhandler *);
|
|
||||||
#else /* not __STDC__ */
|
|
||||||
void sgmls_free_attributes();
|
|
||||||
struct sgmls *sgmls_create();
|
|
||||||
int sgmls_next();
|
|
||||||
void sgmls_free();
|
|
||||||
typedef void sgmls_errhandler();
|
|
||||||
sgmls_errhandler *sgmls_set_errhandler();
|
|
||||||
#endif /* not __STDC__ */
|
|
@ -1,247 +0,0 @@
|
|||||||
#! /usr/bin/perl
|
|
||||||
|
|
||||||
# This is a skeleton of a perl script for processing the output of
|
|
||||||
# sgmls. You must change the parts marked with "XXX".
|
|
||||||
|
|
||||||
# XXX This is for troff: in data, turn \ into \e (which prints as \).
|
|
||||||
# Backslashes in SDATA entities are left as backslashes.
|
|
||||||
|
|
||||||
$backslash_in_data = "\\e";
|
|
||||||
|
|
||||||
$prog = $0;
|
|
||||||
|
|
||||||
$prog =~ s|.*/||;
|
|
||||||
|
|
||||||
$level = 0;
|
|
||||||
|
|
||||||
while (<STDIN>) {
|
|
||||||
chop;
|
|
||||||
$command = substr($_, 0, 1);
|
|
||||||
substr($_, 0, 1) = "";
|
|
||||||
if ($command eq '(') {
|
|
||||||
&start_element($_);
|
|
||||||
$level++;
|
|
||||||
}
|
|
||||||
elsif ($command eq ')') {
|
|
||||||
$level--;
|
|
||||||
&end_element($_);
|
|
||||||
foreach $key (keys %attribute_value) {
|
|
||||||
@splitkey = split($;, $key);
|
|
||||||
if ($splitkey[0] == $level) {
|
|
||||||
delete $attribute_value{$key};
|
|
||||||
delete $attribute_type{$key};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($command eq '-') {
|
|
||||||
&unescape_data($_);
|
|
||||||
&data($_);
|
|
||||||
}
|
|
||||||
elsif ($command eq 'A') {
|
|
||||||
@field = split(/ /, $_, 3);
|
|
||||||
$attribute_type{$level,$field[0]} = $field[1];
|
|
||||||
&unescape_data($field[2]);
|
|
||||||
$attribute_value{$level,$field[0]} = $field[2];
|
|
||||||
}
|
|
||||||
elsif ($command eq '&') {
|
|
||||||
&entity($_);
|
|
||||||
}
|
|
||||||
elsif ($command eq 'D') {
|
|
||||||
@field = split(/ /, $_, 4);
|
|
||||||
$data_attribute_type{$field[0], $field[1]} = $field[2];
|
|
||||||
&unescape_data($field[3]);
|
|
||||||
$data_attribute_value{$field[0], $field[1]} = $field[3];
|
|
||||||
}
|
|
||||||
elsif ($command eq 'N') {
|
|
||||||
$notation{$_} = 1;
|
|
||||||
if (defined($sysid)) {
|
|
||||||
$notation_sysid{$_} = $sysid;
|
|
||||||
undef($sysid);
|
|
||||||
}
|
|
||||||
if (defined($pubid)) {
|
|
||||||
$notation_pubid{$_} = $pubid;
|
|
||||||
undef($pubid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($command eq 'I') {
|
|
||||||
@field = split(/ /, $_, 3);
|
|
||||||
$entity_type{$field[0]} = $field[1];
|
|
||||||
&unescape($field[2]);
|
|
||||||
# You may want to substitute \e for \ if the type is CDATA.
|
|
||||||
$entity_text{$field[0]} = $field[2];
|
|
||||||
$entity_code{$field[0]} = 'I';
|
|
||||||
}
|
|
||||||
elsif ($command eq 'E') {
|
|
||||||
@field = split(/ /, $_);
|
|
||||||
$entity_code{$field[0]} = 'E';
|
|
||||||
$entity_type{$field[0]} = $field[1];
|
|
||||||
$entity_notation{$field[0]} = $field[2];
|
|
||||||
if (defined(@files)) {
|
|
||||||
foreach $i (0..$#files) {
|
|
||||||
$entity_filename{$field[0], $i} = $files[i];
|
|
||||||
}
|
|
||||||
undef(@files);
|
|
||||||
}
|
|
||||||
if (defined($sysid)) {
|
|
||||||
$entity_sysid{$field[0]} = $sysid;
|
|
||||||
undef($sysid);
|
|
||||||
}
|
|
||||||
if (defined($pubid)) {
|
|
||||||
$entity_pubid{$field[0]} = $pubid;
|
|
||||||
undef($pubid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($command eq 'S') {
|
|
||||||
$entity_code{$_} = 'S';
|
|
||||||
if (defined(@files)) {
|
|
||||||
foreach $i (0..$#files) {
|
|
||||||
$entity_filename{$_, $i} = $files[i];
|
|
||||||
}
|
|
||||||
undef(@files);
|
|
||||||
}
|
|
||||||
if (defined($sysid)) {
|
|
||||||
$entity_sysid{$_} = $sysid;
|
|
||||||
undef($sysid);
|
|
||||||
}
|
|
||||||
if (defined($pubid)) {
|
|
||||||
$entity_pubid{$_} = $pubid;
|
|
||||||
undef($pubid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($command eq '?') {
|
|
||||||
&unescape($_);
|
|
||||||
&pi($_);
|
|
||||||
}
|
|
||||||
elsif ($command eq 'L') {
|
|
||||||
@field = split(/ /, $_);
|
|
||||||
$lineno = $field[0];
|
|
||||||
if ($#field >= 1) {
|
|
||||||
&unescape($field[1]);
|
|
||||||
$filename = $field[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($command eq 'V') {
|
|
||||||
@field = split(/ /, $_, 2);
|
|
||||||
&unescape($field[1]);
|
|
||||||
$environment{$field[0]} = $field[1];
|
|
||||||
}
|
|
||||||
elsif ($command eq '{') {
|
|
||||||
&start_subdoc($_);
|
|
||||||
}
|
|
||||||
elsif ($command eq '}') {
|
|
||||||
&end_subdoc($_);
|
|
||||||
}
|
|
||||||
elsif ($command eq 'f') {
|
|
||||||
&unescape($_);
|
|
||||||
push(@files, $_);
|
|
||||||
}
|
|
||||||
elsif ($command eq 'p') {
|
|
||||||
&unescape($_);
|
|
||||||
$pubid = $_;
|
|
||||||
}
|
|
||||||
elsif ($command eq 's') {
|
|
||||||
&unescape($_);
|
|
||||||
$sysid = $_;
|
|
||||||
}
|
|
||||||
elsif ($command eq 'C') {
|
|
||||||
$conforming = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
warn "$prog:$ARGV:$.: unrecognized command \`$command'\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub unescape {
|
|
||||||
$_[0] =~ s/\\([0-7][0-7]?[0-7]?|.)/&esc($1)/eg;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub esc {
|
|
||||||
local($_) = $_[0];
|
|
||||||
if ($_ eq '012' || $_ eq '12') {
|
|
||||||
""; # ignore RS
|
|
||||||
}
|
|
||||||
elsif (/^[0-7]/) {
|
|
||||||
sprintf("%c", oct);
|
|
||||||
}
|
|
||||||
elsif ($_ eq 'n') {
|
|
||||||
"\n";
|
|
||||||
}
|
|
||||||
elsif ($_ eq '|') {
|
|
||||||
"";
|
|
||||||
}
|
|
||||||
elsif ($_ eq "\\") {
|
|
||||||
"\\";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub unescape_data {
|
|
||||||
local($sdata) = 0;
|
|
||||||
$_[0] =~ s/\\([0-7][0-7]?[0-7]?|.)/&esc_data($1)/eg;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub esc_data {
|
|
||||||
local($_) = $_[0];
|
|
||||||
if ($_ eq '012' || $_ eq '12') {
|
|
||||||
""; # ignore RS
|
|
||||||
}
|
|
||||||
elsif (/^[0-7]/) {
|
|
||||||
sprintf("%c", oct);
|
|
||||||
}
|
|
||||||
elsif ($_ eq 'n') {
|
|
||||||
"\n";
|
|
||||||
}
|
|
||||||
elsif ($_ eq '|') {
|
|
||||||
$sdata = !$sdata;
|
|
||||||
"";
|
|
||||||
}
|
|
||||||
elsif ($_ eq "\\") {
|
|
||||||
$sdata ? "\\" : $backslash_in_data;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sub start_element {
|
|
||||||
local($gi) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
||||||
sub end_element {
|
|
||||||
local($gi) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
||||||
sub data {
|
|
||||||
local($data) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
||||||
# A processing instruction.
|
|
||||||
|
|
||||||
sub pi {
|
|
||||||
local($data) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
||||||
# A reference to an external entity.
|
|
||||||
|
|
||||||
sub entity {
|
|
||||||
local($name) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
||||||
sub start_subdoc {
|
|
||||||
local($name) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
||||||
sub end_subdoc {
|
|
||||||
local($name) = $_[0];
|
|
||||||
# XXX
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
#
|
|
||||||
# Bmakefile for sgmls
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
PROG= sgmls
|
|
||||||
|
|
||||||
SRCS= lexrf.c pcbrf.c synrf.c context.c md1.c md2.c pars1.c pars2.c serv.c
|
|
||||||
SRCS+= sgml1.c sgml2.c sgmlmsg.c sgmlxtrn.c traceset.c entgen.c sgmlio.c
|
|
||||||
SRCS+= xfprintf.c main.c unixproc.c sgmldecl.c version.c strerror.c getopt.c
|
|
||||||
SRCS+= lineout.c ambig.c lextaba.c catalog.c
|
|
||||||
|
|
||||||
CFLAGS+= -I${.CURDIR}/../libsgmls
|
|
||||||
|
|
||||||
.include "../Makefile.inc"
|
|
||||||
.include <bsd.prog.mk>
|
|
||||||
|
|
||||||
|
|
@ -1,180 +0,0 @@
|
|||||||
/* ACTION.H: Symbols for all PCB action codes. */
|
|
||||||
/* CONACT.H: Symbols for content parse action names (end with '_').
|
|
||||||
There must be no conflict with PARSEACT.H, which
|
|
||||||
uses 0 through 19, or SGMLACT.H, which uses 20 through 32
|
|
||||||
(except that 31 - 32 can be defined here because they are
|
|
||||||
used only by PARSEPRO and do not conflict with SGML.C).
|
|
||||||
*/
|
|
||||||
#define CIR_ 31 /* Invalid character(s) ignored in MDS; restarting parse. */
|
|
||||||
#define DTD_ 32 /* Process DOCTYPE declaration. */
|
|
||||||
#define DTE_ 33 /* End of DOCTYPE declaration. */
|
|
||||||
#define PEP_ 34 /* TEMP: Previous character ended prolog. */
|
|
||||||
#define DAS_ 35 /* Current character begins data. */
|
|
||||||
#define FCE_ 36 /* Process free character (SR12-18, 21-30). */
|
|
||||||
#define DCE_ 37 /* Data character in element text; change PCB. */
|
|
||||||
#define LAS_ 38 /* Start lookahead buffer with current character. */
|
|
||||||
#define LAM_ 39 /* Move character to lookahead buffer. */
|
|
||||||
#define LAF_ 40 /* Flush the lookahead buffer; REPEATCC. */
|
|
||||||
#define NED_ 41 /* Process null end-tag delimiter. */
|
|
||||||
#define NET_ 42 /* Process null end-tag. */
|
|
||||||
#define NST_ 43 /* Process null start-tag. */
|
|
||||||
#define NLF_ 44 /* Flush lookahead buffer except for trailing NET or SR. */
|
|
||||||
#define ETC_ 45 /* End-tag in CDATA or RCDATA; treat as data if invalid. */
|
|
||||||
#define SRMIN 46 /* Dummy for SHORT REFERENCES: srn = SRn - SRMIN. */
|
|
||||||
#define SR1_ 47 /* TAB */
|
|
||||||
#define SR2_ 48 /* RE */
|
|
||||||
#define SR3_ 49 /* RS */
|
|
||||||
#define SR4_ 50 /* Leading blanks */
|
|
||||||
#define SR5_ 51 /* Null record */
|
|
||||||
#define DAR_ 52 /* Flush data buffer after repeating current character. */
|
|
||||||
#define SR7_ 53 /* Trailing blanks */
|
|
||||||
#define SR8_ 54 /* Space */
|
|
||||||
#define SR9_ 55 /* Two or more blanks */
|
|
||||||
#define SR10 56 /* Quotation mark (first data character) */
|
|
||||||
#define SR11 57 /* Number sign */
|
|
||||||
#define SR12 58 /* FCE CHARACTERS start here */
|
|
||||||
/* _ 59 */
|
|
||||||
#define BSQ_ 60 /* Blank sequence begun; find its end. */
|
|
||||||
/* 61 In use by PARSEACT.H */
|
|
||||||
/* 62 In use by PARSEACT.H */
|
|
||||||
/* 63 In use by PARSEACT.H */
|
|
||||||
/* 64 In use by PARSEACT.H */
|
|
||||||
#define SR19 65 /* Hyphen */
|
|
||||||
#define SR20 66 /* Two hyphens */
|
|
||||||
#define SR25 71 /* Left bracket */
|
|
||||||
#define SR26 72 /* Right bracket */
|
|
||||||
#define RBR_ 73 /* Two right brackets. */
|
|
||||||
#define GTR_ 74 /* EOB with pending data character */
|
|
||||||
#define MSP_ 75 /* Marked section start in prolog outside DTD */
|
|
||||||
#define APP_ 76 /* APPINFO (other than NONE) */
|
|
||||||
#define STE_ 77 /* Start tag ended prolog */
|
|
||||||
#define ETE_ 78 /* End tag ended prolog */
|
|
||||||
|
|
||||||
/* GRPACT.H: Symbols for group tokenization action names (all alpha).
|
|
||||||
There must be no conflict with PARSEACT.H, which
|
|
||||||
uses 0 - 19.
|
|
||||||
*/
|
|
||||||
#define AND 20 /* AND connector found. */
|
|
||||||
#define DTAG 21 /* Data tag token group occurred (treat as #CHARS). */
|
|
||||||
#define GRPE 22 /* Group ended. */
|
|
||||||
#define GRP_ 23 /* Group started. */
|
|
||||||
#define NAS_ 24 /* Name started in content model or name group. */
|
|
||||||
#define NMT_ 25 /* Name or name token started in name token group. */
|
|
||||||
#define OPT 26 /* OPT occurrence indicator for previous token. */
|
|
||||||
#define OR 27 /* OR connector found. */
|
|
||||||
#define OREP 28 /* OREP occurrence indicator for previous token. */
|
|
||||||
#define REP 29 /* REP occurrence indicator for previous token. */
|
|
||||||
#define RNS_ 30 /* Reserved name started (#PCDATA). */
|
|
||||||
#define SEQ 31 /* SEQ connector found. */
|
|
||||||
/* LITACT.H: Symbols for content parse action names (end with '_').
|
|
||||||
There must be no conflict with PARSEACT.H, which
|
|
||||||
uses 0 through 19.
|
|
||||||
*/
|
|
||||||
#define MLA_ 20 /* Move character to look-aside data buffer. */
|
|
||||||
#define LPR_ 21 /* Move previous character to data buffer. */
|
|
||||||
#define RSM_ 22 /* Process record start and move it to data buffer. */
|
|
||||||
#define FUN_ 23 /* Replace function character with a space. */
|
|
||||||
#define LP2_ 24 /* Move previous two characters to data buffer. */
|
|
||||||
#define MLE_ 25 /* Minimum literal error: invalid character ignored. */
|
|
||||||
#define RPR_ 26 /* Remove previous character from data buffer; terminate. */
|
|
||||||
#define TER_ 27 /* Terminate the parse. */
|
|
||||||
/* MDACT.H: Symbols for markup declaration parse action names (all alpha).
|
|
||||||
There must be no conflict with PARSEACT.H, which
|
|
||||||
uses 0 - 19.
|
|
||||||
*/
|
|
||||||
#define CDR 20 /* CD[1] (MINUS) occurred previously. */
|
|
||||||
#define EMD 21 /* End of markup declaration. */
|
|
||||||
#define GRPS 22 /* Group started. */
|
|
||||||
#define LIT 23 /* Literal started: character data. */
|
|
||||||
#define LITE 24 /* Literal started: character data; LITA is delimiter. */
|
|
||||||
#define MGRP 25 /* Minus exception group (MINUS,GRPO). */
|
|
||||||
#define NAS 26 /* Name started. */
|
|
||||||
#define NMT 27 /* Name token started. */
|
|
||||||
#define NUM 28 /* Number or number token started. */
|
|
||||||
#define PEN 29 /* Parameter entity name being defined (PERO found). */
|
|
||||||
#define PGRP 30 /* Plus exception group (PLUS,GRPO). */
|
|
||||||
#define RNS 31 /* Reserved name started. */
|
|
||||||
#define MDS 32 /* Markup declaration subset start. */
|
|
||||||
#define PENR 33 /* REPEATCC; PERO found. */
|
|
||||||
/* PARSEACT.H: Symbols for common parse action names (end with '_').
|
|
||||||
There must be no conflict with other action name
|
|
||||||
files, which use numbers greater than 19.
|
|
||||||
*/
|
|
||||||
#define CRA_ 1 /* Character reference: alphabetic. */
|
|
||||||
#define CRN_ 2 /* Character reference: numeric; non-char refs o.k.. */
|
|
||||||
#define NON_ 3 /* Single byte of non-character data found. */
|
|
||||||
#define EOF_ 4 /* Error: illegal entity end; resume old input; return. */
|
|
||||||
#define ER_ 5 /* Entity reference; start new input source; continue. */
|
|
||||||
#define GET_ 6 /* EOB, EOS, or EE: resume old input source; continue. */
|
|
||||||
#define INV_ 7 /* Error: invalid char terminated markup; repeat char. */
|
|
||||||
#define LEN_ 8 /* Error: length limit exceeded; end markup; repeat char. */
|
|
||||||
#define NOP_ 9 /* No action necessary. */
|
|
||||||
#define PCI_ 10 /* Previous character was invalid. */
|
|
||||||
#define PER_ 11 /* Parameter reference; start new input source; continue. */
|
|
||||||
#define RC2_ 12 /* Back up two characters. */
|
|
||||||
#define RCC_ 13 /* Repeat current character. */
|
|
||||||
#define RCR_ 14 /* Repeat current character and return to caller. */
|
|
||||||
#define EE_ 15 /* EOS or EE: resume old input source; return to caller. */
|
|
||||||
#define RS_ 16 /* Record start: ccnt=0; ++rcnt. */
|
|
||||||
#define ERX_ 17 /* Entity reference; start new input source; return. */
|
|
||||||
#define SYS_ 18 /* Error allowed: SYSCHAR in input stream; replace it. */
|
|
||||||
#define EOD_ 19 /* End of document. */
|
|
||||||
/* Number way out of order to avoid recompilation. */
|
|
||||||
#define NSC_ 58 /* Handle DELNONCH/DELXNONCH when NON_ is allowed */
|
|
||||||
#define PEX_ 61 /* Parameter entity ref; start new input source; return. */
|
|
||||||
#define DEF_ 62 /* Data entity found. */
|
|
||||||
#define PIE_ 63 /* PI entity found (needed in markup). */
|
|
||||||
#define LNR_ 64 /* LEN_ error with extra REPEATCC. */
|
|
||||||
/* SGMLACT.H: Symbols for content parse action names (end with '_')
|
|
||||||
that are returned to SGML.C for processing.
|
|
||||||
There must be no conflict with PARSEACT.H, which
|
|
||||||
uses 0 through 19, or CONACT.H, which uses 34 and above.
|
|
||||||
(Note: 31 is also used in CONACT.H, but no conflict
|
|
||||||
is created because they are tested only in PARSEPRO.C, which
|
|
||||||
completes before SGML.C starts to examine those codes.
|
|
||||||
Also, when EOD_ is returned from PARSECON, it is changed
|
|
||||||
to LOP_.)
|
|
||||||
*/
|
|
||||||
#define CON_ 20 /* Normal content action (one of the following). */
|
|
||||||
#define DAF_ 21 /* Data found. */
|
|
||||||
#define ETG_ 22 /* Process end-tag. */
|
|
||||||
#define MD_ 23 /* Process markup declaration (NAMESTRT found). */
|
|
||||||
#define MDC_ 24 /* Process markup declaration comment (CD found). */
|
|
||||||
#define MSS_ 25 /* Process marked section start. */
|
|
||||||
#define MSE_ 26 /* Process marked section end. */
|
|
||||||
#define PIS_ 27 /* Processing instruction (string). */
|
|
||||||
#define REF_ 28 /* Record end found. */
|
|
||||||
#define STG_ 29 /* Process start-tag. */
|
|
||||||
#define RSR_ 30 /* Return RS to effect SGML state transition. */
|
|
||||||
#define LOP_ 31 /* Loop for new content without returning anything. */
|
|
||||||
/* TAGACT.H: Symbols for tag parse action names (all alpha).
|
|
||||||
There must be no conflict with PARSEACT.H, which
|
|
||||||
uses 0 - 19.
|
|
||||||
*/
|
|
||||||
#define AVD 20 /* Delimited attribute value started: normal delimiter. */
|
|
||||||
#define AVU 21 /* Undelimited value started. */
|
|
||||||
#define ETIC 22 /* Tag closed with ETI. */
|
|
||||||
#define NVS 23 /* Name of attribute or value started. */
|
|
||||||
#define NASV 24 /* Saved NAS was actually an NTV. */
|
|
||||||
#define NTV 25 /* Name token value started; get name and full value. */
|
|
||||||
#define TAGC 26 /* Tag closed normally. */
|
|
||||||
#define TAGO 27 /* Tag closed implicitly by TAGO character. */
|
|
||||||
#define AVDA 28 /* Delimited attribute value started: alternative delim. */
|
|
||||||
#define DSC 29 /* Closed by DSC character. */
|
|
||||||
/* VALACT.H: Symbols for attribute value tokenization action names (all alpha).
|
|
||||||
*/
|
|
||||||
#define NOPA 0 /* No action necessary. */
|
|
||||||
#define INVA 1 /* Invalid character; terminate parse. */
|
|
||||||
#define LENA 2 /* Length limit of token exceeded; terminate parse. */
|
|
||||||
#define NASA 3 /* Name started. */
|
|
||||||
#define NMTA 4 /* Name token started. */
|
|
||||||
#define NUMA 5 /* Number or number token started. */
|
|
||||||
|
|
||||||
/* SGML declaration parsing actions. */
|
|
||||||
|
|
||||||
#define ESGD 20 /* End of SGML declaration. */
|
|
||||||
#define LIT1 21 /* Literal started. */
|
|
||||||
#define LIT2 22 /* Literal started with LITA delimiter. */
|
|
||||||
#define NUM1 23 /* Number started. */
|
|
||||||
#define NAS1 24 /* Name started. */
|
|
||||||
#define ISIG 25 /* Insignificant character occurred. */
|
|
@ -1,118 +0,0 @@
|
|||||||
/* ADL.H: Definitions for attribute descriptor list processing.
|
|
||||||
*/
|
|
||||||
/* N/C/SDATA external entity types for nxetype member of ne structure. */
|
|
||||||
#define ESNCDATA 1 /* External character data entity. */
|
|
||||||
#define ESNNDATA 2 /* Non-SGML data entity. */
|
|
||||||
#define ESNSDATA 3 /* External specific character data entity. */
|
|
||||||
#define ESNSUB 4 /* SGML subdocument entity. */
|
|
||||||
|
|
||||||
/* N/C/SDATA control block for AENTITY attributes and NDATA returns.*/
|
|
||||||
struct ne { /* N/C/SDATA entity control block. */
|
|
||||||
UNIV neid; /* Files for NDATA entity. */
|
|
||||||
UNCH *nepubid; /* Public identifier if specified. */
|
|
||||||
UNCH *nesysid; /* System identifier if specified. */
|
|
||||||
PDCB nedcn; /* Data content notation control block. */
|
|
||||||
struct ad *neal; /* Data attribute list (NULL if none). */
|
|
||||||
UNCH *neename; /* Ptr to entity name (length and EOS). */
|
|
||||||
UNCH nextype; /* Entity type: NDATA SDATA CDATA SUBDOC. */
|
|
||||||
};
|
|
||||||
#define NESZ (sizeof(struct ne))
|
|
||||||
typedef struct ne *PNE;
|
|
||||||
/* NDATA entity control block fields. */
|
|
||||||
#define NEID(p) (((PNE)p)->neid) /* File ID of NDATA entity. */
|
|
||||||
#define NESYSID(p) (((PNE)p)->nesysid) /* System ID of NDATA entity. */
|
|
||||||
#define NEPUBID(p) (((PNE)p)->nepubid) /* Public ID of NDATA entity. */
|
|
||||||
#define NEDCN(p) (((PNE)p)->nedcn->ename) /* Data content notation name. */
|
|
||||||
#define NEDCNSYSID(p) (((PNE)p)->nedcn->sysid) /* Notation system ID.*/
|
|
||||||
#define NEDCNPUBID(p) (((PNE)p)->nedcn->pubid) /* Notation public ID.*/
|
|
||||||
#define NEDCNDEFINED(p) (((PNE)p)->nedcn->defined) /* Notation defined? */
|
|
||||||
#define NEDCNADL(p) (((PNE)p)->nedcn->adl) /* Data content notation attlist.*/
|
|
||||||
#define NEENAME(p) (((PNE)p)->neename) /* Entity name pointer. */
|
|
||||||
#define NEXTYPE(p) (((PNE)p)->nextype) /* External entity type. */
|
|
||||||
#define NEAL(p) (((PNE)p)->neal) /* Data attributes (if any). */
|
|
||||||
#define NEDCNMARK(p) DCNMARK(((PNE)p)->nedcn)
|
|
||||||
|
|
||||||
/* Attribute descriptor list entry. */
|
|
||||||
struct ad {
|
|
||||||
UNCH *adname; /* Attribute name with length and EOS. */
|
|
||||||
UNCH adflags; /* Attribute flags. */
|
|
||||||
UNCH adtype; /* Value type. */
|
|
||||||
UNS adnum; /* Group size or member pos in grp. */
|
|
||||||
UNS adlen; /* Length of default or value (for capacity). */
|
|
||||||
UNCH *addef; /* Default value (NULL if REQUIRED or IMPLIED). */
|
|
||||||
union {
|
|
||||||
PNE n; /* AENTITY: NDATA control block. */
|
|
||||||
PDCB x; /* ANOTEGRP: DCN control block. */
|
|
||||||
} addata; /* Special data associated with some attributes.*/
|
|
||||||
};
|
|
||||||
#define ADSZ (sizeof(struct ad)) /* Size of an ad structure. */
|
|
||||||
|
|
||||||
/* Attribute flags for entire list adflags: ADLF. */
|
|
||||||
#define ADLREQ 0x80 /* Attribute list: 1=REQUIRED att defined. */
|
|
||||||
#define ADLNOTE 0x40 /* Attribute list: 1=NOTATION att defined. */
|
|
||||||
#define ADLCONR 0x20 /* Attribute list: 1=CONREF att defined. */
|
|
||||||
|
|
||||||
/* Attribute flags for list member adflags: ADFLAGS(n). */
|
|
||||||
#define AREQ 0x80 /* Attribute: 0=null; 1=required. */
|
|
||||||
#define ACURRENT 0x40 /* Attribute: 0=normal; 1=current. */
|
|
||||||
#define AFIXED 0x20 /* Attribute: 0=normal; 1=must equal default. */
|
|
||||||
#define AGROUP 0x10 /* Attribute: 0=single; 1=group of ad's. */
|
|
||||||
#define ACONREF 0x08 /* Attribute: 0=normal; 1=att is CONREF. */
|
|
||||||
#define AINVALID 0x04 /* Attribute: 1=value is invalid; 0=o.k. */
|
|
||||||
#define AERROR 0x02 /* Attribute: 1=error was specified; 0=o.k. */
|
|
||||||
#define ASPEC 0x01 /* Attribute: 1=value was specified; 0=default. */
|
|
||||||
|
|
||||||
/* Attribute types for adtype. */
|
|
||||||
#define ANMTGRP 0x00 /* Attribute: Name token group or member. */
|
|
||||||
#define ANOTEGRP 0x01 /* Attribute: Notation (name group). */
|
|
||||||
#define ACHARS 0x02 /* Attribute: Character string. */
|
|
||||||
#define AENTITY 0x03 /* Attribute: Data entity (name). */
|
|
||||||
#define AID 0x04 /* Attribute: ID value (name). */
|
|
||||||
#define AIDREF 0x05 /* Attribute: ID reference value (name). */
|
|
||||||
#define ANAME 0x06 /* Attribute: Name. */
|
|
||||||
#define ANMTOKE 0x07 /* Attribute: Name token. */
|
|
||||||
#define ANUMBER 0x08 /* Attribute: Number. */
|
|
||||||
#define ANUTOKE 0x09 /* Attribute: Number token. */
|
|
||||||
#define ATKNLIST 0x0A /* Attribute: >= means value is a token list. */
|
|
||||||
#define AENTITYS 0x0A /* Attribute: Data entities (name list). */
|
|
||||||
#define AIDREFS 0x0B /* Attribute: ID reference value (name list). */
|
|
||||||
#define ANAMES 0x0C /* Attribute: Name list. */
|
|
||||||
#define ANMTOKES 0x0D /* Attribute: Name token list. */
|
|
||||||
#define ANUMBERS 0x0E /* Attribute: Number list. */
|
|
||||||
#define ANUTOKES 0x0F /* Attribute: Number token list. */
|
|
||||||
|
|
||||||
/* Field definitions for entries in an attribute list.
|
|
||||||
The first argument to all of these is the list address.
|
|
||||||
*/
|
|
||||||
/* Attribute list: flags. */
|
|
||||||
#define ADLF(a) ((a)[0].adflags)
|
|
||||||
/* Attribute list: number of list members. */
|
|
||||||
#define ADN(a) ((a)[0].adtype)
|
|
||||||
/* Attribute list: number of attributes. */
|
|
||||||
#define AN(a) ((a)[0].adnum)
|
|
||||||
/* Nth attribute in list: name. */
|
|
||||||
#define ADNAME(a, n) (((a)[n].adname+1))
|
|
||||||
/* Nth att in list: number of val)ues. */
|
|
||||||
#define ADNUM(a, n) ((a)[n].adnum)
|
|
||||||
/* Nth attribute in list: flags. */
|
|
||||||
#define ADFLAGS(a, n) ((a)[n].adflags)
|
|
||||||
/* Nth attribute in list: type. */
|
|
||||||
#define ADTYPE(a, n) ((a)[n].adtype)
|
|
||||||
/* Nth attribute in list: len of def or val.*/
|
|
||||||
#define ADLEN(a, n) ((a)[n].adlen)
|
|
||||||
/* Nth attribute in list: def or value. */
|
|
||||||
#define ADVAL(a, n) ((a)[n].addef)
|
|
||||||
/* Nth attribute in list: special data. */
|
|
||||||
#define ADDATA(a, n) ((a)[n].addata)
|
|
||||||
/* Nth att: token at Pth pos in value. */
|
|
||||||
#define ADTOKEN(a, n, p)(((a)[n].addef+(p)))
|
|
||||||
|
|
||||||
#define IDHASH 101 /* Size of ID hash table. Must be prime. */
|
|
||||||
struct id { /* ID attribute control block. */
|
|
||||||
struct id *idnext; /* Next ID in chain. */
|
|
||||||
UNCH *idname; /* ID name with length prefix and EOS. */
|
|
||||||
UNCH iddefed; /* Non-zero if it has been defined. */
|
|
||||||
struct fwdref *idrl; /* Chain of forward references to this ID. */
|
|
||||||
};
|
|
||||||
#define IDSZ sizeof(struct id)
|
|
||||||
typedef struct id *PID; /* Ptr to ID attribute control block. */
|
|
@ -1,8 +0,0 @@
|
|||||||
/* alloc.h */
|
|
||||||
|
|
||||||
typedef unsigned SIZE_T;
|
|
||||||
|
|
||||||
/* Like malloc and realloc, but don't return if no memory is available. */
|
|
||||||
|
|
||||||
extern UNIV xmalloc P((SIZE_T));
|
|
||||||
extern UNIV xrealloc P((UNIV, SIZE_T));
|
|
@ -1,438 +0,0 @@
|
|||||||
/* ambig.c -
|
|
||||||
Content model ambiguity checking.
|
|
||||||
|
|
||||||
Written by James Clark (jjc@jclark.com).
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
This uses the construction in pp8-9 of [1], extended to deal with AND
|
|
||||||
groups.
|
|
||||||
|
|
||||||
Note that it is not correct for the purposes of ambiguity analysis to
|
|
||||||
handle AND groups by turning them into an OR group of SEQ groups
|
|
||||||
(consider (a&b?)).
|
|
||||||
|
|
||||||
We build an automaton for the entire content model by adding the
|
|
||||||
following case for AND:
|
|
||||||
|
|
||||||
nullable(v) := nullable(left child) and nullable(right child)
|
|
||||||
if nullable(right child) then
|
|
||||||
for each x in last(left child) do
|
|
||||||
follow(v,x) = follow(left child,x) U first(right child);
|
|
||||||
if nullable(left child) then
|
|
||||||
for each x in last(right child) do
|
|
||||||
follow(v,x) = follow(right child,x) U first(left child);
|
|
||||||
first(v) := first(left child) U first(right child);
|
|
||||||
last(v) := first(left child) U first(right child);
|
|
||||||
|
|
||||||
We also build an automaton for each AND group by building automata for
|
|
||||||
each of the members of the AND group using the above procedure and
|
|
||||||
then combine the members using:
|
|
||||||
|
|
||||||
for each x in last(left child) do
|
|
||||||
follow(v,x) = follow(left child,x) U first(right child);
|
|
||||||
for each x in last(right child) do
|
|
||||||
follow(v,x) = follow(right child,x) U first(left child);
|
|
||||||
first(v) := first(left child) U first(right child);
|
|
||||||
|
|
||||||
The content model is ambiguous just in case one of these automata is
|
|
||||||
non-deterministic. (Note that when checking determinism we need to
|
|
||||||
check the `first' set as well as all the `follow' sets.)
|
|
||||||
|
|
||||||
Why is this correct? Consider a primitive token in a member of an AND
|
|
||||||
group. There are two worst cases for ambiguity: firstly, when none of
|
|
||||||
the other members of AND group have been matched; secondly, when just
|
|
||||||
the nullable members remain to be matched. The first case is not
|
|
||||||
affected by context of the AND group (unless the first case is
|
|
||||||
identical to the second case.)
|
|
||||||
|
|
||||||
Note that inclusions are not relevant for the purposes of determining
|
|
||||||
the ambiguity of content models. Otherwise the case in clause
|
|
||||||
11.2.5.1:
|
|
||||||
|
|
||||||
An element that can satisfy an element in the content model is
|
|
||||||
considered to do so, even if the element is also an inclusion.
|
|
||||||
|
|
||||||
could never arise.
|
|
||||||
|
|
||||||
[1] Anne Brueggemann-Klein, Regular Expressions into Finite Automata,
|
|
||||||
Universitaet Freiburg, Institut fur Informatik, 33 July 1991.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "sgmlincl.h"
|
|
||||||
|
|
||||||
/* Sets of states are represented by 0-terminated, ordered lists of
|
|
||||||
indexes in gbuf. */
|
|
||||||
|
|
||||||
#define MAXSTATES (GRPGTCNT+2)
|
|
||||||
#define listcat(x, y) strcat((char *)(x), (char *)(y))
|
|
||||||
#define listcpy(x, y) strcpy((char *)(x), (char *)(y))
|
|
||||||
|
|
||||||
/* Information about a content token. */
|
|
||||||
|
|
||||||
struct contoken {
|
|
||||||
UNCH size;
|
|
||||||
UNCH nullable;
|
|
||||||
UNCH *first;
|
|
||||||
UNCH *last;
|
|
||||||
};
|
|
||||||
|
|
||||||
static VOID contoken P((int, int, struct contoken *));
|
|
||||||
static VOID andgroup P((int, int, struct contoken *));
|
|
||||||
static VOID orgroup P((int, int, struct contoken *));
|
|
||||||
static VOID seqgroup P((int, int, struct contoken *));
|
|
||||||
static VOID andambig P((int));
|
|
||||||
static int listambig P((UNCH *));
|
|
||||||
static VOID listmerge P((UNCH *, UNCH *));
|
|
||||||
static struct contoken *newcontoken P((void));
|
|
||||||
static VOID freecontoken P((struct contoken *));
|
|
||||||
|
|
||||||
|
|
||||||
/* Dynamically allocated vector of follow sets. */
|
|
||||||
|
|
||||||
static UNCH **follow;
|
|
||||||
static UNCH *mergebuf; /* for use by listmerge */
|
|
||||||
|
|
||||||
/* Set to non-zero if the content model is ambiguous. */
|
|
||||||
|
|
||||||
static int ambigsw;
|
|
||||||
|
|
||||||
/* Check the current content model (in gbuf) for ambiguity. */
|
|
||||||
|
|
||||||
VOID ambig()
|
|
||||||
{
|
|
||||||
struct contoken *s;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!follow) {
|
|
||||||
/* We can't allocate everything in one chunk, because that would
|
|
||||||
overflow a 16-bit unsigned if GRPGTCNT was 253. */
|
|
||||||
UNCH *ptr;
|
|
||||||
follow = (UNCH **)rmalloc(MAXSTATES*sizeof(UNCH *));
|
|
||||||
follow[0] = 0;
|
|
||||||
ptr = (UNCH *)rmalloc((MAXSTATES - 1)*MAXSTATES);
|
|
||||||
for (i = 1; i < MAXSTATES; i++) {
|
|
||||||
follow[i] = ptr;
|
|
||||||
ptr += MAXSTATES;
|
|
||||||
}
|
|
||||||
mergebuf = (UNCH *)rmalloc(MAXSTATES);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 1; i < MAXSTATES; i++)
|
|
||||||
follow[i][0] = 0;
|
|
||||||
|
|
||||||
ambigsw = 0;
|
|
||||||
|
|
||||||
s = newcontoken();
|
|
||||||
contoken(1, 1, s);
|
|
||||||
|
|
||||||
ambigsw = ambigsw || listambig(s->first);
|
|
||||||
|
|
||||||
freecontoken(s);
|
|
||||||
|
|
||||||
for (i = 1; !ambigsw && i < MAXSTATES; i++)
|
|
||||||
if (listambig(follow[i]))
|
|
||||||
ambigsw = 1;
|
|
||||||
|
|
||||||
if (ambigsw)
|
|
||||||
mderr(137, (UNCH *)0, (UNCH *)0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free memory used for ambiguity checking. */
|
|
||||||
|
|
||||||
VOID ambigfree()
|
|
||||||
{
|
|
||||||
if (follow) {
|
|
||||||
frem((UNIV)follow[1]);
|
|
||||||
frem((UNIV)follow);
|
|
||||||
frem((UNIV)mergebuf);
|
|
||||||
follow = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Determine whether a list of primitive content tokens (each
|
|
||||||
represented by its index in gbuf) is ambiguous. */
|
|
||||||
|
|
||||||
static
|
|
||||||
int listambig(list)
|
|
||||||
UNCH *list;
|
|
||||||
{
|
|
||||||
UNCH *p;
|
|
||||||
int chars = 0;
|
|
||||||
int rc = 0;
|
|
||||||
|
|
||||||
for (p = list; *p; p++) {
|
|
||||||
if ((gbuf[*p].ttype & TTMASK) == TTETD) {
|
|
||||||
struct etd *e = gbuf[*p].tu.thetd;
|
|
||||||
if (e->mark) {
|
|
||||||
rc = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
e->mark = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
assert((gbuf[*p].ttype & TTMASK) == TTCHARS);
|
|
||||||
if (chars) {
|
|
||||||
rc = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chars = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (p = list; *p; p++)
|
|
||||||
if ((gbuf[*p].ttype & TTMASK) == TTETD)
|
|
||||||
gbuf[*p].tu.thetd->mark = 0;
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Analyze a content token. The `checkand' argument is needed to ensure
|
|
||||||
that the algorithm is not exponential in the AND-group nesting depth.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID contoken(m, checkand, res)
|
|
||||||
int m; /* Index of content token in gbuf */
|
|
||||||
int checkand; /* Non-zero if AND groups should be checked */
|
|
||||||
struct contoken *res; /* Result */
|
|
||||||
{
|
|
||||||
UNCH flags = gbuf[m].ttype;
|
|
||||||
switch (flags & TTMASK) {
|
|
||||||
case TTCHARS:
|
|
||||||
case TTETD:
|
|
||||||
res->first[0] = m;
|
|
||||||
res->first[1] = 0;
|
|
||||||
res->last[0] = m;
|
|
||||||
res->last[1] = 0;
|
|
||||||
res->size = 1;
|
|
||||||
res->nullable = 0;
|
|
||||||
break;
|
|
||||||
case TTAND:
|
|
||||||
if (checkand)
|
|
||||||
andambig(m);
|
|
||||||
andgroup(m, checkand, res);
|
|
||||||
break;
|
|
||||||
case TTOR:
|
|
||||||
orgroup(m, checkand, res);
|
|
||||||
break;
|
|
||||||
case TTSEQ:
|
|
||||||
seqgroup(m, checkand, res);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (flags & TREP) {
|
|
||||||
UNCH *p;
|
|
||||||
for (p = res->last; *p; p++)
|
|
||||||
listmerge(follow[*p], res->first);
|
|
||||||
}
|
|
||||||
if (flags & TOPT)
|
|
||||||
res->nullable = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check an AND group for ambiguity. */
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID andambig(m)
|
|
||||||
int m;
|
|
||||||
{
|
|
||||||
int i, tnum;
|
|
||||||
int lim;
|
|
||||||
struct contoken *curr;
|
|
||||||
struct contoken *next;
|
|
||||||
|
|
||||||
tnum = gbuf[m].tu.tnum;
|
|
||||||
assert(tnum > 0);
|
|
||||||
curr = newcontoken();
|
|
||||||
next = newcontoken();
|
|
||||||
contoken(m + 1, 0, curr);
|
|
||||||
i = m + 1 + curr->size;
|
|
||||||
curr->size += 1;
|
|
||||||
for (--tnum; tnum > 0; --tnum) {
|
|
||||||
UNCH *p;
|
|
||||||
contoken(i, 0, next);
|
|
||||||
curr->size += next->size;
|
|
||||||
i += next->size;
|
|
||||||
for (p = curr->last; *p; p++)
|
|
||||||
listcat(follow[*p], next->first);
|
|
||||||
for (p = next->last; *p; p++)
|
|
||||||
listmerge(follow[*p], curr->first);
|
|
||||||
listcat(curr->first, next->first);
|
|
||||||
listcat(curr->last, next->last);
|
|
||||||
}
|
|
||||||
lim = m + curr->size;
|
|
||||||
for (i = m + 1; i < lim; i++) {
|
|
||||||
if (listambig(follow[i]))
|
|
||||||
ambigsw = 1;
|
|
||||||
follow[i][0] = 0;
|
|
||||||
}
|
|
||||||
freecontoken(curr);
|
|
||||||
freecontoken(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle an AND group. */
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID andgroup(m, checkand, res)
|
|
||||||
int m;
|
|
||||||
int checkand;
|
|
||||||
struct contoken *res;
|
|
||||||
{
|
|
||||||
int i, tnum;
|
|
||||||
/* union of the first sets of nullable members of the group */
|
|
||||||
UNCH *nullablefirst;
|
|
||||||
struct contoken *next;
|
|
||||||
|
|
||||||
tnum = gbuf[m].tu.tnum;
|
|
||||||
assert(tnum > 0);
|
|
||||||
contoken(m + 1, checkand, res);
|
|
||||||
nullablefirst = (UNCH *)rmalloc(MAXSTATES);
|
|
||||||
if (res->nullable)
|
|
||||||
listcpy(nullablefirst, res->first);
|
|
||||||
else
|
|
||||||
nullablefirst[0] = 0;
|
|
||||||
i = m + 1 + res->size;
|
|
||||||
res->size += 1;
|
|
||||||
next = newcontoken();
|
|
||||||
for (--tnum; tnum > 0; --tnum) {
|
|
||||||
UNCH *p;
|
|
||||||
contoken(i, checkand, next);
|
|
||||||
res->size += next->size;
|
|
||||||
i += next->size;
|
|
||||||
if (next->nullable)
|
|
||||||
for (p = res->last; *p; p++)
|
|
||||||
listcat(follow[*p], next->first);
|
|
||||||
for (p = next->last; *p; p++)
|
|
||||||
listmerge(follow[*p], nullablefirst);
|
|
||||||
listcat(res->first, next->first);
|
|
||||||
if (next->nullable)
|
|
||||||
listcat(nullablefirst, next->first);
|
|
||||||
listcat(res->last, next->last);
|
|
||||||
res->nullable &= next->nullable;
|
|
||||||
}
|
|
||||||
frem((UNIV)nullablefirst);
|
|
||||||
freecontoken(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle a SEQ group. */
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID seqgroup(m, checkand, res)
|
|
||||||
int m;
|
|
||||||
int checkand;
|
|
||||||
struct contoken *res;
|
|
||||||
{
|
|
||||||
int i, tnum;
|
|
||||||
struct contoken *next;
|
|
||||||
|
|
||||||
tnum = gbuf[m].tu.tnum;
|
|
||||||
assert(tnum > 0);
|
|
||||||
contoken(m + 1, checkand, res);
|
|
||||||
i = m + 1 + res->size;
|
|
||||||
res->size += 1;
|
|
||||||
next = newcontoken();
|
|
||||||
for (--tnum; tnum > 0; --tnum) {
|
|
||||||
UNCH *p;
|
|
||||||
contoken(i, checkand, next);
|
|
||||||
res->size += next->size;
|
|
||||||
i += next->size;
|
|
||||||
for (p = res->last; *p; p++)
|
|
||||||
listcat(follow[*p], next->first);
|
|
||||||
if (res->nullable)
|
|
||||||
listcat(res->first, next->first);
|
|
||||||
if (next->nullable)
|
|
||||||
listcat(res->last, next->last);
|
|
||||||
else
|
|
||||||
listcpy(res->last, next->last);
|
|
||||||
res->nullable &= next->nullable;
|
|
||||||
}
|
|
||||||
freecontoken(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle an OR group. */
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID orgroup(m, checkand, res)
|
|
||||||
int m;
|
|
||||||
int checkand;
|
|
||||||
struct contoken *res;
|
|
||||||
{
|
|
||||||
int i, tnum;
|
|
||||||
struct contoken *next;
|
|
||||||
|
|
||||||
tnum = gbuf[m].tu.tnum;
|
|
||||||
assert(tnum > 0);
|
|
||||||
contoken(m + 1, checkand, res);
|
|
||||||
i = m + 1 + res->size;
|
|
||||||
res->size += 1;
|
|
||||||
next = newcontoken();
|
|
||||||
for (--tnum; tnum > 0; --tnum) {
|
|
||||||
contoken(i, checkand, next);
|
|
||||||
res->size += next->size;
|
|
||||||
i += next->size;
|
|
||||||
listcat(res->first, next->first);
|
|
||||||
listcat(res->last, next->last);
|
|
||||||
res->nullable |= next->nullable;
|
|
||||||
}
|
|
||||||
freecontoken(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Merge the second ordered list into the first. */
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID listmerge(p, b)
|
|
||||||
UNCH *p, *b;
|
|
||||||
{
|
|
||||||
UNCH *a = mergebuf;
|
|
||||||
|
|
||||||
strcpy((char *)a, (char *)p);
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
if (*a) {
|
|
||||||
if (*b) {
|
|
||||||
if (*a < *b)
|
|
||||||
*p++ = *a++;
|
|
||||||
else if (*a > *b)
|
|
||||||
*p++ = *b++;
|
|
||||||
else
|
|
||||||
a++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*p++ = *a++;
|
|
||||||
}
|
|
||||||
else if (*b)
|
|
||||||
*p++ = *b++;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*p = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
struct contoken *newcontoken()
|
|
||||||
{
|
|
||||||
struct contoken *p = (struct contoken *)rmalloc(sizeof(struct contoken)
|
|
||||||
+ MAXSTATES*2);
|
|
||||||
p->first = (UNCH *)(p + 1);
|
|
||||||
p->last = p->first + MAXSTATES;
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID freecontoken(p)
|
|
||||||
struct contoken *p;
|
|
||||||
{
|
|
||||||
frem((UNIV)p);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Local Variables:
|
|
||||||
c-indent-level: 5
|
|
||||||
c-continued-statement-offset: 5
|
|
||||||
c-brace-offset: -5
|
|
||||||
c-argdecl-indent: 0
|
|
||||||
c-label-offset: -5
|
|
||||||
End:
|
|
||||||
*/
|
|
@ -1,31 +0,0 @@
|
|||||||
/* appl.h */
|
|
||||||
|
|
||||||
enum {
|
|
||||||
E_NOMEM = 1,
|
|
||||||
E_DOC,
|
|
||||||
E_EXEC,
|
|
||||||
E_FORK,
|
|
||||||
E_WAIT,
|
|
||||||
E_SIGNAL,
|
|
||||||
E_OPEN,
|
|
||||||
E_CAPBOTCH,
|
|
||||||
E_SUBDOC
|
|
||||||
};
|
|
||||||
|
|
||||||
VOID process_document P((int));
|
|
||||||
VOID output_conforming P((void));
|
|
||||||
|
|
||||||
VOID appl_error VP((int, ...));
|
|
||||||
|
|
||||||
#ifdef SUPPORT_SUBDOC
|
|
||||||
int run_process P((char **));
|
|
||||||
char **make_argv P((UNIV));
|
|
||||||
VOID get_subcaps P((void));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SUPPORT_SUBDOC
|
|
||||||
extern int suberr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int suppsw;
|
|
||||||
extern int locsw;
|
|
@ -1,925 +0,0 @@
|
|||||||
/* Normalize public identifiers to handle ISO 8879[-:]1986 problem.
|
|
||||||
What should happen if there's a duplicate in a single catalog entry file? */
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "std.h"
|
|
||||||
#include "catalog.h"
|
|
||||||
|
|
||||||
#ifdef USE_PROTOTYPES
|
|
||||||
#define P(parms) parms
|
|
||||||
#else
|
|
||||||
#define P(parms) ()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "alloc.h"
|
|
||||||
|
|
||||||
#define MINIMUM_DATA_CHARS \
|
|
||||||
"abcdefghijklmnopqrstuvwxyz\
|
|
||||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ\
|
|
||||||
0123456789-.'()+,/:=?"
|
|
||||||
|
|
||||||
#define N_DECL_TYPE 3
|
|
||||||
#define PUBLIC_ID_MAP N_DECL_TYPE
|
|
||||||
#define N_TABLES (N_DECL_TYPE + 1)
|
|
||||||
|
|
||||||
enum literal_type {
|
|
||||||
NORMAL_LITERAL,
|
|
||||||
MINIMUM_LITERAL
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
EOF_PARAM,
|
|
||||||
NAME_PARAM,
|
|
||||||
LITERAL_PARAM
|
|
||||||
} PARAM_TYPE;
|
|
||||||
|
|
||||||
enum catalog_error {
|
|
||||||
E_NAME_EXPECTED,
|
|
||||||
E_LITERAL_EXPECTED,
|
|
||||||
E_ARG_EXPECTED,
|
|
||||||
E_MINIMUM_DATA,
|
|
||||||
E_EOF_COMMENT,
|
|
||||||
E_EOF_LITERAL,
|
|
||||||
E_NUL_CHAR,
|
|
||||||
E_CANNOT_OPEN,
|
|
||||||
E_GETC,
|
|
||||||
E_FCLOSE
|
|
||||||
};
|
|
||||||
|
|
||||||
#define FIRST_SYSTEM_ERROR E_CANNOT_OPEN
|
|
||||||
|
|
||||||
#define HASH_TABLE_INITIAL_SIZE 8
|
|
||||||
#define HASH_TABLE_MAX_SIZE (((SIZE_T)-1)/sizeof(struct hash_table_entry *))
|
|
||||||
|
|
||||||
struct hash_table_entry {
|
|
||||||
int file_index;
|
|
||||||
const char *key;
|
|
||||||
const char *system_id;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Number of bytes per string block. */
|
|
||||||
#define BLOCK_SIZE 1000
|
|
||||||
|
|
||||||
/* Bytes follow the struct. */
|
|
||||||
|
|
||||||
struct string_block {
|
|
||||||
struct string_block *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct hash_table {
|
|
||||||
struct hash_table_entry **v;
|
|
||||||
SIZE_T size; /* must be power of 2 */
|
|
||||||
SIZE_T used;
|
|
||||||
SIZE_T used_limit;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct catalog {
|
|
||||||
struct hash_table tables[N_TABLES];
|
|
||||||
char **files;
|
|
||||||
int n_files;
|
|
||||||
struct string_block *blocks;
|
|
||||||
char *block_ptr;
|
|
||||||
SIZE_T block_spare;
|
|
||||||
CATALOG_ERROR_HANDLER error_handler;
|
|
||||||
int loaded;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct parser {
|
|
||||||
FILE *fp;
|
|
||||||
struct catalog *cat;
|
|
||||||
char *param;
|
|
||||||
SIZE_T param_length;
|
|
||||||
SIZE_T param_alloc;
|
|
||||||
int file_index;
|
|
||||||
const char *filename;
|
|
||||||
unsigned long newline_count;
|
|
||||||
char minimum_data[256];
|
|
||||||
};
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID add_catalog_file P((struct catalog *cat, const char *filename,
|
|
||||||
SIZE_T length));
|
|
||||||
static
|
|
||||||
VOID load P((struct catalog *cat));
|
|
||||||
static
|
|
||||||
VOID parse_file P((struct parser *parser));
|
|
||||||
static
|
|
||||||
VOID parse_public P((struct parser *parser));
|
|
||||||
static
|
|
||||||
VOID parse_name_map P((struct parser *parser,
|
|
||||||
int decl_type));
|
|
||||||
static
|
|
||||||
int parse_arg P((struct parser *parser));
|
|
||||||
static
|
|
||||||
PARAM_TYPE parse_param P((struct parser *parser, enum literal_type));
|
|
||||||
static
|
|
||||||
VOID skip_comment P((struct parser *parser));
|
|
||||||
static
|
|
||||||
PARAM_TYPE parse_literal P((struct parser *parser, int lit,
|
|
||||||
enum literal_type));
|
|
||||||
static
|
|
||||||
PARAM_TYPE parse_name P((struct parser *parser, int first_char));
|
|
||||||
static
|
|
||||||
VOID param_grow P((struct parser *parser));
|
|
||||||
static
|
|
||||||
const char *param_save P((struct parser *parser));
|
|
||||||
static
|
|
||||||
char *alloc_bytes P((struct catalog *catalog, SIZE_T n));
|
|
||||||
static
|
|
||||||
int param_equal P((struct parser *parser, const char *key));
|
|
||||||
static
|
|
||||||
int hash_table_add P((struct hash_table *table, const char *s,
|
|
||||||
const char *system_id, int file_index));
|
|
||||||
static
|
|
||||||
struct hash_table_entry *hash_table_lookup P((struct hash_table *table,
|
|
||||||
const char *s));
|
|
||||||
static
|
|
||||||
struct hash_table_entry *hash_table_lookup_subst P((struct hash_table *table,
|
|
||||||
const char *subst_table,
|
|
||||||
const char *s));
|
|
||||||
static
|
|
||||||
VOID hash_table_init P((struct hash_table *p));
|
|
||||||
static
|
|
||||||
VOID hash_table_delete P((struct hash_table *p));
|
|
||||||
static
|
|
||||||
SIZE_T hash_table_start_index P((struct hash_table *p, const char *s));
|
|
||||||
static
|
|
||||||
int subst_equal P((const char *subst_table, const char *s1, const char *s2));
|
|
||||||
static
|
|
||||||
VOID error P((struct parser *parser, enum catalog_error err));
|
|
||||||
|
|
||||||
#define param_char(parser, c) \
|
|
||||||
((((parser)->param_length < (parser)->param_alloc) \
|
|
||||||
|| (param_grow(parser), 1)), \
|
|
||||||
((parser)->param[(parser)->param_length] = (c)), \
|
|
||||||
((parser)->param_length += 1))
|
|
||||||
|
|
||||||
#define param_init(parser) ((parser)->param_length = 0)
|
|
||||||
#define param_chop(parser) \
|
|
||||||
((parser)->param_length = (parser)->param_length - 1)
|
|
||||||
|
|
||||||
const char *catalog_error_text(error_number)
|
|
||||||
int error_number;
|
|
||||||
{
|
|
||||||
static const char *text[] = {
|
|
||||||
"Name expected",
|
|
||||||
"Literal expected",
|
|
||||||
"Missing argument",
|
|
||||||
"Only minimum data characters allowed in a public identifier",
|
|
||||||
"End of file in comment",
|
|
||||||
"End of file in literal",
|
|
||||||
"Nul character is not allowed",
|
|
||||||
"Cannot open `%s': %s",
|
|
||||||
"Error reading `%s': %s",
|
|
||||||
"Error closing `%s': %s"
|
|
||||||
};
|
|
||||||
if (error_number >= 0 && error_number < sizeof(text)/sizeof(text[0]))
|
|
||||||
return text[error_number];
|
|
||||||
else
|
|
||||||
return "(invalid error number)";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CATALOG catalog_create(error_handler)
|
|
||||||
CATALOG_ERROR_HANDLER error_handler;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
struct catalog *p = (struct catalog *)xmalloc(sizeof(struct catalog));
|
|
||||||
p->loaded = 0;
|
|
||||||
p->n_files = 0;
|
|
||||||
p->files = 0;
|
|
||||||
p->error_handler = error_handler;
|
|
||||||
p->blocks = 0;
|
|
||||||
p->block_spare = 0;
|
|
||||||
p->block_ptr = 0;
|
|
||||||
for (i = 0; i < N_TABLES; i++)
|
|
||||||
hash_table_init(p->tables + i);
|
|
||||||
return (CATALOG)p;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID catalog_delete(cat)
|
|
||||||
CATALOG cat;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
struct string_block *block;
|
|
||||||
struct catalog *catalog = (struct catalog *)cat;
|
|
||||||
for (i = 0; i < 4; i++)
|
|
||||||
hash_table_delete(catalog->tables + i);
|
|
||||||
if (catalog->files)
|
|
||||||
free(catalog->files);
|
|
||||||
block = catalog->blocks;
|
|
||||||
while (block) {
|
|
||||||
struct string_block *tem = block;
|
|
||||||
block = block->next;
|
|
||||||
free((UNIV)tem);
|
|
||||||
}
|
|
||||||
catalog->blocks = 0;
|
|
||||||
free((UNIV)catalog);
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID catalog_load_file(p, filename)
|
|
||||||
CATALOG p;
|
|
||||||
const char *filename;
|
|
||||||
{
|
|
||||||
add_catalog_file((struct catalog *)p, filename, strlen(filename));
|
|
||||||
}
|
|
||||||
|
|
||||||
int catalog_lookup_entity(cat, public_id, name, decl_type, subst_table,
|
|
||||||
system_id, catalog_file)
|
|
||||||
CATALOG cat;
|
|
||||||
const char *public_id;
|
|
||||||
const char *name;
|
|
||||||
enum catalog_decl_type decl_type;
|
|
||||||
const char *subst_table;
|
|
||||||
const char **system_id;
|
|
||||||
const char **catalog_file;
|
|
||||||
{
|
|
||||||
struct catalog *catalog = (struct catalog *)cat;
|
|
||||||
const struct hash_table_entry *entry = 0;
|
|
||||||
if (!catalog->loaded)
|
|
||||||
load(catalog);
|
|
||||||
if (public_id)
|
|
||||||
entry = hash_table_lookup(catalog->tables + PUBLIC_ID_MAP, public_id);
|
|
||||||
if (name
|
|
||||||
&& decl_type >= 0
|
|
||||||
&& decl_type < N_DECL_TYPE
|
|
||||||
&& (!entry || entry->file_index > 0)) {
|
|
||||||
const struct hash_table_entry *entity_entry = 0;
|
|
||||||
if (!subst_table)
|
|
||||||
entity_entry = hash_table_lookup(catalog->tables + decl_type, name);
|
|
||||||
else
|
|
||||||
entity_entry = hash_table_lookup_subst(catalog->tables + decl_type,
|
|
||||||
subst_table, name);
|
|
||||||
if (!entry
|
|
||||||
|| (entity_entry
|
|
||||||
&& entity_entry->file_index < entry->file_index))
|
|
||||||
entry = entity_entry;
|
|
||||||
}
|
|
||||||
if (!entry)
|
|
||||||
return 0;
|
|
||||||
*system_id = entry->system_id;
|
|
||||||
*catalog_file = catalog->files[entry->file_index];
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID add_catalog_file(cat, filename, length)
|
|
||||||
struct catalog *cat;
|
|
||||||
const char *filename;
|
|
||||||
SIZE_T length;
|
|
||||||
{
|
|
||||||
char *s;
|
|
||||||
if (!cat->files)
|
|
||||||
cat->files = (char **)xmalloc(sizeof(char *));
|
|
||||||
else
|
|
||||||
cat->files
|
|
||||||
= (char **)xrealloc(cat->files, (cat->n_files + 1)*sizeof(char *));
|
|
||||||
s = alloc_bytes(cat, length + 1);
|
|
||||||
memcpy(s, filename, length);
|
|
||||||
s[length] = '\0';
|
|
||||||
cat->files[cat->n_files] = s;
|
|
||||||
cat->n_files += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID load(cat)
|
|
||||||
struct catalog *cat;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
const char *p;
|
|
||||||
struct parser parser;
|
|
||||||
const char *env_var;
|
|
||||||
int optional_file_index = cat->n_files;
|
|
||||||
|
|
||||||
cat->loaded = 1;
|
|
||||||
parser.param = 0;
|
|
||||||
parser.param_alloc = 0;
|
|
||||||
parser.cat = cat;
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
parser.minimum_data[i] = 0;
|
|
||||||
for (p = MINIMUM_DATA_CHARS; *p; p++)
|
|
||||||
parser.minimum_data[(unsigned char)*p] = 1;
|
|
||||||
env_var = getenv(CATALOG_FILES_ENV_VAR);
|
|
||||||
if (!env_var || *env_var == '\0')
|
|
||||||
env_var = DEFAULT_CATALOG_FILES;
|
|
||||||
for (;;) {
|
|
||||||
for (p = env_var; *p && *p != PATH_FILE_SEP; p++)
|
|
||||||
;
|
|
||||||
if (p > env_var)
|
|
||||||
add_catalog_file(cat, env_var, p - env_var);
|
|
||||||
if (!*p)
|
|
||||||
break;
|
|
||||||
env_var = p + 1;
|
|
||||||
}
|
|
||||||
for (i = 0; i < cat->n_files; i++) {
|
|
||||||
parser.filename = cat->files[i];
|
|
||||||
parser.newline_count = 0;
|
|
||||||
parser.fp = fopen(cat->files[i], "r");
|
|
||||||
if (!parser.fp) {
|
|
||||||
if (i < optional_file_index)
|
|
||||||
error(&parser, E_CANNOT_OPEN);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
parser.file_index = i;
|
|
||||||
parse_file(&parser);
|
|
||||||
errno = 0;
|
|
||||||
if (fclose(parser.fp) < 0)
|
|
||||||
error(&parser, E_FCLOSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (parser.param)
|
|
||||||
free(parser.param);
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID parse_file(parser)
|
|
||||||
struct parser *parser;
|
|
||||||
{
|
|
||||||
int skipping = 0;
|
|
||||||
for (;;) {
|
|
||||||
PARAM_TYPE type = parse_param(parser, NORMAL_LITERAL);
|
|
||||||
if (type == NAME_PARAM) {
|
|
||||||
if (param_equal(parser, "PUBLIC"))
|
|
||||||
parse_public(parser);
|
|
||||||
else if (param_equal(parser, "ENTITY"))
|
|
||||||
parse_name_map(parser, CATALOG_ENTITY_DECL);
|
|
||||||
else if (param_equal(parser, "DOCTYPE"))
|
|
||||||
parse_name_map(parser, CATALOG_DOCTYPE_DECL);
|
|
||||||
else if (param_equal(parser, "LINKTYPE"))
|
|
||||||
parse_name_map(parser, CATALOG_LINKTYPE_DECL);
|
|
||||||
else
|
|
||||||
skipping = 1;
|
|
||||||
}
|
|
||||||
else if (type == EOF_PARAM)
|
|
||||||
break;
|
|
||||||
else if (!skipping) {
|
|
||||||
skipping = 1;
|
|
||||||
error(parser, E_NAME_EXPECTED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID parse_public(parser)
|
|
||||||
struct parser *parser;
|
|
||||||
{
|
|
||||||
const char *public_id;
|
|
||||||
|
|
||||||
if (parse_param(parser, MINIMUM_LITERAL) != LITERAL_PARAM)
|
|
||||||
error(parser, E_LITERAL_EXPECTED);
|
|
||||||
public_id = param_save(parser);
|
|
||||||
if (!parse_arg(parser))
|
|
||||||
return;
|
|
||||||
hash_table_add(parser->cat->tables + PUBLIC_ID_MAP,
|
|
||||||
public_id, param_save(parser), parser->file_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID parse_name_map(parser, decl_type)
|
|
||||||
struct parser *parser;
|
|
||||||
int decl_type;
|
|
||||||
{
|
|
||||||
const char *name;
|
|
||||||
|
|
||||||
if (!parse_arg(parser))
|
|
||||||
return;
|
|
||||||
name = param_save(parser);
|
|
||||||
if (!parse_arg(parser))
|
|
||||||
return;
|
|
||||||
hash_table_add(parser->cat->tables + decl_type,
|
|
||||||
name, param_save(parser), parser->file_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
int parse_arg(parser)
|
|
||||||
struct parser *parser;
|
|
||||||
{
|
|
||||||
PARAM_TYPE parm = parse_param(parser, NORMAL_LITERAL);
|
|
||||||
if (parm != NAME_PARAM && parm != LITERAL_PARAM) {
|
|
||||||
error(parser, E_ARG_EXPECTED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
PARAM_TYPE parse_param(parser, lit_type)
|
|
||||||
struct parser *parser;
|
|
||||||
enum literal_type lit_type;
|
|
||||||
{
|
|
||||||
for (;;) {
|
|
||||||
int c = getc(parser->fp);
|
|
||||||
switch (c) {
|
|
||||||
case EOF:
|
|
||||||
if (ferror(parser->fp))
|
|
||||||
error(parser, E_GETC);
|
|
||||||
return EOF_PARAM;
|
|
||||||
case '"':
|
|
||||||
case '\'':
|
|
||||||
return parse_literal(parser, c, lit_type);
|
|
||||||
case '\n':
|
|
||||||
parser->newline_count += 1;
|
|
||||||
break;
|
|
||||||
case '\t':
|
|
||||||
case ' ':
|
|
||||||
break;
|
|
||||||
case '\0':
|
|
||||||
error(parser, E_NUL_CHAR);
|
|
||||||
break;
|
|
||||||
case '-':
|
|
||||||
c = getc(parser->fp);
|
|
||||||
if (c == '-') {
|
|
||||||
skip_comment(parser);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ungetc(c, parser->fp);
|
|
||||||
c = '-';
|
|
||||||
/* fall through */
|
|
||||||
default:
|
|
||||||
return parse_name(parser, c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID skip_comment(parser)
|
|
||||||
struct parser *parser;
|
|
||||||
{
|
|
||||||
FILE *fp = parser->fp;
|
|
||||||
for (;;) {
|
|
||||||
int c = getc(fp);
|
|
||||||
if (c == '-') {
|
|
||||||
c = getc(fp);
|
|
||||||
if (c == '-')
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (c == EOF) {
|
|
||||||
if (ferror(fp))
|
|
||||||
error(parser, E_GETC);
|
|
||||||
error(parser, E_EOF_COMMENT);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (c == '\n')
|
|
||||||
parser->newline_count += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
PARAM_TYPE parse_literal(parser, lit, lit_type)
|
|
||||||
struct parser *parser;
|
|
||||||
int lit;
|
|
||||||
enum literal_type lit_type;
|
|
||||||
{
|
|
||||||
enum { no, yes_begin, yes_middle } skipping = yes_begin;
|
|
||||||
FILE *fp = parser->fp;
|
|
||||||
param_init(parser);
|
|
||||||
for (;;) {
|
|
||||||
int c = getc(fp);
|
|
||||||
if (c == lit)
|
|
||||||
break;
|
|
||||||
switch (c) {
|
|
||||||
case '\0':
|
|
||||||
error(parser, E_NUL_CHAR);
|
|
||||||
break;
|
|
||||||
case EOF:
|
|
||||||
if (ferror(fp))
|
|
||||||
error(parser, E_GETC);
|
|
||||||
error(parser, E_EOF_LITERAL);
|
|
||||||
return LITERAL_PARAM;
|
|
||||||
case '\n':
|
|
||||||
parser->newline_count += 1;
|
|
||||||
/* fall through */
|
|
||||||
case ' ':
|
|
||||||
if (lit_type == MINIMUM_LITERAL) {
|
|
||||||
if (skipping == no) {
|
|
||||||
param_char(parser, ' ');
|
|
||||||
skipping = yes_middle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
param_char(parser, c);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (lit_type == MINIMUM_LITERAL) {
|
|
||||||
if (!parser->minimum_data[c])
|
|
||||||
error(parser, E_MINIMUM_DATA);
|
|
||||||
else {
|
|
||||||
skipping = no;
|
|
||||||
param_char(parser, c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
param_char(parser, c);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (skipping == yes_middle)
|
|
||||||
param_chop(parser);
|
|
||||||
return LITERAL_PARAM;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
PARAM_TYPE parse_name(parser, first_char)
|
|
||||||
struct parser *parser;
|
|
||||||
int first_char;
|
|
||||||
{
|
|
||||||
FILE *fp = parser->fp;
|
|
||||||
param_init(parser);
|
|
||||||
param_char(parser, first_char);
|
|
||||||
for (;;) {
|
|
||||||
int c = getc(fp);
|
|
||||||
switch (c) {
|
|
||||||
case '\0':
|
|
||||||
error(parser, E_NUL_CHAR);
|
|
||||||
break;
|
|
||||||
case EOF:
|
|
||||||
if (ferror(fp))
|
|
||||||
error(parser, E_GETC);
|
|
||||||
goto done;
|
|
||||||
case '\n':
|
|
||||||
parser->newline_count += 1;
|
|
||||||
goto done;
|
|
||||||
case ' ':
|
|
||||||
case '\t':
|
|
||||||
goto done;
|
|
||||||
case '"':
|
|
||||||
case '\'':
|
|
||||||
ungetc(c, fp);
|
|
||||||
goto done;
|
|
||||||
default:
|
|
||||||
param_char(parser, c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
done:
|
|
||||||
return NAME_PARAM;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID param_grow(parser)
|
|
||||||
struct parser *parser;
|
|
||||||
{
|
|
||||||
if (parser->param_alloc == 0) {
|
|
||||||
parser->param_alloc = 256;
|
|
||||||
parser->param = xmalloc(parser->param_alloc);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
parser->param_alloc *= 2;
|
|
||||||
parser->param = xrealloc(parser->param, parser->param_alloc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
const char *param_save(parser)
|
|
||||||
struct parser *parser;
|
|
||||||
{
|
|
||||||
char *s = alloc_bytes(parser->cat, parser->param_length + 1);
|
|
||||||
memcpy(s, parser->param, parser->param_length);
|
|
||||||
s[parser->param_length] = '\0';
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
char *alloc_bytes(catalog, n)
|
|
||||||
struct catalog *catalog;
|
|
||||||
SIZE_T n;
|
|
||||||
{
|
|
||||||
char *tem;
|
|
||||||
if (n > catalog->block_spare) {
|
|
||||||
struct string_block *block;
|
|
||||||
SIZE_T block_size = n > BLOCK_SIZE ? n : BLOCK_SIZE;
|
|
||||||
block
|
|
||||||
= (struct string_block *)xmalloc(sizeof(struct string_block)
|
|
||||||
+ block_size);
|
|
||||||
block->next = catalog->blocks;
|
|
||||||
catalog->blocks = block;
|
|
||||||
catalog->block_ptr = (char *)(block + 1);
|
|
||||||
catalog->block_spare = block_size;
|
|
||||||
}
|
|
||||||
tem = catalog->block_ptr;
|
|
||||||
catalog->block_ptr += n;
|
|
||||||
catalog->block_spare -= n;
|
|
||||||
return tem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Return 1 if the current parameter is equal to key. */
|
|
||||||
|
|
||||||
static
|
|
||||||
int param_equal(parser, key)
|
|
||||||
struct parser *parser;
|
|
||||||
const char *key;
|
|
||||||
{
|
|
||||||
const char *param = parser->param;
|
|
||||||
SIZE_T param_length = parser->param_length;
|
|
||||||
for (; param_length > 0; param++, param_length--, key++) {
|
|
||||||
unsigned char c;
|
|
||||||
if (*key == '\0')
|
|
||||||
return 0;
|
|
||||||
c = *param;
|
|
||||||
if (islower(c))
|
|
||||||
c = toupper(c);
|
|
||||||
if (c != (unsigned char)*key)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return *key == '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return 0 if it was a duplicate. */
|
|
||||||
|
|
||||||
static
|
|
||||||
int hash_table_add(table, s, system_id, file_index)
|
|
||||||
struct hash_table *table;
|
|
||||||
const char *s;
|
|
||||||
const char *system_id;
|
|
||||||
int file_index;
|
|
||||||
{
|
|
||||||
SIZE_T i;
|
|
||||||
struct hash_table_entry *p;
|
|
||||||
|
|
||||||
if (table->size > 0) {
|
|
||||||
i = hash_table_start_index(table, s);
|
|
||||||
while (table->v[i] != 0) {
|
|
||||||
if (strcmp(table->v[i]->key, s) == 0)
|
|
||||||
return 0;
|
|
||||||
if (i == 0)
|
|
||||||
i = table->size;
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (table->used >= table->used_limit) {
|
|
||||||
SIZE_T j;
|
|
||||||
struct hash_table_entry **old_table = table->v;
|
|
||||||
SIZE_T old_size = table->size;
|
|
||||||
if (old_size == 0) {
|
|
||||||
table->size = HASH_TABLE_INITIAL_SIZE;
|
|
||||||
table->used_limit = table->size/2;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (old_size > HASH_TABLE_MAX_SIZE/2) {
|
|
||||||
if (old_size == HASH_TABLE_MAX_SIZE)
|
|
||||||
return 0; /* FIXME: give an error? */
|
|
||||||
table->size = HASH_TABLE_MAX_SIZE;
|
|
||||||
table->used_limit = HASH_TABLE_MAX_SIZE - 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
table->size = (old_size << 1);
|
|
||||||
table->used_limit = table->size/2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
table->v
|
|
||||||
= (struct hash_table_entry **)xmalloc(sizeof(struct hash_table_entry *)
|
|
||||||
* table->size);
|
|
||||||
for (j = 0; j < table->size; j++)
|
|
||||||
table->v[j] = 0;
|
|
||||||
for (j = 0; j < old_size; j++)
|
|
||||||
if (old_table[j]) {
|
|
||||||
SIZE_T k = hash_table_start_index(table, old_table[j]->key);
|
|
||||||
while (table->v[k] != 0) {
|
|
||||||
if (k == 0)
|
|
||||||
k = table->size;
|
|
||||||
k--;
|
|
||||||
}
|
|
||||||
table->v[k] = old_table[j];
|
|
||||||
}
|
|
||||||
if (old_table)
|
|
||||||
free((UNIV)old_table);
|
|
||||||
i = hash_table_start_index(table, s);
|
|
||||||
while (table->v[i] != 0) {
|
|
||||||
if (i == 0)
|
|
||||||
i = table->size;
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p = (struct hash_table_entry *)xmalloc(sizeof(struct hash_table_entry));
|
|
||||||
p->key = s;
|
|
||||||
p->system_id = system_id;
|
|
||||||
p->file_index = file_index;
|
|
||||||
table->v[i] = p;
|
|
||||||
table->used += 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
struct hash_table_entry *hash_table_lookup(table, s)
|
|
||||||
struct hash_table *table;
|
|
||||||
const char *s;
|
|
||||||
{
|
|
||||||
if (table->size > 0) {
|
|
||||||
SIZE_T i;
|
|
||||||
i = hash_table_start_index(table, s);
|
|
||||||
while (table->v[i] != 0) {
|
|
||||||
if (strcmp(table->v[i]->key, s) == 0)
|
|
||||||
return table->v[i];
|
|
||||||
if (i == 0)
|
|
||||||
i = table->size;
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
struct hash_table_entry *hash_table_lookup_subst(table, subst_table, s)
|
|
||||||
struct hash_table *table;
|
|
||||||
const char *subst_table;
|
|
||||||
const char *s;
|
|
||||||
{
|
|
||||||
SIZE_T i;
|
|
||||||
for (i = 0; i < table->size; i++) {
|
|
||||||
struct hash_table_entry *p = table->v[i];
|
|
||||||
if (p && subst_equal(subst_table, s, p->key))
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID hash_table_init(p)
|
|
||||||
struct hash_table *p;
|
|
||||||
{
|
|
||||||
p->v = 0;
|
|
||||||
p->size = 0;
|
|
||||||
p->used = 0;
|
|
||||||
p->used_limit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID hash_table_delete(p)
|
|
||||||
struct hash_table *p;
|
|
||||||
{
|
|
||||||
if (p->v) {
|
|
||||||
SIZE_T i;
|
|
||||||
for (i = 0; i < p->size; i++)
|
|
||||||
if (p->v[i])
|
|
||||||
free(p->v[i]);
|
|
||||||
free(p->v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
SIZE_T hash_table_start_index(p, s)
|
|
||||||
struct hash_table *p;
|
|
||||||
const char *s;
|
|
||||||
{
|
|
||||||
unsigned long h = 0;
|
|
||||||
while (*s)
|
|
||||||
h = (h << 5) + h + (unsigned char)*s++;
|
|
||||||
return (h & (p->size - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* s1 has already been substituted; s2 has not */
|
|
||||||
|
|
||||||
static
|
|
||||||
int subst_equal(subst_table, s1, s2)
|
|
||||||
const char *subst_table;
|
|
||||||
const char *s1;
|
|
||||||
const char *s2;
|
|
||||||
{
|
|
||||||
for (; *s1 == subst_table[(unsigned char)*s2]; s1++, s2++)
|
|
||||||
if (*s1 == '\0')
|
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID error(parser, err)
|
|
||||||
struct parser *parser;
|
|
||||||
enum catalog_error err;
|
|
||||||
{
|
|
||||||
(*parser->cat->error_handler)(parser->filename,
|
|
||||||
parser->newline_count + 1,
|
|
||||||
err,
|
|
||||||
(err >= FIRST_SYSTEM_ERROR
|
|
||||||
? CATALOG_SYSTEM_ERROR
|
|
||||||
: 0),
|
|
||||||
(err >= FIRST_SYSTEM_ERROR
|
|
||||||
? errno
|
|
||||||
: 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef MAIN
|
|
||||||
|
|
||||||
static const char *program_name;
|
|
||||||
|
|
||||||
#include "getopt.h"
|
|
||||||
|
|
||||||
static VOID usage P((void));
|
|
||||||
static VOID out_of_memory P((void));
|
|
||||||
static VOID handle_catalog_error P((const char *filename,
|
|
||||||
unsigned long lineno,
|
|
||||||
int error_number,
|
|
||||||
unsigned flags,
|
|
||||||
int sys_errno));
|
|
||||||
|
|
||||||
int main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
int entity_flag = 0;
|
|
||||||
enum catalog_decl_type entity_type = CATALOG_NO_DECL;
|
|
||||||
char *public_id = 0;
|
|
||||||
char *name = 0;
|
|
||||||
int exit_status;
|
|
||||||
int opt;
|
|
||||||
CATALOG catalog;
|
|
||||||
int i;
|
|
||||||
const char *file;
|
|
||||||
const char *system_id;
|
|
||||||
|
|
||||||
program_name = argv[0];
|
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "edl")) != -1)
|
|
||||||
switch (opt) {
|
|
||||||
case 'e':
|
|
||||||
entity_flag = 1;
|
|
||||||
entity_type = CATALOG_ENTITY_DECL;
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
entity_flag = 1;
|
|
||||||
entity_type = CATALOG_DOCTYPE_DECL;
|
|
||||||
break;
|
|
||||||
case 'l':
|
|
||||||
entity_flag = 1;
|
|
||||||
entity_type = CATALOG_LINKTYPE_DECL;
|
|
||||||
break;
|
|
||||||
case '?':
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
if (argc - optind < 2)
|
|
||||||
usage();
|
|
||||||
if (entity_flag)
|
|
||||||
name = argv[optind];
|
|
||||||
else
|
|
||||||
public_id = argv[optind];
|
|
||||||
|
|
||||||
catalog = catalog_create(handle_catalog_error);
|
|
||||||
for (i = optind + 1; i < argc; i++)
|
|
||||||
catalog_load_file(catalog, argv[i]);
|
|
||||||
if (catalog_lookup_entity(catalog, public_id, name, entity_type, (char *)0,
|
|
||||||
&system_id, &file)) {
|
|
||||||
exit_status = 0;
|
|
||||||
fprintf(stderr, "%s (%s)\n", system_id, file);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "not found\n");
|
|
||||||
exit_status = 1;
|
|
||||||
}
|
|
||||||
catalog_delete(catalog);
|
|
||||||
return exit_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID usage()
|
|
||||||
{
|
|
||||||
fprintf(stderr, "usage: %s [-e] [-d] [-l] id file ...\n",
|
|
||||||
program_name);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID handle_catalog_error(filename, lineno, error_number, flags, sys_errno)
|
|
||||||
const char *filename;
|
|
||||||
unsigned long lineno;
|
|
||||||
int error_number;
|
|
||||||
unsigned flags;
|
|
||||||
int sys_errno;
|
|
||||||
{
|
|
||||||
fprintf(stderr, "%s:", program_name);
|
|
||||||
if (flags & CATALOG_SYSTEM_ERROR) {
|
|
||||||
putc(' ', stderr);
|
|
||||||
fprintf(stderr, catalog_error_text(error_number), filename);
|
|
||||||
putc('\n', stderr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fprintf(stderr, "%s:%lu: %s\n", filename, lineno,
|
|
||||||
catalog_error_text(error_number));
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
UNIV xmalloc(n)
|
|
||||||
SIZE_T n;
|
|
||||||
{
|
|
||||||
UNIV p = malloc(n);
|
|
||||||
if (!p)
|
|
||||||
out_of_memory();
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
UNIV xrealloc(p, n)
|
|
||||||
UNIV p;
|
|
||||||
SIZE_T n;
|
|
||||||
{
|
|
||||||
p = realloc(p, n);
|
|
||||||
if (!p)
|
|
||||||
out_of_memory();
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID out_of_memory()
|
|
||||||
{
|
|
||||||
fprintf(stderr, "%s: out of memory\n", program_name);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* MAIN */
|
|
@ -1,45 +0,0 @@
|
|||||||
#ifndef CATALOG_H
|
|
||||||
#define CATALOG_H 1
|
|
||||||
|
|
||||||
enum catalog_decl_type {
|
|
||||||
CATALOG_NO_DECL = -1,
|
|
||||||
CATALOG_ENTITY_DECL,
|
|
||||||
CATALOG_DOCTYPE_DECL,
|
|
||||||
CATALOG_LINKTYPE_DECL
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CATALOG_SYSTEM_ERROR 1
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
|
|
||||||
typedef void *CATALOG;
|
|
||||||
typedef void (*CATALOG_ERROR_HANDLER)(const char *filename,
|
|
||||||
unsigned long lineno,
|
|
||||||
int error_number,
|
|
||||||
unsigned flags,
|
|
||||||
int sys_errno);
|
|
||||||
CATALOG catalog_create(CATALOG_ERROR_HANDLER);
|
|
||||||
void catalog_load_file(CATALOG, const char *);
|
|
||||||
void catalog_delete(CATALOG);
|
|
||||||
int catalog_lookup_entity(CATALOG,
|
|
||||||
const char *public_id,
|
|
||||||
const char *name,
|
|
||||||
enum catalog_decl_type,
|
|
||||||
const char *subst_table,
|
|
||||||
const char **system_id,
|
|
||||||
const char **catalog_file);
|
|
||||||
const char *catalog_error_text(int error_number);
|
|
||||||
|
|
||||||
#else /* not __STDC__ */
|
|
||||||
|
|
||||||
typedef char *CATALOG;
|
|
||||||
typedef void (*CATALOG_ERROR_HANDLER)();
|
|
||||||
CATALOG catalog_create();
|
|
||||||
void catalog_load_file();
|
|
||||||
void catalog_delete();
|
|
||||||
int catalog_lookup_entity();
|
|
||||||
char *catalog_error_text();
|
|
||||||
|
|
||||||
#endif /* not __STDC__ */
|
|
||||||
|
|
||||||
#endif /* not CATALOG_H */
|
|
@ -1,158 +0,0 @@
|
|||||||
/* unix.cfg: Configuration file for sgmls on Unix. */
|
|
||||||
|
|
||||||
/* A list of filename templates to use for searching for external entities.
|
|
||||||
The filenames are separated by the character specified in PATH_FILE_SEP.
|
|
||||||
See sgmls.man for details. */
|
|
||||||
#define DEFAULT_PATH "/usr/share/sgml/%O/%C/%T:%N.%X:%N.%D"
|
|
||||||
/* The character that separates the filenames templates. */
|
|
||||||
#define PATH_FILE_SEP ':'
|
|
||||||
/* The character that separates filenames in a system identifier.
|
|
||||||
Usually the same as PATH_FILE_SEP. */
|
|
||||||
#define SYSID_FILE_SEP ':'
|
|
||||||
/* The environment variable that contains the list of filename templates. */
|
|
||||||
#define PATH_ENV_VAR "SGML_PATH"
|
|
||||||
/* A macro that returns non-zero if the filename is relative to the
|
|
||||||
current directory. */
|
|
||||||
#define FILE_IS_RELATIVE(p) ((p)[0] != '/')
|
|
||||||
/* A string containing the characters that can separate the directory
|
|
||||||
part of a filename from the basename. */
|
|
||||||
#define DIR_BASE_SEP "/"
|
|
||||||
/* The environment variable that contains the list of catalog entry files.
|
|
||||||
Filenames are separated by PATH_FILE_SEP. */
|
|
||||||
#define CATALOG_FILES_ENV_VAR "SGML_CATALOG_FILES"
|
|
||||||
/* Default list of catalog entry files. */
|
|
||||||
#define DEFAULT_CATALOG_FILES "CATALOG:/usr/share/sgml/CATALOG"
|
|
||||||
|
|
||||||
/* MIN_DAT_SUBS_FROM and MIN_DATS_SUBS_TO tell sgmls how to transform a name
|
|
||||||
or system identifier into a legal filename. A character in
|
|
||||||
MIN_DAT_SUBS_FROM will be transformed into the character in the
|
|
||||||
corresponding position in MIN_DAT_SUBS_TO. If there is no such
|
|
||||||
position, then the character is removed. */
|
|
||||||
/* This says that spaces should be transformed to underscores, and
|
|
||||||
slashes to percents. */
|
|
||||||
#define MIN_DAT_SUBS_FROM " /"
|
|
||||||
#define MIN_DAT_SUBS_TO "_%"
|
|
||||||
|
|
||||||
/* Define this to allow tracing. */
|
|
||||||
/* #define TRACE 1 */
|
|
||||||
|
|
||||||
/* Define this you want support for subdocuments. This is implemented
|
|
||||||
using features that are not part of Standard C, so you might not want
|
|
||||||
to define it if you are porting to a new system. Otherwise I suggest
|
|
||||||
you leave it defined. */
|
|
||||||
#define SUPPORT_SUBDOC 1
|
|
||||||
|
|
||||||
/* Define HAVE_EXTENDED_PRINTF if your *printf functions supports
|
|
||||||
X/Open extensions; if they do, then, for example,
|
|
||||||
|
|
||||||
printf("%2$s%1$s", "bar", "foo")
|
|
||||||
|
|
||||||
should print `foobar'. */
|
|
||||||
|
|
||||||
/* #define HAVE_EXTENDED_PRINTF 1 */
|
|
||||||
|
|
||||||
/* Define HAVE_CAT if your system provides the X/Open message
|
|
||||||
catalogue functions catopen() and catgets(), and you want to use them.
|
|
||||||
An implementations of these functions is included and will be used if
|
|
||||||
you don't define this. On SunOS 4.1.1, if you do define this you
|
|
||||||
should set CC=/usr/xpg2bin/cc in the makefile. */
|
|
||||||
|
|
||||||
#define HAVE_CAT 1
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
/* Define this if your compiler supports prototypes. */
|
|
||||||
#define USE_PROTOTYPES 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Can't use <stdarg.h> without prototypes. */
|
|
||||||
#ifndef USE_PROTOTYPES
|
|
||||||
#define VARARGS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If your compiler defines __STDC__ but doesn't provide <stdarg.h>,
|
|
||||||
you must define VARARGS yourself here. */
|
|
||||||
/* #define VARARGS 1 */
|
|
||||||
|
|
||||||
/* Define this if you do not have strerror(). */
|
|
||||||
/* #define STRERROR_MISSING 1 */
|
|
||||||
|
|
||||||
/* Define this unless the character testing functions in ctype.h
|
|
||||||
are defined for all values representable as an unsigned char. You do
|
|
||||||
not need to define this if your system is ANSI C conformant. You
|
|
||||||
should define for old Unix systems. */
|
|
||||||
/* #define USE_ISASCII 1 */
|
|
||||||
|
|
||||||
/* Define this if your system provides the BSD style string operations
|
|
||||||
rather than ANSI C ones (eg bcopy() rather than memcpy(), and index()
|
|
||||||
rather than strchr()). */
|
|
||||||
/* #define BSD_STRINGS 1 */
|
|
||||||
|
|
||||||
/* Define this if you have getopt(). */
|
|
||||||
#define HAVE_GETOPT 1
|
|
||||||
|
|
||||||
/* Define this if you have access(). */
|
|
||||||
#define HAVE_ACCESS 1
|
|
||||||
|
|
||||||
/* Define this if you have <unistd.h>. */
|
|
||||||
#define HAVE_UNISTD_H 1
|
|
||||||
|
|
||||||
/* Define this if you have <sys/stat.h>. */
|
|
||||||
#define HAVE_SYS_STAT_H 1
|
|
||||||
|
|
||||||
/* Define this if you have waitpid(). */
|
|
||||||
#define HAVE_WAITPID 1
|
|
||||||
|
|
||||||
/* Define this if your system is POSIX.1 (ISO 9945-1:1990) compliant. */
|
|
||||||
#define POSIX 1
|
|
||||||
|
|
||||||
/* Define this if you have the vfork() system call. */
|
|
||||||
#define HAVE_VFORK 1
|
|
||||||
|
|
||||||
/* Define this if you have <vfork.h>. */
|
|
||||||
/* #define HAVE_VFORK_H 1 */
|
|
||||||
|
|
||||||
/* Define this if you don't have <stdlib.h> */
|
|
||||||
/* #define STDLIB_H_MISSING 1 */
|
|
||||||
|
|
||||||
/* Define this if you don't have <stddef.h> */
|
|
||||||
/* #define STDDEF_H_MISSING 1 */
|
|
||||||
|
|
||||||
/* Define this if you don't have <limits.h> */
|
|
||||||
/* #define LIMITS_H_MISSING 1 */
|
|
||||||
|
|
||||||
/* Define this if you don't have remove(); unlink() will be used instead. */
|
|
||||||
/* #define REMOVE_MISSING 1 */
|
|
||||||
|
|
||||||
/* Define this if you don't have raise(); kill() will be used instead. */
|
|
||||||
/* #define RAISE_MISSING 1 */
|
|
||||||
|
|
||||||
/* Define this if you don't have fsetpos() and fgetpos(). */
|
|
||||||
/* #define FPOS_MISSING 1 */
|
|
||||||
|
|
||||||
/* Universal pointer type. */
|
|
||||||
/* If your compiler doesn't fully support void *, change `void' to `char'. */
|
|
||||||
typedef void *UNIV;
|
|
||||||
|
|
||||||
/* If your compiler doesn't support void as a function return type,
|
|
||||||
change `void' to `int'. */
|
|
||||||
typedef void VOID;
|
|
||||||
|
|
||||||
/* If you don't have an ANSI C conformant <limits.h>, define
|
|
||||||
CHAR_SIGNED as 1 or 0 according to whether the `char' type is signed.
|
|
||||||
The <limits.h> on some versions of System Release V 3.2 is not ANSI C
|
|
||||||
conformant: the value of CHAR_MIN is 0 even though the `char' type is
|
|
||||||
signed. */
|
|
||||||
|
|
||||||
/* #define CHAR_SIGNED 1 */
|
|
||||||
/* #define CHAR_SIGNED 0 */
|
|
||||||
#ifndef CHAR_SIGNED
|
|
||||||
#include <limits.h>
|
|
||||||
#if CHAR_MIN < 0
|
|
||||||
#define CHAR_SIGNED 1
|
|
||||||
#else
|
|
||||||
#define CHAR_SIGNED 0
|
|
||||||
#endif
|
|
||||||
#endif /* not CHAR_SIGNED */
|
|
||||||
|
|
||||||
/* Assume the system character set is ISO Latin-1. */
|
|
||||||
#include "latin1.h"
|
|
@ -1,451 +0,0 @@
|
|||||||
#include "sgmlincl.h" /* #INCLUDE statements for SGML parser. */
|
|
||||||
#include "context.h"
|
|
||||||
|
|
||||||
#define GI (tags[ts].tetd->etdgi+1) /* GI of current element. */
|
|
||||||
#define NEWGI (newetd->etdgi+1) /* GI of new tag. */
|
|
||||||
#define STATUS (*statuspt) /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
|
|
||||||
#define PEX (-1) /* GI is a plus exception and not a minus. */
|
|
||||||
|
|
||||||
#define ANYHIT(h) (grplongs == 1 ? ((h)[0] != 0) : anyhit(h))
|
|
||||||
#define HITSET(h, n) (h[(unsigned)(n-1)>>LONGPOW] \
|
|
||||||
|= (1L<<((n-1)&(LONGBITS-1))))
|
|
||||||
#define HITON(h, n) (h[(unsigned)(n-1)>>LONGPOW] & (1L<<((n-1)&(LONGBITS-1))))
|
|
||||||
|
|
||||||
#define HITOFF(h, n) (!(HITON(h, n)))
|
|
||||||
|
|
||||||
#define TOKENHIT HITON(H,T)
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID copypos(to, from)
|
|
||||||
struct mpos *to, *from;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i <= (int)from[0].t; i++) {
|
|
||||||
to[i].g = from[i].g;
|
|
||||||
to[i].t = from[i].t;
|
|
||||||
memcpy(to[i].h, from[i].h, grplongs*sizeof(unsigned long));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CONTEXT: Determine whether a GI is valid in the present structural context.
|
|
||||||
Returns RCHIT if valid, RCEND if element has ended, RCREQ if a
|
|
||||||
different element is required, and RCMISS if it is totally invalid.
|
|
||||||
On entry, pos points to the model token to be tested against the GI.
|
|
||||||
TO DO: Save allowed GIs for an error message on an RCMISS.
|
|
||||||
Support a "query" mode (what is allowed now?) by working
|
|
||||||
with a copy of pos.
|
|
||||||
*/
|
|
||||||
int context(gi, mod, pos, statuspt, mexts)
|
|
||||||
struct etd *gi; /* ETD of new GI. */
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
UNCH *statuspt; /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
|
|
||||||
int mexts; /* >0=stack level of minus grp; -1=plus; 0=none.*/
|
|
||||||
{
|
|
||||||
UNCH toccsv, gtypesv; /* Save token's TOCC and GTYPE in case grp ends.*/
|
|
||||||
|
|
||||||
if (mexts != 0) {
|
|
||||||
if (mexts == -1 && STATUS == RCEND)
|
|
||||||
return RCPEX;
|
|
||||||
copypos(savedpos, pos);
|
|
||||||
}
|
|
||||||
Tstart = T; /* Save starting token for AND group testing. */
|
|
||||||
while (STATUS!=RCMISS && STATUS!=RCEND) {
|
|
||||||
TRACEGI("CONTEXT", gi, mod, pos);
|
|
||||||
while (TTYPE==TTOR || TTYPE==TTSEQ || TTYPE==TTAND) {
|
|
||||||
pos[P+1].g = M++; pos[++P].t = 1; HITCLEAR(H);
|
|
||||||
Tstart = T; /* Save starting token for AND group testing. */
|
|
||||||
TRACEGI("OPENGRP", gi, mod, pos);
|
|
||||||
}
|
|
||||||
STATUS = (UNCH)tokenreq(gi, mod, pos);
|
|
||||||
TRACEGI("STATUS", gi, mod, pos);
|
|
||||||
if (gi==TOKEN.tu.thetd) { /* Hit in model. */
|
|
||||||
STATUS = (UNCH)RCHIT;
|
|
||||||
gtypesv = GTYPE; toccsv = TOCC;
|
|
||||||
newtoken(mod, pos, statuspt);
|
|
||||||
if (mexts <= 0)
|
|
||||||
return RCHIT;
|
|
||||||
else if (gtypesv==TTOR || BITON(toccsv, TOPT)) {
|
|
||||||
/* restore position */
|
|
||||||
copypos(pos, savedpos);
|
|
||||||
return RCMEX;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return RCHITMEX;
|
|
||||||
}
|
|
||||||
if (STATUS==RCREQ) {
|
|
||||||
if (mexts == -1)
|
|
||||||
break;
|
|
||||||
STATUS = RCHIT;
|
|
||||||
nextetd = TOKEN.tu.thetd;
|
|
||||||
newtoken(mod, pos, statuspt);
|
|
||||||
return(RCREQ);
|
|
||||||
}
|
|
||||||
/* else if (STATUS==RCNREQ) */
|
|
||||||
if (mexts>0) return(RCMEX);
|
|
||||||
newtoken(mod, pos, statuspt);
|
|
||||||
}
|
|
||||||
if (mexts == -1) {
|
|
||||||
copypos(pos, savedpos);
|
|
||||||
return STATUS = RCPEX;
|
|
||||||
}
|
|
||||||
return((int)STATUS);
|
|
||||||
}
|
|
||||||
/* ECONTEXT: Determine whether the current element can be ended, or whether
|
|
||||||
non-optional tokens remain at the current level or higher.
|
|
||||||
Returns 1 if element can be ended, or 0 if tokens remain.
|
|
||||||
On entry, STATUS==RCEND if there are no tokens left; if not,
|
|
||||||
pos points to the next model token to be tested.
|
|
||||||
TO DO: Support a "query" mode (what is required now?) by working
|
|
||||||
with a copy of pos.
|
|
||||||
*/
|
|
||||||
int econtext(mod, pos, statuspt)
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
UNCH *statuspt; /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
|
|
||||||
{
|
|
||||||
unsigned next; /* Position in AND group of next testable token.*/
|
|
||||||
|
|
||||||
Tstart = T;
|
|
||||||
TRACEEND("ECONT", mod, pos, 0, 0);
|
|
||||||
if (P<=1) {nextetd = 0; return(TOKENHIT || BITON(TOCC, TOPT));}
|
|
||||||
nextetd = TTYPE == TTETD ? TOKEN.tu.thetd : 0;
|
|
||||||
while (STATUS!=RCMISS && STATUS!=RCEND) {
|
|
||||||
STATUS = (UNCH)testend(mod, pos, 0, 0);
|
|
||||||
TRACEEND("ECONTEND", mod, pos, 0, 0);
|
|
||||||
nextetd = P<=1 || TTYPE != TTETD ? 0 : TOKEN.tu.thetd;
|
|
||||||
if (STATUS==RCEND) return(1);
|
|
||||||
if (P<=1) return(TOKENHIT || BITON(TOCC, TOPT));
|
|
||||||
if (STATUS==RCMISS) {
|
|
||||||
if (BITON(TOCC, TOPT)) nextetd = 0;
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
if (!tokenopt(mod, pos)) return(0);
|
|
||||||
|
|
||||||
STATUS = RCNREQ;
|
|
||||||
if (GTYPE!=TTAND) ++T; /* T!=GNUM or group would have ended. */
|
|
||||||
else T = (UNCH)(((next = (UNS)offbit(H, (int)T, GNUM))!=0) ?
|
|
||||||
next : offbit(H, 0, GNUM));
|
|
||||||
|
|
||||||
M = G + grpsz(&GHDR, (int)T-1) + 1;
|
|
||||||
TRACEEND("ECONTNEW", mod, pos, 0, 0);
|
|
||||||
}
|
|
||||||
if (STATUS==RCMISS) {
|
|
||||||
if (BITON(TOCC, TOPT)) nextetd = 0;
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
return(1); /* STATUS==RCEND */
|
|
||||||
}
|
|
||||||
/* NEWTOKEN: Find the next token to test. Set STATUS to indicate results:
|
|
||||||
RCEND if element has ended (no more tokens to test);
|
|
||||||
RCREQ if required new token was found;
|
|
||||||
RCNREQ if non-required new token was found;
|
|
||||||
RCHIT if a hit token was repeated (now non-required);
|
|
||||||
and RCMISS if a new token can't be found because current token
|
|
||||||
(which was not hit) was neither unconditionally required nor
|
|
||||||
optional.
|
|
||||||
*/
|
|
||||||
VOID newtoken(mod, pos, statuspt)
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
UNCH *statuspt; /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
|
|
||||||
{
|
|
||||||
unsigned nextand = 0; /* Position in AND group of next testable token.*/
|
|
||||||
int currhit = (STATUS==RCHIT); /* 1=current GI hit; 0=not. */
|
|
||||||
|
|
||||||
/* If the GI was a hit, turn on the hit bit and set the status to
|
|
||||||
assume that the token to be tested against the next GI will
|
|
||||||
be non-required. If the current token is repeatable, exit so
|
|
||||||
it will stand as the next token to test.
|
|
||||||
*/
|
|
||||||
if (STATUS==RCHIT) {
|
|
||||||
HITSET(H, T);
|
|
||||||
STATUS = RCNREQ;
|
|
||||||
if (BITON(TOCC, TREP)) return;
|
|
||||||
}
|
|
||||||
/* At this point, we must determine the next token to test:
|
|
||||||
either against the next GI, if this one was a hit, or
|
|
||||||
against the same GI if conditions permit a retry.
|
|
||||||
To find the next token, we must first end the current group,
|
|
||||||
if possible, and any we can that contain it.
|
|
||||||
If the outermost group was a hit and is repeatable, or
|
|
||||||
if the element has ended, we exit now.
|
|
||||||
If it hasn't ended, or was optional and ended with a miss,
|
|
||||||
we can retry the GI against the next token.
|
|
||||||
*/
|
|
||||||
if ((STATUS = (UNCH)testend(mod, pos, 1, 1))!=RCNREQ) return;
|
|
||||||
|
|
||||||
/* At this point, the "current token" is either the original one,
|
|
||||||
or the token for the highest level unhit group that it ended.
|
|
||||||
We will retry a missed GI, by testing it against the next
|
|
||||||
token, if the current token:
|
|
||||||
1. Is optional;
|
|
||||||
2. Was hit (i.e., because it is repeatable and was hit by a
|
|
||||||
previous GI or because it is a hit group that just ended);
|
|
||||||
3. Is in an AND or OR group and is not the last testable token.
|
|
||||||
|
|
||||||
It will be the next sequential one (unhit one, in an AND group);
|
|
||||||
if there are none left, use the first unhit token in the group.
|
|
||||||
In either case, set M to correspond to the new T.
|
|
||||||
*/
|
|
||||||
retest:
|
|
||||||
TRACEEND("RETEST", mod, pos, (int)nextand, 1);
|
|
||||||
if (GTYPE==TTAND) {
|
|
||||||
nextand = offbit(H, (int)T, GNUM);
|
|
||||||
if (!nextand)
|
|
||||||
nextand = offbit(H, 0, GNUM);
|
|
||||||
}
|
|
||||||
if ( BITON(TOCC, TOPT)
|
|
||||||
|| TOKENHIT
|
|
||||||
|| GTYPE==TTOR /* T!=GNUM or group would have ended. */
|
|
||||||
|| nextand ) {
|
|
||||||
if (GTYPE!=TTAND) ++T; /* T!=GNUM or group would have ended. */
|
|
||||||
else T = nextand;
|
|
||||||
M = G + grpsz(&GHDR, (int)T-1) + 1;
|
|
||||||
if (GTYPE==TTAND) {
|
|
||||||
/* If AND group wrapped, it can end if all non-optionals were
|
|
||||||
hit. */
|
|
||||||
if (T==Tstart && !currhit) {
|
|
||||||
UNCH Psave = P;
|
|
||||||
int rc = testend(mod, pos, 0, 1);
|
|
||||||
if (Psave!=P) {if ((STATUS = (UNCH)rc)==RCNREQ) goto retest;}
|
|
||||||
else STATUS = RCMISS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We only test unhit tokens, so we must use an unhit token
|
|
||||||
as Tstart (which is used to detect when the AND group has
|
|
||||||
wrapped). */
|
|
||||||
else if (HITON(H,Tstart)) Tstart = T;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else STATUS = RCMISS;
|
|
||||||
TRACEEND("NEWTOKEN", mod, pos, (int)nextand, 1);
|
|
||||||
}
|
|
||||||
/* TESTEND: End the current group, if possible, and any that it is nested in.
|
|
||||||
The current token will either be a group header, or some token
|
|
||||||
that could not end its group. Return 1 if the (possibly new)
|
|
||||||
current token is repeatable; 0 if it is not.
|
|
||||||
*/
|
|
||||||
int testend(mod, pos, andoptsw, newtknsw)
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
int andoptsw; /* 1=test optional AND members; 0=ignore. */
|
|
||||||
int newtknsw; /* 1=new token test; 0=end element test. */
|
|
||||||
{
|
|
||||||
int rc = 0; /* Return code: RCNREQ RCHIT RCMISS RCEND */
|
|
||||||
|
|
||||||
while (!rc) {
|
|
||||||
TRACEEND("TRACEEND", mod, pos, rc, andoptsw);
|
|
||||||
/* TESTMISS:
|
|
||||||
If we've hit no tokens yet in the current group, and
|
|
||||||
the current token is the last unhit one in the group we can test,
|
|
||||||
we will end the group (it may never really have started!)
|
|
||||||
because we might be able to try the token that follows it.
|
|
||||||
In any group, a token is the last testable unhit token if it
|
|
||||||
is the last sequential one, as the GI was already tested against
|
|
||||||
the preceding unhit tokens. In addition,
|
|
||||||
in a SEQ group, it is the last testable unhit token if it isn't
|
|
||||||
optional, because we can't skip past it to the following ones.
|
|
||||||
If we end the group, before popping the level, set M to G, as this
|
|
||||||
level`s group header will be the next level's current token.
|
|
||||||
*/
|
|
||||||
if (!ANYHIT(H) && (T==GNUM
|
|
||||||
|| (GTYPE==TTSEQ && BITOFF(TOCC, TOPT)))) {
|
|
||||||
M = G; --P;
|
|
||||||
if (P<=1) {
|
|
||||||
if (BITON(TOCC, TOPT) || TOKENHIT) rc = RCEND;
|
|
||||||
else rc = RCMISS;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* TESTHIT:
|
|
||||||
See if we've hit all the non-optional tokens in the group.
|
|
||||||
If so, pop to the previous level and set the group's hit bit.
|
|
||||||
If we were called from NEWTOKEN we are trying to find the token
|
|
||||||
to test against the next start-tag, so if the group is repeatable,
|
|
||||||
process it again. (If not, we were called from ECONTEXT and
|
|
||||||
are testing whether the element can be ended.)
|
|
||||||
Otherwise, if we are at the first level, the element is over.
|
|
||||||
*/
|
|
||||||
if ((GTYPE==TTOR && TOKENHIT)
|
|
||||||
|| (GTYPE==TTSEQ && T==(UNCH)GNUM
|
|
||||||
&& (TOKENHIT || BITON(TOCC, TOPT)))
|
|
||||||
|| (GTYPE==TTAND && allhit(&GHDR, H, 0, andoptsw))) {
|
|
||||||
M = G;
|
|
||||||
--P;
|
|
||||||
HITSET(H, T);
|
|
||||||
Tstart = T;
|
|
||||||
if (newtknsw && BITON(TOCC, TREP)) rc = RCHIT;
|
|
||||||
else if (P<=1) rc = RCEND;
|
|
||||||
/* If we are looking for a new token to test against the next
|
|
||||||
start-tag, then we need to consider optional and members
|
|
||||||
in this group, even if we didn't need to consider them
|
|
||||||
in the group that we just ended because that group had
|
|
||||||
wrapped. */
|
|
||||||
else if (newtknsw) andoptsw = 1;
|
|
||||||
/* Else loop to test new outer group. */
|
|
||||||
}
|
|
||||||
else rc = RCNREQ; /* No group ended this time, so return. */
|
|
||||||
}
|
|
||||||
TRACEEND("ENDFOUND", mod, pos, rc, andoptsw);
|
|
||||||
return(rc);
|
|
||||||
}
|
|
||||||
/* TOKENOPT: Return 1 if current token is contextually optional;
|
|
||||||
otherwise, return 0.
|
|
||||||
*/
|
|
||||||
int tokenopt(mod, pos)
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
{
|
|
||||||
TRACEEND("TOKENOPT", mod, pos, 0, 0);
|
|
||||||
return (BITON(TOCC, TOPT) /* Inherently optional. */
|
|
||||||
|| TOKENHIT /* Was hit (handles "plus" suffix case). */
|
|
||||||
|| (!ANYHIT(H) && groupopt(mod, pos)));
|
|
||||||
/* In optional group with no hits. */
|
|
||||||
}
|
|
||||||
/* GROUPOPT: Temporarily makes the current group be the current token so that
|
|
||||||
TOKENOPT() can be applied to it. Returns the value returned
|
|
||||||
by TOKENOPT.
|
|
||||||
*/
|
|
||||||
int groupopt(mod, pos)
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
{
|
|
||||||
UNCH saveM; /* Save M when testing if group is not required.*/
|
|
||||||
int rc; /* 1=contextually optional; 0=not. */
|
|
||||||
|
|
||||||
if (P==1) return(BITON(GOCC, TOPT) || TOKENHIT);
|
|
||||||
saveM = M; M = G; --P;
|
|
||||||
rc = tokenopt(mod, pos);
|
|
||||||
++P; G = M; M = saveM;
|
|
||||||
return(rc);
|
|
||||||
}
|
|
||||||
/* TOKENREQ: Returns RCREQ if the current token is "contextually required".
|
|
||||||
That is, it is not contextually optional and
|
|
||||||
1) it is a member of a "seq" group that is either required
|
|
||||||
or has at least 1 hit token.
|
|
||||||
2) it is a member of an "and" group in which all other
|
|
||||||
tokens were hit.
|
|
||||||
Optional tokens are not counted
|
|
||||||
if GI is ETDCDATA, as we are looking for an
|
|
||||||
omitted start-tag. Otherwise, they are counted,
|
|
||||||
as the GI might match one of them.
|
|
||||||
Returns RCNREQ if the current token is "not required".
|
|
||||||
*/
|
|
||||||
int tokenreq(gi, mod, pos)
|
|
||||||
struct etd *gi; /* ETD of new GI. */
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
{
|
|
||||||
TRACEGI("TOKENREQ", gi, mod, pos);
|
|
||||||
return( tokenopt(mod, pos) ? RCNREQ
|
|
||||||
: ( GTYPE==TTSEQ && (ANYHIT(H) || groupreq(gi, mod, pos)==RCREQ)
|
|
||||||
#if 0
|
|
||||||
|| (GTYPE==TTAND && allhit(&GHDR, H, T, \*gi!=ETDCDATA*\ 1))
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
? RCREQ : RCNREQ );
|
|
||||||
}
|
|
||||||
/* GROUPREQ: Temporarily makes the current group be the current token so that
|
|
||||||
TOKENREQ() can be applied to it. Returns the value returned
|
|
||||||
by TOKENREQ.
|
|
||||||
*/
|
|
||||||
int groupreq(gi, mod, pos)
|
|
||||||
struct etd *gi; /* ETD of new GI. */
|
|
||||||
struct thdr mod[]; /* Model of current open element. */
|
|
||||||
struct mpos pos[]; /* Position in open element's model. */
|
|
||||||
{
|
|
||||||
UNCH saveM; /* Save M when testing if group is not required.*/
|
|
||||||
int rc; /* Return code: RCREQ RCNREQ */
|
|
||||||
|
|
||||||
if (P==1) return(BITOFF(GOCC, TOPT) ? RCREQ : RCNREQ);
|
|
||||||
saveM = M; M = G; --P;
|
|
||||||
rc = tokenreq(gi, mod, pos);
|
|
||||||
++P; G = M; M = saveM;
|
|
||||||
return(rc);
|
|
||||||
}
|
|
||||||
/* GRPSZ: Returns the number of tokens spanned by a group in the model (M),
|
|
||||||
from the group's start (G) to a specified index within the group (T).
|
|
||||||
M = 0, plus 1 for each token in the group, plus the size of
|
|
||||||
any subgroups (gotten by calling GRPSZ recursively). On entry,
|
|
||||||
M must be equal to G at the current level.
|
|
||||||
*/
|
|
||||||
int grpsz(g, t)
|
|
||||||
struct thdr *g; /* mod[G]: Ptr to group in the model. */
|
|
||||||
int t; /* T: Index of last token in the group. */
|
|
||||||
{
|
|
||||||
struct thdr *p = g; /* Ptr to current token in the model. */
|
|
||||||
int m = 0; /* Size of group (including nested groups). */
|
|
||||||
int i = 0; /* Number of group members (loop counter). */
|
|
||||||
UNS type; /* Token type (without TOREP bits). */
|
|
||||||
|
|
||||||
while (++i<=t) {
|
|
||||||
++p; ++m;
|
|
||||||
type = GET(p->ttype, TTMASK);
|
|
||||||
if (type==TTOR || type==TTSEQ || type==TTAND) {
|
|
||||||
m += grpsz(p, p->tu.tnum);
|
|
||||||
p = g+m;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(m);
|
|
||||||
}
|
|
||||||
/* ALLHIT: Returns 1 if all hit bits for the specified group are turned on,
|
|
||||||
(other than those that correspond to optional tokens if "opt" is
|
|
||||||
0) and the "but" bit (all bits if "but" bit is zero). Otherwise,
|
|
||||||
returns 0. GRPSZ is used to skip past subgroup tokens.
|
|
||||||
*/
|
|
||||||
int allhit(p, hits, but, opt)
|
|
||||||
struct thdr *p; /* mod[G]: Ptr to group in the model. */
|
|
||||||
unsigned long *hits; /* H: Hit bits to be tested. */
|
|
||||||
int but; /* Index of bit to ignore; 0=test all. */
|
|
||||||
int opt; /* 1=optional tokens must be hit; 0=ignore. */
|
|
||||||
{
|
|
||||||
int b = 0; /* Index of bit being tested in hits. */
|
|
||||||
int e = p->tu.tnum; /* Ending index (number of bits to test). */
|
|
||||||
unsigned type; /* Token type (without TOREP bits). */
|
|
||||||
|
|
||||||
while (++p, ++b<=e) {
|
|
||||||
if (HITOFF(hits,b) && (opt || BITOFF(p->ttype,TOPT)) && b!=but)
|
|
||||||
return 0;
|
|
||||||
if ((type = GET(p->ttype,TTMASK))==TTOR || type==TTSEQ || type==TTAND)
|
|
||||||
p += grpsz(p, p->tu.tnum);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
/* OFFBIT: Returns the index of the first unset bit after (i.e., not including)
|
|
||||||
the caller's "first" bit. If all bits through the
|
|
||||||
specified last bit are on, it returns 0.
|
|
||||||
*/
|
|
||||||
int offbit(bits, first, last)
|
|
||||||
unsigned long *bits; /* Bits to be tested. */
|
|
||||||
int first; /* Index of first bit to be tested in bits. */
|
|
||||||
int last; /* Index of last bit to be tested in bits. */
|
|
||||||
{
|
|
||||||
while (++first <= last)
|
|
||||||
if (HITOFF(bits, first))
|
|
||||||
return first;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ANYHIT: Return 1 if any bit is set. */
|
|
||||||
|
|
||||||
int anyhit(bits)
|
|
||||||
unsigned long *bits;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < grplongs; i++)
|
|
||||||
if (bits[i] != 0)
|
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Local Variables:
|
|
||||||
c-indent-level: 5
|
|
||||||
c-continued-statement-offset: 5
|
|
||||||
c-brace-offset: -5
|
|
||||||
c-argdecl-indent: 0
|
|
||||||
c-label-offset: -5
|
|
||||||
comment-column: 30
|
|
||||||
End:
|
|
||||||
*/
|
|
@ -1,19 +0,0 @@
|
|||||||
/* context.h */
|
|
||||||
|
|
||||||
#define M pos[0].g /* Index of current token in model. */
|
|
||||||
#ifdef P
|
|
||||||
#undef P
|
|
||||||
#endif
|
|
||||||
#define P pos[0].t /* Index of current group in pos. */
|
|
||||||
#define G pos[P].g /* Index of current group in model. */
|
|
||||||
#define T pos[P].t /* Index of current token in its group. */
|
|
||||||
#define Tstart pos[P].tstart /* Index of starting token in its group
|
|
||||||
for AND group testing. */
|
|
||||||
#define H pos[P].h /* Pointer to hit bits for current group. */
|
|
||||||
#define GHDR mod[G] /* Current group header. */
|
|
||||||
#define TOKEN mod[M] /* Current token. */
|
|
||||||
#define TTYPE (GET(TOKEN.ttype, TTMASK)) /* Token type of current token. */
|
|
||||||
#define TOCC (GET(TOKEN.ttype, TOREP)) /* Occurrence for current token. */
|
|
||||||
#define GTYPE (GET(GHDR.ttype, TTMASK)) /* Token type of current group. */
|
|
||||||
#define GOCC (GET(GHDR.ttype, TOREP)) /* Occurrence for current group. */
|
|
||||||
#define GNUM GHDR.tu.tnum /* Number of tokens in current grp. */
|
|
@ -1,40 +0,0 @@
|
|||||||
/* dosproc.c -
|
|
||||||
|
|
||||||
MS-DOS implementation of run_process().
|
|
||||||
|
|
||||||
Written by James Clark (jjc@jclark.com).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifdef SUPPORT_SUBDOC
|
|
||||||
|
|
||||||
#include "std.h"
|
|
||||||
#include "entity.h"
|
|
||||||
#include "appl.h"
|
|
||||||
|
|
||||||
#include <process.h>
|
|
||||||
|
|
||||||
int run_process(argv)
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
fflush(stdout);
|
|
||||||
fflush(stderr);
|
|
||||||
ret = spawnvp(P_WAIT, argv[0], argv);
|
|
||||||
if (ret < 0)
|
|
||||||
appl_error(E_EXEC, argv[0], strerror(errno));
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SUPPORT_SUBDOC */
|
|
||||||
|
|
||||||
/*
|
|
||||||
Local Variables:
|
|
||||||
c-indent-level: 5
|
|
||||||
c-continued-statement-offset: 5
|
|
||||||
c-brace-offset: -5
|
|
||||||
c-argdecl-indent: 0
|
|
||||||
c-label-offset: -5
|
|
||||||
End:
|
|
||||||
*/
|
|
@ -1,42 +0,0 @@
|
|||||||
/* ASCII to EBCDIC (ISO 8859-1 to IBM CP 37v2) table. */
|
|
||||||
/* Contributed by C. M. Sperberg-McQueen <u35395@uicvm.uic.edu>. */
|
|
||||||
|
|
||||||
/* The mapping must be 1 to 1. The positions of *CHAR and *CH in the table
|
|
||||||
must not be changed, although the values in ebcdic.h can be. */
|
|
||||||
|
|
||||||
#include "ebcdic.h"
|
|
||||||
|
|
||||||
unsigned char charset[] = {
|
|
||||||
0, 1, 2, 3, 55, 45, 46, 47,
|
|
||||||
GENRECHAR, TABCHAR, RSCHAR, 11, 12, RECHAR, 14, 15,
|
|
||||||
16, 17, 18, 19, 60, 61, 50, 38,
|
|
||||||
24, 25, EOFCHAR, 39, EOBCHAR, DELCDATA, DELSDATA, DELNONCH,
|
|
||||||
SPCCHAR, 90, 127, 123, 91, 108, 80, 125,
|
|
||||||
77, 93, 92, 78, 107, 96, 75, 97,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247,
|
|
||||||
248, 249, 122, 94, 76, 126, 110, 111,
|
|
||||||
124, 193, 194, 195, 196, 197, 198, 199,
|
|
||||||
200, 201, 209, 210, 211, 212, 213, 214,
|
|
||||||
215, 216, 217, 226, 227, 228, 229, 230,
|
|
||||||
231, 232, 233, 173, 224, 189, 176, 109,
|
|
||||||
121, 129, 130, 131, 132, 133, 134, 135,
|
|
||||||
136, 137, 145, 146, 147, 148, 149, 150,
|
|
||||||
151, 152, 153, 162, 163, 164, 165, 166,
|
|
||||||
167, 168, 169, 192, 79, 208, 161, 7,
|
|
||||||
4, 6, 8, 9, 10, 20, 21, 23,
|
|
||||||
26, 27, 32, 33, 34, 35, 36, 40,
|
|
||||||
41, 42, 43, 44, 48, 49, 51, 52,
|
|
||||||
53, 54, 56, 57, 58, 59, 62, 255,
|
|
||||||
65, 170, 74, 177, 159, 178, 106, 181,
|
|
||||||
187, 180, 154, 138, 95, 202, 175, 188,
|
|
||||||
144, 143, 234, 250, 190, 160, 182, 179,
|
|
||||||
157, 218, 155, 139, 183, 184, 185, 171,
|
|
||||||
100, 101, 98, 102, 99, 103, 158, 104,
|
|
||||||
116, 113, 114, 115, 120, 117, 118, 119,
|
|
||||||
172, 105, 237, 238, 235, 239, 236, 191,
|
|
||||||
128, 253, 254, 251, 252, 186, 174, 89,
|
|
||||||
68, 69, 66, 70, 67, 71, 156, 72,
|
|
||||||
84, 81, 82, 83, 88, 85, 86, 87,
|
|
||||||
140, 73, 205, 206, 203, 207, 204, 225,
|
|
||||||
112, 221, 222, 219, 220, 141, 142, 223,
|
|
||||||
};
|
|
@ -1,25 +0,0 @@
|
|||||||
/* SGML Character Use: EBCDIC
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define EOFCHAR '\077' /* FUNCTION: EE (entity end: files). */
|
|
||||||
#define EOBCHAR '\034' /* NONCHAR: EOB (file entity: end of buffer. */
|
|
||||||
#define RSCHAR '\045' /* FUNCTION: RS (record start). */
|
|
||||||
#define RECHAR '\015' /* FUNCTION: RE (record end). */
|
|
||||||
#define TABCHAR '\005' /* FUNCTION: TAB (horizontal tab). */
|
|
||||||
#define SPCCHAR '\100' /* FUNCTION: SPACE (horizontal space). */
|
|
||||||
#define GENRECHAR '\026' /* NONCHAR: Generated RE. */
|
|
||||||
#define DELCDATA '\035' /* NONCHAR: Delimiter for CDATA entity in
|
|
||||||
attribute value. */
|
|
||||||
#define DELSDATA '\036' /* NONCHAR: Delimiter for SDATA entity in
|
|
||||||
attribute value. */
|
|
||||||
#define DELNONCH '\037' /* NONCHAR: non-SGML character prefix. */
|
|
||||||
|
|
||||||
/* This should work for EBCDIC. See comment in latin1.h. */
|
|
||||||
#define SHIFTNON(ch) ((UNCH)(ch) | 0200)
|
|
||||||
#define UNSHIFTNON(ch) ((UNCH)(ch) & ~0200)
|
|
||||||
|
|
||||||
/* See comment in latin1.h. */
|
|
||||||
#define CANON_NONSGML 255
|
|
||||||
|
|
||||||
/* See comment in latin1.h. */
|
|
||||||
#define CANON_DATACHAR 254
|
|
@ -1,517 +0,0 @@
|
|||||||
/* entgen.c -
|
|
||||||
|
|
||||||
Implement entgen() which generates a list of filenames from a struct fpi.
|
|
||||||
|
|
||||||
Written by James Clark (jjc@jclark.com).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_ACCESS
|
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h> /* For R_OK. */
|
|
||||||
#endif /* HAVE_UNISTD_H */
|
|
||||||
|
|
||||||
#ifndef R_OK
|
|
||||||
#define R_OK 4
|
|
||||||
#endif /* not R_OK */
|
|
||||||
|
|
||||||
#endif /* HAVE_ACCESS */
|
|
||||||
|
|
||||||
#include "sgmlaux.h"
|
|
||||||
|
|
||||||
/* Environment variable that contains path. */
|
|
||||||
#ifndef PATH_ENV_VAR
|
|
||||||
#define PATH_ENV_VAR "SGML_PATH"
|
|
||||||
#endif
|
|
||||||
/* Default search path. See field() for interpretation of %*. */
|
|
||||||
#ifndef DEFAULT_PATH
|
|
||||||
#define DEFAULT_PATH "/usr/local/lib/sgml/%O/%C/%T:%N.%X:%N.%D"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef PATH_FILE_SEP
|
|
||||||
#define PATH_FILE_SEP ':'
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SYSID_FILE_SEP
|
|
||||||
#define SYSID_FILE_SEP ':'
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This says: change space to underscore, slash to percent. */
|
|
||||||
|
|
||||||
#ifndef MIN_DAT_SUBS_FROM
|
|
||||||
#define MIN_DAT_SUBS_FROM " /"
|
|
||||||
#endif
|
|
||||||
#ifndef MIN_DAT_SUBS_TO
|
|
||||||
#define MIN_DAT_SUBS_TO "_%"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int field P((struct fpi *, int, char *));
|
|
||||||
static int mindatcpy P((char *, char *, int, int));
|
|
||||||
static int testopen P((char *));
|
|
||||||
static UNIV sysidgen P((char *));
|
|
||||||
static UNIV catsysidgen P((const char *, const char *));
|
|
||||||
static const char *basename P((const char *));
|
|
||||||
|
|
||||||
static char *path = 0;
|
|
||||||
|
|
||||||
/* Non-zero if searching should be performed when a system identifier
|
|
||||||
is specified. */
|
|
||||||
static int sysidsrch = 0;
|
|
||||||
|
|
||||||
#define EMPTY_VERSION "default"
|
|
||||||
|
|
||||||
static char *classes[] = {
|
|
||||||
"capacity",
|
|
||||||
"charset",
|
|
||||||
"notation",
|
|
||||||
"syntax",
|
|
||||||
"document",
|
|
||||||
"dtd",
|
|
||||||
"elements",
|
|
||||||
"entities",
|
|
||||||
"lpd",
|
|
||||||
"nonsgml",
|
|
||||||
"shortref",
|
|
||||||
"subdoc",
|
|
||||||
"text"
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This is mainly for compatibility with arcsgml. */
|
|
||||||
|
|
||||||
static char *genext[] = {
|
|
||||||
"nsd", /* Non-SGML data entity. */
|
|
||||||
"gml", /* GML document or text entity. */
|
|
||||||
"spe", /* System parameter entity. */
|
|
||||||
"dtd", /* Document type definition. */
|
|
||||||
"lpd", /* Link process definition. */
|
|
||||||
"pns", /* Public non-SGML data entity. */
|
|
||||||
"pge", /* Public general entity. */
|
|
||||||
"ppe", /* Public parameter entity. */
|
|
||||||
"pdt", /* Public document type definition. */
|
|
||||||
"plp", /* Public link process definition. */
|
|
||||||
"vns", /* Display version non-SGML data entity. */
|
|
||||||
"vge", /* Display version general entity. */
|
|
||||||
"vpe", /* Display version parameter entity. */
|
|
||||||
"vdt", /* Display version document type definition.*/
|
|
||||||
"vlp", /* Display version link process definition.*/
|
|
||||||
};
|
|
||||||
|
|
||||||
static char *ext[] = {
|
|
||||||
"sgml", /* SGML subdocument */
|
|
||||||
"data", /* Data */
|
|
||||||
"text", /* General text */
|
|
||||||
"parm", /* Parameter entity */
|
|
||||||
"dtd", /* Document type definition */
|
|
||||||
"lpd", /* Link process definition */
|
|
||||||
};
|
|
||||||
|
|
||||||
static CATALOG catalog;
|
|
||||||
|
|
||||||
VOID entginit(swp)
|
|
||||||
struct switches *swp;
|
|
||||||
{
|
|
||||||
catalog = swp->catalog;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Like memcpy, but substitute, fold to lower case (if fold is
|
|
||||||
non-zero) and null terminate. This is used both for minimum data and
|
|
||||||
for names. If p is NULL, do nothing. Return len. */
|
|
||||||
|
|
||||||
static int mindatcpy(p, q, len, fold)
|
|
||||||
char *p, *q;
|
|
||||||
int len;
|
|
||||||
int fold;
|
|
||||||
{
|
|
||||||
static char subsfrom[] = MIN_DAT_SUBS_FROM;
|
|
||||||
static char substo[] = MIN_DAT_SUBS_TO;
|
|
||||||
int n;
|
|
||||||
|
|
||||||
if (!p)
|
|
||||||
return len;
|
|
||||||
for (n = len; --n >= 0; q++) {
|
|
||||||
char *r = strchr(subsfrom, *q);
|
|
||||||
if (!r) {
|
|
||||||
if (fold && ISASCII(*q) && isupper((UNCH)*q))
|
|
||||||
*p++ = tolower((UNCH)*q);
|
|
||||||
else
|
|
||||||
*p++ = *q;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
int i = r - subsfrom;
|
|
||||||
if (i < sizeof(substo) - 1)
|
|
||||||
*p++ = substo[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*p = '\0';
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Return length of field. Copy into buf if non-NULL. */
|
|
||||||
|
|
||||||
static int field(f, c, buf)
|
|
||||||
struct fpi *f;
|
|
||||||
int c;
|
|
||||||
char *buf;
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
|
|
||||||
switch (c) {
|
|
||||||
case '%':
|
|
||||||
if (buf) {
|
|
||||||
buf[0] = '%';
|
|
||||||
buf[1] = '\0';
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
case 'N': /* the entity, document or dcn name */
|
|
||||||
return mindatcpy(buf, (char *)f->fpinm, ustrlen(f->fpinm),
|
|
||||||
(f->fpistore != 1 && f->fpistore != 2 && f->fpistore != 3
|
|
||||||
? NAMECASE
|
|
||||||
: ENTCASE));
|
|
||||||
case 'D': /* dcn name */
|
|
||||||
if (f->fpistore != 1) /* not a external data entity */
|
|
||||||
return -1;
|
|
||||||
if (f->fpinedcn == 0) /* it's a SUBDOC */
|
|
||||||
return -1;
|
|
||||||
return mindatcpy(buf, (char *)f->fpinedcn, ustrlen(f->fpinedcn),
|
|
||||||
NAMECASE);
|
|
||||||
case 'X':
|
|
||||||
/* This is for compatibility with arcsgml */
|
|
||||||
if (f->fpistore < 1 || f->fpistore > 5)
|
|
||||||
return -1;
|
|
||||||
n = (f->fpipubis != 0)*(f->fpiversw > 0 ? 2 : 1)*5+f->fpistore - 1;
|
|
||||||
if (buf)
|
|
||||||
strcpy(buf, genext[n]);
|
|
||||||
return strlen(genext[n]);
|
|
||||||
case 'Y': /* tYpe */
|
|
||||||
n = f->fpistore;
|
|
||||||
if (n < 1 || n > 5)
|
|
||||||
return -1;
|
|
||||||
if (n == 1 && f->fpinedcn == 0) /* it's a SUBDOC */
|
|
||||||
n = 0;
|
|
||||||
if (buf)
|
|
||||||
strcpy(buf, ext[n]);
|
|
||||||
return strlen(ext[n]);
|
|
||||||
case 'P': /* public identifier */
|
|
||||||
if (!f->fpipubis)
|
|
||||||
return -1;
|
|
||||||
return mindatcpy(buf, (char *)f->fpipubis, ustrlen(f->fpipubis), 0);
|
|
||||||
case 'S': /* system identifier */
|
|
||||||
if (!f->fpisysis)
|
|
||||||
return -1;
|
|
||||||
else {
|
|
||||||
UNCH *p;
|
|
||||||
n = 0;
|
|
||||||
for (p = f->fpisysis; *p; p++)
|
|
||||||
if (*p != RSCHAR) {
|
|
||||||
if (buf)
|
|
||||||
buf[n] = *p == RECHAR ? '\n' : *p;
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Other fields need a formal public identifier. */
|
|
||||||
/* return -1 if the formal public identifier was invalid or missing. */
|
|
||||||
if (f->fpiversw < 0 || !f->fpipubis)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
switch (c) {
|
|
||||||
case 'A': /* Is it available? */
|
|
||||||
return f->fpitt == '+' ? 0 : -1;
|
|
||||||
case 'I': /* Is it ISO? */
|
|
||||||
return f->fpiot == '!' ? 0 : -1;
|
|
||||||
case 'R': /* Is it registered? */
|
|
||||||
return f->fpiot == '+' ? 0 : -1;
|
|
||||||
case 'U': /* Is it unregistered? */
|
|
||||||
return f->fpiot == '-' ? 0 : -1;
|
|
||||||
case 'L': /* public text language */
|
|
||||||
if (f->fpic == FPICHARS)
|
|
||||||
return -1;
|
|
||||||
/* it's entered in all upper case letters */
|
|
||||||
return mindatcpy(buf, (char *)f->fpipubis + f->fpil, f->fpill, 1);
|
|
||||||
case 'O': /* owner identifier */
|
|
||||||
return mindatcpy(buf, (char *)f->fpipubis + f->fpio, f->fpiol, 0);
|
|
||||||
case 'C': /* public text class */
|
|
||||||
n = f->fpic - 1;
|
|
||||||
if (n < 0 || n >= sizeof(classes)/sizeof(classes[0]))
|
|
||||||
return -1;
|
|
||||||
if (buf)
|
|
||||||
strcpy(buf, classes[n]);
|
|
||||||
return strlen(classes[n]);
|
|
||||||
case 'T': /* text description */
|
|
||||||
return mindatcpy(buf, (char *)f->fpipubis + f->fpit, f->fpitl, 0);
|
|
||||||
case 'V':
|
|
||||||
if (f->fpic < FPICMINV) /* class doesn't have version */
|
|
||||||
return -1;
|
|
||||||
if (f->fpiversw > 0) /* no version */
|
|
||||||
return -1;
|
|
||||||
if (f->fpivl == 0) { /* empty version: */
|
|
||||||
/* use device-independent version*/
|
|
||||||
if (buf)
|
|
||||||
strcpy(buf, EMPTY_VERSION);
|
|
||||||
return strlen(EMPTY_VERSION);
|
|
||||||
}
|
|
||||||
return mindatcpy(buf, (char *)f->fpipubis + f->fpiv, f->fpivl, 0);
|
|
||||||
case 'E': /* public text designating (escape) sequence */
|
|
||||||
if (f->fpic != FPICHARS)
|
|
||||||
return -1;
|
|
||||||
return mindatcpy(buf, (char *)f->fpipubis + f->fpil, f->fpill, 0);
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int testopen(pathname)
|
|
||||||
char *pathname;
|
|
||||||
{
|
|
||||||
#ifdef HAVE_ACCESS
|
|
||||||
return access(pathname, R_OK) >= 0;
|
|
||||||
#else /* not HAVE_ACCESS */
|
|
||||||
FILE *fp;
|
|
||||||
fp = fopen(pathname, "r");
|
|
||||||
if (!fp)
|
|
||||||
return 0;
|
|
||||||
fclose(fp);
|
|
||||||
return 1;
|
|
||||||
#endif /* not HAVE_ACCESS */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return a pointer to an dynamically-allocated buffer that contains
|
|
||||||
the names of the files containing this entity, with each filename
|
|
||||||
terminated by a '\0', and with the list of filenames terminated by
|
|
||||||
another '\0'. */
|
|
||||||
|
|
||||||
UNIV entgen(f)
|
|
||||||
struct fpi *f;
|
|
||||||
{
|
|
||||||
char *qname;
|
|
||||||
char *file;
|
|
||||||
enum catalog_decl_type dtype;
|
|
||||||
char *subst = 0;
|
|
||||||
const char *sysid;
|
|
||||||
const char *catfile;
|
|
||||||
|
|
||||||
assert(f->fpistore != 6); /* Musn't call entgen for a notation. */
|
|
||||||
if (!path) {
|
|
||||||
char *p;
|
|
||||||
char c;
|
|
||||||
path = getenv(PATH_ENV_VAR);
|
|
||||||
if (!path)
|
|
||||||
path = DEFAULT_PATH;
|
|
||||||
p = path;
|
|
||||||
|
|
||||||
/* Only search for system identifiers if path uses %S. */
|
|
||||||
while ((c = *p++) != '\0')
|
|
||||||
if (c == '%') {
|
|
||||||
if (*p == 'S') {
|
|
||||||
sysidsrch = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (*p != '\0' && *p != PATH_FILE_SEP)
|
|
||||||
p++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (f->fpisysis && !sysidsrch)
|
|
||||||
return sysidgen((char *)f->fpisysis);
|
|
||||||
|
|
||||||
qname = (char *)f->fpinm;
|
|
||||||
|
|
||||||
switch (f->fpistore) {
|
|
||||||
case 3:
|
|
||||||
/* fall through */
|
|
||||||
qname--; /* hack */
|
|
||||||
case 1:
|
|
||||||
case 2:
|
|
||||||
dtype = CATALOG_ENTITY_DECL;
|
|
||||||
if (ENTCASE)
|
|
||||||
subst = getsubst();
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
dtype = CATALOG_DOCTYPE_DECL;
|
|
||||||
if (NAMECASE)
|
|
||||||
subst = getsubst();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
dtype = CATALOG_NO_DECL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (catalog_lookup_entity(catalog,
|
|
||||||
(char *)f->fpipubis,
|
|
||||||
qname,
|
|
||||||
dtype,
|
|
||||||
(char *)subst,
|
|
||||||
&sysid,
|
|
||||||
&catfile))
|
|
||||||
return catsysidgen(sysid, catfile);
|
|
||||||
if (f->fpisysis
|
|
||||||
&& (strchr((char *)f->fpisysis, SYSID_FILE_SEP)
|
|
||||||
|| strcmp((char *)f->fpisysis, STDINNAME) == 0))
|
|
||||||
return sysidgen((char *)f->fpisysis);
|
|
||||||
|
|
||||||
file = path;
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
char *p;
|
|
||||||
int len = 0;
|
|
||||||
char *fileend = strchr(file, PATH_FILE_SEP);
|
|
||||||
if (!fileend)
|
|
||||||
fileend = strchr(file, '\0');
|
|
||||||
|
|
||||||
/* Check that all substitutions are non-null, and calculate
|
|
||||||
the resulting total length of the filename. */
|
|
||||||
for (p = file; p < fileend; p++)
|
|
||||||
if (*p == '%') {
|
|
||||||
int n;
|
|
||||||
/* Set len to -1 if a substitution is invalid. */
|
|
||||||
if (++p >= fileend) {
|
|
||||||
len = -1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
n = field(f, *p, (char *)0);
|
|
||||||
if (n < 0) {
|
|
||||||
len = -1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
len += n;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
len++;
|
|
||||||
|
|
||||||
if (len > 0) {
|
|
||||||
/* We've got a valid non-empty filename. */
|
|
||||||
char *s;
|
|
||||||
char *buf;
|
|
||||||
|
|
||||||
s = buf = (char *)rmalloc(len + 2);
|
|
||||||
for (p = file; p < fileend; p++)
|
|
||||||
if (*p == '%')
|
|
||||||
s += field(f, *++p, s);
|
|
||||||
else
|
|
||||||
*s++ = *p;
|
|
||||||
*s++ = '\0';
|
|
||||||
if (testopen(buf)) {
|
|
||||||
/* Terminate the array of filenames. */
|
|
||||||
*s++ = '\0';
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
free((UNIV)buf);
|
|
||||||
}
|
|
||||||
if (*fileend == '\0')
|
|
||||||
break;
|
|
||||||
file = ++fileend;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle a system identifier without searching. */
|
|
||||||
|
|
||||||
static
|
|
||||||
UNIV sysidgen(s)
|
|
||||||
char *s;
|
|
||||||
{
|
|
||||||
char *buf, *p;
|
|
||||||
|
|
||||||
buf = (char *)rmalloc(strlen(s) + 2);
|
|
||||||
|
|
||||||
for (p = buf; *s; s++) {
|
|
||||||
if (*s == SYSID_FILE_SEP) {
|
|
||||||
if (p > buf && p[-1] != '\0')
|
|
||||||
*p++ = '\0';
|
|
||||||
}
|
|
||||||
else if (*s == RECHAR)
|
|
||||||
*p++ = '\n';
|
|
||||||
else if (*s != RSCHAR)
|
|
||||||
*p++ = *s;
|
|
||||||
}
|
|
||||||
/* Terminate this filename. */
|
|
||||||
if (p > buf && p[-1] != '\0')
|
|
||||||
*p++ = '\0';
|
|
||||||
if (p == buf) {
|
|
||||||
/* No filenames. */
|
|
||||||
frem((UNIV)buf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/* Terminate the list. */
|
|
||||||
*p++ = '\0';
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle a system id in a catalog entry file. */
|
|
||||||
static
|
|
||||||
UNIV catsysidgen(s, catfile)
|
|
||||||
const char *s;
|
|
||||||
const char *catfile;
|
|
||||||
{
|
|
||||||
const char *p;
|
|
||||||
char *bufp;
|
|
||||||
char *buf;
|
|
||||||
int nrelative = 0;
|
|
||||||
int catdirlen = 0;
|
|
||||||
if (FILE_IS_RELATIVE(s))
|
|
||||||
nrelative++;
|
|
||||||
for (p = s; *p; p++)
|
|
||||||
if (*p == SYSID_FILE_SEP
|
|
||||||
&& FILE_IS_RELATIVE(p + 1))
|
|
||||||
nrelative++;
|
|
||||||
if (nrelative) {
|
|
||||||
const char *base = basename(catfile);
|
|
||||||
catdirlen = base - catfile;
|
|
||||||
}
|
|
||||||
buf = (char *)rmalloc(p - s + 2 + nrelative*catdirlen);
|
|
||||||
bufp = buf;
|
|
||||||
for (;;) {
|
|
||||||
if (!*s)
|
|
||||||
break;
|
|
||||||
if (*s != SYSID_FILE_SEP && FILE_IS_RELATIVE(s)) {
|
|
||||||
memcpy(bufp, catfile, catdirlen);
|
|
||||||
bufp += catdirlen;
|
|
||||||
}
|
|
||||||
for (;;) {
|
|
||||||
if (*s == SYSID_FILE_SEP) {
|
|
||||||
s++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*bufp++ = *s++;
|
|
||||||
if (*s == '\0')
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (bufp > buf && bufp[-1] != '\0')
|
|
||||||
*bufp++ = '\0';
|
|
||||||
}
|
|
||||||
if (bufp == buf) {
|
|
||||||
frem((UNIV)buf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
*bufp++ = '\0';
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
const char *basename(s)
|
|
||||||
const char *s;
|
|
||||||
{
|
|
||||||
const char *p = s;
|
|
||||||
while (*p)
|
|
||||||
p++;
|
|
||||||
if (p > s) {
|
|
||||||
while (--p > s)
|
|
||||||
if (strchr(DIR_BASE_SEP, *p))
|
|
||||||
return p + 1;
|
|
||||||
}
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Local Variables:
|
|
||||||
c-indent-level: 5
|
|
||||||
c-continued-statement-offset: 5
|
|
||||||
c-brace-offset: -5
|
|
||||||
c-argdecl-indent: 0
|
|
||||||
c-label-offset: -5
|
|
||||||
End:
|
|
||||||
*/
|
|
@ -1,192 +0,0 @@
|
|||||||
/* Struct dcncb: attribute list added to support data attributes. */
|
|
||||||
#ifndef ENTITY_H /* Don't include this file more than once. */
|
|
||||||
#define ENTITY_H
|
|
||||||
/* ENTITY.H: Definitions and control block templates for entity management.
|
|
||||||
*/
|
|
||||||
#include "tools.h" /* Definitions for type declarations, etc. */
|
|
||||||
#include "msgcat.h"
|
|
||||||
#include "catalog.h"
|
|
||||||
|
|
||||||
#define STDINNAME "-" /* File name that refers to standard input. */
|
|
||||||
|
|
||||||
#define EOS '\0' /* NONCHAR: EE (entity end: strings). */
|
|
||||||
|
|
||||||
#define AVALCASE 2 /* 2=untranslated string of name characters. */
|
|
||||||
|
|
||||||
#define REFNAMELEN 8 /* reference quantity set NAMELEN */
|
|
||||||
#define REFLITLEN 240 /* reference quantity set LITLEN */
|
|
||||||
|
|
||||||
/* Minimization status of returned tags.
|
|
||||||
*/
|
|
||||||
#define MINNONE 0 /* Minimization: tag not minimized. */
|
|
||||||
#define MINNULL 1 /* Minimization: tag was null. */
|
|
||||||
#define MINNET 2 /* Minimization: end-tag was NET delimiter. */
|
|
||||||
#define MINDATA 3 /* Minimization: end-tag was data tag. */
|
|
||||||
#define MINSTAG 4 /* Minimization: tag implied by start-tag. */
|
|
||||||
#define MINETAG 5 /* Minimization: end-tag implied by end-tag. */
|
|
||||||
|
|
||||||
/* Formal public identifier public text classes.
|
|
||||||
*/
|
|
||||||
#define FPICAP 1
|
|
||||||
#define FPICHARS 2
|
|
||||||
#define FPINOT 3
|
|
||||||
#define FPISYN 4
|
|
||||||
#define FPICMINV 5 /* Minimum fpic value for versionable text. */
|
|
||||||
#define FPIDOC 5
|
|
||||||
#define FPIDTD 6
|
|
||||||
#define FPIELEM 7
|
|
||||||
#define FPIENT 8
|
|
||||||
#define FPILPD 9
|
|
||||||
#define FPINON 10
|
|
||||||
#define FPISHORT 11
|
|
||||||
#define FPISUB 12
|
|
||||||
#define FPITEXT 13
|
|
||||||
struct fpi { /* Formal public identifier. */
|
|
||||||
UNCH fpiot; /* Owner type: + or - or ! (for ISO). */
|
|
||||||
UNS fpiol; /* Length of owner identifier. */
|
|
||||||
UNS fpio; /* Offset in pubis of owner identifier (no EOS).*/
|
|
||||||
int fpic; /* Public text class. */
|
|
||||||
UNCH fpitt; /* Text type: - or + (for available). */
|
|
||||||
UNS fpitl; /* Length of text identifier. */
|
|
||||||
UNS fpit; /* Offset in pubis of text identifier (no EOS). */
|
|
||||||
UNS fpill; /* Language/designating sequence length. */
|
|
||||||
UNS fpil; /* Offset in pubis of language. */
|
|
||||||
UNS fpivl; /* Length of display version . */
|
|
||||||
UNS fpiv; /* Offset in pubis of display version (no EOS). */
|
|
||||||
int fpiversw; /* 1=use best ver; 0=use stated ver; -1=error. */
|
|
||||||
UNCH *fpinm; /* Entity/DCN name (EOS, no length). */
|
|
||||||
UNCH fpistore; /* 1=NDATA 2=general 3=parm 4=DTD 5=LPD 6=DCN. */
|
|
||||||
/* Name of the entity's DCN. Valid only when fpistore == 1.
|
|
||||||
NULL if it's a SUBDOC. */
|
|
||||||
UNCH *fpinedcn;
|
|
||||||
UNCH *fpipubis; /* Public ID string (EOS). */
|
|
||||||
UNCH *fpisysis; /* System ID string (EOS). */
|
|
||||||
};
|
|
||||||
#define FPISZ sizeof(struct fpi)
|
|
||||||
typedef struct fpi *PFPI; /* Ptr to FPI control block. */
|
|
||||||
|
|
||||||
/* General control blocks.
|
|
||||||
*/
|
|
||||||
#define NONONCH 1 /* Character references to non-chars invalid. */
|
|
||||||
#define OKNONCH 0 /* Character references to non-chars allowed. */
|
|
||||||
struct parse { /* Parse control block. */
|
|
||||||
char *pname; /* Parse name; content, tag, etc. */
|
|
||||||
UNCH *plex; /* Lexical analysis table. */
|
|
||||||
UNCH **ptab; /* State and action table. */
|
|
||||||
UNS state; /* State. */
|
|
||||||
UNS input; /* Input. */
|
|
||||||
UNS action; /* Action. */
|
|
||||||
UNS newstate; /* Next state. */
|
|
||||||
};
|
|
||||||
struct restate {
|
|
||||||
UNS sstate; /* State. */
|
|
||||||
UNS sinput; /* Input. */
|
|
||||||
UNS saction; /* Action. */
|
|
||||||
UNS snext; /* Next state. */
|
|
||||||
};
|
|
||||||
struct map {
|
|
||||||
UNCH *mapnm; /* Name followed by EOS. */
|
|
||||||
int mapdata; /* Data associated with that name. */
|
|
||||||
};
|
|
||||||
struct hash { /* Dummy structure for function arguments. */
|
|
||||||
struct hash *enext; /* Next entry in chain. */
|
|
||||||
UNCH *ename; /* Entry name with size and EOS. */
|
|
||||||
};
|
|
||||||
typedef struct hash *PHASH; /* Ptr to hash table entry. */
|
|
||||||
typedef struct hash **THASH; /* Ptr to hash table. */
|
|
||||||
|
|
||||||
struct fwdref { /* A forward id reference. */
|
|
||||||
struct fwdref *next; /* Pt to next reference in chain. */
|
|
||||||
UNIV msg; /* Ptr to saved error messsage. */
|
|
||||||
};
|
|
||||||
#define FWDREFSZ sizeof(struct fwdref)
|
|
||||||
|
|
||||||
struct dcncb { /* Data content notation control block. */
|
|
||||||
struct dcncb *enext; /* Next DCN in chain. */
|
|
||||||
UNCH *ename; /* Notation name followed by EOS. */
|
|
||||||
UNCH mark; /* For use by application. */
|
|
||||||
UNCH entsw; /* Entity defined with this notation? */
|
|
||||||
UNCH defined; /* Has this notation been defined. */
|
|
||||||
UNCH *sysid; /* System identifier of notation. */
|
|
||||||
UNCH *pubid; /* Public identifier of notation. */
|
|
||||||
struct ad *adl; /* Data attribute list (NULL if none). */
|
|
||||||
};
|
|
||||||
#define DCBSZ sizeof(struct dcncb)
|
|
||||||
#define DCNMARK(p) ((p)->mark ? 1 : ((p)->mark = 1, 0))
|
|
||||||
|
|
||||||
typedef struct dcncb *PDCB; /* Ptr to DCN control block. */
|
|
||||||
|
|
||||||
/* Number of capacities in a capacity set. */
|
|
||||||
|
|
||||||
#define NCAPACITY 17
|
|
||||||
|
|
||||||
struct sgmlcap {
|
|
||||||
char **name;
|
|
||||||
UNCH *points;
|
|
||||||
long *number;
|
|
||||||
long *limit;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sgmlstat { /* Document statistics. */
|
|
||||||
UNS dcncnt; /* Number of data content notations defined. */
|
|
||||||
UNS pmexgcnt; /* Number of plus or minus exception groups. */
|
|
||||||
UNS etdcnt; /* Number of element types declared. */
|
|
||||||
UNS etdercnt; /* Number of element types defined by default. */
|
|
||||||
UNS pmexcnt; /* Number of plus/minus exception grp members. */
|
|
||||||
UNS modcnt; /* Number of content model tokens defined. */
|
|
||||||
UNS attcnt; /* Number of attributes defined. */
|
|
||||||
UNS attdef; /* Characters of attribute defaults defined. */
|
|
||||||
UNS attgcnt; /* Number of att value grp members (incl dcn). */
|
|
||||||
UNS idcnt; /* Number of ID attributes specified. */
|
|
||||||
UNS idrcnt; /* Number of ID references specified. */
|
|
||||||
UNS ecbcnt; /* Number of entities declared. */
|
|
||||||
UNS ecbtext; /* Characters of entity text defined. */
|
|
||||||
UNS srcnt; /* Number of short reference tables defined. */
|
|
||||||
UNS dcntext; /* Characters of notation identifiers defined. */
|
|
||||||
};
|
|
||||||
struct switches { /* Parser control switches (1=non-standard). */
|
|
||||||
int swdupent; /* 1=msg if duplicate ENTITY def attempted;0=no.*/
|
|
||||||
int swcommnt; /* 1=return comment declarations as data; 0=no. */
|
|
||||||
int swrefmsg; /* 1=msg if undeclared ref is defaulted; 0=no. */
|
|
||||||
UNS swbufsz; /* Size of source file buffer for READ(). */
|
|
||||||
int swenttr; /* 1=trace entity stack in error messages; 0=no.*/
|
|
||||||
int sweltr; /* 1=trace element stack in error messages; 0=no. */
|
|
||||||
int swambig; /* 1=check content model ambiguity */
|
|
||||||
int swundef; /* 1=warn about undefined elements. */
|
|
||||||
int swcap; /* 1=report capcity errors */
|
|
||||||
char *prog; /* Program name for error messages. */
|
|
||||||
#ifdef TRACE
|
|
||||||
char *trace; /* What to trace in the body. */
|
|
||||||
char *ptrace; /* What to trace in the prolog. */
|
|
||||||
#endif /* TRACE */
|
|
||||||
nl_catd catd; /* Message catalog descriptor. */
|
|
||||||
long nopen; /* Number of open document entities */
|
|
||||||
int onlypro; /* Parse only the prolog. */
|
|
||||||
char **includes; /* List of parameter entities to be defined
|
|
||||||
as "INCLUDE"; NULL terminated.*/
|
|
||||||
VOID (*die) P((void)); /* Function to call on fatal error. */
|
|
||||||
CATALOG catalog; /* Catalog for generating system identifiers. */
|
|
||||||
};
|
|
||||||
struct markup { /* Delimiter strings for text processor. */
|
|
||||||
UNCH *cro; /* LEXCON markup string: CRO */
|
|
||||||
UNCH *dso; /* LEXCON markup string: DSO */
|
|
||||||
UNCH *ero; /* LEXCON markup string: ERO */
|
|
||||||
UNCH *etag; /* LEXMARK markup string: end-tag */
|
|
||||||
UNCH *lit; /* LEXMARK markup string: LIT */
|
|
||||||
UNCH *lita; /* LEXMARK markup string: LITA */
|
|
||||||
UNCH *mdc; /* LEXCON markup string: MDC */
|
|
||||||
UNCH *mdo; /* LEXCON markup string: MDO */
|
|
||||||
UNCH *mse; /* LEXCON markup string: mse */
|
|
||||||
UNCH *mss; /* LEXCON markup string: mss */
|
|
||||||
UNCH *mssc; /* LEXCON markup string: mss CDATA */
|
|
||||||
UNCH *mssr; /* LEXCON markup string: mss RCDATA */
|
|
||||||
UNCH *pic; /* LEXCON markup string: PIC */
|
|
||||||
UNCH *pio; /* LEXCON markup string: PIO */
|
|
||||||
UNCH *refc; /* LEXGRP markup string: REFC */
|
|
||||||
UNCH *stag; /* LEXMARK markup string: start-tag */
|
|
||||||
UNCH *tagc; /* LEXMARK markup string: TAGC */
|
|
||||||
UNCH *vi; /* LEXMARK markup string: VI */
|
|
||||||
int lennet; /* LEXMARK markup string length: null end-tag. */
|
|
||||||
int lennst; /* LEXMARK markup string length: null start-tag.*/
|
|
||||||
};
|
|
||||||
#endif /* ndef ENTITY_H */
|
|
@ -1,61 +0,0 @@
|
|||||||
/* ERROR.H: Symbols for SGML error codes (start with 'E_').
|
|
||||||
Numbers 46 - 56 are generated by ERROR.C.
|
|
||||||
Later numbers are coded directly.
|
|
||||||
*/
|
|
||||||
/* SGMLERR.C: General errors and syntax errors.
|
|
||||||
*/
|
|
||||||
#define E_CONTEXT 1 /* W GI not allowed at this point in structure. */
|
|
||||||
#define E_MDNAME 2 /* E Invalid markup declaration name. */
|
|
||||||
/*efine E_LEN 3 E Syntax error: length exceeded. */
|
|
||||||
#define E_SYS 4 /* W Illegal system character. */
|
|
||||||
#define E_ETAG 5 /* E End-tag does not match any open start-tag. */
|
|
||||||
#define E_STAGMAX 6 /* E Maximum number of open elements exceeded. */
|
|
||||||
/* E_ALLNULL 7 W Start- and end-tag omitted with null content. */
|
|
||||||
#define E_EOF 8 /* E/W Illegal entity end in markup or delimited text. */
|
|
||||||
/* fine E_INV 9 E Markup error: invalid character. */
|
|
||||||
#define E_CHARS 10 /* W Data found in content that doesn't allow it. */
|
|
||||||
/* fine E_NOETDE 11 E End-tag GI not defined by element declaration. */
|
|
||||||
#define E_BADNM 12 /* E Name is not syntactically valid. */
|
|
||||||
#define E_BADATT 13 /* E Attribute was not defined by element declaration. */
|
|
||||||
#define E_VALINV 14 /* W Att value/declaration conflict: invalid char. */
|
|
||||||
#define E_VALLEN 15 /* W Att value/declaration conflict: token too long. */
|
|
||||||
#define E_VALCNT 16 /* W Att value/declaration conflict: too many tokens. */
|
|
||||||
#define E_VALTYPE 17 /* W Att value/declaration conflict: wrong token type.*/
|
|
||||||
#define E_VALGRP 18 /* W Att value/declaration conflict: token not in grp.*/
|
|
||||||
#define E_VALREQ 19 /* W Att value/declaration conflict: req unspecified. */
|
|
||||||
/* E_EMIN 20 W End-tag implied by end-tag; not minimizable. */
|
|
||||||
/* E_SMIN 21 W Omitted start-tag was not minimizable. */
|
|
||||||
#define E_POSSATT 22 /* E Possible att found but not defined; used as data.*/
|
|
||||||
/* Late additions numbered out of order to avoid recompilation. */
|
|
||||||
/*efine E_ENTSYNC 37 E Entity and group nesting levels out of sync. */
|
|
||||||
#define E_BADVAL 25 /* W Att value omitted (null); default used. */
|
|
||||||
/* E_ECONTXT 30 W Element ended prematurely (some content omitted).*/
|
|
||||||
/* E_EMINST 39 W End-tag implied by start-tag; not minimizable. */
|
|
||||||
/* E_MEXTAG 40 W *** In Use *** */
|
|
||||||
#define E_MEXERR 41 /* W Attempt to exclude contextually required element.*/
|
|
||||||
#define E_DOCTYPE 42 /* W No document type defined; *DOCTYPE assumed. */
|
|
||||||
/* E_NOETDS 43 E Start-tag GI not defined by element declaration. */
|
|
||||||
#define E_RESTART 44 /* E Invalid chars ignored; trying to restart parse. */
|
|
||||||
|
|
||||||
/* MDERROR.C: Errors in markup declarations.
|
|
||||||
*/
|
|
||||||
/*efine E_DUP 23 E Duplicate specification. */
|
|
||||||
/*efine E_KEY 24 E Incorrect keyword for parameter. */
|
|
||||||
/*efine E_MSE 26 E MSE occurred with no corresponding MS. */
|
|
||||||
/*efine E_MSS 27 E MSS exceeded maximum nesting level. */
|
|
||||||
/*efine E_NUM 28 E Incorrect number of parameters. */
|
|
||||||
#define E_TYPE 29 /* E Incorrect parameter type. */
|
|
||||||
/* Late additions numbered out of order to avoid recompilation. */
|
|
||||||
/*efine E_VAL 38 W Incorrect parameter value. */
|
|
||||||
|
|
||||||
/* RESERROR.C: Errors in resource routines.
|
|
||||||
*/
|
|
||||||
/* Unused I End of primary source entity. */
|
|
||||||
/* fine E_FILBUF 31 E Could not read next buffer. */
|
|
||||||
/* fine E_ERFILE 32 E Could not open file. */
|
|
||||||
/* fine E_MALLOC 33 T Could not obtain required main storage. */
|
|
||||||
/* fine E_ERMAX 34 E Maximum number of open entities exceeded. */
|
|
||||||
/* fine E_ERNAME 35 E Referenced entity undeclared. */
|
|
||||||
/* fine E_ERLOOP 36 E Entity referenced within itself: ref ignored. */
|
|
||||||
/* Late additions numbered out of order to avoid recompilation. */
|
|
||||||
/* E_ERDEF 45 E Referenced entity undeclared; SYSTEM assumed. */
|
|
@ -1,93 +0,0 @@
|
|||||||
/* ETYPE.H: Definitions for element type and group processing.
|
|
||||||
*/
|
|
||||||
#define MCHARS 0x80 /* Model: contains #CHARS. */
|
|
||||||
#define MGI 0x40 /* Model: contains GI names. */
|
|
||||||
#define MPHRASE 0x20 /* Model: first token is #CHARS. */
|
|
||||||
#define MKEYWORD 0x1F /* Model: defined with single keyword. */
|
|
||||||
#define MNONE 0x10 /* Model: contains no GIs or #CHARS. */
|
|
||||||
#define MANY 0x08 /* Model: contains any GIs or #CHARS. */
|
|
||||||
#define MRCDATA 0x04 /* Model: contains RCDATA. */
|
|
||||||
#define MCDATA 0x02 /* Model: contains CDATA. */
|
|
||||||
|
|
||||||
#define TOREP (TOPT+TREP) /* 11000000 Optional and repeatable. */
|
|
||||||
#define TOPT 0x80 /* Token: 1=optional; 0=required. */
|
|
||||||
#define TREP 0x40 /* Token: 1=repeatable; 0=not. */
|
|
||||||
#define TXOREP (TXOPT+TXREP) /* * explicitly specified */
|
|
||||||
#define TXOPT 0x20 /* ? explicitly specified */
|
|
||||||
#define TXREP 0x10 /* + explicitly specified */
|
|
||||||
#define TTMASK 0x0F /* 00001111 Mask for testing token type. */
|
|
||||||
#define TTETD 4 /* 00000100 Token is an ETD. */
|
|
||||||
#define TTAND 3 /* 00000011 Token is an AND group. */
|
|
||||||
#define TTSEQ 2 /* 00000010 Token is a sequence group. */
|
|
||||||
#define TTOR 1 /* 00000001 Token is an OR group. */
|
|
||||||
#define TTCHARS 0 /* 00000000 Token is #CHARS. */
|
|
||||||
|
|
||||||
struct thdr { /* Token header or model header. */
|
|
||||||
UNCH ttype; /* Token type attributes or model content. */
|
|
||||||
union {
|
|
||||||
int tnum; /* Group token: tokens in group.
|
|
||||||
Model header: content tokens at any level. */
|
|
||||||
struct etd *thetd; /* GI token: ptr to etd. */
|
|
||||||
} tu;
|
|
||||||
};
|
|
||||||
#define THSZ (sizeof(struct thdr))
|
|
||||||
|
|
||||||
#define ETDHASH 211 /* Size of element hash table. Must be prime. */
|
|
||||||
#define SMO 0x40 /* ETDMIN: Start-tag O minimization. */
|
|
||||||
#define EMO 0x04 /* ETDMIN: End-tag O minimization. */
|
|
||||||
#define EMM 0x02 /* ETDMIN: End-tag minimization explicitly
|
|
||||||
specified to be minus */
|
|
||||||
#define ETDDCL 0x80 /* ETDMIN: Element was declared. */
|
|
||||||
#define ETDUSED 0x20 /* ETDMIN: Element used in another declaration. */
|
|
||||||
#define ETDOCC 0x10 /* ETDMIN: Element occurred in document. */
|
|
||||||
|
|
||||||
struct etd { /* Element type definition. */
|
|
||||||
struct etd *etdnext; /* Next element type definition in hash chain. */
|
|
||||||
UNCH *etdgi; /* GI preceded by its length, followed by EOS. */
|
|
||||||
UNCH etdmin; /* Flag bits: minimization. */
|
|
||||||
UNCH mark; /* Mark bit: for ambiguity checking */
|
|
||||||
struct thdr *etdmod; /* Content model. */
|
|
||||||
struct etd **etdmex; /* Minus exceptions. */
|
|
||||||
struct etd **etdpex; /* Plus exceptions. */
|
|
||||||
struct ad *adl; /* Attribute descriptor list. */
|
|
||||||
struct entity **etdsrm; /* Short reference map. */
|
|
||||||
};
|
|
||||||
#define ETDSZ (sizeof(struct etd))
|
|
||||||
typedef struct etd *PETD;
|
|
||||||
extern struct etd dumetd[];
|
|
||||||
|
|
||||||
/* Number of bits in a long must be >= 1<<LONGPOW */
|
|
||||||
#define LONGPOW 5
|
|
||||||
|
|
||||||
#define LONGBITS (1<<LONGPOW)
|
|
||||||
|
|
||||||
struct mpos { /* Position of current element in model. */
|
|
||||||
UNCH g; /* Index of this group in the model. */
|
|
||||||
UNCH t; /* Index of the current token in this group. */
|
|
||||||
UNCH tstart; /* Index of starting token for AND group
|
|
||||||
testing. */
|
|
||||||
unsigned long *h; /* Hit bits of this group's tokens. */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define HITCLEAR(h) MEMZERO((UNIV)(h), grplongs*sizeof(unsigned long))
|
|
||||||
|
|
||||||
#define TAGCONER 0x01 /* 00000001 (contersw) Tag was out of context. */
|
|
||||||
#define TAGNET 0x02 /* 00000010 (etisw) Tag has NET enabled. */
|
|
||||||
#define TAGPEX 0x04 /* 00000100 (pexsw) Tag was plus exception. */
|
|
||||||
#define TAGREF 0x08 /* 00001000 (conrefsw) Tag had CONREF or EMPTY.*/
|
|
||||||
struct tag { /* Tag control block. */
|
|
||||||
UNCH status; /* Status of context check. */
|
|
||||||
UNCH tflags; /* Flags: TAGCONER TAGNET TAGPEX TAGREF */
|
|
||||||
struct etd *tetd; /* Element type definition for tag. */
|
|
||||||
struct entity **tsrm; /* Current short reference map. */
|
|
||||||
struct mpos *tpos; /* Position of next tag in this model. */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define RCEND 1 /* No more tokens: end element and retry GI. */
|
|
||||||
#define RCREQ 2 /* Required GI must precede proposed GI. */
|
|
||||||
#define RCMISS 3 /* GI invalid: not element end; no required GI. */
|
|
||||||
#define RCHIT 4 /* GI is the one expected next. */
|
|
||||||
#define RCMEX 5 /* GI invalid: minus exception. */
|
|
||||||
#define RCHITMEX 6 /* RCMEX with invalid attempted minus exclusion.*/
|
|
||||||
#define RCPEX 7 /* GI is valid solely because of plus exclusion.*/
|
|
||||||
#define RCNREQ 8 /* Token is not required; can retry invalid GI. */
|
|
@ -1,121 +0,0 @@
|
|||||||
/* exclude.c -
|
|
||||||
Exclusion checking.
|
|
||||||
|
|
||||||
Written by James Clark (jjc@jclark.com).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "sgmlincl.h"
|
|
||||||
|
|
||||||
static int excktok P((struct thdr *, int, int *));
|
|
||||||
static int exmark P((int));
|
|
||||||
|
|
||||||
/* Check that the current exclusions are legal for the content model
|
|
||||||
of the current element. */
|
|
||||||
|
|
||||||
VOID exclude()
|
|
||||||
{
|
|
||||||
struct thdr *mod = tags[ts].tetd->etdmod;
|
|
||||||
|
|
||||||
if ((mod->ttype & MKEYWORD) == 0 && exmark(1)) {
|
|
||||||
int excl;
|
|
||||||
|
|
||||||
excktok(mod + 1, 0, &excl);
|
|
||||||
exmark(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the mark field of all current exclusions to val. Return 1 if
|
|
||||||
there are some current exclusions. */
|
|
||||||
|
|
||||||
static
|
|
||||||
int exmark(val)
|
|
||||||
int val;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int gotone = 0;
|
|
||||||
|
|
||||||
for (i = ts; i > 0; --i) {
|
|
||||||
struct etd **p = tags[i].tetd->etdmex;
|
|
||||||
if (p) {
|
|
||||||
for (; *p; p++)
|
|
||||||
(*p)->mark = val;
|
|
||||||
gotone = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return gotone;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check exclusions for this token. Return size of token. */
|
|
||||||
|
|
||||||
static
|
|
||||||
int excktok(t, orgrp, excl)
|
|
||||||
struct thdr *t;
|
|
||||||
int orgrp; /* 1 if token is member of or group */
|
|
||||||
int *excl; /* Set to 1 if token is excluded. */
|
|
||||||
{
|
|
||||||
int size;
|
|
||||||
struct thdr *tem;
|
|
||||||
int tnum;
|
|
||||||
int optional = 0;
|
|
||||||
int hadopt, hadreq;
|
|
||||||
|
|
||||||
*excl = 0;
|
|
||||||
|
|
||||||
switch (t->ttype & TTMASK) {
|
|
||||||
case TTETD:
|
|
||||||
if (t->tu.thetd->mark) {
|
|
||||||
if (orgrp || (t->ttype & TOPT))
|
|
||||||
*excl = 1;
|
|
||||||
else
|
|
||||||
sgmlerr(217, &pcbstag, t->tu.thetd->etdgi + 1,
|
|
||||||
tags[ts].tetd->etdgi + 1);
|
|
||||||
}
|
|
||||||
/* fall through */
|
|
||||||
case TTCHARS:
|
|
||||||
size = 1;
|
|
||||||
break;
|
|
||||||
case TTOR:
|
|
||||||
case TTAND:
|
|
||||||
case TTSEQ:
|
|
||||||
tem = t + 1;
|
|
||||||
hadopt = 0;
|
|
||||||
hadreq = 0;
|
|
||||||
for (tnum = t->tu.tnum; tnum > 0; --tnum) {
|
|
||||||
int ex;
|
|
||||||
int n = excktok(tem, (t->ttype & TTMASK) == TTOR, &ex);
|
|
||||||
if (!ex) {
|
|
||||||
if (tem->ttype & TOPT)
|
|
||||||
hadopt = 1;
|
|
||||||
else
|
|
||||||
hadreq = 1;
|
|
||||||
}
|
|
||||||
tem += n;
|
|
||||||
}
|
|
||||||
size = tem - t;
|
|
||||||
if ((t->ttype & TTMASK) == TTOR)
|
|
||||||
optional = hadreq ? hadopt : 1;
|
|
||||||
else
|
|
||||||
optional = !hadreq;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Was required, but exclusions have made it optional.
|
|
||||||
eg <!element foo - - (a | b) -(a, b)> */
|
|
||||||
|
|
||||||
if (optional && !(t->ttype & TOPT))
|
|
||||||
sgmlerr(216, &pcbstag, tags[ts].tetd->etdgi + 1, (UNCH *)0);
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Local Variables:
|
|
||||||
c-indent-level: 5
|
|
||||||
c-continued-statement-offset: 5
|
|
||||||
c-brace-offset: -5
|
|
||||||
c-argdecl-indent: 0
|
|
||||||
c-label-offset: -5
|
|
||||||
End:
|
|
||||||
*/
|
|
@ -1,140 +0,0 @@
|
|||||||
/* genlex: Generate lexical tables for non-ASCII charsets. */
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "std.h"
|
|
||||||
#include "tools.h"
|
|
||||||
|
|
||||||
#define CANON_ASCII_NONSGML 255 /* Canonical non-SGML character in ASCII. */
|
|
||||||
#define CANON_ASCII_DATACHAR 254 /* Canonical DATACHAR in ASCII. */
|
|
||||||
|
|
||||||
extern unsigned char charset[];
|
|
||||||
extern UNCH *lextabs[];
|
|
||||||
extern UNCH lextran[];
|
|
||||||
|
|
||||||
static char *lextabnames[] = {
|
|
||||||
"lexcnm", "lexcon", "lexgrp", "lexlms", "lexmark", "lexsd", "lextoke",
|
|
||||||
"lexmin"
|
|
||||||
};
|
|
||||||
|
|
||||||
#define UNUSED -1
|
|
||||||
|
|
||||||
extern int iso646charset[];
|
|
||||||
extern int iso646G0charset[];
|
|
||||||
extern int iso646C0charset[];
|
|
||||||
extern int iso8859_1charset[];
|
|
||||||
extern int iso6429C1charset[];
|
|
||||||
|
|
||||||
static struct {
|
|
||||||
char *name;
|
|
||||||
int *map;
|
|
||||||
} charsets[] = {
|
|
||||||
{ "iso646charset", iso646charset },
|
|
||||||
{ "iso646G0charset", iso646G0charset },
|
|
||||||
{ "iso646G0charset", iso646G0charset },
|
|
||||||
{ "iso8859_1charset", iso8859_1charset },
|
|
||||||
{ "iso646C0charset", iso646C0charset },
|
|
||||||
{ "iso6429C1charset", iso6429C1charset },
|
|
||||||
};
|
|
||||||
|
|
||||||
static VOID print_tab(s, t)
|
|
||||||
char *s;
|
|
||||||
UNCH *t;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
printf("UNCH %s[] = {\n", s);
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
printf("%2d,%c", t[i], (i + 1) % 16 == 0 ? '\n' : ' ');
|
|
||||||
fputs("};\n\n", stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
UNCH tab[256];
|
|
||||||
char special[256];
|
|
||||||
/* Shunned character numbers in the reference concrete syntax. */
|
|
||||||
static UNCH refshun[] = {
|
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
|
|
||||||
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 255
|
|
||||||
};
|
|
||||||
char shunned[256];
|
|
||||||
char *program_name;
|
|
||||||
|
|
||||||
program_name = strrchr(argv[0], '/');
|
|
||||||
if (program_name)
|
|
||||||
program_name++;
|
|
||||||
else
|
|
||||||
program_name = argv[0];
|
|
||||||
|
|
||||||
/* Check that the mapping is 1-1. */
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
tab[i] = 0;
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
tab[charset[i]] = 1;
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
if (!tab[i]) {
|
|
||||||
fprintf(stderr, "%s: bad mapping: no character mapped to %d\n",
|
|
||||||
program_name, i);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compute special. */
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
special[i] = 0;
|
|
||||||
for (i = 0; lextabs[i]; i++) {
|
|
||||||
int j;
|
|
||||||
for (j = 0; j < 256; j++)
|
|
||||||
if (lextabs[i][j] != lextabs[i][CANON_ASCII_NONSGML]
|
|
||||||
&& lextabs[i][j] != lextabs[i][CANON_ASCII_DATACHAR])
|
|
||||||
special[charset[j]] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compute shunned. */
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
shunned[i] = 0;
|
|
||||||
for (i = 0; i < sizeof(refshun); i++)
|
|
||||||
shunned[refshun[i]] = 1;
|
|
||||||
|
|
||||||
printf("/* This file was automatically generated by %s. Do not edit. */\n\n",
|
|
||||||
program_name);
|
|
||||||
fputs("#include \"config.h\"\n#include \"entity.h\"\n#include \"sgmldecl.h\"\n\n",
|
|
||||||
stdout);
|
|
||||||
|
|
||||||
/* Generate each of the lexical tables. */
|
|
||||||
for (i = 0; lextabs[i]; i++) {
|
|
||||||
int j;
|
|
||||||
for (j = 0; j < 256; j++)
|
|
||||||
tab[charset[j]] = lextabs[i][j];
|
|
||||||
|
|
||||||
for (j = 0; j < 256; j++)
|
|
||||||
if (!special[j]) {
|
|
||||||
if (shunned[j])
|
|
||||||
tab[j] = lextabs[i][CANON_ASCII_NONSGML];
|
|
||||||
else
|
|
||||||
tab[j] = lextabs[i][CANON_ASCII_DATACHAR];
|
|
||||||
}
|
|
||||||
print_tab(lextabnames[i], tab);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate lextran. */
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
tab[charset[i]] = charset[lextran[i]];
|
|
||||||
print_tab("lextran", tab);
|
|
||||||
|
|
||||||
/* Generate charsets. */
|
|
||||||
for (i = 0; i < sizeof(charsets)/sizeof(charsets[0]); i++) {
|
|
||||||
int j;
|
|
||||||
int *map = charsets[i].map;
|
|
||||||
printf("\nint %s[] = {\n", charsets[i].name);
|
|
||||||
for (j = 0; j < 256; j++)
|
|
||||||
if (map[j] == UNUSED)
|
|
||||||
printf("UNUSED,%c", (j + 1) % 8 == 0 ? '\n' : ' ');
|
|
||||||
else
|
|
||||||
printf("%3d,%c", charset[map[j]], (j + 1) % 16 == 0 ? '\n' : ' ');
|
|
||||||
fputs("};\n", stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
}
|
|
@ -1,166 +0,0 @@
|
|||||||
/* getopt.c -
|
|
||||||
getopt() for those systems that don't have it.
|
|
||||||
|
|
||||||
Derived from comp.sources.unix/volume3/att_getopt.
|
|
||||||
Modified by James Clark (jjc@jclark.com).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
|
||||||
|
|
||||||
#include "std.h"
|
|
||||||
#include "getopt.h"
|
|
||||||
|
|
||||||
#ifdef SWITCHAR
|
|
||||||
#include <dos.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int opterr = 1;
|
|
||||||
int optind = 1;
|
|
||||||
int optopt;
|
|
||||||
char *optarg;
|
|
||||||
|
|
||||||
#ifndef OPTION_CHAR
|
|
||||||
#define OPTION_CHAR '-'
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int getopt(argc, argv, opts)
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
char *opts;
|
|
||||||
{
|
|
||||||
#ifdef SWITCHAR
|
|
||||||
union REGS regs;
|
|
||||||
static char switchar = '\0';
|
|
||||||
#endif
|
|
||||||
static int sp = 1;
|
|
||||||
register int c;
|
|
||||||
register char *cp;
|
|
||||||
char *message;
|
|
||||||
#ifdef SWITCHAR
|
|
||||||
if (switchar == '\0') {
|
|
||||||
regs.x.ax = 0x3700;
|
|
||||||
intdos(®s, ®s);
|
|
||||||
if (!regs.x.cflag)
|
|
||||||
switchar = regs.h.dl;
|
|
||||||
else
|
|
||||||
switchar = '/';
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (sp == 1) {
|
|
||||||
if (optind >= argc)
|
|
||||||
return EOF;
|
|
||||||
if ((
|
|
||||||
#ifdef SWITCHAR
|
|
||||||
argv[optind][0] != switchar &&
|
|
||||||
#endif
|
|
||||||
argv[optind][0] != OPTION_CHAR) || argv[optind][1] == '\0') {
|
|
||||||
#ifdef REORDER_ARGS
|
|
||||||
int i;
|
|
||||||
for (i = optind; i < argc; i++)
|
|
||||||
if ((
|
|
||||||
#ifdef SWITCHAR
|
|
||||||
argv[i][0] == switchar ||
|
|
||||||
#endif
|
|
||||||
argv[i][0] == OPTION_CHAR) && argv[i][1] != '\0')
|
|
||||||
break;
|
|
||||||
if (i < argc) {
|
|
||||||
c = argv[i][1];
|
|
||||||
#ifdef CASE_INSENSITIVE_OPTIONS
|
|
||||||
if (isupper(c))
|
|
||||||
c = tolower(c);
|
|
||||||
#endif
|
|
||||||
if (c != ':' && c != OPTION_CHAR && (cp = strchr(opts, c)) != NULL
|
|
||||||
&& cp[1] == ':' && argv[i][2] == 0 && i < argc - 1) {
|
|
||||||
int j;
|
|
||||||
char *temp1 = argv[i];
|
|
||||||
char *temp2 = argv[i+1];
|
|
||||||
for (j = i - 1; j >= optind; j--)
|
|
||||||
argv[j+2] = argv[j];
|
|
||||||
argv[optind] = temp1;
|
|
||||||
argv[optind+1] = temp2;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
int j;
|
|
||||||
char *temp = argv[i];
|
|
||||||
for (j = i - 1; j >= optind; j--)
|
|
||||||
argv[j+1] = argv[j];
|
|
||||||
argv[optind] = temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return EOF;
|
|
||||||
}
|
|
||||||
if ((argv[optind][0] == OPTION_CHAR && argv[optind][1] == OPTION_CHAR
|
|
||||||
&& argv[optind][2] == '\0')
|
|
||||||
#ifdef SWITCHAR
|
|
||||||
|| (argv[optind][0] == switchar && argv[optind][1] == switchar
|
|
||||||
&& argv[optind][2] == '\0')
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
optind++;
|
|
||||||
return(EOF);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
optopt = c = argv[optind][sp];
|
|
||||||
#ifdef CASE_INSENSITIVE_OPTIONS
|
|
||||||
if (
|
|
||||||
#ifdef USE_ISASCII
|
|
||||||
isascii(c) &&
|
|
||||||
#endif /* USE_ISASCII */
|
|
||||||
isupper((unsigned char)c))
|
|
||||||
optopt = c = tolower((unsigned char)c);
|
|
||||||
#endif /* CASE_INSENSITIVE_OPTIONS */
|
|
||||||
if (c == ':' || (cp = strchr(opts, c)) == NULL) {
|
|
||||||
if (argv[optind][++sp] == '\0') {
|
|
||||||
optind++;
|
|
||||||
sp = 1;
|
|
||||||
}
|
|
||||||
message = ": illegal option -- ";
|
|
||||||
goto bad;
|
|
||||||
}
|
|
||||||
if (*++cp == ':') {
|
|
||||||
if (argv[optind][sp+1] != '\0')
|
|
||||||
optarg = &argv[optind++][sp+1];
|
|
||||||
else if (++optind >= argc) {
|
|
||||||
sp = 1;
|
|
||||||
message = ": option requires an argument -- ";
|
|
||||||
goto bad;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
optarg = argv[optind++];
|
|
||||||
sp = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (argv[optind][++sp] == '\0') {
|
|
||||||
sp = 1;
|
|
||||||
optind++;
|
|
||||||
}
|
|
||||||
optarg = NULL;
|
|
||||||
}
|
|
||||||
return c;
|
|
||||||
bad:
|
|
||||||
if (opterr) {
|
|
||||||
fputs(argv[0], stderr);
|
|
||||||
fputs(message, stderr);
|
|
||||||
fputc(optopt, stderr);
|
|
||||||
fputc('\n', stderr);
|
|
||||||
}
|
|
||||||
return '?';
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* not HAVE_GETOPT */
|
|
||||||
|
|
||||||
/*
|
|
||||||
Local Variables:
|
|
||||||
c-indent-level: 4
|
|
||||||
c-continued-statement-offset: 4
|
|
||||||
c-brace-offset: 4
|
|
||||||
c-argdecl-indent: 4
|
|
||||||
c-label-offset: -4
|
|
||||||
tab-width: 4
|
|
||||||
End:
|
|
||||||
*/
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
/* Declare getopt() and associated variables. */
|
|
||||||
|
|
||||||
/* Don't use prototypes in case some system header file has a
|
|
||||||
conflicting definition. Systems differ on how they declare the second
|
|
||||||
parameter. */
|
|
||||||
|
|
||||||
extern int getopt();
|
|
||||||
|
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
extern int opterr;
|
|
@ -1,22 +0,0 @@
|
|||||||
/* KEYWORD.H: Definitions for markup declaration keyword processing.
|
|
||||||
*/
|
|
||||||
/* Default value types for attribute definition list declaration.
|
|
||||||
*/
|
|
||||||
#define DNULL 1 /* Default value: implied attribute. */
|
|
||||||
#define DREQ 2 /* Default value: required attribute. */
|
|
||||||
#define DCURR 3 /* Default value: current attribute. */
|
|
||||||
#define DCONR 4 /* Default value: content reference attribute. */
|
|
||||||
#define DFIXED 5 /* Default value: fixed attribute. */
|
|
||||||
|
|
||||||
/* External identifier types for entity and notation declarations.
|
|
||||||
*/
|
|
||||||
#define EDSYSTEM 1 /* SYSTEM (but not PUBLIC) identifier specified.*/
|
|
||||||
#define EDPUBLIC 2 /* PUBLIC (but not SYSTEM) identifier specified.*/
|
|
||||||
#define EDBOTH 3 /* PUBLIC and also SYSTEM identifiers specified.*/
|
|
||||||
|
|
||||||
/* Marked section keywords.
|
|
||||||
*/
|
|
||||||
#define MSTEMP 1
|
|
||||||
#define MSRCDATA 2
|
|
||||||
#define MSCDATA 3
|
|
||||||
#define MSIGNORE 4
|
|
@ -1,37 +0,0 @@
|
|||||||
/* SGML Character Use: ISO Latin 1.
|
|
||||||
*/
|
|
||||||
#define EOFCHAR '\032' /* FUNCTION: EE (entity end: files). */
|
|
||||||
#define EOBCHAR '\034' /* NONCHAR: EOB (file entity: end of buffer. */
|
|
||||||
#define RSCHAR '\012' /* FUNCTION: RS (record start). */
|
|
||||||
#define RECHAR '\015' /* FUNCTION: RE (record end). */
|
|
||||||
#define TABCHAR '\011' /* FUNCTION: TAB (horizontal tab). */
|
|
||||||
#define SPCCHAR '\040' /* FUNCTION: SPACE (horizontal space). */
|
|
||||||
#define GENRECHAR '\010' /* NONCHAR: Generated RE. */
|
|
||||||
#define DELCDATA '\035' /* NONCHAR: Delimiter for CDATA entity in
|
|
||||||
attribute value. */
|
|
||||||
#define DELSDATA '\036' /* NONCHAR: Delimiter for SDATA entity in
|
|
||||||
attribute value. */
|
|
||||||
#define DELNONCH '\037' /* NONCHAR: non-SGML character prefix. */
|
|
||||||
|
|
||||||
/* These two macros are used to handle non-SGML characters. A non-SGML
|
|
||||||
by character is represented by a DELNONCH character followed by
|
|
||||||
SHIFTNON(original_character). SHIFTNON must transform any character
|
|
||||||
in the set 0, EOFCHAR, EOBCHAR, GENRECHAR, DELCDATA, DELSDATA,
|
|
||||||
DELNONCH into a character that is not one of the set 0, EOFCHAR,
|
|
||||||
EOBCHAR. Furthermore UNSHIFTNON(SHIFTNON(c)) must be equal to c for
|
|
||||||
every character c in the former set. */
|
|
||||||
/* This is a simple definition that works for ASCII-like character sets. */
|
|
||||||
#define SHIFTNON(ch) ((UNCH)(ch) | 0100)
|
|
||||||
#define UNSHIFTNON(ch) ((UNCH)(ch) & ~0100)
|
|
||||||
|
|
||||||
/* A canonical NONSGML character. The character number that is shunned
|
|
||||||
in the reference concrete syntax and is not the number of a
|
|
||||||
significant (in the reference concrete syntax) character nor one of
|
|
||||||
the above characters nor 0. */
|
|
||||||
#define CANON_NONSGML 255
|
|
||||||
|
|
||||||
/* A canonical DATACHAR character. The character number that is not
|
|
||||||
shunned in the reference concrete syntax and is not the number of a
|
|
||||||
significant (in the reference concrete syntax) SGML character nor one
|
|
||||||
of the above characters. */
|
|
||||||
#define CANON_DATACHAR 254
|
|
@ -1,12 +0,0 @@
|
|||||||
/* Definitions of lexical codes needed by both lextaba.c and lexrf.c. */
|
|
||||||
|
|
||||||
#define FCE 27 /* FRE Free character in use as an entity reference */
|
|
||||||
#define FRE 0 /* FREECHAR that is not in a CON delimiter-in-context. */
|
|
||||||
#define LITC 21 /* LIT LITA PIC or EE in use as a literal terminator */
|
|
||||||
#define MINLITC 13 /* LIT LITA as literal terminator in minimum data */
|
|
||||||
#define MSC3 15 /* ] Also MSC[2]. */
|
|
||||||
#define NET 17 /* / When enabled. */
|
|
||||||
#define ETI 16 /* / Actually ETAGO[2] */
|
|
||||||
#define SPCR 19 /* Space in use as SR8. */
|
|
||||||
#define TGO2 25 /* < TAGO; also MDO[1], PIO[1] */
|
|
||||||
#define CDE 11 /* NONSGML delcdata CDATA/SDATA delimiter */
|
|
@ -1,125 +0,0 @@
|
|||||||
/* LEXRF: Lexical tables for reference concrete syntax.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "entity.h" /* Templates for entity control blocks. */
|
|
||||||
#include "synxtrn.h" /* Declarations for concrete syntax constants. */
|
|
||||||
#include "action.h" /* Action names for all parsing. */
|
|
||||||
#include "lexcode.h"
|
|
||||||
|
|
||||||
static UNCH SRTAB[] = { TABCHAR, '\0' };
|
|
||||||
static UNCH SRRE[] = { RECHAR, '\0' };
|
|
||||||
static UNCH SRRS[] = { RSCHAR, '\0' };
|
|
||||||
static UNCH SRRSB[] = { RSCHAR, 'B', '\0' };
|
|
||||||
static UNCH SRRSRE[] = { RSCHAR, RECHAR, '\0' };
|
|
||||||
static UNCH SRRSBRE[] = { RSCHAR, 'B', RECHAR, '\0' };
|
|
||||||
static UNCH SRBRE[] = { 'B', RECHAR, '\0' };
|
|
||||||
|
|
||||||
struct lexical lex = { /* Delimiter set constants for parser use. */
|
|
||||||
{ /* Markup strings for text processor use. */
|
|
||||||
(UNCH *)"\4&#", /* LEXCON markup string: CRO */
|
|
||||||
(UNCH *)"[", /* LEXCON markup string: DSO */
|
|
||||||
(UNCH *)"\3&", /* LEXCON markup string: ERO */
|
|
||||||
(UNCH *)"\4</", /* LEXMARK markup string: end-tag */
|
|
||||||
(UNCH *)"\3\"", /* LEXMARK markup string: LIT */
|
|
||||||
(UNCH *)"\3'", /* LEXMARK markup string: LITA */
|
|
||||||
(UNCH *)"\3>", /* LEXCON markup string: MDC */
|
|
||||||
(UNCH *)"\4<!", /* LEXCON markup string: MDO */
|
|
||||||
(UNCH *)"\5]]>", /* LEXCON markup string: mse */
|
|
||||||
(UNCH *)"\5<![", /* LEXCON markup string: mss */
|
|
||||||
(UNCH *)"\13<![CDATA[", /* LEXCON markup string: mss CDATA */
|
|
||||||
(UNCH *)"\14<![RCDATA[", /* LEXCON markup string: mss RCDATA */
|
|
||||||
(UNCH *)"\3>", /* LEXCON markup string: PIC */
|
|
||||||
(UNCH *)"\4<?", /* LEXCON markup string: PIO */
|
|
||||||
(UNCH *)"\3;", /* LEXGRP markup string: ref close. */
|
|
||||||
(UNCH *)"\3<", /* LEXMARK markup string: start-tag */
|
|
||||||
(UNCH *)"\3>", /* LEXMARK markup string: TAGC */
|
|
||||||
(UNCH *)"\3=", /* LEXMARK markup string: VI */
|
|
||||||
3, /* LEXMARK: length of null end-tag. */
|
|
||||||
2 /* LEXMARK: length of null start-tag. */
|
|
||||||
},
|
|
||||||
{ /* Short reference delimiters. */
|
|
||||||
{ /* Short reference delimiter table. */
|
|
||||||
{(UNCH *)"", SRCT}, /* Dummy entry to store SR count. */
|
|
||||||
{SRTAB, 1}, /* TAB */
|
|
||||||
{SRRE, 2}, /* RE */
|
|
||||||
{SRRS, 3}, /* RS */
|
|
||||||
{SRRSB, 4}, /* Leading blanks */
|
|
||||||
{SRRSRE, 5}, /* Null record */
|
|
||||||
{SRRSBRE, 6}, /* Blank record */
|
|
||||||
{SRBRE, 7}, /* Trailing blanks */
|
|
||||||
{(UNCH *)" ", 8}, /* Space */
|
|
||||||
{(UNCH *)"BB", 9}, /* Two or more blanks */
|
|
||||||
{(UNCH *)"\"", 10}, /* Quotation mark (first data character) */
|
|
||||||
{(UNCH *)"#", 11}, /* Number sign */
|
|
||||||
{(UNCH *)"%", 12}, /* FCE CHARACTERS start here */
|
|
||||||
{(UNCH *)"'", 13},
|
|
||||||
{(UNCH *)"(", 14},
|
|
||||||
{(UNCH *)")", 15},
|
|
||||||
{(UNCH *)"*", 16},
|
|
||||||
{(UNCH *)"+", 17},
|
|
||||||
{(UNCH *)",", 18},
|
|
||||||
{(UNCH *)"-", 19}, /* Hyphen */
|
|
||||||
{(UNCH *)"--", 20}, /* Two hyphens */
|
|
||||||
{(UNCH *)":", 21},
|
|
||||||
{(UNCH *)";", 22},
|
|
||||||
{(UNCH *)"=", 23},
|
|
||||||
{(UNCH *)"@", 24},
|
|
||||||
{(UNCH *)"[", 25},
|
|
||||||
{(UNCH *)"]", 26},
|
|
||||||
{(UNCH *)"^", 27},
|
|
||||||
{(UNCH *)"_", 28}, /* Low line */
|
|
||||||
{(UNCH *)"{", 29},
|
|
||||||
{(UNCH *)"|", 30},
|
|
||||||
{(UNCH *)"}", 31},
|
|
||||||
{(UNCH *)"~", 32},
|
|
||||||
{0, 0}
|
|
||||||
},
|
|
||||||
{ /* Printable form of unprintable SR delims.*/
|
|
||||||
"", /* Dummy entry to balance s.dtb. */
|
|
||||||
"&#TAB;", /* TAB */
|
|
||||||
"&#RE;", /* RE */
|
|
||||||
"&#RS;", /* RS */
|
|
||||||
"&#RS;B", /* Leading blanks */
|
|
||||||
"&#RS;&#RE;", /* Null record */
|
|
||||||
"&#RS;B&#RE;", /* Blank record */
|
|
||||||
"B&#RE;", /* Trailing blanks */
|
|
||||||
"&#SPACE;" /* Space */
|
|
||||||
},
|
|
||||||
12, /* LEXCNM: Index of first FCE in srdeltab. */
|
|
||||||
20, /*LEXCNM:Index of "two hyphens" in srdeltab*/
|
|
||||||
10, /* LEXCNM: Index of first SR with data char. */
|
|
||||||
19, /* LEXCNM: Index of hyphen in srdeltab. */
|
|
||||||
SRNPRT+1, /* LEXCNM: Index of 1st printable SR. */
|
|
||||||
8, /* LEXCNM: Index of space in srdeltab. */
|
|
||||||
25, /* LEXCNM: Index of left bracket in srdeltab. */
|
|
||||||
26, /* LEXCNM: Index of right bracket in srdeltab. */
|
|
||||||
}, /* End of short reference delimiters. */
|
|
||||||
{ /* General delimiter characters. */
|
|
||||||
GENRECHAR, /*LEXCNM:(BS)Generated RE; can't be markup.*/
|
|
||||||
'"', /* LEXMARK: Char used as LIT delimiter.*/
|
|
||||||
'\'', /* LEXMARK: Char used as LITA delimiter.*/
|
|
||||||
'>', /* LEXLMS: Char used as MDC delimiter.*/
|
|
||||||
']', /* LEXLMS: Char used as MSC when enabled.*/
|
|
||||||
'/', /* LEXCON: Char used as NET when enabled.*/
|
|
||||||
'%', /* LEXMARK: Char used as PERO delimiter. */
|
|
||||||
'>', /* LEXCON: Char used as PIC delimiter.*/
|
|
||||||
'<' /* LEXCON: Char used as TAGO when enabled.*/
|
|
||||||
},
|
|
||||||
{ /* Lexical table code assignments. */
|
|
||||||
FCE, /* LEXCNM: FRE char as entity reference.*/
|
|
||||||
FRE, /* LEXLMS: Free character not an entity ref.*/
|
|
||||||
LITC, /* LEXLMS: Literal close delimiter enabled. */
|
|
||||||
MINLITC, /* LEXMIN: Literal close delimiter enabled. */
|
|
||||||
MSC3, /* LEXLMS: Marked section close delim enabled. */
|
|
||||||
NET, /* LEXCON: Null end-tag delimiter enabled. */
|
|
||||||
ETI, /* LEXCON: NET disabled; still used as ETI. */
|
|
||||||
SPCR, /* LEXCNM: Space in use as SHORTREF delim. */
|
|
||||||
TGO2, /* LEXCON: Tag open delimiter enabled. */
|
|
||||||
CDE /* LEXLMS: CDATA/SDATA delimiters. */
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH *lextabs[] = {
|
|
||||||
lexcnm, lexcon, lexgrp, lexlms, lexmark, lexsd, lextoke, lexmin, 0
|
|
||||||
};
|
|
@ -1,750 +0,0 @@
|
|||||||
/* lextaba.c: lexical tables for ASCII. */
|
|
||||||
|
|
||||||
/* These tables are munged by setnonsgml(). */
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "entity.h"
|
|
||||||
#include "lexcode.h"
|
|
||||||
#include "sgmldecl.h"
|
|
||||||
|
|
||||||
/* LEXCNM: Lexical table for mixed content (PCBCONM) parse.
|
|
||||||
*/
|
|
||||||
/* Symbols for SGML character set divisions and function characters. */
|
|
||||||
#define NU 1 /* NUMERAL Numerals */
|
|
||||||
#define NMC 2 /* LC/UCNMCHAR . - Period and hyphen */
|
|
||||||
#define NMS 3 /* LC/UCNMSTRT Lower and uppercase letters */
|
|
||||||
#define SPC 4 /* SPACE 32 Space */
|
|
||||||
#define NON 5 /* NONSGML 0-31 127 255 Unused, except for: */
|
|
||||||
#define EE 6 /* NONSGML 00 26 Entity end (end of file) */
|
|
||||||
#define EOB 7 /* NONSGML 28 End disk buffer */
|
|
||||||
#define RS 8 /* Function 10 Line feed */
|
|
||||||
#define RE 9 /* Function 13 Carrier return */
|
|
||||||
#define SEP 10 /* SEPCHAR 09 TAB: horizontal tab */
|
|
||||||
#define NSC 12 /* NONSGML delnonch Non-SGML character prefix */
|
|
||||||
|
|
||||||
/* Symbols for SGML delimiter roles in CON and CXT.
|
|
||||||
ETI and NET must be the same in LEXCNM and LEXCON.
|
|
||||||
FRE characters are changed to FCE if an FCE entity is declared.
|
|
||||||
They are changed back to FRE when the entity is canceled.
|
|
||||||
*/
|
|
||||||
#define ERO 13 /* & Also CRO[1] */
|
|
||||||
#define NMRE 14 /* 08 Generated non-markup RE */
|
|
||||||
#define COM 15 /* - For MDO context; also SR19 and SR20. */
|
|
||||||
#undef LIT1
|
|
||||||
#define LIT1 18 /* " SR10 */
|
|
||||||
#define MDO 20 /* ! Actually MDO[2] */
|
|
||||||
#define MSC1 21 /* ] Both MSC[1] and MSC[2]; also SR26. */
|
|
||||||
#define MSO 22 /* [ For MDO context; also SR25. */
|
|
||||||
#define PIO 23 /* ? Actually PIO[2] */
|
|
||||||
#define RNI 24 /* # For CRO[2]; also SR11. */
|
|
||||||
#define TGC1 25 /* > For TAGO and MSC context; also MDC, PIC */
|
|
||||||
#define TGO1 26 /* < TAGO; also MDO[1], PIO[1] */
|
|
||||||
|
|
||||||
UNCH lexcnm[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE, NON, NON, NON, NON, NON, NON, NON, NMRE,SEP, RS, NON, NON, RE, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE, NON, EOB, NON, NON, NSC, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, MDO, LIT1,RNI, FRE, FRE ,ERO, FRE, FRE, FRE, FRE, FRE, FRE, COM, NMC, ETI, /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , FRE, FRE, TGO1,FRE, TGC1,PIO, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC1,FRE, FRE, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
|
|
||||||
};
|
|
||||||
/* free nu nmc nms spc non ee eob rs re sep cde nsc ero
|
|
||||||
nmre com eti lit spcr mdo msc mso net pio rni tagc tago fce */
|
|
||||||
#undef ERO
|
|
||||||
#undef NMRE
|
|
||||||
#undef COM
|
|
||||||
#undef LIT1
|
|
||||||
/* def SPCR*/
|
|
||||||
#undef MDO
|
|
||||||
#undef MSC1
|
|
||||||
#undef MSO
|
|
||||||
#undef PIO
|
|
||||||
#undef RNI
|
|
||||||
#undef TGC1
|
|
||||||
/* def TGO1*/
|
|
||||||
/* def FCE*/
|
|
||||||
/* LEXCON: Lexical table for RCDATA and CDATA content (PCBCON?),
|
|
||||||
prolog (PCBPRO), and nested declaration set (PCBMDS) parses.
|
|
||||||
Note: NMC is same as FRE; kept for consistency with LEXCNM and LEXLMS.
|
|
||||||
*/
|
|
||||||
/* Symbols for SGML character set divisions and function characters. */
|
|
||||||
/* Same as for LEXCNM. */
|
|
||||||
|
|
||||||
/* Symbols for SGML delimiter roles in CON, CXT, and DS.
|
|
||||||
ETI and NET must be the same in LEXCNM and LEXCON.
|
|
||||||
FRE characters are changed to FCE if an FCE entity is declared.
|
|
||||||
They are changed back to FRE when the entity is canceled.
|
|
||||||
*/
|
|
||||||
#define ERO 13 /* & Also CRO[1] */
|
|
||||||
#define NMRE 14 /* 08 Generated non-markup RE */
|
|
||||||
#define COM 15 /* - For MDO context. */
|
|
||||||
/*#define ETI 16 / Actually ETAGO[2] */
|
|
||||||
/*#define NET 17 / When enabled. */
|
|
||||||
#define MDO 18 /* ! Actually MDO[2] */
|
|
||||||
#define MSC2 19 /* ] Both MSC[1] and MSC[2]. */
|
|
||||||
#define MSO 20 /* [ For MDO context. */
|
|
||||||
#define PERO 21 /* % For prolog */
|
|
||||||
#define PIO 22 /* ? Actually PIO[2] */
|
|
||||||
#define RNI 23 /* # For CRO[2]. */
|
|
||||||
#define TGC2 24 /* > For TAGO and MSC context; also MDC, PIC */
|
|
||||||
|
|
||||||
UNCH lexcon[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE, NON, NON, NON, NON, NON, NON, NON, NMRE,SEP, RS, NON, NON, RE, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE, NON, EOB, NON, NON, NSC, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, MDO, FRE, RNI, FRE, PERO,ERO, FRE, FRE, FRE, FRE, FRE, FRE, COM, NMC, ETI, /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , FRE, FRE, TGO2,FRE, TGC2,PIO, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC2,FRE, FRE, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
|
|
||||||
};
|
|
||||||
/* free nu nmc nms spc non ee eob rs re sep cde nsc ero
|
|
||||||
nmre com eti net mdo msc mso pero pio rni tagc tago */
|
|
||||||
#undef FRE
|
|
||||||
#undef NU
|
|
||||||
#undef NMC
|
|
||||||
#undef NMS
|
|
||||||
#undef SPC
|
|
||||||
#undef NON
|
|
||||||
#undef EE
|
|
||||||
#undef EOB
|
|
||||||
#undef RS
|
|
||||||
#undef RE
|
|
||||||
#undef SEP
|
|
||||||
#undef NSC
|
|
||||||
#undef ERO
|
|
||||||
#undef NMRE
|
|
||||||
#undef COM
|
|
||||||
/* def ETI*/
|
|
||||||
/* def NET*/
|
|
||||||
#undef MDO
|
|
||||||
#undef MSC2
|
|
||||||
#undef MSO
|
|
||||||
#undef PERO
|
|
||||||
#undef PIO
|
|
||||||
#undef RNI
|
|
||||||
#undef TGC2
|
|
||||||
/* LEXGRP: Lexical table for group parses, including PCBREF.
|
|
||||||
*/
|
|
||||||
/* Symbols for SGML character set divisions. */
|
|
||||||
#define BIT 0 /* Bit combinations (not NONCHAR) not allowed in a group. */
|
|
||||||
#define NMC 1 /* NAMECHAR . - Period, underscore, and numerals */
|
|
||||||
#define NMS 2 /* NAMESTRT Lower and uppercase letters */
|
|
||||||
#define RE 3 /* Function 13 Carrier return */
|
|
||||||
#define SPC 4 /* SPACE 32 09 Space; includes TAB */
|
|
||||||
#define NON 5 /* NONCHAR 0-31 127 255 Unused, except for: */
|
|
||||||
#define EE 6 /* Function 26 00 EE: entity end (end of file) */
|
|
||||||
#define EOB 7 /* NONCHAR 28 End disk buffer. */
|
|
||||||
#define RS 8 /* Function 10 RS: record start (line feed) */
|
|
||||||
|
|
||||||
/* Symbols for SGML delimiter roles in GRP. */
|
|
||||||
#define AND1 9 /* & */
|
|
||||||
#define GRPC 10 /* ) */
|
|
||||||
#define GRPO 11 /* ( */
|
|
||||||
#undef LIT2
|
|
||||||
#define LIT2 12 /* " For datatags. */
|
|
||||||
#define LITA 13 /* ' For datatags. */
|
|
||||||
#define DTGC 14 /* ] For datatags. */
|
|
||||||
#define DTGO 15 /* [ For datatags. */
|
|
||||||
#define OPT1 16 /* ? */
|
|
||||||
#define OR1 17 /* | */
|
|
||||||
#define PERO 18 /* % */
|
|
||||||
#define PLUS 19 /* + */
|
|
||||||
#define REP1 20 /* * */
|
|
||||||
#define RNI 21 /* # For #CHARS */
|
|
||||||
#define SEQ1 22 /* , */
|
|
||||||
#define REFC 23 /* ; For references */
|
|
||||||
|
|
||||||
UNCH lexgrp[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE , NON, NON, NON, NON, NON, NON, NON, NON, SPC, RS, NON, NON, RE, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE , NON, EOB, NON, NON, NON, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, BIT, LIT2,RNI, BIT, PERO,AND1,LITA,GRPO,GRPC,REP1,PLUS,SEQ1,NMC, NMC, BIT, /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NMC, NMC, NMC, NMC, NMC, NMC, NMC, NMC, NMC, NMC, BIT, REFC,BIT, BIT, BIT, OPT1,/*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, DTGO,BIT, DTGC,BIT, BIT, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, BIT, OR1, BIT, BIT, NON,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, NON
|
|
||||||
};
|
|
||||||
/* bit nmc nms re spc non ee eob rs and grpc grpo lit lita
|
|
||||||
dtgc dtgo opt or pero plus rep rni seq refc */
|
|
||||||
#undef BIT
|
|
||||||
#undef NMC
|
|
||||||
#undef NMS
|
|
||||||
#undef RE
|
|
||||||
#undef SPC
|
|
||||||
#undef NON
|
|
||||||
#undef EE
|
|
||||||
#undef EOB
|
|
||||||
#undef RS
|
|
||||||
#undef AND1
|
|
||||||
#undef GRPC
|
|
||||||
#undef GRPO
|
|
||||||
#undef LIT2
|
|
||||||
#undef LITA
|
|
||||||
#undef DTGC
|
|
||||||
#undef DTGO
|
|
||||||
#undef OPT1
|
|
||||||
#undef OR1
|
|
||||||
#undef PERO
|
|
||||||
#undef PLUS
|
|
||||||
#undef REP1
|
|
||||||
#undef RNI
|
|
||||||
#undef SEQ1
|
|
||||||
#undef REFC
|
|
||||||
/* LEXLMS: Lexical table for literal parses and marked sections.
|
|
||||||
*/
|
|
||||||
/* Symbols for SGML character set divisions and function characters.
|
|
||||||
*/
|
|
||||||
#define FRE 0 /* Free char: not in a delimiter or minimum literal. */
|
|
||||||
#define NU 1 /* Numeral Numerals */
|
|
||||||
#undef MIN
|
|
||||||
#define MIN 2 /* Minimum literal '()+,-./:?= */
|
|
||||||
#define NMS 3 /* LC/UCNMSTRT Lower and uppercase letters */
|
|
||||||
#define SPC 4 /* SPACE 32 Space */
|
|
||||||
#define NON 5 /* NONSGML 0-31 127 255 Unused, except for: */
|
|
||||||
#define EE 6 /* NONSGML 00 26 Entity end (end of file) */
|
|
||||||
#define EOB 7 /* NONSGML 28 End disk buffer */
|
|
||||||
#define RS 8 /* Function 10 Line feed */
|
|
||||||
#define RE 9 /* Function 13 Carrier return */
|
|
||||||
#define SEP 10 /* SEPCHAR 09 TAB: horizontal tab */
|
|
||||||
/*#define CDE 11 NONSGML delcdata CDATA/SDATA delimiter */
|
|
||||||
#define NSC 12 /* NONSGML delnonch Non-SGML character prefix */
|
|
||||||
/* Symbols for SGML delimiter roles in LIT, PI, and marked sections.
|
|
||||||
Either LIT, LITA, PIC, or EE, is changed to LITC when a literal is begun.
|
|
||||||
It is changed back when the LITC occurs (i.e., when the literal ends).
|
|
||||||
*/
|
|
||||||
#define ERO 13 /* & */
|
|
||||||
#define MDO 14 /* ! Actually MDO[2] */
|
|
||||||
#define MSO 16 /* [ For MDO context. */
|
|
||||||
#define PERO 17 /* % For prolog. */
|
|
||||||
#define RNI 18 /* # For CRO[2] */
|
|
||||||
#define TGC3 19 /* > Also MDC for MSC context. */
|
|
||||||
#define TGO3 20 /* < TAGO; also MDO[1] */
|
|
||||||
|
|
||||||
/* Room has been left in the parse tables in case re-parsing of text
|
|
||||||
is eventually supported (i.e., saved parsed text is used by the
|
|
||||||
application to create a new SGML document, but CDATA and SDATA
|
|
||||||
entities in literals, and non-SGML characters, are left in their
|
|
||||||
parsed state to avoid the overhead of reconstituting the original
|
|
||||||
markup). In such a case, the two non-SGML characters DELCDATA and
|
|
||||||
DELSDATA are changed to CDE.
|
|
||||||
NOTE: The idea is a bad one, because the generated document would
|
|
||||||
be non-conforming, as it would contain non-SGML characters.
|
|
||||||
*/
|
|
||||||
UNCH lexlms[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE, NON, NON, NON, NON, NON, NON, NON, NON ,SEP, RS, NON, NON, RE, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE, NON, EOB, NON, NON, NSC, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, MDO, FRE, RNI, FRE, PERO,ERO, MIN, MIN, MIN, FRE, MIN, MIN, MIN, MIN, MIN, /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , MIN, FRE, TGO3,MIN, TGC3,MIN, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC3,FRE, FRE, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
|
|
||||||
};
|
|
||||||
/* free nu min nms spc non ee eob rs re sep cde nsc ero
|
|
||||||
mdo msc mso pero rni tago tagc litc */
|
|
||||||
/* def FRE*/
|
|
||||||
#undef NU
|
|
||||||
#undef MIN
|
|
||||||
#undef NMS
|
|
||||||
#undef SPC
|
|
||||||
#undef NON
|
|
||||||
#undef EE
|
|
||||||
#undef EOB
|
|
||||||
#undef RS
|
|
||||||
#undef RE
|
|
||||||
#undef SEP
|
|
||||||
/* def CDE*/
|
|
||||||
/* def NSC*/
|
|
||||||
#undef ERO
|
|
||||||
#undef MDO
|
|
||||||
/* def MSC3*/
|
|
||||||
#undef MSO
|
|
||||||
#undef PERO
|
|
||||||
#undef RNI
|
|
||||||
#undef TGC3
|
|
||||||
#undef TGO3
|
|
||||||
/* def LITC*/
|
|
||||||
/* LEXMIN: Lexical table for minimum data literals.
|
|
||||||
*/
|
|
||||||
/* Symbols for SGML character set divisions and function characters.
|
|
||||||
*/
|
|
||||||
#define FRE 0 /* Free char: not in a delimiter or minimum literal. */
|
|
||||||
#define NU 1 /* Numeral Numerals */
|
|
||||||
#undef MIN
|
|
||||||
#define MIN 2 /* Minimum literal '()+,-./:?= */
|
|
||||||
#define NMS 3 /* LC/UCNMSTRT Lower and uppercase letters */
|
|
||||||
#define SPC 4 /* SPACE 32 Space */
|
|
||||||
#define NON 5 /* NONSGML 0-31 127 255 Unused, except for: */
|
|
||||||
#define EE 6 /* NONSGML 00 26 Entity end (end of file) */
|
|
||||||
#define EOB 7 /* NONSGML 28 End disk buffer */
|
|
||||||
#define RS 8 /* Function 10 Line feed */
|
|
||||||
#define RE 9 /* Function 13 Carrier return */
|
|
||||||
#define SEP 10 /* SEPCHAR 09 TAB: horizontal tab */
|
|
||||||
/*#define CDE 11 NONSGML delcdata CDATA/SDATA delimiter */
|
|
||||||
#define NSC 12 /* NONSGML delnonch Non-SGML character prefix */
|
|
||||||
/* Either LIT or LITA changed to LITC when a literal is begun.
|
|
||||||
It is changed back when the LITC occurs (i.e., when the literal ends).
|
|
||||||
*/
|
|
||||||
UNCH lexmin[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE, NON, NON, NON, NON, NON, NON, NON, NON ,SEP, RS, NON, NON, RE, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE, NON, EOB, NON, NON, NSC, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, FRE, FRE, FRE, FRE, FRE, FRE, MIN, MIN, MIN, FRE, MIN, MIN, MIN, MIN, MIN, /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , MIN, FRE, FRE, MIN, FRE, MIN, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, FRE, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
|
|
||||||
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
|
|
||||||
};
|
|
||||||
/* free nu min nms spc non ee eob rs re sep cde nsc ero
|
|
||||||
mdo msc mso pero rni tago tagc litc */
|
|
||||||
/* def FRE*/
|
|
||||||
#undef NU
|
|
||||||
#undef MIN
|
|
||||||
#undef NMS
|
|
||||||
#undef SPC
|
|
||||||
#undef NON
|
|
||||||
#undef EE
|
|
||||||
#undef EOB
|
|
||||||
#undef RS
|
|
||||||
#undef RE
|
|
||||||
#undef SEP
|
|
||||||
/* def CDE*/
|
|
||||||
/* def NSC*/
|
|
||||||
/* def LITC*/
|
|
||||||
/* LEXMARK: Lexical scan table for markup: PCBMD? and PCB?TAG.
|
|
||||||
*/
|
|
||||||
/* Symbols for SGML character set divisions. */
|
|
||||||
#define BIT 0 /* Bit combinations not allowed; includes ESC SO SI */
|
|
||||||
#define NMC 1 /* NAMECHAR . _ Period and underscore */
|
|
||||||
#define NU 2 /* NUMERAL Numerals */
|
|
||||||
#define NMS 3 /* NAMESTRT Lower and uppercase letters */
|
|
||||||
#define SPC 4 /* SPACE 32 13 09 Space; includes RE TAB */
|
|
||||||
#define NON 5 /* NONCHAR 0-31 127 255 Unused, except for: */
|
|
||||||
#define EE 6 /* Function 26 00 EE: entity end (end of file) */
|
|
||||||
#define EOB 7 /* NONCHAR 28 End disk buffer. */
|
|
||||||
#define RS 8 /* Function 10 RS: record start (line feed) */
|
|
||||||
|
|
||||||
/* Symbols for SGML delimiter roles in MD and TAG. */
|
|
||||||
#define COM1 9 /* - Actually COM[1]; also COM[2], MINUS. */
|
|
||||||
#define ETIB 10 /* / ETI; actually ETAGO[2]. */
|
|
||||||
#define GRPO 11 /* ( */
|
|
||||||
#define LIT3 12 /* " */
|
|
||||||
#define LITA 13 /* ' */
|
|
||||||
#define DSO 14 /* [ */
|
|
||||||
#define DSC1 15 /* ] For data attribute specifications */
|
|
||||||
#define PERO 16 /* % */
|
|
||||||
#define PLUS 17 /* + */
|
|
||||||
#define REFC 18 /* ; For references */
|
|
||||||
#define RNI 19 /* # Also CRO[2] */
|
|
||||||
#define TGC4 20 /* > Also MDC, PIC */
|
|
||||||
#define TGO4 21 /* < TAGO; also MDO[1] */
|
|
||||||
#define VI 22 /* = */
|
|
||||||
|
|
||||||
UNCH lexmark[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE , NON, NON, NON, NON, NON, NON, NON, NON, SPC, RS, NON, NON, SPC, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE , NON, EOB, NON, NON, NON, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, BIT, LIT3,RNI, BIT, PERO,BIT, LITA,GRPO,BIT, BIT, PLUS,BIT, COM1,NMC ,ETIB,/*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU, NU, NU, NU, NU, NU, NU, NU, NU, NU, BIT, REFC,TGO4,VI, TGC4,BIT, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, DSO, BIT, DSC1, BIT, BIT, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, BIT, BIT, BIT, BIT, NON,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
|
|
||||||
BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, NON
|
|
||||||
};
|
|
||||||
/* bit nmc nu nms spc non ee eob rs com eti grpo lit lita
|
|
||||||
dso pero plus refc rni tagc tago vi */
|
|
||||||
#undef BIT
|
|
||||||
#undef NMC
|
|
||||||
#undef NU
|
|
||||||
#undef NMS
|
|
||||||
#undef SPC
|
|
||||||
#undef NON
|
|
||||||
#undef EE
|
|
||||||
#undef EOB
|
|
||||||
#undef RS
|
|
||||||
#undef COM1
|
|
||||||
#undef ETIB
|
|
||||||
#undef GRPO
|
|
||||||
#undef LIT3
|
|
||||||
#undef LITA
|
|
||||||
#undef DSO
|
|
||||||
#undef DSC
|
|
||||||
#undef PERO
|
|
||||||
#undef PLUS
|
|
||||||
#undef REFC
|
|
||||||
#undef RNI
|
|
||||||
#undef TGC4
|
|
||||||
#undef TGO4
|
|
||||||
#undef VI
|
|
||||||
/* LEXSD: Lexical scan table for SGML declaration.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Symbols for SGML character set divisions. */
|
|
||||||
#define SIG 0 /* Significant SGML characters. */
|
|
||||||
#define DAT 1 /* DATACHAR Not significant, and not non-sgml. */
|
|
||||||
#define NU 2 /* NUMERAL Numerals */
|
|
||||||
#define NMS 3 /* NAMESTRT Lower and uppercase letters */
|
|
||||||
#define SPC 4 /* SPACE 32 13 09 Space; includes RE TAB */
|
|
||||||
#define NON 5 /* NONCHAR NONSGML */
|
|
||||||
#define EE 6 /* Function 26 00 EE: entity end (end of file) */
|
|
||||||
#define EOB 7 /* NONCHAR 28 End disk buffer. */
|
|
||||||
#define RS 8 /* Function 10 RS: record start (line feed) */
|
|
||||||
/* Symbols for SGML delimiter roles in SGML declaration. */
|
|
||||||
#define COM1 9 /* - Actually COM[1]; also COM[2]. */
|
|
||||||
#define LIT3 10 /* " */
|
|
||||||
#define LITA 11 /* ' */
|
|
||||||
#define TGC4 12 /* > Also MDC, PIC */
|
|
||||||
|
|
||||||
UNCH lexsd[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
EE , NON, NON, NON, NON, NON, NON, NON, NON, SPC, RS, NON, NON, SPC, NON, NON, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE , NON, EOB, NON, NON, NON, /*
|
|
||||||
032 ! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SPC, SIG, LIT3,SIG, DAT, SIG ,SIG, LITA,SIG, SIG, SIG, SIG, SIG, COM1,SIG ,SIG,/*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU, NU, NU, NU, NU, NU, NU, NU, NU, NU, SIG, SIG, SIG, SIG, TGC4,SIG, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
SIG, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, SIG, DAT, SIG, SIG, SIG, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
DAT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, SIG, SIG, SIG, SIG, NON,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
|
|
||||||
DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, NON
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef SIG
|
|
||||||
#undef DAT
|
|
||||||
#undef NON
|
|
||||||
#undef NU
|
|
||||||
#undef NMS
|
|
||||||
#undef SPC
|
|
||||||
#undef EE
|
|
||||||
#undef EOB
|
|
||||||
#undef RS
|
|
||||||
#undef COM1
|
|
||||||
#undef LIT3
|
|
||||||
#undef LITA
|
|
||||||
#undef TGC4
|
|
||||||
|
|
||||||
/* LEXTRAN: Translation table for SGML names.
|
|
||||||
*/
|
|
||||||
UNCH lextran[256] = { /*
|
|
||||||
000 001 bs tab lf home ff cr so si */
|
|
||||||
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , /*
|
|
||||||
space! " # $ % & ' ( ) * + , - . / */
|
|
||||||
32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
96 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 123, 124, 125, 126, 127,
|
|
||||||
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
|
||||||
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
|
|
||||||
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
|
|
||||||
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
|
|
||||||
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
|
|
||||||
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
|
|
||||||
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
|
|
||||||
};
|
|
||||||
/* LEXTOKE: Lexical class table for tokenization scan.
|
|
||||||
*/
|
|
||||||
#include "lextoke.h" /* Symbols for tokenization lexical classes. */
|
|
||||||
UNCH lextoke[256] = { /*
|
|
||||||
|
|
||||||
000 001 bs tab lf home ff cr */
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, SEP, REC, INV, INV, REC, INV, INV, /*
|
|
||||||
eof esc rt left up down */
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, EOB, INV, INV, INV, /*
|
|
||||||
space! " # $ % & ' ( ) * + , - . / */
|
|
||||||
SP , INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, NMC, NMC, INV, /*
|
|
||||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
|
|
||||||
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , INV, INV, INV, INV, INV, INV, /*
|
|
||||||
@ A B C D E F G H I J K L M N O */
|
|
||||||
INV, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
P Q R S T U V W X Y Z [ \ ] ^ _ */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, INV, INV, INV, INV, INV, /*
|
|
||||||
` a b c d e f g h i j k l m n o */
|
|
||||||
INV, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
|
|
||||||
p q r s t u v w x y z { | } ~ 127 */
|
|
||||||
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
|
|
||||||
INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This table maps ASCII to the system character set. */
|
|
||||||
int iso646charset[] = {
|
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
|
||||||
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
|
||||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
|
|
||||||
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
|
||||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This table maps the C0 part of ISO646 to the system character set. */
|
|
||||||
/* We through in 32 and 127 for free, since ISO 2022 maps them in
|
|
||||||
automatically. */
|
|
||||||
int iso646C0charset[] = {
|
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
||||||
32, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, 127,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This table maps the G0 part of ISO646 to the system character set. */
|
|
||||||
int iso646G0charset[] = {
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
|
||||||
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
|
||||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
|
|
||||||
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
|
||||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso8859_1charset[] = {
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
|
|
||||||
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
|
|
||||||
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
|
|
||||||
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
|
|
||||||
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso6429C1charset[] = {
|
|
||||||
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
|
||||||
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
@ -1,357 +0,0 @@
|
|||||||
/* This file was automatically generated by genlex. Do not edit. */
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "entity.h"
|
|
||||||
#include "sgmldecl.h"
|
|
||||||
|
|
||||||
UNCH lexcnm[] = {
|
|
||||||
6, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 9, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 14, 5, 5, 5, 5, 5, 7, 5, 5, 12,
|
|
||||||
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 26, 0, 0, 0,
|
|
||||||
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0,
|
|
||||||
15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 23,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 18,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 22, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lexcon[] = {
|
|
||||||
6, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 9, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 14, 5, 5, 5, 5, 5, 7, 5, 5, 12,
|
|
||||||
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 25, 0, 0, 0,
|
|
||||||
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0,
|
|
||||||
15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 24, 22,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 20, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lexgrp[] = {
|
|
||||||
6, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5,
|
|
||||||
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 11, 19, 17,
|
|
||||||
9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 10, 23, 0,
|
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 18, 0, 0, 16,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 13, 0, 12,
|
|
||||||
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 15, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0,
|
|
||||||
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lexlms[] = {
|
|
||||||
6, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 9, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 12,
|
|
||||||
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20, 2, 2, 0,
|
|
||||||
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 2, 0, 0,
|
|
||||||
2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 17, 0, 19, 2,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 18, 0, 2, 2, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 16, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lexmark[] = {
|
|
||||||
6, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5,
|
|
||||||
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 21, 11, 17, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0,
|
|
||||||
9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 20, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 13, 22, 12,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 14, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lexsd[] = {
|
|
||||||
6, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5,
|
|
||||||
1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
|
|
||||||
4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1,
|
|
||||||
9, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 12, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 11, 0, 10,
|
|
||||||
1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 0, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 0, 1, 1,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lextoke[] = {
|
|
||||||
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
|
||||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lexmin[] = {
|
|
||||||
6, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 9, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 12,
|
|
||||||
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
||||||
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
|
|
||||||
2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UNCH lextran[] = {
|
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
|
||||||
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
|
||||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
|
|
||||||
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
|
||||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
|
|
||||||
128, 193, 194, 195, 196, 197, 198, 199, 200, 201, 138, 139, 140, 141, 142, 143,
|
|
||||||
144, 209, 210, 211, 212, 213, 214, 215, 216, 217, 154, 155, 156, 157, 158, 159,
|
|
||||||
160, 161, 226, 227, 228, 229, 230, 231, 232, 233, 170, 171, 172, 173, 174, 175,
|
|
||||||
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
|
|
||||||
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
|
|
||||||
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
|
|
||||||
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
int iso646charset[] = {
|
|
||||||
0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14, 15,
|
|
||||||
16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31,
|
|
||||||
64, 90, 127, 123, 91, 108, 80, 125, 77, 93, 92, 78, 107, 96, 75, 97,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 122, 94, 76, 126, 110, 111,
|
|
||||||
124, 193, 194, 195, 196, 197, 198, 199, 200, 201, 209, 210, 211, 212, 213, 214,
|
|
||||||
215, 216, 217, 226, 227, 228, 229, 230, 231, 232, 233, 173, 224, 189, 176, 109,
|
|
||||||
121, 129, 130, 131, 132, 133, 134, 135, 136, 137, 145, 146, 147, 148, 149, 150,
|
|
||||||
151, 152, 153, 162, 163, 164, 165, 166, 167, 168, 169, 192, 79, 208, 161, 7,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso646G0charset[] = {
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
64, 90, 127, 123, 91, 108, 80, 125, 77, 93, 92, 78, 107, 96, 75, 97,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 122, 94, 76, 126, 110, 111,
|
|
||||||
124, 193, 194, 195, 196, 197, 198, 199, 200, 201, 209, 210, 211, 212, 213, 214,
|
|
||||||
215, 216, 217, 226, 227, 228, 229, 230, 231, 232, 233, 173, 224, 189, 176, 109,
|
|
||||||
121, 129, 130, 131, 132, 133, 134, 135, 136, 137, 145, 146, 147, 148, 149, 150,
|
|
||||||
151, 152, 153, 162, 163, 164, 165, 166, 167, 168, 169, 192, 79, 208, 161, 7,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso646G0charset[] = {
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
64, 90, 127, 123, 91, 108, 80, 125, 77, 93, 92, 78, 107, 96, 75, 97,
|
|
||||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 122, 94, 76, 126, 110, 111,
|
|
||||||
124, 193, 194, 195, 196, 197, 198, 199, 200, 201, 209, 210, 211, 212, 213, 214,
|
|
||||||
215, 216, 217, 226, 227, 228, 229, 230, 231, 232, 233, 173, 224, 189, 176, 109,
|
|
||||||
121, 129, 130, 131, 132, 133, 134, 135, 136, 137, 145, 146, 147, 148, 149, 150,
|
|
||||||
151, 152, 153, 162, 163, 164, 165, 166, 167, 168, 169, 192, 79, 208, 161, 7,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso8859_1charset[] = {
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
65, 170, 74, 177, 159, 178, 106, 181, 187, 180, 154, 138, 95, 202, 175, 188,
|
|
||||||
144, 143, 234, 250, 190, 160, 182, 179, 157, 218, 155, 139, 183, 184, 185, 171,
|
|
||||||
100, 101, 98, 102, 99, 103, 158, 104, 116, 113, 114, 115, 120, 117, 118, 119,
|
|
||||||
172, 105, 237, 238, 235, 239, 236, 191, 128, 253, 254, 251, 252, 186, 174, 89,
|
|
||||||
68, 69, 66, 70, 67, 71, 156, 72, 84, 81, 82, 83, 88, 85, 86, 87,
|
|
||||||
140, 73, 205, 206, 203, 207, 204, 225, 112, 221, 222, 219, 220, 141, 142, 223,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso646C0charset[] = {
|
|
||||||
0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14, 15,
|
|
||||||
16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31,
|
|
||||||
64, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, 7,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
||||||
|
|
||||||
int iso6429C1charset[] = {
|
|
||||||
4, 6, 8, 9, 10, 20, 21, 23, 26, 27, 32, 33, 34, 35, 36, 40,
|
|
||||||
41, 42, 43, 44, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 62, 255,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
|
|
||||||
};
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user