/*----------------------------------------------------------------------*\
 | Entity substitution for SGML output.									|
 |																		|
 | Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192)		|
\*----------------------------------------------------------------------*/

#include <stdio.h>

#define CONVERT_WINDOWS_1252 1

char *iso8859_1[256] = {
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,
	"quot",	/* <!ENTITY quot   SDATA "[quot  ]"--=quotation--> */
	NULL,NULL,NULL,
	"amp",	/* <!ENTITY amp    SDATA "[amp   ]"--=ampersand--> */
	"apos",	/* <!ENTITY apos   SDATA "[apos  ]"--=apostrophe--> */
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,
	"lt",	/* <!ENTITY lt     SDATA "[lt    ]"--=less-than sign R:--> */
	NULL,
	"gt",	/* <!ENTITY gt     SDATA "[gt    ]"--=greater-than sign R:--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,

#ifdef CONVERT_WINDOWS_1252

	/*------------------------------------------------------------------*\
	 | Microsoft Windows 1252 special characters can be converted, when	|
	 | they appear, to the appropriate character entity.				|
	\*------------------------------------------------------------------*/

	"euro"  , NULL    , "sbquo" , "fnof"  ,
	"bdquo" , "hellip", "dagger", "Dagger",
	"circ"  , "permil", "Scaron", "lsaquo",
	"OElig" , NULL    , NULL    , NULL    ,
	NULL    , "lsquo" , "rsquo" , "ldquo" ,
	"rdquo" , "bull"  , "ndash" , "mdash" ,
	"tilde" , "trade" , "scaron", "rsaquo",
	"oelig" , NULL    , NULL    , "Yuml"  ,

	/*------------------------------------------------------------------*\
	 | End of Microsoft Windows 1252 characters							|
	\*------------------------------------------------------------------*/

#else
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
#endif

	"nbsp"  ,	/* <!ENTITY nbsp   SDATA" [nbsp  ]"--=no break (required) space--> */
	"iexcl" ,	/* <!ENTITY iexcl  SDATA" [iexcl ]"--=inverted exclamation mark--> */
	"cent"  ,	/* <!ENTITY cent   SDATA" [cent  ]"--=cent sign--> */
	"pound" ,	/* <!ENTITY pound  SDATA" [pound ]"--=pound sign--> */
	"curren",	/* <!ENTITY curren SDATA" [curren]"--=general currency sign--> */
	"yen"   ,	/* <!ENTITY yen    SDATA" [yen   ]"--/yen =yen sign--> */
	"brvbar",	/* <!ENTITY brvbar SDATA" [brvbar]"--=broken (vertical) bar--> */
	"sect"  ,	/* <!ENTITY sect   SDATA" [sect  ]"--=section sign--> */
	"uml"   ,	/* <!ENTITY uml    SDATA" [uml   ]"--=umlaut mark--> */
	"copy"  ,	/* <!ENTITY copy   SDATA" [copy  ]"--=copyright sign--> */
	"ordf"  ,	/* <!ENTITY ordf   SDATA" [ordf  ]"--=ordinal indicator, feminine--> */
	"laquo" ,	/* <!ENTITY laquo  SDATA" [laquo ]"--=angle quotation mark, left--> */
	"not"   ,	/* <!ENTITY not    SDATA" [not   ]"--/neg /lnot =not sign--> */
	"shy"   ,	/* <!ENTITY shy    SDATA" [shy   ]"--=soft hyphen--> */
	"reg"   ,	/* <!ENTITY reg    SDATA" [reg   ]"--/circledR =registered sign--> */
	"macr"  ,	/* <!ENTITY macr   SDATA" [macr  ]"--=macron--> */
	"deg"   ,	/* <!ENTITY deg    SDATA" [deg   ]"--=degree sign--> */
	"plusmn",	/* <!ENTITY plusmn SDATA" [plusmn]"--/pm B: =plus-or-minus sign--> */
	"sup2"  ,	/* <!ENTITY sup2   SDATA" [sup2  ]"--=superscript two--> */
	"sup3"  ,	/* <!ENTITY sup3   SDATA" [sup3  ]"--=superscript three--> */
	"acute" ,	/* <!ENTITY acute  SDATA" [acute ]"--=acute accent--> */
	"micro" ,	/* <!ENTITY micro  SDATA" [micro ]"--=micro sign--> */
	"para"  ,	/* <!ENTITY para   SDATA" [para  ]"--=pilcrow (paragraph sign)--> */
	"middot",	/* <!ENTITY middot SDATA" [middot]"--/centerdot B: =middle dot--> */
	"cedil" ,	/* <!ENTITY cedil  SDATA" [cedil ]"--=cedilla--> */
	"sup1"  ,	/* <!ENTITY sup1   SDATA" [sup1  ]"--=superscript one--> */
	"ordm"  ,	/* <!ENTITY ordm   SDATA" [ordm  ]"--=ordinal indicator, masculine--> */
	"raquo" ,	/* <!ENTITY raquo  SDATA" [raquo ]"--=angle quotation mark, right--> */
	"frac14",	/* <!ENTITY frac14 SDATA" [frac14]"--=fraction one-quarter--> */
	"frac12",	/* <!ENTITY frac12 SDATA" [frac12]"--=fraction one-half--> */
	"frac34",	/* <!ENTITY frac34 SDATA" [frac34]"--=fraction three-quarters--> */
	"iquest",	/* <!ENTITY iquest SDATA" [iquest]"--=inverted question mark--> */
	"Agrave",	/* <!ENTITY Agrave SDATA" [Agrave]"--=capital A, grave accent--> */
	"Aacute",	/* <!ENTITY Aacute SDATA" [Aacute]"--=capital A, acute accent--> */
	"Acirc" ,	/* <!ENTITY Acirc  SDATA" [Acirc ]"--=capital A, circumflex accent--> */
	"Atilde",	/* <!ENTITY Atilde SDATA" [Atilde]"--=capital A, tilde--> */
	"Auml"  ,	/* <!ENTITY Auml   SDATA" [Auml  ]"--=capital A, dieresis or umlaut mark--> */
	"Aring" ,	/* <!ENTITY Aring  SDATA" [Aring ]"--=capital A, ring--> */
	"AElig" ,	/* <!ENTITY AElig  SDATA" [AElig ]"--=capital AE diphthong (ligature)--> */
	"Ccedil",	/* <!ENTITY Ccedil SDATA" [Ccedil]"--=capital C, cedilla--> */
	"Egrave",	/* <!ENTITY Egrave SDATA" [Egrave]"--=capital E, grave accent--> */
	"Eacute",	/* <!ENTITY Eacute SDATA" [Eacute]"--=capital E, acute accent--> */
	"Ecirc" ,	/* <!ENTITY Ecirc  SDATA" [Ecirc ]"--=capital E, circumflex accent--> */
	"Euml"  ,	/* <!ENTITY Euml   SDATA" [Euml  ]"--=capital E, dieresis or umlaut mark--> */
	"Igrave",	/* <!ENTITY Igrave SDATA" [Igrave]"--=capital I, grave accent--> */
	"Iacute",	/* <!ENTITY Iacute SDATA" [Iacute]"--=capital I, acute accent--> */
	"Icirc" ,	/* <!ENTITY Icirc  SDATA" [Icirc ]"--=capital I, circumflex accent--> */
	"Iuml"  ,	/* <!ENTITY Iuml   SDATA" [Iuml  ]"--=capital I, dieresis or umlaut mark--> */
	"ETH"   ,	/* <!ENTITY ETH    SDATA" [ETH   ]"--=capital Eth, Icelandic--> */
	"Ntilde",	/* <!ENTITY Ntilde SDATA" [Ntilde]"--=capital N, tilde--> */
	"Ograve",	/* <!ENTITY Ograve SDATA" [Ograve]"--=capital O, grave accent--> */
	"Oacute",	/* <!ENTITY Oacute SDATA" [Oacute]"--=capital O, acute accent--> */
	"Ocirc" ,	/* <!ENTITY Ocirc  SDATA" [Ocirc ]"--=capital O, circumflex accent--> */
	"Otilde",	/* <!ENTITY Otilde SDATA" [Otilde]"--=capital O, tilde--> */
	"Ouml"  ,	/* <!ENTITY Ouml   SDATA" [Ouml  ]"--=capital O, dieresis or umlaut mark--> */
	"times" ,	/* <!ENTITY times  SDATA" [times ]"--/times B: =multiply sign--> */
	"Oslash",	/* <!ENTITY Oslash SDATA" [Oslash]"--=capital O, slash--> */
	"Ugrave",	/* <!ENTITY Ugrave SDATA" [Ugrave]"--=capital U, grave accent--> */
	"Uacute",	/* <!ENTITY Uacute SDATA" [Uacute]"--=capital U, acute accent--> */
	"Ucirc" ,	/* <!ENTITY Ucirc  SDATA" [Ucirc ]"--=capital U, circumflex accent--> */
	"Uuml"  ,	/* <!ENTITY Uuml   SDATA" [Uuml  ]"--=capital U, dieresis or umlaut mark--> */
	"Yacute",	/* <!ENTITY Yacute SDATA" [Yacute]"--=capital Y, acute accent--> */
	"THORN" ,	/* <!ENTITY THORN  SDATA" [THORN ]"--=capital THORN, Icelandic--> */
	"szlig" ,	/* <!ENTITY szlig  SDATA" [szlig ]"--=small sharp s, German (sz ligature)--> */
	"agrave",	/* <!ENTITY agrave SDATA" [agrave]"--=small a, grave accent--> */
	"aacute",	/* <!ENTITY aacute SDATA" [aacute]"--=small a, acute accent--> */
	"acirc" ,	/* <!ENTITY acirc  SDATA" [acirc ]"--=small a, circumflex accent--> */
	"atilde",	/* <!ENTITY atilde SDATA" [atilde]"--=small a, tilde--> */
	"auml"  ,	/* <!ENTITY auml   SDATA" [auml  ]"--=small a, dieresis or umlaut mark--> */
	"aring" ,	/* <!ENTITY aring  SDATA" [aring ]"--=small a, ring--> */
	"aelig" ,	/* <!ENTITY aelig  SDATA" [aelig ]"--=small ae diphthong (ligature)--> */
	"ccedil",	/* <!ENTITY ccedil SDATA" [ccedil]"--=small c, cedilla--> */
	"egrave",	/* <!ENTITY egrave SDATA" [egrave]"--=small e, grave accent--> */
	"eacute",	/* <!ENTITY eacute SDATA" [eacute]"--=small e, acute accent--> */
	"ecirc" ,	/* <!ENTITY ecirc  SDATA" [ecirc ]"--=small e, circumflex accent--> */
	"euml"  ,	/* <!ENTITY euml   SDATA" [euml  ]"--=small e, dieresis or umlaut mark--> */
	"igrave",	/* <!ENTITY igrave SDATA" [igrave]"--=small i, grave accent--> */
	"iacute",	/* <!ENTITY iacute SDATA" [iacute]"--=small i, acute accent--> */
	"icirc" ,	/* <!ENTITY icirc  SDATA" [icirc ]"--=small i, circumflex accent--> */
	"iuml"  ,	/* <!ENTITY iuml   SDATA" [iuml  ]"--=small i, dieresis or umlaut mark--> */
	"eth"   ,	/* <!ENTITY eth    SDATA" [eth   ]"--=small eth, Icelandic--> */
	"ntilde",	/* <!ENTITY ntilde SDATA" [ntilde]"--=small n, tilde--> */
	"ograve",	/* <!ENTITY ograve SDATA" [ograve]"--=small o, grave accent--> */
	"oacute",	/* <!ENTITY oacute SDATA" [oacute]"--=small o, acute accent--> */
	"ocirc" ,	/* <!ENTITY ocirc  SDATA" [ocirc ]"--=small o, circumflex accent--> */
	"otilde",	/* <!ENTITY otilde SDATA" [otilde]"--=small o, tilde--> */
	"ouml"  ,	/* <!ENTITY ouml   SDATA" [ouml  ]"--=small o, dieresis or umlaut mark--> */
	"divide",	/* <!ENTITY divide SDATA" [divide]"--/div B: =divide sign--> */
	"oslash",	/* <!ENTITY oslash SDATA" [oslash]"--=small o, slash--> */
	"ugrave",	/* <!ENTITY ugrave SDATA" [ugrave]"--=small u, grave accent--> */
	"uacute",	/* <!ENTITY uacute SDATA" [uacute]"--=small u, acute accent--> */
	"ucirc" ,	/* <!ENTITY ucirc  SDATA" [ucirc ]"--=small u, circumflex accent--> */
	"uuml"  ,	/* <!ENTITY uuml   SDATA" [uuml  ]"--=small u, dieresis or umlaut mark--> */
	"yacute",	/* <!ENTITY yacute SDATA" [yacute]"--=small y, acute accent--> */
	"thorn" ,	/* <!ENTITY thorn  SDATA" [thorn ]"--=small thorn, Icelandic--> */
	"yuml"		/* <!ENTITY yuml   SDATA "[yuml  ]"--=small y, dieresis or umlaut mark--> */
	};

char *entity_list = "\
<!DOCTYPE metadata SYSTEM \"http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd\" [\n\
	<!ENTITY Aacute           \"&#x000C1;\" >\n\
	<!ENTITY aacute           \"&#x000E1;\" >\n\
	<!ENTITY Acirc            \"&#x000C2;\" >\n\
	<!ENTITY acirc            \"&#x000E2;\" >\n\
	<!ENTITY AElig            \"&#x000C6;\" >\n\
	<!ENTITY aelig            \"&#x000E6;\" >\n\
	<!ENTITY Agrave           \"&#x000C0;\" >\n\
	<!ENTITY agrave           \"&#x000E0;\" >\n\
	<!ENTITY Aring            \"&#x000C5;\" >\n\
	<!ENTITY aring            \"&#x000E5;\" >\n\
	<!ENTITY Atilde           \"&#x000C3;\" >\n\
	<!ENTITY atilde           \"&#x000E3;\" >\n\
	<!ENTITY Auml             \"&#x000C4;\" >\n\
	<!ENTITY auml             \"&#x000E4;\" >\n\
	<!ENTITY Ccedil           \"&#x000C7;\" >\n\
	<!ENTITY ccedil           \"&#x000E7;\" >\n\
	<!ENTITY Eacute           \"&#x000C9;\" >\n\
	<!ENTITY eacute           \"&#x000E9;\" >\n\
	<!ENTITY Ecirc            \"&#x000CA;\" >\n\
	<!ENTITY ecirc            \"&#x000EA;\" >\n\
	<!ENTITY Egrave           \"&#x000C8;\" >\n\
	<!ENTITY egrave           \"&#x000E8;\" >\n\
	<!ENTITY ETH              \"&#x000D0;\" >\n\
	<!ENTITY eth              \"&#x000F0;\" >\n\
	<!ENTITY Euml             \"&#x000CB;\" >\n\
	<!ENTITY euml             \"&#x000EB;\" >\n\
	<!ENTITY Iacute           \"&#x000CD;\" >\n\
	<!ENTITY iacute           \"&#x000ED;\" >\n\
	<!ENTITY Icirc            \"&#x000CE;\" >\n\
	<!ENTITY icirc            \"&#x000EE;\" >\n\
	<!ENTITY Igrave           \"&#x000CC;\" >\n\
	<!ENTITY igrave           \"&#x000EC;\" >\n\
	<!ENTITY Iuml             \"&#x000CF;\" >\n\
	<!ENTITY iuml             \"&#x000EF;\" >\n\
	<!ENTITY Ntilde           \"&#x000D1;\" >\n\
	<!ENTITY ntilde           \"&#x000F1;\" >\n\
	<!ENTITY Oacute           \"&#x000D3;\" >\n\
	<!ENTITY oacute           \"&#x000F3;\" >\n\
	<!ENTITY Ocirc            \"&#x000D4;\" >\n\
	<!ENTITY ocirc            \"&#x000F4;\" >\n\
	<!ENTITY Ograve           \"&#x000D2;\" >\n\
	<!ENTITY ograve           \"&#x000F2;\" >\n\
	<!ENTITY Oslash           \"&#x000D8;\" >\n\
	<!ENTITY oslash           \"&#x000F8;\" >\n\
	<!ENTITY Otilde           \"&#x000D5;\" >\n\
	<!ENTITY otilde           \"&#x000F5;\" >\n\
	<!ENTITY Ouml             \"&#x000D6;\" >\n\
	<!ENTITY ouml             \"&#x000F6;\" >\n\
	<!ENTITY szlig            \"&#x000DF;\" >\n\
	<!ENTITY THORN            \"&#x000DE;\" >\n\
	<!ENTITY thorn            \"&#x000FE;\" >\n\
	<!ENTITY Uacute           \"&#x000DA;\" >\n\
	<!ENTITY uacute           \"&#x000FA;\" >\n\
	<!ENTITY Ucirc            \"&#x000DB;\" >\n\
	<!ENTITY ucirc            \"&#x000FB;\" >\n\
	<!ENTITY Ugrave           \"&#x000D9;\" >\n\
	<!ENTITY ugrave           \"&#x000F9;\" >\n\
	<!ENTITY Uuml             \"&#x000DC;\" >\n\
	<!ENTITY uuml             \"&#x000FC;\" >\n\
	<!ENTITY Yacute           \"&#x000DD;\" >\n\
	<!ENTITY yacute           \"&#x000FD;\" >\n\
	<!ENTITY yuml             \"&#x000FF;\" >\n\
	]>\n";

char *iso8859_1_numeric [256] = {
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,
	"amp",	/* <!ENTITY amp    SDATA "[amp   ]"--=ampersand--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,
	"lt",	/* <!ENTITY lt     SDATA "[lt    ]"--=less-than sign R:--> */
	NULL,
	"gt",	/* <!ENTITY gt     SDATA "[gt    ]"--=greater-than sign R:--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	"#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"
	};

char *dos_codeset[256] = {
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,
	"amp",	/* <!ENTITY amp    SDATA "[amp   ]"--=ampersand--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,
	"lt",	/* <!ENTITY lt     SDATA "[lt    ]"--=less-than sign R:--> */
	NULL,
	"gt",	/* <!ENTITY gt     SDATA "[gt    ]"--=greater-than sign R:--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	"nbsp"  ,	/* <!ENTITY nbsp   SDATA" [nbsp  ]"--=no break (required) space--> */
	"iexcl" ,	/* <!ENTITY iexcl  SDATA" [iexcl ]"--=inverted exclamation mark--> */
	"cent"  ,	/* <!ENTITY cent   SDATA" [cent  ]"--=cent sign--> */
	"pound" ,	/* <!ENTITY pound  SDATA" [pound ]"--=pound sign--> */
	"curren",	/* <!ENTITY curren SDATA" [curren]"--=general currency sign--> */
	"yen"   ,	/* <!ENTITY yen    SDATA" [yen   ]"--/yen =yen sign--> */
	"brvbar",	/* <!ENTITY brvbar SDATA" [brvbar]"--=broken (vertical) bar--> */
	"sect"  ,	/* <!ENTITY sect   SDATA" [sect  ]"--=section sign--> */
	"uml"   ,	/* <!ENTITY uml    SDATA" [uml   ]"--=umlaut mark--> */
	"copy"  ,	/* <!ENTITY copy   SDATA" [copy  ]"--=copyright sign--> */
	"ordf"  ,	/* <!ENTITY ordf   SDATA" [ordf  ]"--=ordinal indicator, feminine--> */
	"laquo" ,	/* <!ENTITY laquo  SDATA" [laquo ]"--=angle quotation mark, left--> */
	"not"   ,	/* <!ENTITY not    SDATA" [not   ]"--/neg /lnot =not sign--> */
	"shy"   ,	/* <!ENTITY shy    SDATA" [shy   ]"--=soft hyphen--> */
	"reg"   ,	/* <!ENTITY reg    SDATA" [reg   ]"--/circledR =registered sign--> */
	"macr"  ,	/* <!ENTITY macr   SDATA" [macr  ]"--=macron--> */
	"deg"   ,	/* <!ENTITY deg    SDATA" [deg   ]"--=degree sign--> */
	"plusmn",	/* <!ENTITY plusmn SDATA" [plusmn]"--/pm B: =plus-or-minus sign--> */
	"sup2"  ,	/* <!ENTITY sup2   SDATA" [sup2  ]"--=superscript two--> */
	"sup3"  ,	/* <!ENTITY sup3   SDATA" [sup3  ]"--=superscript three--> */
	"acute" ,	/* <!ENTITY acute  SDATA" [acute ]"--=acute accent--> */
	"micro" ,	/* <!ENTITY micro  SDATA" [micro ]"--=micro sign--> */
	"para"  ,	/* <!ENTITY para   SDATA" [para  ]"--=pilcrow (paragraph sign)--> */
	"middot",	/* <!ENTITY middot SDATA" [middot]"--/centerdot B: =middle dot--> */
	"cedil" ,	/* <!ENTITY cedil  SDATA" [cedil ]"--=cedilla--> */
	"sup1"  ,	/* <!ENTITY sup1   SDATA" [sup1  ]"--=superscript one--> */
	"ordm"  ,	/* <!ENTITY ordm   SDATA" [ordm  ]"--=ordinal indicator, masculine--> */
	"raquo" ,	/* <!ENTITY raquo  SDATA" [raquo ]"--=angle quotation mark, right--> */
	"frac14",	/* <!ENTITY frac14 SDATA" [frac14]"--=fraction one-quarter--> */
	"frac12",	/* <!ENTITY frac12 SDATA" [frac12]"--=fraction one-half--> */
	"frac34",	/* <!ENTITY frac34 SDATA" [frac34]"--=fraction three-quarters--> */
	"iquest",	/* <!ENTITY iquest SDATA" [iquest]"--=inverted question mark--> */
	"Agrave",	/* <!ENTITY Agrave SDATA" [Agrave]"--=capital A, grave accent--> */
	"Aacute",	/* <!ENTITY Aacute SDATA" [Aacute]"--=capital A, acute accent--> */
	"Acirc" ,	/* <!ENTITY Acirc  SDATA" [Acirc ]"--=capital A, circumflex accent--> */
	"Atilde",	/* <!ENTITY Atilde SDATA" [Atilde]"--=capital A, tilde--> */
	"Auml"  ,	/* <!ENTITY Auml   SDATA" [Auml  ]"--=capital A, dieresis or umlaut mark--> */
	"Aring" ,	/* <!ENTITY Aring  SDATA" [Aring ]"--=capital A, ring--> */
	"AElig" ,	/* <!ENTITY AElig  SDATA" [AElig ]"--=capital AE diphthong (ligature)--> */
	"Ccedil",	/* <!ENTITY Ccedil SDATA" [Ccedil]"--=capital C, cedilla--> */
	"Egrave",	/* <!ENTITY Egrave SDATA" [Egrave]"--=capital E, grave accent--> */
	"Eacute",	/* <!ENTITY Eacute SDATA" [Eacute]"--=capital E, acute accent--> */
	"Ecirc" ,	/* <!ENTITY Ecirc  SDATA" [Ecirc ]"--=capital E, circumflex accent--> */
	"Euml"  ,	/* <!ENTITY Euml   SDATA" [Euml  ]"--=capital E, dieresis or umlaut mark--> */
	"Igrave",	/* <!ENTITY Igrave SDATA" [Igrave]"--=capital I, grave accent--> */
	"Iacute",	/* <!ENTITY Iacute SDATA" [Iacute]"--=capital I, acute accent--> */
	"Icirc" ,	/* <!ENTITY Icirc  SDATA" [Icirc ]"--=capital I, circumflex accent--> */
	"Iuml"  ,	/* <!ENTITY Iuml   SDATA" [Iuml  ]"--=capital I, dieresis or umlaut mark--> */
	"ETH"   ,	/* <!ENTITY ETH    SDATA" [ETH   ]"--=capital Eth, Icelandic--> */
	"Ntilde",	/* <!ENTITY Ntilde SDATA" [Ntilde]"--=capital N, tilde--> */
	"Ograve",	/* <!ENTITY Ograve SDATA" [Ograve]"--=capital O, grave accent--> */
	"Oacute",	/* <!ENTITY Oacute SDATA" [Oacute]"--=capital O, acute accent--> */
	"Ocirc" ,	/* <!ENTITY Ocirc  SDATA" [Ocirc ]"--=capital O, circumflex accent--> */
	"Otilde",	/* <!ENTITY Otilde SDATA" [Otilde]"--=capital O, tilde--> */
	"Ouml"  ,	/* <!ENTITY Ouml   SDATA" [Ouml  ]"--=capital O, dieresis or umlaut mark--> */
	"times" ,	/* <!ENTITY times  SDATA" [times ]"--/times B: =multiply sign--> */
	"Oslash",	/* <!ENTITY Oslash SDATA" [Oslash]"--=capital O, slash--> */
	"Ugrave",	/* <!ENTITY Ugrave SDATA" [Ugrave]"--=capital U, grave accent--> */
	"Uacute",	/* <!ENTITY Uacute SDATA" [Uacute]"--=capital U, acute accent--> */
	"Ucirc" ,	/* <!ENTITY Ucirc  SDATA" [Ucirc ]"--=capital U, circumflex accent--> */
	"Uuml"  ,	/* <!ENTITY Uuml   SDATA" [Uuml  ]"--=capital U, dieresis or umlaut mark--> */
	"Yacute",	/* <!ENTITY Yacute SDATA" [Yacute]"--=capital Y, acute accent--> */
	"THORN" ,	/* <!ENTITY THORN  SDATA" [THORN ]"--=capital THORN, Icelandic--> */
	"szlig" ,	/* <!ENTITY szlig  SDATA" [szlig ]"--=small sharp s, German (sz ligature)--> */
	"agrave",	/* <!ENTITY agrave SDATA" [agrave]"--=small a, grave accent--> */
	"aacute",	/* <!ENTITY aacute SDATA" [aacute]"--=small a, acute accent--> */
	"acirc" ,	/* <!ENTITY acirc  SDATA" [acirc ]"--=small a, circumflex accent--> */
	"atilde",	/* <!ENTITY atilde SDATA" [atilde]"--=small a, tilde--> */
	"auml"  ,	/* <!ENTITY auml   SDATA" [auml  ]"--=small a, dieresis or umlaut mark--> */
	"aring" ,	/* <!ENTITY aring  SDATA" [aring ]"--=small a, ring--> */
	"aelig" ,	/* <!ENTITY aelig  SDATA" [aelig ]"--=small ae diphthong (ligature)--> */
	"ccedil",	/* <!ENTITY ccedil SDATA" [ccedil]"--=small c, cedilla--> */
	"egrave",	/* <!ENTITY egrave SDATA" [egrave]"--=small e, grave accent--> */
	"eacute",	/* <!ENTITY eacute SDATA" [eacute]"--=small e, acute accent--> */
	"ecirc" ,	/* <!ENTITY ecirc  SDATA" [ecirc ]"--=small e, circumflex accent--> */
	"euml"  ,	/* <!ENTITY euml   SDATA" [euml  ]"--=small e, dieresis or umlaut mark--> */
	"igrave",	/* <!ENTITY igrave SDATA" [igrave]"--=small i, grave accent--> */
	"iacute",	/* <!ENTITY iacute SDATA" [iacute]"--=small i, acute accent--> */
	"icirc" ,	/* <!ENTITY icirc  SDATA" [icirc ]"--=small i, circumflex accent--> */
	"iuml"  ,	/* <!ENTITY iuml   SDATA" [iuml  ]"--=small i, dieresis or umlaut mark--> */
	"eth"   ,	/* <!ENTITY eth    SDATA" [eth   ]"--=small eth, Icelandic--> */
	"ntilde",	/* <!ENTITY ntilde SDATA" [ntilde]"--=small n, tilde--> */
	"ograve",	/* <!ENTITY ograve SDATA" [ograve]"--=small o, grave accent--> */
	"oacute",	/* <!ENTITY oacute SDATA" [oacute]"--=small o, acute accent--> */
	"ocirc" ,	/* <!ENTITY ocirc  SDATA" [ocirc ]"--=small o, circumflex accent--> */
	"otilde",	/* <!ENTITY otilde SDATA" [otilde]"--=small o, tilde--> */
	"ouml"  ,	/* <!ENTITY ouml   SDATA" [ouml  ]"--=small o, dieresis or umlaut mark--> */
	"divide",	/* <!ENTITY divide SDATA" [divide]"--/div B: =divide sign--> */
	"oslash",	/* <!ENTITY oslash SDATA" [oslash]"--=small o, slash--> */
	"ugrave",	/* <!ENTITY ugrave SDATA" [ugrave]"--=small u, grave accent--> */
	"uacute",	/* <!ENTITY uacute SDATA" [uacute]"--=small u, acute accent--> */
	"ucirc" ,	/* <!ENTITY ucirc  SDATA" [ucirc ]"--=small u, circumflex accent--> */
	"uuml"  ,	/* <!ENTITY uuml   SDATA" [uuml  ]"--=small u, dieresis or umlaut mark--> */
	"yacute",	/* <!ENTITY yacute SDATA" [yacute]"--=small y, acute accent--> */
	"thorn" ,	/* <!ENTITY thorn  SDATA" [thorn ]"--=small thorn, Icelandic--> */
	"yuml"		/* <!ENTITY yuml   SDATA "[yuml  ]"--=small y, dieresis or umlaut mark--> */
	};

char *mac_codeset[256] = {
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,
	"amp",	/* <!ENTITY amp    SDATA "[amp   ]"--=ampersand--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,
	"lt",	/* <!ENTITY lt     SDATA "[lt    ]"--=less-than sign R:--> */
	NULL,
	"gt",	/* <!ENTITY gt     SDATA "[gt    ]"--=greater-than sign R:--> */
	NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
	"nbsp"  ,	/* <!ENTITY nbsp   SDATA" [nbsp  ]"--=no break (required) space--> */
	"iexcl" ,	/* <!ENTITY iexcl  SDATA" [iexcl ]"--=inverted exclamation mark--> */
	"cent"  ,	/* <!ENTITY cent   SDATA" [cent  ]"--=cent sign--> */
	"pound" ,	/* <!ENTITY pound  SDATA" [pound ]"--=pound sign--> */
	"curren",	/* <!ENTITY curren SDATA" [curren]"--=general currency sign--> */
	"yen"   ,	/* <!ENTITY yen    SDATA" [yen   ]"--/yen =yen sign--> */
	"brvbar",	/* <!ENTITY brvbar SDATA" [brvbar]"--=broken (vertical) bar--> */
	"sect"  ,	/* <!ENTITY sect   SDATA" [sect  ]"--=section sign--> */
	"uml"   ,	/* <!ENTITY uml    SDATA" [uml   ]"--=umlaut mark--> */
	"copy"  ,	/* <!ENTITY copy   SDATA" [copy  ]"--=copyright sign--> */
	"ordf"  ,	/* <!ENTITY ordf   SDATA" [ordf  ]"--=ordinal indicator, feminine--> */
	"laquo" ,	/* <!ENTITY laquo  SDATA" [laquo ]"--=angle quotation mark, left--> */
	"not"   ,	/* <!ENTITY not    SDATA" [not   ]"--/neg /lnot =not sign--> */
	"shy"   ,	/* <!ENTITY shy    SDATA" [shy   ]"--=soft hyphen--> */
	"reg"   ,	/* <!ENTITY reg    SDATA" [reg   ]"--/circledR =registered sign--> */
	"macr"  ,	/* <!ENTITY macr   SDATA" [macr  ]"--=macron--> */
	"deg"   ,	/* <!ENTITY deg    SDATA" [deg   ]"--=degree sign--> */
	"plusmn",	/* <!ENTITY plusmn SDATA" [plusmn]"--/pm B: =plus-or-minus sign--> */
	"sup2"  ,	/* <!ENTITY sup2   SDATA" [sup2  ]"--=superscript two--> */
	"sup3"  ,	/* <!ENTITY sup3   SDATA" [sup3  ]"--=superscript three--> */
	"acute" ,	/* <!ENTITY acute  SDATA" [acute ]"--=acute accent--> */
	"micro" ,	/* <!ENTITY micro  SDATA" [micro ]"--=micro sign--> */
	"para"  ,	/* <!ENTITY para   SDATA" [para  ]"--=pilcrow (paragraph sign)--> */
	"middot",	/* <!ENTITY middot SDATA" [middot]"--/centerdot B: =middle dot--> */
	"cedil" ,	/* <!ENTITY cedil  SDATA" [cedil ]"--=cedilla--> */
	"sup1"  ,	/* <!ENTITY sup1   SDATA" [sup1  ]"--=superscript one--> */
	"ordm"  ,	/* <!ENTITY ordm   SDATA" [ordm  ]"--=ordinal indicator, masculine--> */
	"raquo" ,	/* <!ENTITY raquo  SDATA" [raquo ]"--=angle quotation mark, right--> */
	"frac14",	/* <!ENTITY frac14 SDATA" [frac14]"--=fraction one-quarter--> */
	"frac12",	/* <!ENTITY frac12 SDATA" [frac12]"--=fraction one-half--> */
	"frac34",	/* <!ENTITY frac34 SDATA" [frac34]"--=fraction three-quarters--> */
	"iquest",	/* <!ENTITY iquest SDATA" [iquest]"--=inverted question mark--> */
	"Agrave",	/* <!ENTITY Agrave SDATA" [Agrave]"--=capital A, grave accent--> */
	"Aacute",	/* <!ENTITY Aacute SDATA" [Aacute]"--=capital A, acute accent--> */
	"Acirc" ,	/* <!ENTITY Acirc  SDATA" [Acirc ]"--=capital A, circumflex accent--> */
	"Atilde",	/* <!ENTITY Atilde SDATA" [Atilde]"--=capital A, tilde--> */
	"Auml"  ,	/* <!ENTITY Auml   SDATA" [Auml  ]"--=capital A, dieresis or umlaut mark--> */
	"Aring" ,	/* <!ENTITY Aring  SDATA" [Aring ]"--=capital A, ring--> */
	"AElig" ,	/* <!ENTITY AElig  SDATA" [AElig ]"--=capital AE diphthong (ligature)--> */
	"Ccedil",	/* <!ENTITY Ccedil SDATA" [Ccedil]"--=capital C, cedilla--> */
	"Egrave",	/* <!ENTITY Egrave SDATA" [Egrave]"--=capital E, grave accent--> */
	"Eacute",	/* <!ENTITY Eacute SDATA" [Eacute]"--=capital E, acute accent--> */
	"Ecirc" ,	/* <!ENTITY Ecirc  SDATA" [Ecirc ]"--=capital E, circumflex accent--> */
	"Euml"  ,	/* <!ENTITY Euml   SDATA" [Euml  ]"--=capital E, dieresis or umlaut mark--> */
	"Igrave",	/* <!ENTITY Igrave SDATA" [Igrave]"--=capital I, grave accent--> */
	"Iacute",	/* <!ENTITY Iacute SDATA" [Iacute]"--=capital I, acute accent--> */
	"Icirc" ,	/* <!ENTITY Icirc  SDATA" [Icirc ]"--=capital I, circumflex accent--> */
	"Iuml"  ,	/* <!ENTITY Iuml   SDATA" [Iuml  ]"--=capital I, dieresis or umlaut mark--> */
	"ETH"   ,	/* <!ENTITY ETH    SDATA" [ETH   ]"--=capital Eth, Icelandic--> */
	"Ntilde",	/* <!ENTITY Ntilde SDATA" [Ntilde]"--=capital N, tilde--> */
	"Ograve",	/* <!ENTITY Ograve SDATA" [Ograve]"--=capital O, grave accent--> */
	"Oacute",	/* <!ENTITY Oacute SDATA" [Oacute]"--=capital O, acute accent--> */
	"Ocirc" ,	/* <!ENTITY Ocirc  SDATA" [Ocirc ]"--=capital O, circumflex accent--> */
	"Otilde",	/* <!ENTITY Otilde SDATA" [Otilde]"--=capital O, tilde--> */
	"Ouml"  ,	/* <!ENTITY Ouml   SDATA" [Ouml  ]"--=capital O, dieresis or umlaut mark--> */
	"times" ,	/* <!ENTITY times  SDATA" [times ]"--/times B: =multiply sign--> */
	"Oslash",	/* <!ENTITY Oslash SDATA" [Oslash]"--=capital O, slash--> */
	"Ugrave",	/* <!ENTITY Ugrave SDATA" [Ugrave]"--=capital U, grave accent--> */
	"Uacute",	/* <!ENTITY Uacute SDATA" [Uacute]"--=capital U, acute accent--> */
	"Ucirc" ,	/* <!ENTITY Ucirc  SDATA" [Ucirc ]"--=capital U, circumflex accent--> */
	"Uuml"  ,	/* <!ENTITY Uuml   SDATA" [Uuml  ]"--=capital U, dieresis or umlaut mark--> */
	"Yacute",	/* <!ENTITY Yacute SDATA" [Yacute]"--=capital Y, acute accent--> */
	"THORN" ,	/* <!ENTITY THORN  SDATA" [THORN ]"--=capital THORN, Icelandic--> */
	"szlig" ,	/* <!ENTITY szlig  SDATA" [szlig ]"--=small sharp s, German (sz ligature)--> */
	"agrave",	/* <!ENTITY agrave SDATA" [agrave]"--=small a, grave accent--> */
	"aacute",	/* <!ENTITY aacute SDATA" [aacute]"--=small a, acute accent--> */
	"acirc" ,	/* <!ENTITY acirc  SDATA" [acirc ]"--=small a, circumflex accent--> */
	"atilde",	/* <!ENTITY atilde SDATA" [atilde]"--=small a, tilde--> */
	"auml"  ,	/* <!ENTITY auml   SDATA" [auml  ]"--=small a, dieresis or umlaut mark--> */
	"aring" ,	/* <!ENTITY aring  SDATA" [aring ]"--=small a, ring--> */
	"aelig" ,	/* <!ENTITY aelig  SDATA" [aelig ]"--=small ae diphthong (ligature)--> */
	"ccedil",	/* <!ENTITY ccedil SDATA" [ccedil]"--=small c, cedilla--> */
	"egrave",	/* <!ENTITY egrave SDATA" [egrave]"--=small e, grave accent--> */
	"eacute",	/* <!ENTITY eacute SDATA" [eacute]"--=small e, acute accent--> */
	"ecirc" ,	/* <!ENTITY ecirc  SDATA" [ecirc ]"--=small e, circumflex accent--> */
	"euml"  ,	/* <!ENTITY euml   SDATA" [euml  ]"--=small e, dieresis or umlaut mark--> */
	"igrave",	/* <!ENTITY igrave SDATA" [igrave]"--=small i, grave accent--> */
	"iacute",	/* <!ENTITY iacute SDATA" [iacute]"--=small i, acute accent--> */
	"icirc" ,	/* <!ENTITY icirc  SDATA" [icirc ]"--=small i, circumflex accent--> */
	"iuml"  ,	/* <!ENTITY iuml   SDATA" [iuml  ]"--=small i, dieresis or umlaut mark--> */
	"eth"   ,	/* <!ENTITY eth    SDATA" [eth   ]"--=small eth, Icelandic--> */
	"ntilde",	/* <!ENTITY ntilde SDATA" [ntilde]"--=small n, tilde--> */
	"ograve",	/* <!ENTITY ograve SDATA" [ograve]"--=small o, grave accent--> */
	"oacute",	/* <!ENTITY oacute SDATA" [oacute]"--=small o, acute accent--> */
	"ocirc" ,	/* <!ENTITY ocirc  SDATA" [ocirc ]"--=small o, circumflex accent--> */
	"otilde",	/* <!ENTITY otilde SDATA" [otilde]"--=small o, tilde--> */
	"ouml"  ,	/* <!ENTITY ouml   SDATA" [ouml  ]"--=small o, dieresis or umlaut mark--> */
	"divide",	/* <!ENTITY divide SDATA" [divide]"--/div B: =divide sign--> */
	"oslash",	/* <!ENTITY oslash SDATA" [oslash]"--=small o, slash--> */
	"ugrave",	/* <!ENTITY ugrave SDATA" [ugrave]"--=small u, grave accent--> */
	"uacute",	/* <!ENTITY uacute SDATA" [uacute]"--=small u, acute accent--> */
	"ucirc" ,	/* <!ENTITY ucirc  SDATA" [ucirc ]"--=small u, circumflex accent--> */
	"uuml"  ,	/* <!ENTITY uuml   SDATA" [uuml  ]"--=small u, dieresis or umlaut mark--> */
	"yacute",	/* <!ENTITY yacute SDATA" [yacute]"--=small y, acute accent--> */
	"thorn" ,	/* <!ENTITY thorn  SDATA" [thorn ]"--=small thorn, Icelandic--> */
	"yuml"		/* <!ENTITY yuml   SDATA "[yuml  ]"--=small y, dieresis or umlaut mark--> */
	};

#ifdef TEST

int main (int argc, char *argv[]) {
	int k;
	for (k=0; k < sizeof(iso8859_1)/sizeof(char *); k++) {
		if (iso8859_1[k])
			printf ("<!ENTITY %-8s \"\\x%x\">\n",iso8859_1[k],k);
		else
			printf ("<!--              \"\\x%02x\" -->\n",k);
		}
	}

#endif

/*----------------------------------------------------------------------*\
\*----------------------------------------------------------------------*/