summaryrefslogtreecommitdiff
path: root/usr/src/cmd/man
diff options
context:
space:
mode:
authorYuri Pankov <yuri.pankov@nexenta.com>2012-08-18 05:52:16 -0500
committerRichard Lowe <richlowe@richlowe.net>2012-08-20 03:10:16 -0400
commita970c705050f9e90c4b6d7982a9b3211719353fb (patch)
tree0e16d287795671011421a4a74453e6734c563b32 /usr/src/cmd/man
parentca3c8f41e333bc4783da7cb75b242843c8846c8a (diff)
downloadillumos-joyent-a970c705050f9e90c4b6d7982a9b3211719353fb.tar.gz
3057 Remove sgml util from cmd/man
Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Gary Mills <gary_mills@fastmail.fm> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/cmd/man')
-rw-r--r--usr/src/cmd/man/src/Makefile21
-rw-r--r--usr/src/cmd/man/src/util/Makefile180
-rw-r--r--usr/src/cmd/man/src/util/THIRDPARTYLICENSE4
-rw-r--r--usr/src/cmd/man/src/util/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/cmd/man/src/util/aap-shortref.gml78
-rw-r--r--usr/src/cmd/man/src/util/allisoents.gml62
-rw-r--r--usr/src/cmd/man/src/util/ati-dflt.dcl101
-rw-r--r--usr/src/cmd/man/src/util/ati-eqn1.gml366
-rw-r--r--usr/src/cmd/man/src/util/ati-graph.gml35
-rw-r--r--usr/src/cmd/man/src/util/ati-math.elm193
-rw-r--r--usr/src/cmd/man/src/util/ati-num.gml42
-rw-r--r--usr/src/cmd/man/src/util/ati-tbl.elm98
-rw-r--r--usr/src/cmd/man/src/util/atilogo.epsbin67979 -> 0 bytes
-rw-r--r--usr/src/cmd/man/src/util/basic.dcl97
-rw-r--r--usr/src/cmd/man/src/util/cals-tbl.elm204
-rw-r--r--usr/src/cmd/man/src/util/capref.gml44
-rw-r--r--usr/src/cmd/man/src/util/catalog33
-rw-r--r--usr/src/cmd/man/src/util/caution.epsbin17038 -> 0 bytes
-rw-r--r--usr/src/cmd/man/src/util/core.gml141
-rw-r--r--usr/src/cmd/man/src/util/docbook-to-man.ts2278
-rw-r--r--usr/src/cmd/man/src/util/ereview.gml111
-rw-r--r--usr/src/cmd/man/src/util/html-latin.sgml164
-rw-r--r--usr/src/cmd/man/src/util/instant.src/Makefile144
-rw-r--r--usr/src/cmd/man/src/util/instant.src/README179
-rw-r--r--usr/src/cmd/man/src/util/instant.src/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/cmd/man/src/util/instant.src/allVersion.c13
-rw-r--r--usr/src/cmd/man/src/util/instant.src/browse.c473
-rw-r--r--usr/src/cmd/man/src/util/instant.src/general.h329
-rw-r--r--usr/src/cmd/man/src/util/instant.src/hyper.c101
-rw-r--r--usr/src/cmd/man/src/util/instant.src/info.c301
-rw-r--r--usr/src/cmd/man/src/util/instant.src/main.c714
-rw-r--r--usr/src/cmd/man/src/util/instant.src/masterVersion.c3
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tables.c2124
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/Imakefile19
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/Makefile117
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/README103
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/README.osf39
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/regerror.c14
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.3182
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.c1216
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/regmagic.h6
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/regsub.c82
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/strerror.c12
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/tests130
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/timer.c183
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/tptregexp.h23
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tptregexp/try.c239
-rw-r--r--usr/src/cmd/man/src/util/instant.src/traninit.c454
-rw-r--r--usr/src/cmd/man/src/util/instant.src/translate.c1016
-rw-r--r--usr/src/cmd/man/src/util/instant.src/translate.h158
-rw-r--r--usr/src/cmd/man/src/util/instant.src/tranvar.c769
-rw-r--r--usr/src/cmd/man/src/util/instant.src/util.c1152
-rw-r--r--usr/src/cmd/man/src/util/iso-amsa.gml69
-rw-r--r--usr/src/cmd/man/src/util/iso-amsb.gml55
-rw-r--r--usr/src/cmd/man/src/util/iso-amsc.gml23
-rw-r--r--usr/src/cmd/man/src/util/iso-amsn.gml73
-rw-r--r--usr/src/cmd/man/src/util/iso-amso.gml32
-rw-r--r--usr/src/cmd/man/src/util/iso-amsr.gml97
-rw-r--r--usr/src/cmd/man/src/util/iso-box.gml65
-rw-r--r--usr/src/cmd/man/src/util/iso-cyr1.gml80
-rw-r--r--usr/src/cmd/man/src/util/iso-cyr2.gml39
-rw-r--r--usr/src/cmd/man/src/util/iso-dia.gml27
-rw-r--r--usr/src/cmd/man/src/util/iso-grk1.gml62
-rw-r--r--usr/src/cmd/man/src/util/iso-grk2.gml33
-rw-r--r--usr/src/cmd/man/src/util/iso-grk3.gml56
-rw-r--r--usr/src/cmd/man/src/util/iso-grk4.gml56
-rw-r--r--usr/src/cmd/man/src/util/iso-lat1.gml75
-rw-r--r--usr/src/cmd/man/src/util/iso-lat2.gml134
-rw-r--r--usr/src/cmd/man/src/util/iso-num.gml94
-rw-r--r--usr/src/cmd/man/src/util/iso-pub.gml103
-rw-r--r--usr/src/cmd/man/src/util/iso-tech.gml76
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/COPYING25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/COPYING.descrip1
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/Makefile148
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/Makefile.comm60
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/Makefile.lib21
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/Makefile.prog29
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/VERSION1
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/Makefile25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/archform.htm407
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/build.htm106
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/catalog4
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/catalog.htm168
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/features.htm141
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/generic.htm1084
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/ideas.htm491
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/index.htm96
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/new.htm168
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/nsgmls.htm450
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/sgmldecl.htm275
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlnorm.htm153
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlsout.htm420
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/spam.htm274
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/spent.htm70
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/sysdecl.htm43
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/sysid.htm307
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/doc/winntu.htm55
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/generic/EventGenerator.h30
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/generic/ParserEventGeneratorKit.h53
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/generic/SGMLApplication.h313
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Allocator.h68
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ArcEngine.h56
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Attribute.h945
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Attributed.h58
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Big5CodingSystem.h24
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Boolean.h41
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.cxx258
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.h143
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CharsetDecl.h141
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CharsetInfo.h121
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CharsetRegistry.h60
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CmdLineApp.h107
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystem.h92
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystemKit.h59
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ConsoleOutput.h28
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ContentState.h119
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ContentToken.h631
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.cxx28
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.h32
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/DescriptorManager.h51
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Dtd.h468
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/EUCJPCodingSystem.h24
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ElementType.h303
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Entity.h337
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/EntityApp.h49
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/EntityCatalog.h55
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/EntityDecl.h108
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/EntityManager.h50
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ErrnoMessageArg.h36
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ErrorCountEventHandler.h69
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Event.h1357
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/EventsWanted.h92
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ExtendEntityManager.h130
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ExternalId.h179
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Fixed2CodingSystem.h25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/GenericEventHandler.h128
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Hash.h26
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.cxx42
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.h69
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.cxx27
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.h39
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IList.h42
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IListBase.h81
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IListIter.h29
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IListIterBase.h52
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.cxx23
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.h66
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ISO8859InputCodingSystem.h28
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ISet.cxx131
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ISet.h59
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ISetIter.h41
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/IdentityCodingSystem.h26
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/InputSource.h281
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/InternalInputSource.h46
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Link.h39
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/LinkProcess.h82
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/List.cxx38
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/List.h50
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ListIter.h30
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/LiteralStorage.h41
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Location.h196
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Lpd.h447
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Markup.h204
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Message.h260
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/MessageArg.h66
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/MessageBuilder.h31
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/MessageEventHandler.h40
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/MessageFormatter.h59
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/MessageReporter.h81
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/MessageTable.h34
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Mode.h75
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.cxx168
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h80
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h.dist60
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.sed5
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Named.h30
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NamedResource.h24
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NamedResourceTable.h95
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NamedTable.h66
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Notation.h62
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/NotationStorage.h39
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/OpenElement.h210
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Options.cxx123
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Options.h45
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/OutputByteStream.h137
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/OutputCharStream.h138
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Owner.cxx29
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Owner.h61
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.cxx52
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.h51
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ParserApp.h54
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ParserOptions.h134
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.cxx147
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.h69
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/PosixStorage.h83
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.cxx73
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.h93
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.cxx162
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.h86
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Resource.h57
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/RewindStorageObject.h45
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SJISCodingSystem.h24
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SOEntityCatalog.h32
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Sd.h583
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SdText.h69
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SearchResultMessageArg.h58
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SgmlParser.h87
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/ShortReferenceMap.h105
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/StdioStorage.h48
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/StorageManager.h90
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/StringC.h21
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.cxx153
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.h80
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/StringResource.h25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.cxx98
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.h40
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Syntax.h528
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Text.h228
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/TranslateCodingSystem.h53
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/TranslateInputCodingSystem.h27
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/TypeId.h30
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/URLStorage.h40
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/UTF8CodingSystem.h24
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/UnicodeCodingSystem.h28
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/UnivCharsetDesc.h148
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Vector.cxx167
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Vector.h79
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/Win32CodingSystem.h39
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/WinApp.h106
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/WinInetStorage.h40
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/XMLCodingSystem.h29
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.cxx53
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.h50
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/config.h298
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/constant.h17
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/macros.h38
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/rtti.h60
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/sptchar.h157
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/types.h70
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/include/xnew.h53
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Allocator.cxx105
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngine.cxx1758
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngineMessages.h418
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ArcProcessor.h211
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Attribute.cxx1366
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Big5CodingSystem.cxx90
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogEntry.h28
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogMessages.h194
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetDecl.cxx266
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetInfo.cxx139
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetRegistry.cxx286
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineApp.cxx452
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineAppMessages.h124
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystem.cxx115
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystemKit.cxx531
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ConsoleOutput.cxx74
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ContentState.cxx170
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ContentToken.cxx790
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/DescriptorManager.cxx91
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Dtd.cxx92
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EUCJPCodingSystem.cxx120
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ElementType.cxx111
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Entity.cxx589
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EntityApp.cxx192
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EntityCatalog.cxx59
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EntityDecl.cxx59
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManager.cxx22
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManagerMessages.h306
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EquivClass.h26
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ErrnoMessageArg.cxx25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ErrorCountEventHandler.cxx34
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Event.cxx574
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EventGenerator.cxx26
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/EventQueue.h59
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ExtendEntityManager.cxx2149
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ExternalId.cxx266
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Fixed2CodingSystem.cxx145
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/GenericEventHandler.cxx807
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Group.cxx165
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Group.h164
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Hash.cxx27
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/IListBase.cxx37
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Id.cxx31
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Id.h61
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/IdentityCodingSystem.cxx87
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/InputSource.cxx84
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/InternalInputSource.cxx61
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Link.cxx18
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/LinkProcess.cxx186
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/LiteralStorage.cxx131
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Location.cxx557
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Lpd.cxx177
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/LpdEntityRef.h47
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Makefile.sub53
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Markup.cxx423
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MarkupScan.h25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Message.cxx318
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageArg.cxx83
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageEventHandler.cxx51
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatter.cxx176
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatterMessages.h90
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporter.cxx240
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporterMessages.h142
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/MessageTable.cxx201
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.cxx300
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.h77
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Mutex.h86
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/NameToken.h25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Notation.cxx62
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/NotationStorage.cxx43
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.cxx43
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.h35
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.cxx133
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.h56
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OpenElement.cxx32
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OutputByteStream.cxx284
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OutputCharStream.cxx262
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.cxx132
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.h79
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Param.cxx247
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Param.h214
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.cxx214
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.h412
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserApp.cxx253
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserAppMessages.h54
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserEventGeneratorKit.cxx211
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.cxx5306
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.h907
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserOptions.cxx52
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.cxx828
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.h844
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.cxx220
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.h75
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorage.cxx718
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorageMessages.h138
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Priority.h37
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.cxx76
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.h43
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/RewindStorageObject.cxx79
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SGMLApplication.cxx160
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SJISCodingSystem.cxx181
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SOEntityCatalog.cxx1149
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Sd.cxx274
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SdFormalError.h33
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SdText.cxx87
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SearchResultMessageArg.cxx36
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SgmlParser.cxx114
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ShortReferenceMap.cxx36
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/SrInfo.h25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorage.cxx157
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorageMessages.h54
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/StorageManager.cxx100
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/StorageObjectPosition.h36
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.cxx38
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.h33
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Syntax.cxx452
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Text.cxx408
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.cxx113
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.h40
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/TranslateCodingSystem.cxx210
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Trie.h84
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.cxx253
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.h71
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/TypeId.cxx29
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorage.cxx685
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorageMessages.h319
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/UTF8CodingSystem.cxx275
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.cxx55
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.h69
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/UnicodeCodingSystem.cxx216
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/UnivCharsetDesc.cxx172
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/Win32CodingSystem.cxx205
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/WinApp.cxx224
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorage.cxx235
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorageMessages.h40
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/XMLCodingSystem.cxx406
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/app_inst.m432
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/arc_inst.m428
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/assert.cxx25
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/big5.h1895
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/entmgr_inst.m4155
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/events.h44
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/gb2312.h1043
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/instmac.m482
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ir.out0
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso646-jis.h14
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-2.h15
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-3.h24
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-4.h15
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-5.h15
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-6.h21
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-7.h21
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-8.h14
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-9.h15
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/jis0201.h10
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/jis0208.h971
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/jis0212.h871
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/ksc5601.h1152
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/memmove.c7
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseAttribute.cxx472
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseCommon.cxx618
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseDecl.cxx3336
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseInstance.cxx1414
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseMode.cxx581
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseParam.cxx1024
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parseSd.cxx3435
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/parser_inst.m4328
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/splib.cxx4
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/splib.h11
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/splibpch.h153
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/strerror.c18
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/token.h84
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/version.h1
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/lib/xentmgr_inst.m487
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/Makefile.sub8
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.h27
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.rc4
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.cxx943
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.h210
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.h97
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.rc9
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.cxx639
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.h146
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.cxx34
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.h44
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.cxx271
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.rc6
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls_inst.m436
-rw-r--r--usr/src/cmd/man/src/util/nsgmls.src/sunfix.sh13
-rw-r--r--usr/src/cmd/man/src/util/roff.cmap50
-rw-r--r--usr/src/cmd/man/src/util/roff.sdata590
-rw-r--r--usr/src/cmd/man/src/util/sgml2roff.sh101
-rw-r--r--usr/src/cmd/man/src/util/solbookv2/Makefile61
-rw-r--r--usr/src/cmd/man/src/util/solbookv2/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/cmd/man/src/util/solbookv2/solbook.dcl137
-rw-r--r--usr/src/cmd/man/src/util/solbookv2/solbook.dtd4296
-rw-r--r--usr/src/cmd/man/src/util/sun_iso.gml199
-rw-r--r--usr/src/cmd/man/src/util/synref.gml61
-rw-r--r--usr/src/cmd/man/src/util/warn.epsbin16631 -> 0 bytes
439 files changed, 3 insertions, 99092 deletions
diff --git a/usr/src/cmd/man/src/Makefile b/usr/src/cmd/man/src/Makefile
index 84bda2fdee..179e974249 100644
--- a/usr/src/cmd/man/src/Makefile
+++ b/usr/src/cmd/man/src/Makefile
@@ -30,7 +30,6 @@ BINPROG = man
LIBPROG = getNAME
LIBSHELL = makewhatis
LNKPROG = catman apropos whatis
-SGMLUTILDIR = util
PROG = $(BINPROG) $(LIBPROG)
@@ -54,19 +53,13 @@ POFILES= $(SRCS:%.c=%.po)
.KEEP_STATE :
-all : $(PROG) $(LIBSHELL) $(LNKPROG) buildsubs
+all : $(PROG) $(LIBSHELL) $(LNKPROG)
makewhatis : $$@.sh
cat $@.sh > $@
-buildsubs :
- cd $(SGMLUTILDIR); pwd; $(MAKE) all
-
install : all $(ROOTPROG) $(ROOTLIBPROG) \
- $(ROOTLIBSHELL) $(ROOTLNKPROG) installsubs
-
-installsubs :
- cd $(SGMLUTILDIR); pwd; $(MAKE) install
+ $(ROOTLIBSHELL) $(ROOTLNKPROG)
$(ROOTLNKPROG) : $(ROOTBIN)/man
-$(RM) $@; $(LN) $(ROOTBIN)/man $@
@@ -81,15 +74,7 @@ $(POFILE): $(POFILES)
cat $(POFILES) > $@
-clean : sgml_clean
-
-sgml_clean :
- cd $(SGMLUTILDIR); pwd; $(MAKE) clean
-
-clobber : sgml_clobber
-
-sgml_clobber :
- cd $(SGMLUTILDIR); pwd; $(MAKE) clobber
+clean :
strip :
$(STRIP) $(PROG)
diff --git a/usr/src/cmd/man/src/util/Makefile b/usr/src/cmd/man/src/util/Makefile
deleted file mode 100644
index 5cd2cdc884..0000000000
--- a/usr/src/cmd/man/src/util/Makefile
+++ /dev/null
@@ -1,180 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../../Makefile.cmd
-
-BINPROG = nsgmls instant
-
-SGMLUTILSOLBOOKV2DIR = solbookv2
-
-LIBSHELL = sgml2roff
-SGMLENTS = aap-shortref.gml \
- allisoents.gml \
- ati-dflt.dcl \
- ati-eqn1.gml \
- ati-graph.gml \
- ati-math.elm \
- ati-num.gml \
- ati-tbl.elm \
- atilogo.eps \
- basic.dcl \
- cals-tbl.elm \
- capref.gml \
- caution.eps \
- core.gml \
- ereview.gml \
- html-latin.sgml \
- iso-amsa.gml \
- iso-amsb.gml \
- iso-amsc.gml \
- iso-amsn.gml \
- iso-amso.gml \
- iso-amsr.gml \
- iso-box.gml \
- iso-cyr1.gml \
- iso-cyr2.gml \
- iso-dia.gml \
- iso-grk1.gml \
- iso-grk2.gml \
- iso-grk3.gml \
- iso-grk4.gml \
- iso-lat1.gml \
- iso-lat2.gml \
- iso-num.gml \
- iso-pub.gml \
- iso-tech.gml \
- sun_iso.gml \
- synref.gml \
- warn.eps
-CATALOG = catalog
-SOLBOOKV2 = solbook.dcl \
- solbook.dtd
-SOLBOOKV1 = solbook.dtd
-TPTFILES = docbook-to-man.ts \
- roff.cmap \
- roff.sdata
-
-PROG = $(BINPROG)
-
-SHSRCS = sgml2roff.sh
-
-PROGDIR = $(ROOTLIB)/sgml
-SGMLSHLIB = $(ROOTSHLIB)/sgml
-SGMLSHLIBLOCALE = $(ROOTSHLIB)/sgml/locale
-SGMLSHLIBLOCALEC = $(ROOTSHLIB)/sgml/locale/C
-SGMLENTSDIR = $(ROOTSHLIB)/sgml/locale/C/entities
-SGMLDTDDIR = $(ROOTSHLIB)/sgml/locale/C/dtds
-DOCBOOKDIR = $(SGMLDTDDIR)/docbook
-SOLBOOKV1DIR = $(SGMLDTDDIR)/solbookv1
-SOLBOOKV2DIR = $(SGMLDTDDIR)/solbookv2
-TPTDIR = $(ROOTSHLIB)/sgml/locale/C/transpec
-
-ROOTPROG = $(BINPROG:%=$(PROGDIR)/%)
-ROOTLIBSHELL = $(LIBSHELL:%=$(PROGDIR)/%)
-ROOTENTS = $(SGMLENTS:%=$(SGMLENTSDIR)/%)
-ROOTSOLBOOKV2 = $(SOLBOOKV2:%=$(SOLBOOKV2DIR)/%)
-ROOTCATALOG = $(CATALOG:%=$(SGMLDTDDIR)/%)
-ROOTTPT = $(TPTFILES:%=$(TPTDIR)/%)
-
-CLOBBERFILES += $(LIBSHELL)
-
-FILEMODE = 0644
-$(ROOTPROG) := FILEMODE = 0755
-$(ROOTLIBSHELL) := FILEMODE = 0755
-
-.KEEP_STATE :
-
-all : $(PROG) $(LIBSHELL)
-
-install : all $(PROGDIR) $(SGMLSHLIB) $(SGMLSHLIBLOCALE) \
- $(SGMLSHLIBLOCALEC) $(SGMLDTDDIR) $(SGMLENTSDIR) $(ROOTPROG) \
- $(ROOTLIBSHELL) $(TPTDIR) $(ROOTENTS) $(ROOTCATALOG) $(ROOTTPT) \
- $(ROOTSOLBOOKV2)
-
-$(PROGDIR) :
- $(INS.dir)
-
-$(SGMLSHLIB) :
- $(INS.dir)
-
-$(SGMLSHLIBLOCALE) :
- $(INS.dir)
-
-$(SGMLSHLIBLOCALEC) :
- $(INS.dir)
-
-$(SGMLDTDDIR) :
- $(INS.dir)
-
-$(SGMLENTSDIR) :
- $(INS.dir)
-
-$(TPTDIR) :
- $(INS.dir)
-
-$(ROOTPROG) : instant nsgmls
-
-instant : FRC
- @cd $@.src; pwd; $(MAKE) $(TARGET)
- $(CP) $@.src/$@ .
-
-nsgmls : FRC
- @cd $@.src; pwd; $(MAKE) $(TARGET)
- $(CP) $@.src/$@/$@ .
-
-sgml2roff : sgml2roff.sh
- cat $@.sh > $@
-
-FRC:
-
-clean : _localclean
-
-_localclean:
- @cd instant.src; pwd; $(MAKE) clean
- @cd nsgmls.src; pwd; $(MAKE) clean
-
-clobber : clean _localclobber
-
-_localclobber:
- @cd instant.src; pwd; $(MAKE) clobber
- @cd nsgmls.src; pwd; $(MAKE) clobber
- @cd solbookv2; pwd; $(MAKE) clobber
- $(RM) instant nsgmls sgml2roff
- $(RM) -r $(PROGDIR)
- $(RM) -r $(ROOTSHLIB)/sgml
-
-$(PROGDIR)/%: %
- $(INS.file)
-
-$(SGMLENTSDIR)/%: %
- $(INS.file)
-
-$(SGMLDTDDIR)/%: %
- $(INS.file)
-
-$(TPTDIR)/%: %
- $(INS.file)
-
-$(ROOTSOLBOOKV2):
- cd $(SGMLUTILSOLBOOKV2DIR); pwd; $(MAKE) install; cd ..; pwd
diff --git a/usr/src/cmd/man/src/util/THIRDPARTYLICENSE b/usr/src/cmd/man/src/util/THIRDPARTYLICENSE
deleted file mode 100644
index 57a8809a5e..0000000000
--- a/usr/src/cmd/man/src/util/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,4 +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.
diff --git a/usr/src/cmd/man/src/util/THIRDPARTYLICENSE.descrip b/usr/src/cmd/man/src/util/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index e74b16cfc5..0000000000
--- a/usr/src/cmd/man/src/util/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-MAN COMMAND ISO GML FILES
diff --git a/usr/src/cmd/man/src/util/aap-shortref.gml b/usr/src/cmd/man/src/util/aap-shortref.gml
deleted file mode 100644
index 02d4c0cbaa..0000000000
--- a/usr/src/cmd/man/src/util/aap-shortref.gml
+++ /dev/null
@@ -1,78 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- Public entity for AAP short reference maps. Typical invocation:
- <!ENTITY % srmaps PUBLIC "-//USA/AAP//SHORTREF SR-1//EN" > %srmaps;
- NOTE: The entity "mdash" must be defined before invoking this one.
--->
-<!ENTITY s..line STARTTAG "line">
-<!ENTITY s..p STARTTAG "p" >
-<!ENTITY s..q STARTTAG "q" >
-<!ENTITY e..q ENDTAG "q" >
-<!ENTITY s..li STARTTAG "li" >
-<!ENTITY s..c STARTTAG "c" >
-<!ENTITY s..row STARTTAG "row" >
-<!ENTITY c..null CDATA "" >
-<!ENTITY s..dt STARTTAG "dt" >
-<!ENTITY s..dd STARTTAG "dd" >
-<!SHORTREF bkmap
- "&#RS;&#RE" s..p -- null record is paragraph start-tag --
- "&#RS;B" c..null -- leading blanks are suppressed --
- '"' s..q -- quotation is quote start-tag --
- "--" mdash -- two hyphens is an em dash --
->
-<!SHORTREF qmap
- '"' e..q -- quotation is quote end-tag --
- "--" mdash -- two hyphens is an em dash --
->
-<!SHORTREF dlmap
- "#" s..dt -- number sign is def term start-tag --
- "|" s..dd -- vertical bar is def descr start-tag --
- "&#RS;&#RE;" s..p -- null record is paragraph start-tag --
- "&#RS;B" c..null -- leading blanks are suppressed --
- '"' s..q -- quotation is quote start-tag --
- "--" mdash -- two hyphens is an em dash --
->
-<!SHORTREF listmap
- "#" s..li -- number sign is list item start-tag --
- "&#RS;&#RE;" s..p -- null record is paragraph start-tag --
- "&#RS;B" c..null -- leading blanks are suppressed --
- '"' s..q -- quotation is quote start-tag --
- "--" mdash -- two hyphens is an em dash --
->
-<!SHORTREF litmap
- "&#RS;" s..line -- record start is line start-tag --
- "--" mdash -- two hyphens is an em dash --
->
-<!SHORTREF tblmap
- "@" s..row -- commercial at is row start-tag --
- "|" s..c -- vertical bar is tbl entry start-tag --
- "&#RS;&#RE;" s..p -- null record is paragraph start-tag --
- "&#RS;B" c..null -- leading blanks are suppressed --
- '"' s..q -- quotation is quote start-tag --
- "--" mdash -- two hyphens is an em dash --
->
diff --git a/usr/src/cmd/man/src/util/allisoents.gml b/usr/src/cmd/man/src/util/allisoents.gml
deleted file mode 100644
index 7b4a8fd14b..0000000000
--- a/usr/src/cmd/man/src/util/allisoents.gml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!ENTITY % ISOpub PUBLIC
- "ISO 8879:1986//ENTITIES Publishing//EN">
-%ISOpub;
-
-<!ENTITY % ISOnum PUBLIC
- "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
-%ISOnum;
-
-<!ENTITY % ISOtech PUBLIC
- "ISO 8879:1986//ENTITIES General Technical//EN">
-%ISOtech;
-
-<!ENTITY % ISOdia PUBLIC
- "ISO 8879:1986//ENTITIES Diacritical Marks//EN">
-%ISOdia;
-
-<!ENTITY % ISOlat1 PUBLIC
- "ISO 8879:1986//ENTITIES Added Latin 1//EN">
-%ISOlat1;
-
-<!ENTITY % ISOlat2 PUBLIC
- "ISO 8879:1986//ENTITIES Added Latin 2//EN">
-%ISOlat2;
-
-<!ENTITY % ISOamso PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN">
-%ISOamso;
-
-<!ENTITY % ISOgrk1 PUBLIC
- "ISO 8879:1986//ENTITIES Greek Letters//EN">
-%ISOgrk1;
-
-<!ENTITY % ISOgrk3 PUBLIC
- "ISO 8879:1986//ENTITIES Greek Symbols//EN">
-%ISOgrk3;
diff --git a/usr/src/cmd/man/src/util/ati-dflt.dcl b/usr/src/cmd/man/src/util/ati-dflt.dcl
deleted file mode 100644
index a033610b53..0000000000
--- a/usr/src/cmd/man/src/util/ati-dflt.dcl
+++ /dev/null
@@ -1,101 +0,0 @@
-<!SGML "ISO 8879:1986"
--- --
--- CDDL HEADER START --
--- --
--- The contents of this file are subject to the terms of the --
--- Common Development and Distribution License, Version 1.0 only --
--- (the "License"). You may not use this file except in compliance --
--- with the License. --
--- --
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --
--- or http://www.opensolaris.org/os/licensing. --
--- See the License for the specific language governing permissions --
--- and limitations under the License. --
--- --
--- When distributing Covered Code, include this CDDL HEADER in each --
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE. --
--- If applicable, add the following below this CDDL HEADER, with the --
--- fields enclosed by brackets "[]" replaced with your own identifying --
--- information: Portions Copyright [yyyy] [name of copyright owner] --
--- --
--- CDDL HEADER END --
--- --
--- ArborText's default SGML declaration --
-
-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
- 128 128 "High-order characters"
-
-CAPACITY SGMLREF
- TOTALCAP 200000
- ENTCAP 35000
- ENTCHCAP 35000
- ELEMCAP 35000
- GRPCAP 150000
- EXGRPCAP 35000
- EXNMCAP 35000
- ATTCAP 50000
- ATTCHCAP 35000
- AVGRPCAP 35000
- NOTCAP 35000
- NOTCHCAP 35000
- IDCAP 35000
- IDREFCAP 35000
- MAPCAP 35000
- LKSETCAP 35000
- LKNMCAP 35000
-
-SCOPE DOCUMENT
-
-SYNTAX
- SHUNCHAR 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
-BASESET "ISO 646-1983//CHARSET
- International Reference Version (IRV)//ESC 2/5 4/0"
-DESCSET 0 128 0
- 128 128 "High-order characters"
-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 100
- ATTSPLEN 960
- BSEQLEN 960
- DTAGLEN 16
- DTEMPLEN 16
- ENTLVL 16
- GRPCNT 100
- GRPGTCNT 96
- GRPLVL 16
- LITLEN 800
- NAMELEN 32
- NORMSEP 2
- PILEN 1024
- TAGLEN 960
- TAGLVL 24
-
-
-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>
diff --git a/usr/src/cmd/man/src/util/ati-eqn1.gml b/usr/src/cmd/man/src/util/ati-eqn1.gml
deleted file mode 100644
index 0eec7c0f67..0000000000
--- a/usr/src/cmd/man/src/util/ati-eqn1.gml
+++ /dev/null
@@ -1,366 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- ArborText equation entity set. Typical invocation:
- <!ENTITY % ATIeqn1 PUBLIC "-//ArborText//ENTITIES Equation1//EN">
- %ATIeqn1;
--->
-<!ENTITY i SDATA "[i]">
-<!ENTITY dotbelow SDATA "[dotbelow]">
-<!ENTITY barbelow SDATA "[barbelow]">
-<!ENTITY huml SDATA "[huml]">
-<!ENTITY fgr SDATA "[fgr]">
-<!ENTITY Fgr SDATA "[Fgr]">
-<!ENTITY inches SDATA "[inches]">
-<!ENTITY feet SDATA "[feet]">
-<!ENTITY Aelig SDATA "[Aelig]">
-<!ENTITY Oelig SDATA "[Oelig]">
-<!ENTITY slaquo SDATA "[slaquo]">
-<!ENTITY sraquo SDATA "[sraquo]">
-
-<!ENTITY Barwed SDATA "[Barwed]">
-<!ENTITY Cap SDATA "[Cap]">
-<!ENTITY Cup SDATA "[Cup]">
-<!ENTITY Empty SDATA "[Empty]">
-<!ENTITY Gg SDATA "[Gg]">
-<!ENTITY Gt SDATA "[Gt]">
-<!ENTITY Im SDATA "[Im]">
-<!ENTITY Larr SDATA "[Larr]">
-<!ENTITY Ll SDATA "[Ll]">
-<!ENTITY Lt SDATA "[Lt]">
-<!ENTITY Rarr SDATA "[Rarr]">
-<!ENTITY Re SDATA "[Re]">
-<!ENTITY Sub SDATA "[Sub]">
-<!ENTITY Sup SDATA "[Sup]">
-<!ENTITY Vdash SDATA "[Vdash]">
-<!ENTITY Vvdash SDATA "[Vvdash]">
-<!ENTITY amalg SDATA "[amalg]">
-<!ENTITY ang SDATA "[ang]">
-<!ENTITY angl0 SDATA "[angl0]">
-<!ENTITY angmsd SDATA "[angmsd]">
-<!ENTITY angr0 SDATA "[angr0]">
-<!ENTITY ape SDATA "[ape]">
-<!ENTITY ar SDATA "[ar]">
-<!ENTITY asymp SDATA "[asymp]">
-<!ENTITY backeps SDATA "[backeps]">
-<!ENTITY barwed SDATA "[barwed]">
-<!ENTITY beth SDATA "[beth]">
-<!ENTITY bigand SDATA "[bigand]">
-<!ENTITY bigcap SDATA "[bigcap]">
-<!ENTITY bigcirc SDATA "[bigcirc]">
-<!ENTITY bigcup SDATA "[bigcup]">
-<!ENTITY bigodot SDATA "[bigodot]">
-<!ENTITY bigoplus SDATA "[bigoplus]">
-<!ENTITY bigor SDATA "[bigor]">
-<!ENTITY bigotimes SDATA "[bigotimes]">
-<!ENTITY bigsqcap SDATA "[bigsqcap]">
-<!ENTITY bigsqcup SDATA "[bigsqcup]">
-<!ENTITY bigstar SDATA "[bigstar]">
-<!ENTITY biguplus SDATA "[biguplus]">
-<!ENTITY bigxdtri SDATA "[bigxdtri]">
-<!ENTITY bigxutri SDATA "[bigxutri]">
-<!ENTITY bowtie SDATA "[bowtie]">
-<!ENTITY bprime SDATA "[bprime]">
-<!ENTITY bsim SDATA "[bsim]">
-<!ENTITY bsime SDATA "[bsime]">
-<!ENTITY bsolm0 SDATA "[bsolm0]">
-<!ENTITY bump SDATA "[bump]">
-<!ENTITY bumpe SDATA "[bumpe]">
-<!ENTITY cdots SDATA "[cdots]">
-<!ENTITY ceill0 SDATA "[ceill0]">
-<!ENTITY ceilr0 SDATA "[ceilr0]">
-<!ENTITY chkmrk SDATA "[chkmrk]">
-<!ENTITY circR SDATA "[circR]">
-<!ENTITY circS SDATA "[circS]">
-<!ENTITY circe SDATA "[circe]">
-<!ENTITY comp SDATA "[comp]">
-<!ENTITY cubl0 SDATA "[cubl0]">
-<!ENTITY cubr0 SDATA "[cubr0]">
-<!ENTITY cubl1 SDATA "[cubl1]">
-<!ENTITY cubl2 SDATA "[cubl2]">
-<!ENTITY cubl3 SDATA "[cubl3]">
-<!ENTITY cubl4 SDATA "[cubl4]">
-<!ENTITY cubr1 SDATA "[cubr1]">
-<!ENTITY cubr2 SDATA "[cubr2]">
-<!ENTITY cubr3 SDATA "[cubr3]">
-<!ENTITY cubr4 SDATA "[cubr4]">
-<!ENTITY cuepr SDATA "[cuepr]">
-<!ENTITY cuesc SDATA "[cuesc]">
-<!ENTITY cularr SDATA "[cularr]">
-<!ENTITY curarr SDATA "[curarr]">
-<!ENTITY cuvee SDATA "[cuvee]">
-<!ENTITY cuwed SDATA "[cuwed]">
-<!ENTITY d1 SDATA "[d1]">
-<!ENTITY d11 SDATA "[d11]">
-<!ENTITY d12 SDATA "[d12]">
-<!ENTITY d13 SDATA "[d13]">
-<!ENTITY d14 SDATA "[d14]">
-<!ENTITY d15 SDATA "[d15]">
-<!ENTITY d2 SDATA "[d2]">
-<!ENTITY d3 SDATA "[d3]">
-<!ENTITY d4 SDATA "[d4]">
-<!ENTITY d5 SDATA "[d5]">
-<!ENTITY d9 SDATA "[d9]">
-<!ENTITY dArr SDATA "[dArr]">
-<!ENTITY daleth SDATA "[daleth]">
-<!-- in iso-amsa; ENTITY darr2 SDATA "[darr2]"-->
-<!ENTITY dashv SDATA "[dashv]">
-<!ENTITY ddots SDATA "[ddots]">
-<!ENTITY dharl SDATA "[dharl]">
-<!ENTITY dharr SDATA "[dharr]">
-<!ENTITY diam SDATA "[diam]">
-<!ENTITY diams SDATA "[diams]">
-<!ENTITY divonx SDATA "[divonx]">
-<!ENTITY dlarr SDATA "[dlarr]">
-<!ENTITY drarr SDATA "[drarr]">
-<!ENTITY dvbm0 SDATA "[dvbm0]">
-<!ENTITY dvbr SDATA "[dvbr]">
-<!ENTITY eDot SDATA "[eDot]">
-<!ENTITY ecir SDATA "[ecir]">
-<!ENTITY efDot SDATA "[efDot]">
-<!ENTITY egs SDATA "[egs]">
-<!ENTITY els SDATA "[els]">
-<!ENTITY empty SDATA "[empty]">
-<!ENTITY eqsim SDATA "[eqsim]">
-<!ENTITY erDot SDATA "[erDot]">
-<!ENTITY eth SDATA "[eth]">
-<!ENTITY fll0 SDATA "[fll0]">
-<!ENTITY flr0 SDATA "[flr0]">
-<!ENTITY fork SDATA "[fork]">
-<!ENTITY frown SDATA "[frown]">
-<!ENTITY gE SDATA "[gE]">
-<!ENTITY gap SDATA "[gap]">
-<!ENTITY gdot SDATA "[gdot]">
-<!-- in iso-amsr; ENTITY gel SDATA "[gel]"-->
-<!-- in iso-amsr; ENTITY ges SDATA "[ges]"-->
-<!ENTITY gimel SDATA "[gimel]">
-<!ENTITY gl SDATA "[gl]">
-<!ENTITY gnE SDATA "[gnE]">
-<!ENTITY gnap SDATA "[gnap]">
-<!ENTITY gne SDATA "[gne]">
-<!ENTITY gnsim SDATA "[gnsim]">
-<!ENTITY gsim SDATA "[gsim]">
-<!ENTITY gvertnE SDATA "[gvertnE]">
-<!ENTITY hArr SDATA "[hArr]">
-<!ENTITY harr SDATA "[harr]">
-<!ENTITY harrr SDATA "[harrr]">
-<!ENTITY harrw SDATA "[harrw]">
-<!ENTITY hslash SDATA "[hslash]">
-<!ENTITY intcal SDATA "[intcal]">
-<!ENTITY j0 SDATA "[j0]">
-<!ENTITY lAarr SDATA "[lAarr]">
-<!ENTITY lArrr SDATA "[lArrr]">
-<!ENTITY lE SDATA "[lE]">
-<!ENTITY lEg SDATA "[lEg]">
-<!ENTITY lap SDATA "[lap]">
-<!-- in iso-num; ENTITY larr SDATA "[larr]"-->
-<!-- in iso-amsa; ENTITY larr2 SDATA "[larr2]"-->
-<!-- in iso-amsa; ENTITY larrhk SDATA "[larrhk]"-->
-<!-- in iso-amsa; ENTITY larrlp SDATA "[larrlp]"-->
-<!ENTITY larrr SDATA "[larrr]">
-<!ENTITY ldot SDATA "[ldot]">
-<!ENTITY ldots SDATA "[ldots]">
-<!-- in iso-amsr; ENTITY leg SDATA "[leg]"-->
-<!-- in iso-amsr; ENTITY les SDATA "[les]"-->
-<!ENTITY lg SDATA "[lg]">
-<!ENTITY lhard SDATA "[lhard]">
-<!ENTITY lharu SDATA "[lharu]">
-<!ENTITY lnE SDATA "[lnE]">
-<!ENTITY lnap SDATA "[lnap]">
-<!ENTITY lne SDATA "[lne]">
-<!ENTITY lnsim SDATA "[lnsim]">
-<!ENTITY lrarr2 SDATA "[lrarr2]">
-<!ENTITY lrhar2 SDATA "[lrhar2]">
-<!ENTITY lsh SDATA "[lsh]">
-<!ENTITY lsim SDATA "[lsim]">
-<!-- in iso-amsb; ENTITY lthree SDATA "[lthree]"-->
-<!-- in iso-amsb; ENTITY ltimes SDATA "[ltimes]"-->
-<!ENTITY lvertnE SDATA "[lvertnE]">
-<!ENTITY m22 SDATA "[m22]">
-<!ENTITY m7 SDATA "[m7]">
-<!ENTITY mho SDATA "[mho]">
-<!ENTITY mid SDATA "[mid]">
-<!-- in iso-amsb; ENTITY minusb SDATA "[minusb]"-->
-<!ENTITY models SDATA "[models]">
-<!ENTITY mumap SDATA "[mumap]">
-<!ENTITY nVDash SDATA "[nVDash]">
-<!ENTITY nVdash SDATA "[nVdash]">
-<!ENTITY napprox SDATA "[napprox]">
-<!ENTITY ncong SDATA "[ncong]">
-<!ENTITY nearr SDATA "[nearr]">
-<!ENTITY nexist SDATA "[nexist]">
-<!ENTITY ngE SDATA "[ngE]">
-<!ENTITY nge SDATA "[nge]">
-<!ENTITY nges SDATA "[nges]">
-<!ENTITY ngt SDATA "[ngt]">
-<!ENTITY nharr SDATA "[nharr]">
-<!ENTITY nlArr SDATA "[nlArr]">
-<!ENTITY nlE SDATA "[nlE]">
-<!ENTITY nlarr SDATA "[nlarr]">
-<!ENTITY nle SDATA "[nle]">
-<!ENTITY nles SDATA "[nles]">
-<!ENTITY nlt SDATA "[nlt]">
-<!ENTITY nltri SDATA "[nltri]">
-<!ENTITY nltrie SDATA "[nltrie]">
-<!ENTITY nmid SDATA "[nmid]">
-<!ENTITY npar SDATA "[npar]">
-<!ENTITY npr SDATA "[npr]">
-<!ENTITY npre SDATA "[npre]">
-<!ENTITY nrArr SDATA "[nrArr]">
-<!ENTITY nrarr SDATA "[nrarr]">
-<!ENTITY nrtri SDATA "[nrtri]">
-<!ENTITY nrtrie SDATA "[nrtrie]">
-<!ENTITY nsc SDATA "[nsc]">
-<!ENTITY nsce SDATA "[nsce]">
-<!ENTITY nsim SDATA "[nsim]">
-<!ENTITY nsmid SDATA "[nsmid]">
-<!ENTITY nspar SDATA "[nspar]">
-<!ENTITY nsubE SDATA "[nsubE]">
-<!ENTITY nsube SDATA "[nsube]">
-<!ENTITY nsup SDATA "[nsup]">
-<!ENTITY nsupE SDATA "[nsupE]">
-<!ENTITY nsupe SDATA "[nsupe]">
-<!ENTITY nvDash SDATA "[nvDash]">
-<!ENTITY nvdash SDATA "[nvdash]">
-<!ENTITY nwarr SDATA "[nwarr]">
-<!ENTITY oast SDATA "[oast]">
-<!ENTITY ocirc SDATA "[ocirc]">
-<!ENTITY odash SDATA "[odash]">
-<!ENTITY odot SDATA "[odot]">
-<!ENTITY olarr SDATA "[olarr]">
-<!ENTITY ominus SDATA "[ominus]">
-<!ENTITY oplus SDATA "[oplus]">
-<!ENTITY orarr SDATA "[orarr]">
-<!ENTITY osol SDATA "[osol]">
-<!ENTITY otimes SDATA "[otimes]">
-<!ENTITY parl0 SDATA "[parl0]">
-<!ENTITY parr0 SDATA "[parr0]">
-<!ENTITY plank SDATA "[plank]">
-<!ENTITY plusb SDATA "[plusb]">
-<!ENTITY plusdo SDATA "[plusdo]">
-<!ENTITY pr SDATA "[pr]">
-<!ENTITY prap SDATA "[prap]">
-<!ENTITY pre SDATA "[pre]">
-<!ENTITY preccurlyeq SDATA "[preccurlyeq]">
-<!ENTITY prnE SDATA "[prnE]">
-<!ENTITY prnap SDATA "[prnap]">
-<!ENTITY prnsim SDATA "[prnsim]">
-<!ENTITY rAarr SDATA "[rAarr]">
-<!ENTITY rArrr SDATA "[rArrr]">
-<!-- in iso-amsa; ENTITY rarr2 SDATA "[rarr2]"-->
-<!-- in iso-amsa; ENTITY rarrhk SDATA "[rarrhk]"-->
-<!-- in iso-amsa; ENTITY rarrlp SDATA "[rarrlp]"-->
-<!ENTITY rarrr SDATA "[rarrr]">
-<!-- in iso-amsa; ENTITY rarrtl SDATA "[rarrtl]"-->
-<!-- in iso-amsa; ENTITY rarrw SDATA "[rarrw]"-->
-<!ENTITY rhard SDATA "[rhard]">
-<!ENTITY rharu SDATA "[rharu]">
-<!ENTITY rlarr2 SDATA "[rlarr2]">
-<!ENTITY rlhar2 SDATA "[rlhar2]">
-<!ENTITY rsh SDATA "[rsh]">
-<!ENTITY rthree SDATA "[rthree]">
-<!ENTITY rtimes SDATA "[rtimes]">
-<!ENTITY rtrie SDATA "[rtrie]">
-<!ENTITY samalg SDATA "[samalg]">
-<!ENTITY sc SDATA "[sc]">
-<!ENTITY sccue SDATA "[sccue]">
-<!ENTITY sce SDATA "[sce]">
-<!ENTITY scnE SDATA "[scnE]">
-<!ENTITY scnap SDATA "[scnap]">
-<!ENTITY sdotb SDATA "[sdotb]">
-<!ENTITY setmn SDATA "[setmn]">
-<!ENTITY sfrown SDATA "[sfrown]">
-<!ENTITY smallint SDATA "[smallint]">
-<!ENTITY smallsetminus SDATA "[smallsetminus]">
-<!ENTITY smid SDATA "[smid]">
-<!ENTITY smile SDATA "[smile]">
-<!ENTITY solm0 SDATA "[solm0]">
-<!ENTITY spar SDATA "[spar]">
-<!ENTITY sqbl0 SDATA "[sqbl0]">
-<!ENTITY sqbr0 SDATA "[sqbr0]">
-<!ENTITY sqbl1 SDATA "[sqbl1]">
-<!ENTITY sqbl2 SDATA "[sqbl2]">
-<!ENTITY sqbl3 SDATA "[sqbl3]">
-<!ENTITY sqbl4 SDATA "[sqbl4]">
-<!ENTITY sqbr1 SDATA "[sqbr1]">
-<!ENTITY sqbr2 SDATA "[sqbr2]">
-<!ENTITY sqbr3 SDATA "[sqbr3]">
-<!ENTITY sqbr4 SDATA "[sqbr4]">
-<!ENTITY sqcap SDATA "[sqcap]">
-<!ENTITY sqcup SDATA "[sqcup]">
-<!ENTITY sqsub SDATA "[sqsub]">
-<!ENTITY sqsube SDATA "[sqsube]">
-<!ENTITY sqsup SDATA "[sqsup]">
-<!ENTITY sqsupe SDATA "[sqsupe]">
-<!ENTITY ssmile SDATA "[ssmile]">
-<!ENTITY sstarf SDATA "[sstarf]">
-<!ENTITY subE SDATA "[subE]">
-<!ENTITY subnE SDATA "[subnE]">
-<!ENTITY subne SDATA "[subne]">
-<!ENTITY supE SDATA "[supE]">
-<!ENTITY supnE SDATA "[supnE]">
-<!ENTITY supne SDATA "[supne]">
-<!ENTITY surd SDATA "[surd]">
-<!ENTITY thickapprox SDATA "[thickapprox]">
-<!ENTITY thicksim SDATA "[thicksim]">
-<!-- in iso-amsb; ENTITY timesb SDATA "[timesb]"-->
-<!ENTITY top SDATA "[top]">
-<!ENTITY trie SDATA "[trie]">
-<!ENTITY twixt SDATA "[twixt]">
-<!ENTITY uArr SDATA "[uArr]">
-<!-- in iso-amsa; ENTITY uarr2 SDATA "[uarr2]"-->
-<!ENTITY uharl SDATA "[uharl]">
-<!ENTITY uharr SDATA "[uharr]">
-<!ENTITY uplus SDATA "[uplus]">
-<!ENTITY vArr SDATA "[vArr]">
-<!ENTITY vDash SDATA "[vDash]">
-<!ENTITY vDelta SDATA "[vDelta]">
-<!ENTITY vGamma SDATA "[vGamma]">
-<!ENTITY vLambda SDATA "[vLambda]">
-<!ENTITY vOmega SDATA "[vOmega]">
-<!ENTITY vPhi SDATA "[vPhi]">
-<!ENTITY vPi SDATA "[vPi]">
-<!ENTITY vPsi SDATA "[vPsi]">
-<!ENTITY vSigma SDATA "[vSigma]">
-<!ENTITY vTheta SDATA "[vTheta]">
-<!ENTITY vUpsilon SDATA "[vUpsilon]">
-<!ENTITY vXi SDATA "[vXi]">
-<!ENTITY varr SDATA "[varr]">
-<!ENTITY vbm0 SDATA "[vbm0]">
-<!ENTITY vdash SDATA "[vdash]">
-<!ENTITY veebar SDATA "[veebar]">
-<!ENTITY vltri SDATA "[vltri]">
-<!ENTITY vprop SDATA "[vprop]">
-<!ENTITY vrtri SDATA "[vrtri]">
-<!ENTITY vsubnE SDATA "[vsubnE]">
-<!ENTITY vsubne SDATA "[vsubne]">
-<!ENTITY vsupnE SDATA "[vsupnE]">
-<!ENTITY vsupne SDATA "[vsupne]">
-<!ENTITY vtri SDATA "[vtri]">
-<!ENTITY weierp SDATA "[weierp]">
-<!ENTITY xdtri SDATA "[xdtri]">
-<!ENTITY xhArr SDATA "[xhArr]">
diff --git a/usr/src/cmd/man/src/util/ati-graph.gml b/usr/src/cmd/man/src/util/ati-graph.gml
deleted file mode 100644
index 4c71ab9072..0000000000
--- a/usr/src/cmd/man/src/util/ati-graph.gml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- ArborText graphic entity set. Typical invocation:
- <!ENTITY % ATIgrph PUBLIC
- "-//ArborText//ENTITIES Graphic Notation//EN">
- %ATIgrph;
--->
-
-<!ENTITY #DEFAULT SYSTEM NDATA ATIGRAPH>
-<!NOTATION ATIGRAPH SYSTEM>
diff --git a/usr/src/cmd/man/src/util/ati-math.elm b/usr/src/cmd/man/src/util/ati-math.elm
deleted file mode 100644
index 58258cafd3..0000000000
--- a/usr/src/cmd/man/src/util/ati-math.elm
+++ /dev/null
@@ -1,193 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- Public document type declaration subset. Typical invocation:
-<!ENTITY % atimath PUBLIC "-//ArborText//ELEMENTS Math Equation Structures//EN">
-%atimath;
--->
-
-<!-- Declarations for ArborText Equations (based on AAP math)
-$Header: ati-math.elm,v 18.2 93/06/22 18:14:58 txf Exp $
-
-NOTE: Dtgen excludes ati-math tags from the <docname>.menu and
-<docname>.tags files it builds since the user cannot manipulate
-these tags directly. The tag exclusion algorithm requires that
-the first and last math elements (in the order they are defined
-in this file) be named <fd> and <rm> respectively.
-
-If these assumptions are invalidated, then some math elements may
-be included into the menus, or some of the DTD's elements might be
-excluded from the menus.
--->
-
-<!ENTITY % p.em.ph "b|it|rm">
-<!ENTITY % p.fnt.ph "blkbd|ig|sc|ge|ty|mit">
-<!ENTITY % sp.pos "vmk|vmkr|vsp|hsp|tu">
-<!ENTITY % f-cs "a|%p.em.ph|%p.fnt.ph|g|bg|%sp.pos">
-<!ENTITY % f-cstxt "#PCDATA|%f-cs">
-<!ENTITY % f-scs "rf|inc|v|dy|fi">
-<!ENTITY % limits "pr|in|sum">
-<!ENTITY % f-bu "fr|rad|lim|ar|stk|cases|eqaln|fen">
-<!ENTITY % f-ph "unl|ovl|unb|ovb|sup|inf">
-<!ENTITY % f-butxt "%f-bu|%limits|%f-cstxt|%f-scs|%f-ph|phr">
-<!ENTITY % f-phtxt "#PCDATA|%p.em.ph">
-<!ENTITY % f-post "par|sqb|llsqb|rrsqb|cub|ceil|fl|ang
- |sol|vb|uc|dc">
-<!ENTITY % f-style "s|d|t|da|dot|b|bl|n">
-
-<!ELEMENT fd - - (fl)*>
-<!ELEMENT fl O O (%f-butxt)*>
-
- <![IGNORE [
- <!ELEMENT fd - - (la?,fl)+>
- <!ELEMENT la - - (%f-cstxt;|%f-ph;)*>
- <!ATTLIST la loc CDATA #IMPLIED>
- ]]>
-
-<!ELEMENT f - - (%f-butxt)*>
-
-<!ELEMENT fr - - (nu,de)>
-<!ATTLIST fr shape CDATA #IMPLIED
- align CDATA #IMPLIED
- style CDATA #IMPLIED>
-<!ELEMENT (nu|de) O O (%f-butxt)*>
- <![IGNORE [
- <!ELEMENT lim - - (op,ll,ul,opd?)>
- ]]>
-<!ELEMENT lim - - (op,ll?,ul?,opd?)>
-<!ATTLIST lim align (r|c) #IMPLIED>
- <![IGNORE [
- <!ELEMENT op - - (%f-cstxt|rf|%f-ph) -(tu)>
- ]]>
-<!ELEMENT op - - (%f-cstxt|rf|%f-ph)* -(tu)>
-<!ELEMENT (ll|ul) O O (%f-butxt)*>
-<!ELEMENT opd - O (%f-butxt)*>
- <![IGNORE [
- <!ELEMENT (%limits) - - (ll,ul,opd?)>
- ]]>
-<!ELEMENT (%limits) - - (ll?,ul?,opd?)>
-<!ATTLIST (%limits) align CDATA #IMPLIED>
-<!ELEMENT rad - - (rcd,rdx?)>
-<!ELEMENT rcd O O (%f-butxt)*>
-<!ELEMENT rdx - O (%f-butxt)* -(tu)>
- <![IGNORE [
- <!ELEMENT fen - - ((%f-butxt)*,(cp,(%f-butxt)*)*,rp)>
- ]]>
-<!ELEMENT fen - - (%f-butxt|cp|rp)*>
-<!ATTLIST fen lp (%f-post;) vb
- style (%f-style;) s>
-<!ELEMENT (cp|rp) - O EMPTY>
-<!ATTLIST (cp|rp) post (%f-post;) vb
- style (%f-style;) s>
-<!ELEMENT ar - - (arr+)>
-<!ATTLIST ar cs CDATA #IMPLIED
- rs CDATA #IMPLIED
- ca CDATA #IMPLIED>
-<!ELEMENT arr - O (arc+)>
-<!ELEMENT arc O O (%f-butxt)*>
-<!ATTLIST arc align CDATA #IMPLIED>
-<!ELEMENT cases - - (arr+)>
-<!ELEMENT eqaln - - (eqline+)>
-<!ELEMENT eqline - - (%f-butxt)*>
-<!ELEMENT stk - - (lyr+)>
-<!ELEMENT lyr O O (%f-butxt)* -(tu)>
-<!ATTLIST lyr align CDATA #IMPLIED>
-<!ELEMENT ach - - (%f-butxt)*>
-<!ATTLIST ach atom CDATA #IMPLIED>
-<!ELEMENT (sup|inf) - - (%f-butxt)* -(tu)>
-<!ATTLIST (sup|inf) loc CDATA #IMPLIED>
-<!ELEMENT (unl|ovl) - - (%f-butxt)*>
-<!ATTLIST (unl|ovl) style CDATA #IMPLIED>
-<!ELEMENT (unb|ovb) - - (%f-butxt)*>
-<!ELEMENT a - - (ac,ac) -(tu)>
-<!ATTLIST a valign CDATA #IMPLIED>
- <![IGNORE [
- <!ELEMENT ac O O (%f-cstxt|%f-scs)* -(sup|inf)>
- ]]>
-<!ELEMENT ac O O (%f-cstxt|%f-scs|sup|inf)*>
-<!ELEMENT (%f-scs) - O (%f-cstxt|sup|inf)* -(tu|%limits|%f-bu|%f-ph)>
-<!ELEMENT phr - O (%f-phtxt)*>
-<!ELEMENT vmk - O EMPTY>
-<!ATTLIST vmk id CDATA #IMPLIED>
-<!ELEMENT vmkr - O EMPTY>
-<!ATTLIST vmkr rid CDATA #IMPLIED>
-<!ELEMENT (hsp|vsp) - O EMPTY>
-<!ATTLIST (hsp|vsp) sp CDATA #IMPLIED>
-<!ELEMENT tu - O EMPTY>
-<!ELEMENT (g|bg) - - (#PCDATA)>
-<!ELEMENT (%p.fnt.ph;) - - (%f-cstxt)*>
-<!ELEMENT (%p.em.ph;) - - (%f-cstxt)*>
-
-<!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 % 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 % ISOcyr1 PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
-%ISOcyr1;
-
-<!ENTITY % ISOdia PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN">
-%ISOdia;
-
-<!ENTITY % ISOlat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN">
-%ISOlat1;
-
-<!ENTITY % ISOlat2 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN">
-%ISOlat2;
-
-<!ENTITY % ISOnum PUBLIC
- "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
-%ISOnum;
-
-<!ENTITY % ISOpub PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN">
-%ISOpub;
-
-<!ENTITY % ISOtech PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN">
-%ISOtech;
-
-<!ENTITY % ATIeqn1 PUBLIC "-//ArborText//ENTITIES Equation1//EN">
-%ATIeqn1;
-
-
-
-
-
diff --git a/usr/src/cmd/man/src/util/ati-num.gml b/usr/src/cmd/man/src/util/ati-num.gml
deleted file mode 100644
index 04039afe2f..0000000000
--- a/usr/src/cmd/man/src/util/ati-num.gml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- ArborText character entity set. Typical invocation:
- <!ENTITY % ATInum PUBLIC
- "-//ArborText//ENTITIES Numeric and Special Graphic//EN">
- %ATInum;
--->
-
-<!ENTITY peso SDATA "[peso ]"--=peso sign-->
-
-<!ENTITY monthname SDATA "[monthname ]" -- current month, e.g., January -->
-<!ENTITY monthnum SDATA "[monthnum ]" -- current month as number, e.g., 1 -->
-<!ENTITY day SDATA "[day ]" -- current day of the month -->
-<!ENTITY year SDATA "[year ]" -- current year -->
-
-<!ENTITY brkpt SDATA "[brkpt ]" -- allowable point to break line -->
-
diff --git a/usr/src/cmd/man/src/util/ati-tbl.elm b/usr/src/cmd/man/src/util/ati-tbl.elm
deleted file mode 100644
index 233b3f6b09..0000000000
--- a/usr/src/cmd/man/src/util/ati-tbl.elm
+++ /dev/null
@@ -1,98 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- ArborText style table -->
-
-<!-- It is assumed that %tblcon is defined when this file is included,
- to specify content for tablecell, e.g.,
- <!ENTITY % tblcon "#PCDATA|emphasis|%eqn|graphic" >
--->
-
-<!-- [JFS] The table, tablerow and tablecell elements have a new
- attribute defined called "label". This attribute is
- intended to be used by command language processing.
- <tablecell> also has another attribute called "action". It
- is anticipated that this attribute will also contribute to
- command language processing of tables.
--->
-
-<!ELEMENT table - - (rowrule,(tablerow,rowrule)+)>
-<!ATTLIST table acl CDATA #IMPLIED
- chj CDATA #IMPLIED
- csl CDATA #IMPLIED
- cst CDATA #IMPLIED
- ctl CDATA #IMPLIED
- cwl CDATA #REQUIRED
- hff CDATA #IMPLIED
- hfs CDATA #IMPLIED
- htm CDATA #IMPLIED
- hts CDATA #IMPLIED
- jst CDATA #IMPLIED
- ncols CDATA #IMPLIED
- off CDATA #IMPLIED
- rth CDATA #IMPLIED
- rst CDATA #IMPLIED
- rvj CDATA #IMPLIED
- tff CDATA #IMPLIED
- tfs CDATA #IMPLIED
- tts CDATA #IMPLIED
- unt CDATA #IMPLIED
- wdm CDATA #REQUIRED
- ctmarg CDATA #IMPLIED
- cbmarg CDATA #IMPLIED
- clmarg CDATA #IMPLIED
- crmarg CDATA #IMPLIED
- dispwid CDATA #IMPLIED
- label CDATA #IMPLIED
- >
-
-<!ELEMENT tablerow - O (cellrule,(tablecell,cellrule)+)>
-<!ATTLIST tablerow hdr CDATA #IMPLIED
- rht CDATA #IMPLIED
- rvj CDATA #IMPLIED
- label CDATA #IMPLIED
- >
-
-<!ELEMENT tablecell - - (%tblcon)*>
-
-<!ATTLIST tablecell cff CDATA #IMPLIED
- cfs CDATA #IMPLIED
- chj CDATA #IMPLIED
- cts CDATA #IMPLIED
- cvj CDATA #IMPLIED
- shd CDATA #IMPLIED
- spn CDATA #IMPLIED
- vspn CDATA #IMPLIED
- label CDATA #IMPLIED
- action CDATA #IMPLIED>
-
-<!ELEMENT rowrule - O EMPTY>
-<!ATTLIST rowrule rty CDATA #IMPLIED
- rtl CDATA #IMPLIED>
-
-<!ELEMENT cellrule - O EMPTY>
-<!ATTLIST cellrule rty CDATA #IMPLIED>
diff --git a/usr/src/cmd/man/src/util/atilogo.eps b/usr/src/cmd/man/src/util/atilogo.eps
deleted file mode 100644
index 1f6516724c..0000000000
--- a/usr/src/cmd/man/src/util/atilogo.eps
+++ /dev/null
Binary files differ
diff --git a/usr/src/cmd/man/src/util/basic.dcl b/usr/src/cmd/man/src/util/basic.dcl
deleted file mode 100644
index 748a613426..0000000000
--- a/usr/src/cmd/man/src/util/basic.dcl
+++ /dev/null
@@ -1,97 +0,0 @@
-<!SGML "ISO 8879:1986"
--- --
--- CDDL HEADER START --
--- --
--- The contents of this file are subject to the terms of the --
--- Common Development and Distribution License, Version 1.0 only --
--- (the "License"). You may not use this file except in compliance --
--- with the License. --
--- --
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --
--- or http://www.opensolaris.org/os/licensing. --
--- See the License for the specific language governing permissions --
--- and limitations under the License. --
--- --
--- When distributing Covered Code, include this CDDL HEADER in each --
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE. --
--- If applicable, add the following below this CDDL HEADER, with the --
--- fields enclosed by brackets "[]" replaced with your own identifying --
--- information: Portions Copyright [yyyy] [name of copyright owner] --
--- --
--- CDDL HEADER END --
--- --
--- Basic SGML declaration using Reference Concrete Syntax --
-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
-
-CAPACITY SGMLREF
- TOTALCAP 35000
- ENTCAP 35000
- ENTCHCAP 35000
- ELEMCAP 35000
- GRPCAP 35000
- EXGRPCAP 35000
- EXNMCAP 35000
- ATTCAP 35000
- ATTCHCAP 35000
- AVGRPCAP 35000
- NOTCAP 35000
- NOTCHCAP 35000
- IDCAP 35000
- IDREFCAP 35000
- MAPCAP 35000
- LKSETCAP 35000
- LKNMCAP 35000
-
-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 255
-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 40
- ATTSPLEN 960
- BSEQLEN 960
- DTAGLEN 16
- DTEMPLEN 16
- ENTLVL 16
- GRPCNT 32
- GRPGTCNT 96
- GRPLVL 16
- LITLEN 240
- NAMELEN 8
- NORMSEP 2
- PILEN 240
- TAGLEN 960
- TAGLVL 24
-
-FEATURES
-MINIMIZE DATATAG NO OMITTAG YES RANK NO SHORTTAG YES
-LINK SIMPLE NO IMPLICIT NO EXPLICIT NO
-OTHER CONCUR NO SUBDOC NO FORMAL NO
-APPINFO NONE>
diff --git a/usr/src/cmd/man/src/util/cals-tbl.elm b/usr/src/cmd/man/src/util/cals-tbl.elm
deleted file mode 100644
index b74cc566eb..0000000000
--- a/usr/src/cmd/man/src/util/cals-tbl.elm
+++ /dev/null
@@ -1,204 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-
-<!-- This entity is fragment of:
-
- <!DOCTYPE doc PUBLIC "-//USA-DOD//DTD MIL-M-38784B 910201//EN">
-
- ...and contains the elements that define CALS tables.
-
- NOTE: The table elements and ATTLISTs reference a number
- of other elements and parametric entities that are not
- defined in this fragment. They are listed below.
-
-
-Parametric entities that must be defined by the referencing entity:
-
- ENTITY NAME WHERE USED
- %titles In content model of:
- <table>
- <chart>
-
- %yesorno In ATTLIST of:
- <table>
- <chart>
- <tgroup>
- <colspec>
- <spanspec>
- <row>
- <entry>
- <entrytbl>
-
- %bodyatt In ATTLIST of:
- <table>
- <chart>
-
- %secur In ATTLIST of:
- <table>
- <chart>
- <tgroup>
- <thead>
- <tfoot>
- <tbody>
- <row>
- <entry>
- <entrytbl>
-
- %paracon In content model of:
- <entry>
-
-
-
-Elements that are referenced either in a content model,
-inclusions, or exclusions.
-
- <chart>/<table> content model:
- %titles;
-
- <chart>/<table> exclusion list:
- <figure>
-
- <entry> content model:
- <para>
- <warning>
- <caution>
- <note>
- <legend>
- %paracon;
-
--->
-
-
-<!-- The table elements: -->
-
-<!ELEMENT (table | chart) - - (%titles;, tgroup+) -(table | chart | figure)>
-
-<!ATTLIST (table | chart) tabstyle NMTOKEN #IMPLIED
- tocentry %yesorno; "1"
- shortentry %yesorno; #IMPLIED
- frame (top|bottom|topbot|all|sides|none) #IMPLIED
- colsep %yesorno; #IMPLIED
- rowsep %yesorno; #IMPLIED
- orient (port | land) #IMPLIED
- pgwide %yesorno; #IMPLIED
- %bodyatt;
- %secur; >
-
-<!ELEMENT tgroup - o (colspec*, spanspec*, thead?, tfoot?, tbody) >
-
-<!ATTLIST tgroup cols NUMBER #REQUIRED
- tgroupstyle NMTOKEN #IMPLIED
- colsep %yesorno; #IMPLIED
- rowsep %yesorno; #IMPLIED
- align (left | right | center | justify | char ) "left"
- charoff NUTOKEN "50"
- char CDATA ""
- %secur; >
-
-<!ELEMENT colspec - o EMPTY>
-
-<!ATTLIST colspec colnum NUMBER #IMPLIED
- colname NMTOKEN #IMPLIED
- align (left|right|center|justify|char) #IMPLIED
- charoff NUTOKEN #IMPLIED
- char CDATA #IMPLIED
- colwidth CDATA #IMPLIED
- colsep %yesorno; #IMPLIED
- rowsep %yesorno; #IMPLIED>
-
-<!ELEMENT spanspec - o EMPTY >
-
-<!ATTLIST spanspec namest NMTOKEN #REQUIRED
- nameend NMTOKEN #REQUIRED
- spanname NMTOKEN #REQUIRED
- align (left|right|center|justify|char) "center"
- charoff NUTOKEN #IMPLIED
- char CDATA #IMPLIED
- colsep %yesorno; #IMPLIED
- rowsep %yesorno; #IMPLIED>
-
-<!ELEMENT (thead | tfoot) - o (colspec*, row+) -(entrytbl) >
-
-<!ATTLIST thead valign (top | middle | bottom) "bottom"
- %secur; >
-
-<!ATTLIST tfoot valign (top | middle | bottom) "top"
- %secur; >
-
-<!ELEMENT tbody - o (row+) >
-
-<!ATTLIST tbody valign (top | middle | bottom) "top"
- %secur; >
-
-<!ELEMENT row - o (entry | entrytbl)+ >
-
-<!ATTLIST row rowsep %yesorno; #IMPLIED
- %secur; >
-
-<!--CHANGE 910201 - FOLLOWING ELEMENT CHANGED -->
-
-<!ELEMENT entry - o (para | warning | caution | note | legend | %paracon;)+>
-
-<!--CHANGE 910201 - FOLLOWING ATTLIST CHANGED -->
-
-<!ATTLIST entry colname NMTOKEN #IMPLIED
- namest NMTOKEN #IMPLIED
- nameend NMTOKEN #IMPLIED
- spanname NMTOKEN #IMPLIED
- morerows NUMBER "0"
- colsep %yesorno; #IMPLIED
- rowsep %yesorno; #IMPLIED
- rotate %yesorno; "0"
- valign (top | bottom | middle) "top"
- align (left | right | center | justify | char ) #IMPLIED
- charoff NUTOKEN #IMPLIED
- char CDATA #IMPLIED
- %secur; >
-
-<!-- ELEMENT ATTR MIN VALUE CONTENT DEFAULT EXCEPT -->
-
-<!ELEMENT entrytbl - - (colspec*, spanspec*, thead?, tbody)+ -(entrytbl)>
-
-<!ATTLIST entrytbl cols NUMBER #REQUIRED
- tgroupstyle NMTOKEN #IMPLIED
- colname NMTOKEN #IMPLIED
- spanname NMTOKEN #IMPLIED
- colsep %yesorno; #IMPLIED
- rowsep %yesorno; #IMPLIED
- align (left | right | center | justify | char ) #IMPLIED
- charoff NUTOKEN #IMPLIED
- char CDATA #IMPLIED
- %secur; >
-
-
-
-
-
-
-
-
diff --git a/usr/src/cmd/man/src/util/capref.gml b/usr/src/cmd/man/src/util/capref.gml
deleted file mode 100644
index 1748aa2df3..0000000000
--- a/usr/src/cmd/man/src/util/capref.gml
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-TOTALCAP 35000
-ENTCAP 35000
-ENTCHCAP 35000
-ELEMCAP 35000
-GRPCAP 35000
-EXGRPCAP 35000
-EXNMCAP 35000
-ATTCAP 35000
-ATTCHCAP 35000
-AVGRPCAP 35000
-NOTCAP 35000
-NOTCHCAP 35000
-IDCAP 35000
-IDREFCAP 35000
-MAPCAP 35000
-LKSETCAP 35000
-LKNMCAP 35000
diff --git a/usr/src/cmd/man/src/util/catalog b/usr/src/cmd/man/src/util/catalog
deleted file mode 100644
index 57f1eea5ae..0000000000
--- a/usr/src/cmd/man/src/util/catalog
+++ /dev/null
@@ -1,33 +0,0 @@
--- ident "%Z%%M% %I% %E% SMI" --
--- --
--- CDDL HEADER START --
--- --
--- The contents of this file are subject to the terms of the --
--- Common Development and Distribution License, Version 1.0 only --
--- (the "License"). You may not use this file except in compliance --
--- with the License. --
--- --
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --
--- or http://www.opensolaris.org/os/licensing. --
--- See the License for the specific language governing permissions --
--- and limitations under the License. --
--- --
--- When distributing Covered Code, include this CDDL HEADER in each --
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE. --
--- If applicable, add the following below this CDDL HEADER, with the --
--- fields enclosed by brackets "[]" replaced with your own identifying --
--- information: Portions Copyright [yyyy] [name of copyright owner] --
--- --
--- CDDL HEADER END --
--- --
--- Sun DocBook variant --
-PUBLIC "-//Sun Microsystems//DTD DocBook V2.4-Based SolBook Subset V1.0//EN" "solbookv1/solbook.dtd"
-PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" "solbookv2/solbook.dtd"
-PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.1//EN" "solbookv2/solbook.dtd"
-PUBLIC "-//Sun Microsystems//DTD SolBook 3.0//EN" "solbookv2/solbook.dtd"
-PUBLIC "-//Sun Microsystems//DTD SolBook 3.1//EN" "solbookv2/solbook.dtd"
-
-SGMLDECL "solbookv2/solbook.dcl"
-
-PUBLIC "-//Sun Microsystems//ENTITIES SolBook ISO 8879:1986 Subset//EN" "../entities/sun_iso.gml"
-
diff --git a/usr/src/cmd/man/src/util/caution.eps b/usr/src/cmd/man/src/util/caution.eps
deleted file mode 100644
index cd2dcf8fa2..0000000000
--- a/usr/src/cmd/man/src/util/caution.eps
+++ /dev/null
Binary files differ
diff --git a/usr/src/cmd/man/src/util/core.gml b/usr/src/cmd/man/src/util/core.gml
deleted file mode 100644
index 2646d3f485..0000000000
--- a/usr/src/cmd/man/src/util/core.gml
+++ /dev/null
@@ -1,141 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- CORE DTD SUBSET
- This subset declaration defines a core set of elements. The subset
- includes some common basic elemnents such as paragraphs, lists,
- figures, footnotes, etc. It does not contain any definitions for
- heirarchical elements such as front, body, rear, chapters,
- sections, etc. The elements below are intended to be included in a
- master dtd by reference, e.g., to defined the content of a section,
- the master dtd would only need to declare the section and any
- heirarchical elements included therein, but not need to decalare
- anything at the "leaf" level:
-
- <!ELEMENT section - O (title,(%parlevel;|subsect))
-
- In other words the dtd author concentrates on the document
- structure and simply references the leaf level components.
--->
-
-<!ENTITY % par "par">
-<!ENTITY % fig "figure">
-<!ENTITY % footnote "footnote">
-<!ENTITY % graphic "graphic">
-<!ENTITY % list "list">
-<!ENTITY % xref "xref">
-
-<!ENTITY % notes "%footnote;|endnote|citation">
-<!ENTITY % text "CDATA" -- text, no entities (e.g., no diacritics) -->
-<!ENTITY % etext "#PCDATA" -- text with entities (e.g., diacritics) -->
-<!ENTITY % eqn "display-equation">
-<!ENTITY % table "table">
-<!ENTITY % emphasis "bold|ital|boldit|under">
-<!ENTITY % figures "%graphic;|reserve-space|%table|figurepar">
-<!ENTITY % parlevel "%par;|%fig;|%list;|list|computer|poetry|%eqn|extract">
-<!ENTITY % subp.a1 "%etext|%xref;|super|sub|%emphasis|indexterm|inline-equation">
-<!ENTITY % subp.a2 "%subp.a1|%notes">
-<!-- note, since subp.b is a subset of parlevel, don't include subp.b
- in any model that contains parlevel (in the same "or" group)-->
-<!ENTITY % subp.b "computer|%eqn|%list|extract|poetry">
-
-<!ENTITY % tblcon "%subp.a2|%subp.b|graphic" >
-
-<!ENTITY % jfstable PUBLIC "-//ArborText//ELEMENTS jfs Table Structures//EN">
-%jfstable;
-
-<!ELEMENT %par; - - (%subp.a2|%subp.b)*>
-
-<!ELEMENT %list; - - (item)*>
-<!ELEMENT list - O (li,li,li*) >
-
-<!ELEMENT (item|li) O O (%subp.a2|%subp.b)*>
-<!ATTLIST item state (0|1) "0"
- id ID #IMPLIED>
-
-<!ELEMENT %fig; - - (caption?,(%figures|%subp.b)*)>
-
-<!ELEMENT extract - O (%parlevel)*>
-
-<!ELEMENT poetry - O (%subp.a2)*>
-
-<!ELEMENT caption - O (%subp.a2)*>
-<!ATTLIST caption id ID #IMPLIED>
-
-<!ELEMENT %graphic; - O EMPTY>
-<!ATTLIST %graphic; filename CDATA #IMPLIED
- type CDATA #IMPLIED
- mag NUMBER #IMPLIED
- vertadjpct CDATA -25>
-
-<!ELEMENT reserve-space - O EMPTY>
-
-
-<!-- eqn [mostly aap]-->
-<!-- NOTE:
- We include and use our
- math equation document declaration subset.
--->
-
-<!ENTITY % atimath PUBLIC "-//ArborText//ELEMENTS Math Equation Structures//EN">
-%atimath;
-
-<!ELEMENT display-equation - - (equation-caption?,fd?) >
-<!ATTLIST display-equation id ID #IMPLIED>
-
-<!ELEMENT equation-caption - - (%subp.a2)*>
-
-<!ELEMENT inline-equation - - (f)? >
-
-
-<!ELEMENT figurepar - - (%subp.a1|%subp.b)*>
-
-<!ELEMENT computer - - (%etext)*>
-
-<!ELEMENT super - - (%subp.a1)* -(super)>
-
-<!ELEMENT sub - - (%subp.a1)* -(sub)>
-
-<!ELEMENT (%emphasis;) - - (%subp.a1)* -(%emphasis;)>
-
-<!ELEMENT indexterm - - (%etext|indextopic)* >
-
-<!ELEMENT indextopic - - (%etext)*>
-
-<!ELEMENT %footnote; - - (notepar)+>
-
-<!ELEMENT endnote - - (notepar)+>
-
-<!ELEMENT endnotes - O EMPTY>
-
-<!ELEMENT notepar O O (%subp.a1|%subp.b)*>
-
-<!ELEMENT %xref; - O EMPTY>
-<!ATTLIST %xref; refid IDREF #REQUIRED>
-
-<!ELEMENT citation - - %text>
-<!ATTLIST citation citid ID #IMPLIED>
diff --git a/usr/src/cmd/man/src/util/docbook-to-man.ts b/usr/src/cmd/man/src/util/docbook-to-man.ts
deleted file mode 100644
index e35d40c308..0000000000
--- a/usr/src/cmd/man/src/util/docbook-to-man.ts
+++ /dev/null
@@ -1,2278 +0,0 @@
-#############################################################################
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-# solbook-to-man.ts
-#
-#############################################################################
-#
-# 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.
-#
-#############################################################################
-#
-# Written 5/29/96 by Fred Dalrymple
-#
-#############################################################################
-#
-# Variables
-#
-Var: callout 0
-Var: orderlist 0
-Var: nestorderlist 0
-Var: procstep 0
-Var: procsubstep 0
-Var: examplenum 1
-Var: tablenum 1
-Var: firstpara false
-Var: nestedpara false
-Var: termcount 0
-#
-#
-#
-#
-#############################################################################
-#
-# Hierarchy (and document meta stuff)
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: REFENTRY
-StartText: .TH ${_followrel descendant REFENTRYTITLE 1000}
- ${_followrel descendant MANVOLNUM 1000}
-EndText: ...\\" created by instant / solbook-to-man, ${date}
--
-#
-GI: REFMISCINFO
-# The Last Change date
-AttValue: CLASS DATE
-Set: the_date ${+content}
-Ignore: data
--
-#
-GI: REFMISCINFO
-# The OS release string
-AttValue: CLASS SOFTWARE
-Set: the_release ${+content}
-Ignore: data
--
-#
-GI: REFMISCINFO
-# The section title
-AttValue: CLASS SECTDESC
-Set: the_sect ${+content}
-Ignore: data
--
-GI: REFMISCINFO
-# Do nothing
-Ignore: data
--
-#
-GI: REFMETA
-# Use the end of refmeta to output the arguments for the .TH macro
-EndText: \s"${the_date}"\s"${the_release}"\s"${the_sect}"
--
-#
-#
-GI: DOCINFO
-Ignore: all
--
-#
-GI: TITLE
-Context: DOCINFO
-# inside DocInfo, which we're ignoring
--
-GI: REFNAMEDIV
-StartText: .SH "NAME"
--
-#
-GI: REFDESCRIPTOR
-EndText: ,\s${_set refnameseen xy}
--
-#
-GI: REFNAME
-Relation: sibling-1 REFDESCRIPTOR
-EndText: ,\s
--
-#
-GI: REFNAME
-StartText: ${_isset refnameseen xxx 20}
-EndText: ${_set refnameseen xxx}
--
-#
-GI: _rfname
-SpecID: 20
-Ignore: data
-StartText: ,\s
-EndText: ${_set refnameseen xy}
--
-#
-GI: REFPURPOSE
-StartText: \s\\-\s
-EndText: 
--
-#
-GI: REFCLASS
-StartText: .PP
-EndText: 
--
-#
-GI: REFSYNOPSISDIV
-StartText: .SH "SYNOPSIS"
-EndText: 
--
-#
-GI: TITLE
-Context: REFSYNOPSISDIV
-Ignore: all
--
-#
-GI: REFSECT1
-StartText: .SH "${_followrel child TITLE 1000}"
-EndText: 
--
-#
-GI: REFSECT2
-StartText: .SS "${_followrel child TITLE 1000}"
-EndText: 
--
-#
-GI: REFSECT3
-StartText: .SS "${_followrel child TITLE 1000}"
-EndText: 
--
-#
-GI: BRIDGEHEAD
-StartText: .PP\\fB
-EndText: \\fR.PP
--
-#
-GI: TITLE
-Context: REFSECT1
-Ignore: all
--
-#
-GI: TITLE
-Context: REFSECT2
-Ignore: all
--
-#
-GI: TITLE
-Context: REFSECT3
-Ignore: all
--
-#
-GI: LEGALNOTICE
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: TITLE
-Context: LEGALNOTICE
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: REFENTRYTITLE
-Context: REFMETA
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: MANVOLNUM
-Context: REFMETA
-# part of the DocInfo structure, which is ignored, though this element
-# if accessed directly by the _followrel call from the REFENTRY element.
-Ignore: all
--
-#
-GI: SUBTITLE
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: AUTHORGROUP
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: AUTHOR
-Context: AUTHORGROUP
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: EDITOR
-Context: AUTHORGROUP
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: COLLAB
-Context: AUTHORGROUP
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: COLLABNAME
-Context: COLLAB
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: CORPAUTHOR
-Context: AUTHORGROUP
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-GI: OTHERCREDIT
-Context: AUTHORGROUP
-# part of the DocInfo structure, which is ignored
-Ignore: all
--
-#
-#
-#############################################################################
-#
-# (before we get into the branch stuff, we turn off paragraphs in some
-# contexts where they would break the flow. Generally, this happens
-# within indented areas, such as within lists.
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: PARA
-Context: ENTRY
-NthChild: 1
-# nothing in this context
--
-#
-GI: PARA
-Context: ENTRY
-StartText: .br.sp 1
--
-#
-GI: PARA
-Context: NOTE
-NthChild: 1
-EndText: .sp 1
--
-#
-GI: PARA
-Context: NOTE
-# EndText handled in NOTE EndText
--
-#
-GI: PARA
-Context: CAUTION
-# EndText handled in CAUTION EndText
--
-#
-GI: PARA
-Context: GLOSSDEF
-NthChild: 1
-# nothing in this context
--
-#
-GI: PARA
-Context: STEP
-NthChild: 1
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: PARA
-Context: STEP
-Relation: sibling-1 TITLE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: PARA
-Context: STEP
-StartText: .sp 2n
--
-#
-GI: PARA
-Context: CALLOUT
-NthChild: 1
-# nothing in this context
--
-#
-GI: PARA
-Context: MSGTEXT
-NthChild: 1
-# nothing in this context
--
-#
-GI: PARA
-Context: MSGEXPLAN
-NthChild: 1
-# nothing in this context
--
-#
-#
-#############################################################################
-#
-# Regular "branch" stuff
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: FORMALPARA
-# it's all done in TITLE (FORMALPARA) and PARA
--
-#
-GI: TITLE
-Context: FORMALPARA
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: PARA
-Context: LISTITEM
-EndText: .sp
--
-#
-GI: PARA
-Relation: ancestor ORDEREDLIST
-StartText: .sp
--
-#
-GI: PARA
-Context: LISTITEM
-Relation: ancestor VARLISTENTRY
-NthChild: 1
-EndText: .sp
--
-#
-GI: PARA
-Relation: ancestor VARLISTENTRY
-StartText: .sp
--
-#
-GI: PARA
-Context: INFORMALEXAMPLE
-StartText: .RS
-EndText: .RE
--
-#
-GI: PARA
-Relation: ancestor STEP
-StartText: .IP "" 10
--
-#
-GI: PARA
-StartText: .PP
--
-#
-GI: SIMPARA
-StartText: .PP
--
-#
-GI: PROGRAMLISTING
-StartText: .sp.nf\\f(CW
-EndText: \\fR.fi.sp
--
-#
-GI: LITERALLAYOUT
-Context: ENTRY
-StartText: .nf
-EndText: .fi
--
-#
-#GI: LITERALLAYOUT
-#Relation: ancestor LISTITEM
-#StartText: .nf.sp
-#EndText: .fi.sp
-#-
-#
-GI: LITERALLAYOUT
-StartText: .sp.nf
-EndText: .fi.sp
--
-#
-GI: BLOCKQUOTE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: TITLE
-Context: BLOCKQUOTE
-StartText: \\fB
-EndText: \\fR.PP
--
-#
-GI: EPIGRAPH
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: ATTRIBUTION
-StartText: \\fI
-EndText: \\fR.PP
--
-#
-GI: ABSTRACT
-Relation: child TITLE
--
-#
-GI: ABSTRACT
-StartText: .SS "Abstract"
--
-#
-GI: TITLE
-Context: ABSTRACT
-StartText: .SS "
-EndText: "
--
-#
-GI: REVHISTORY
-StartText: .SS "Revision History"
-EndText: 
--
-#
-GI: REVISION
-StartText: .PP\\fBRevision:\\fR\s
-EndText: 
--
-#
-GI: REVNUMBER
-StartText: #\s
-EndText: ;\s
--
-#
-GI: DATE
-EndText: ;\s
--
-#
-GI: AUTHORINITIALS
-Context: REVISION
-StartText: \s
--
-#
-GI: REVREMARK
-StartText: ;\s\s
-EndText: 
--
-#
-GI: PROGRAMLISTINGCO
-# nothing to do specifically in ProgramListingCO -- it falls to
-# the content of ProgramListing and any callout list
--
-#
-GI: SCREEN
-Relation: ancestor LISTITEM
-StartText: .nf.sp
-EndText: .fi.sp
--
-#
-GI: SCREEN
-StartText: .PP.nf
-EndText: .fi
--
-#
-GI: SCREENCO
-# nothing to do specifically in ScreenCO -- it falls to
-# the content of Screen and any callout list
--
-#
-GI: SCREENSHOT
-# nothing specific to do here -- defer to any ScreenInfo or the
-# included graphic
--
-#
-GI: SCREENINFO
-StartText: .PP\\fI
-EndText: \\fR.PP
--
-#
-GI: GRAPHICCO
-# nothing to do specifically in GraphicCO -- it falls to
-# the content of Graphic and any callout list
--
-#
-GI: INFORMALEXAMPLE
-StartText: .sp
-EndText: .sp
--
-#
-GI: EXAMPLE
-# nothing special to do here -- it falls to the content.
--
-#
-GI: TITLE
-Context: EXAMPLE
-StartText: .PP\\fBExample ${examplenum}:
-EndText: \\fR
-Increment: examplenum 1
--
-#
-GI: FIGURE
-# nothing special to do here -- it falls to the content.
--
-#
-GI: TITLE
-Context: FIGURE
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: SIDEBAR
-Relation: child TITLE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: SIDEBAR
-StartText: .PP.RS\\fB[ Sidebar ]\\fR
-EndText: .RE
--
-#
-GI: TITLE
-Context: SIDEBAR
-StartText: \\fB[ Sidebar:\s
-EndText: \s]\\fR
--
-#
-GI: HIGHLIGHTS
-StartText: .SS "Highlights"
--
-#
-GI: AUTHORBLURB
-# nothing to do specially -- an included title may occur
--
-#
-GI: TITLE
-Context: AUTHORBLURB
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-#
-#############################################################################
-#
-# Call-out material
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: CO
-# nothing to do for the anchor of a callout
--
-#
-GI: AREASPEC
-Ignore: all
-# not much to do with representing the anchor of callouts in n/troff
--
-#
-GI: AREA
-Ignore: all
-# part of AreaSpec, which is being ignored
--
-#
-GI: AREASET
-Ignore: all
-# part of AreaSpec, which is being ignored
--
-#
-#
-#############################################################################
-#
-# Address block
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: ADDRESS
-StartText: .PP.nf
-EndText: .fi
--
-#
-GI: STREET
-# just the content...
--
-#
-GI: POB
-# just the content...
--
-#
-GI: POSTCODE
-# just the content...
--
-#
-GI: CITY
-EndText: ,\s
--
-#
-GI: STATE
-# just the content
--
-#
-GI: COUNTRY
-# just the content
--
-#
-GI: PHONE
-StartText: voice:\s
--
-#
-GI: FAX
-StartText: fax:\s
--
-#
-GI: OTHERADDR
-# just the content..
--
-#
-GI: EMAIL
-Context: ADDRESS
-# just the content..
--
-#
-#
-#############################################################################
-#
-# Lists
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: GLOSSLIST
-Relation: ancestor ITEMIZEDLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: GLOSSLIST
-Relation: ancestor GLOSSLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: GLOSSLIST
-Relation: ancestor ORDEREDLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: GLOSSLIST
-Relation: ancestor SIMPLELIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: GLOSSLIST
-Relation: ancestor VARIABLELIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: GLOSSLIST
-Relation: ancestor SEGMENTEDLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: GLOSSLIST
-# Nothing to do here.. see glossentry, etc
--
-#
-GI: GLOSSENTRY
-# nothing to do..
--
-#
-GI: GLOSSTERM
-Context: GLOSSENTRY
-StartText: .IP "
-EndText: " 10
--
-#
-GI: GLOSSTERM
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: ACRONYM
-Context: GLOSSENTRY
-StartText: (\\fIacronym:\s\\fR
-EndText: )\s\s
--
-#
-GI: ABBREV
-Context: GLOSSENTRY
-StartText: (\\fIabbreviation:\s\\fR
-EndText: )\s\s
--
-#
-GI: GLOSSSEE
-StartText: \\fISee \\fR
--
-#
-GI: GLOSSDEF
-# nothing special to do -- just pass the content.
--
-#
-GI: GLOSSSEEALSO
-StartText: \\fISee Also \\fR
--
-#
-GI: ITEMIZEDLIST
-Relation: ancestor LISTITEM
-StartText: .sp.in +2
-EndText: .in -2
--
-#
-GI: ITEMIZEDLIST
-StartText: .sp.in +2
-EndText: .in -2
--
-#
-GI: LISTITEM
-Context: ITEMIZEDLIST
-PAttSet: MARK NONE
-StartText: .mk.in +3.rt
-EndText: .in -3
--
-#
-GI: LISTITEM
-Context: ITEMIZEDLIST
-StartText: \\(bu.mk.in +3.rt
-EndText: .in -3
--
-#
-GI: ORDEREDLIST
-Relation: ancestor ITEMIZEDLIST
-StartText: .RS ${_set orderlist 1}
-EndText: .RE
--
-#
-GI: ORDEREDLIST
-Relation: ancestor GLOSSLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: ORDEREDLIST
-Relation: ancestor ORDEREDLIST
-StartText: .in +4${_set nestorderlist ${orderlist}} ${_set orderlist a}
-EndText: .in -4.sp${_set orderlist ${nestorderlist}}
--
-#
-GI: ORDEREDLIST
-Relation: ancestor SIMPLELIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: ORDEREDLIST
-Relation: ancestor VARIABLELIST
-StartText: .in +4${_set orderlist 1}
-EndText: .sp.in -4
--
-#
-GI: ORDEREDLIST
-Relation: ancestor SEGMENTEDLIST
-StartText: .RS${_set orderlist 1}
-EndText: .RE
--
-#
-GI: ORDEREDLIST
-StartText: ${_set orderlist 1}
--
-#
-GI: LISTITEM
-Context: ORDEREDLIST
-Increment: orderlist 1
-StartText: .br.sp${orderlist}..mk.in +4.rt
-EndText: .in -4
--
-#
-GI: SIMPLELIST
-Relation: ancestor ITEMIZEDLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: SIMPLELIST
-Relation: ancestor GLOSSLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: SIMPLELIST
-Relation: ancestor ORDEREDLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: SIMPLELIST
-Relation: ancestor SIMPLELIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: SIMPLELIST
-Relation: ancestor VARIABLELIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: SIMPLELIST
-Relation: ancestor SEGMENTEDLIST
-StartText: .RS
-EndText: .RE
--
-#
-GI: SIMPLELIST
-# nothing to do here..
--
-#
-GI: MEMBER
-PAttSet: TYPE INLINE
-NthChild: 1
--
-#
-GI: MEMBER
-PAttSet: TYPE INLINE
-StartText: ,\s
--
-#
-GI: MEMBER
-PAttSet: TYPE HORIZ
-NthChild: 1
-StartText: .PP\t
--
-#
-GI: MEMBER
-PAttSet: TYPE HORIZ
-StartText: \t
--
-#
-GI: MEMBER
-PAttSet: TYPE VERT
-StartText: .IP "" 10
-EndText: 
--
-#
-#GI: VARIABLELIST
-#Relation: ancestor ITEMIZEDLIST
-#StartText: .RS 4
-#EndText: .sp.RE
-#-
-#
-GI: VARIABLELIST
-Relation: ancestor GLOSSLIST
-StartText: .RS 4
-EndText: .sp.RE
--
-#
-GI: VARIABLELIST
-Relation: ancestor ORDEREDLIST
-StartText: .RS 4
-EndText: .sp.RE
--
-#
-GI: VARIABLELIST
-Relation: ancestor SIMPLELIST
-StartText: .RS 4
-EndText: .sp.RE
--
-#
-GI: VARIABLELIST
-Relation: ancestor VARIABLELIST
-StartText: ${_set twotermlen ${onetermlen}}${_set onetermlen ${etermlength}}
-EndText: ${_set etermlength ${onetermlen}}${_set onetermlen ${twotermlen}}
--
-#
-GI: VARIABLELIST
-Relation: ancestor SEGMENTEDLIST
-StartText: .RS 4
-EndText: .RE
--
-#
-GI: VARIABLELIST
-Context: PARA
-EndText: .sp
--
-#
-GI: VARIABLELIST
-#Catch all
--
-# Determine how much to indent VarlistEntry's ListItem
-#
-GI: VARLISTENTRY
-PAttSet: TERMLENGTH XTRANARROW
-StartText: ${_set stermlength \.in\s+9n.rt}${_set etermlength \.in\s-9n}
--
-GI: VARLISTENTRY
-PAttSet: TERMLENGTH NARROW
-StartText: ${_set stermlength \.in\s+16n.rt}${_set etermlength \.in\s-16n}
--
-#
-GI: VARLISTENTRY
-PAttSet: TERMLENGTH MEDIUM
-StartText: ${_set stermlength \.in\s+24n.rt}${_set etermlength \.in\s-24n}
--
-#
-GI: VARLISTENTRY
-PAttSet: TERMLENGTH WIDE
-StartText: ${_set stermlength \.in\s+32n.rt}${_set etermlength \.in\s-32n}
--
-#
-GI: VARLISTENTRY
-PAttSet: TERMLENGTH XTRAWIDE
-StartText: ${_set stermlength \.in\s+40n.rt}${_set etermlength \.in\s-40n}
--
-#
-GI: VARLISTENTRY
-PAttSet: TERMLENGTH WHOLELINE
-StartText: ${_set stermlength \.sp\s.6\.in\s+4}${_set etermlength \.in\s-4}
--
-#
-GI: VARLISTENTRY
-StartText: ${_set stermlength \.sp\s.6\.in\s+4}${_set etermlength \.in\s-4}
--
-#
-GI: TERM
-NthChild: 1
-StartText: .sp.ne 2.mk\\fB
-Increment: termcount 1
-EndText: \\fR
--
-#
-GI: TERM
-StartText: .br\\fB
-Increment: termcount 1
-EndText: \\fR
--
-#
-GI: LISTITEM
-Relation: parent VARLISTENTRY
-StartText: ${stermlength}
-EndText: .sp ${termcount}${etermlength}${_set termcount 0}
--
-#
-GI: SEGMENTEDLIST
-Relation: ancestor ITEMIZEDLIST
-StartText: .RS${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE.RE
--
-#
-GI: SEGMENTEDLIST
-Relation: ancestor GLOSSLIST
-StartText: .RS${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE.RE
--
-#
-GI: SEGMENTEDLIST
-Relation: ancestor ORDETERLIST
-StartText: .RS${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE.RE
--
-#
-GI: SEGMENTEDLIST
-Relation: ancestor SIMPLELIST
-StartText: .RS${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE.RE
--
-#
-GI: SEGMENTEDLIST
-Relation: ancestor VARIABLELIST
-StartText: .RS${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE.RE
--
-#
-GI: SEGMENTEDLIST
-Relation: ancestor SEGMENTEDLIST
-StartText: .RS${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE.RE
--
-#
-GI: SEGMENTEDLIST
-Relation: child TITLE
-StartText: ${_followrel child TITLE 400}.TStab();l l l l l l l l l l l l l l l l l l.
-EndText: .TE
--
-#
-GI: TITLE
-Context: SEGMENTEDLIST
-# ignored by default -- must be called by SEGMENTEDLIST gi
-Ignore: all
--
-#
-GI: _segmentedlist_title
-SpecID: 400
-StartText: .sp 1\\fB
-EndText: \\fR
--
-#
-GI: SEGTITLE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: SEGLISTITEM
-StartText: 
-EndText: 
--
-#
-GI: SEG
-EndText: 
--
-#
-GI: PROCEDURE
-AttValue: ROLE SINGLE-STEP
-StartText: ${_set singlestep xxx}${_set manysteps xy}
--
-#
-GI: PROCEDURE
-# defer to the content...
-StartText: ${_set procstep 1}${_set procsubstep a}${_set manysteps xxx}
--
-#
-GI: TITLE
-Context: PROCEDURE
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: _onestep
-SpecID: 9000
-StartText: .PP.RS
-EndText: .RE${_set singlestep xy}
--
-#
-GI: _manysteps
-SpecID: 9001
-StartText: .RS.TP 4\\fB${procstep}.\\fR
-EndText: .RE
-Increment: procstep 1
--
-#
-GI: STEP
-Context: SUBSTEPS
-StartText: .TP 4\\fB${procsubstep}\\fR.
-EndText: 
-Increment: procsubstep 1
--
-#
-GI: STEP
-StartText: ${_isset singlestep xxx 9000}${_isset manysteps xxx 9001}
-Ignore: all
-EndText: 
--
-#
-GI: TITLE
-Context: STEP
-# Ignore - Optional titles deprecated
-Ignore: all
--
-#
-GI: SUBSTEPS
-StartText: .RS
-EndText: .RE
--
-#
-GI: CALLOUTLIST
-StartText: ${_set callout 1}
-# nothing to do specifically, defer to the content...
--
-#
-GI: TITLE
-Context: CALLOUTLIST
-StartText: \\fB
-EndText: \\fR.PP
--
-#
-GI: CALLOUT
-StartText: .PP\\fICallout ${callout}.\s\s\\fR
-EndText: 
-Increment: callout
--
-#
-#
-#############################################################################
-#
-# Messages
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: MSGSET
-StartText: .PP
--
-#
-GI: MSGENTRY
-EndText: .sp
--
-#
-GI: MSG
-Relation: child TITLE
-StartText: .PP
-EndText: 
--
-#
-GI: MSG
-EndText: 
--
-#
-GI: TITLE
-Context: MSG
-StartText: .PP\\fB
-EndText: \\fR.PP
--
-#
-GI: MSGINFO
-# nothing specific -- just groups (MsgLevel | MsgOrig | MsgAud)*
--
-#
-GI: MSGEXPLAN
-AttValue: ROLE DESCRIPTION
-StartText: .RS 3.sp\\fBDescription\\fR:.RS 3
-EndText: .RE.RE
--
-#
-GI: MSGEXPLAN
-AttValue: ROLE CAUSE
-StartText: .RS 3.sp\\fBCause\\fR:.RS 3
-EndText: .RE.RE
--
-#
-GI: MSGEXPLAN
-AttValue: ROLE EXAMPLE
-StartText: .RS 3.sp\\fBExample\\fR:.RS 3
-EndText: .RE.RE
--
-#
-GI: MSGEXPLAN
-AttValue: ROLE SOLUTION
-StartText: .RS 3.sp\\fBSolution\\fR:.RS 3
-EndText: .RE.RE
--
-#
-GI: MSGEXPLAN
-# No gentext
-StartText: .RS 2.sp
-EndText: .RE
--
-GI: TITLE
-Context: MSGEXPLAN
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: MSGMAIN
-# defer to content
--
-#
-GI: TITLE
-Context: MSGMAIN
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: MSGSUB
-# defer to content
--
-#
-GI: TITLE
-Context: MSGSUB
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: MSGREL
-# defer to content
--
-#
-GI: TITLE
-Context: MSGREL
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: MSGLEVEL
-StartText: .PP\\fIMessage level:\s\s\\fR
-EndText: 
--
-#
-GI: MSGORIG
-StartText: .PP\\fIMessage origin:\s\s\\fR
-EndText: 
--
-#
-GI: MSGAUD
-StartText: .PP\\fIMessage audience:\s\s\\fR
-EndText: 
--
-#
-GI: MSGTEXT
-StartText: \\f(CW
-EndText: \\fR
--
-#
-#
-#############################################################################
-#
-# Admonitions
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: CAUTION
-Relation: child TITLE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: CAUTION
-StartText: .sp.mk\\fBCaution\\fR\s\\-\s.in +10.rt
-EndText: .in -10
--
-#
-GI: TITLE
-Context: CAUTION
-StartText: .sp.mk\\fBCaution\\fR\s\\-\s.in +10.rt
-EndText: .in -10
--
-#
-GI: IMPORTANT
-Relation: child TITLE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: IMPORTANT
-StartText: .PP.RS\\fBImportant:\s\s
-EndText: .RE
--
-#
-GI: TITLE
-Context: IMPORTANT
-StartText: \\fBImportant:\s\s
-EndText: \\fR.PP
--
-#
-GI: NOTE
-Relation: child TITLE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: NOTE
-StartText: .sp.mk\\fBNote\\fR\s\\-\s.in +8.rt
-EndText: .in -8
--
-#
-GI: TITLE
-Context: NOTE
-StartText: .sp.mk\\fBNote\\fR\s\\-\s.in +8.rt
-EndText: .in -8
--
-#
-GI: TIP
-Relation: child TITLE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: TIP
-StartText: .PP.RS\\fBTip:\s\s
-EndText: .RE
--
-#
-GI: TITLE
-Context: TIP
-StartText: \\fBTip:\s\s
-EndText: \\fR.PP
--
-#
-GI: WARNING
-Relation: child TITLE
-StartText: .PP.RS
-EndText: .RE
--
-#
-GI: WARNING
-StartText: .PP.RS\\fBWarning:\s\s
-EndText: .RE
--
-#
-GI: TITLE
-Context: WARNING
-StartText: \\fBWarning:\s\s
-EndText: \\fR.PP
--
-#
-#
-#############################################################################
-#
-# Synopses
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: SYNOPSIS
-StartText: .PP.nf
-EndText: .fi
--
-#
-GI: CMDSYNOPSIS
-StartText: .PP
-EndText: 
--
-#
-GI: ARG
-Context: GROUP
-NthChild: 1
-AttValue: CHOICE OPT
-StartText: \s[
-EndText: ${_attval REP REPEAT 505}]
--
-#
-GI: ARG
-Context: GROUP
-NthChild: 1
-EndText: ${_attval REP REPEAT 505}
--
-#
-GI: ARG
-Context: GROUP
-AttValue: CHOICE OPT
-StartText: \s|\s[
-EndText: ${_attval REP REPEAT 505}]
--
-#
-GI: ARG
-Context: GROUP
-StartText: \s|\s
-EndText: ${_attval REP REPEAT 505}
--
-#
-GI: ARG
-AttValue: CHOICE OPT
-StartText: \s[
-EndText: ${_attval REP REPEAT 505}]
--
-#
-GI: ARG
-AttValue: CHOICE REQ
-StartText: \s{
-EndText: ${_attval REP REPEAT 505}}
--
-#
-GI: ARG
-AttValue: CHOICE PLAIN
-StartText: \s
-EndText: ${_attval REP REPEAT 505}
--
-#
-GI: ARG
-# no special attrs -- just pass content through
-EndText: ${_attval REP REPEAT 505}
--
-#
-GI: _arg_group
-SpecID: 505
-StartText: \\&...
-Ignore: all
--
-#
-GI: GROUP
-AttValue: CHOICE OPT
-StartText: \s[
-EndText: ]\s${_attval REP REPEAT 505}
--
-#
-GI: GROUP
-AttValue: CHOICE REQ
-StartText: \s{
-EndText: }\s${_attval REP REPEAT 505}
--
-#
-GI: GROUP
-AttValue: CHOICE PLAIN
-StartText: \s
-EndText: ${_attval REP REPEAT 505}
--
-#
-GI: SBR
-StartText: .br
--
-#
-GI: SYNOPFRAGMENT
-# nothing special to do here -- just pass through content (Arg | Group)+
--
-#
-GI: SYNOPFRAGMENTREF
-# WHAT TO DO HERE?? pass through the content, but what about the
-# linkend? (will call it across...)
-EndText: \s\\fI(refers to: ${_followlink LINKEND 1000})\\fR
--
-#
-GI: FUNCSYNOPSIS
-StartText: .PP
-EndText: 
--
-#
-GI: FUNCSYNOPSISINFO
-StartText: .nf
-EndText: .fi.LP
--
-#
-GI: FUNCPROTOTYPE
-# nothing special -- just pass through content (looks like
-# a function def
-StartText: .sp 1
--
-#
-GI: FUNCDEF
-StartText: \\fB
-EndText: \\fR(
--
-#
-GI: FUNCPARAMS
-StartText: (\\fB
-EndText: \\fR)
--
-#
-GI: VOID
-StartText: \\fBvoid\\fR);
--
-#
-GI: VARARGS
-StartText: \\fB\\&...\\fR);
--
-#
-GI: PARAMDEF
-Relation: sibling+ PARAMDEF
-StartText: \\fB
-EndText: \\fR,\s
--
-#
-GI: PARAMDEF
-StartText: \\fB
-EndText: \\fR);
--
-#
-#
-#############################################################################
-#
-# Links
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: LINK
-# Defer to content
--
-#
-GI: OLINK
-# Defer to content
--
-#
-GI: ULINK
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: FOOTNOTEREF
-# just let the footnote ref mark come through
--
-#
-GI: FOOTNOTE
-# just let footnote body come through (-man doesn't support footnotes)
--
-#
-GI: XREF
-AttValue: LINKEND
-StartText: \\fI${_followlink LINKEND 600}
-EndText: \\fR
--
-#
-GI: XREF
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: _xref
-SpecID: 600
-StartText: ${_followrel child TITLE 2000}
-Ignore: all
--
-#
-GI: ANCHOR
-# nothing to do -- this just marks a place..
--
-#
-#
-#############################################################################
-#
-# Graphics and Equations
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: GRAPHIC
-AttValue: REMAP pic
-StartText: .LP.RSPlease see the online man page on docs.sun.com or a print copy for the diagram..RE.LP
--
-#
-GI: GRAPHIC
-AttValue: ENTITYREF
-StartText: .PP.if t .P! "${_filename}"
--
-#
-GI: GRAPHIC
-# Do nothing
--
-#
-GI: INLINEGRAPHIC
-StartText: .if t .P! "${_filename}"
--
-#
-GI: INFORMALEQUATION
-# nothing special to do -- defer to graphic content..
--
-#
-GI: EQUATION
-#Set up for running EQN pre-processor
-StartText: .EQdelim $$.EN.sp 2
--
-#
-GI: ALT
-# Pass through $$ deliminited EQN code
-Context: EQUATION
-StartText: 
-EndText: 
--
-#
-GI: TITLE
-Context: EQUATION
-StartText: .PP\\fB
-EndText: \\fR
--
-#
-GI: INLINEEQUATION
-# nothing special to do -- defer to graphic content..
--
-#
-#
-#############################################################################
-#
-# Tables
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-#
-GI: INFORMALTABLE
-StartText: .sp${_calstable tbl tablestart}
-EndText: ${_calstable tbl tableend}.sp
--
-#
-GI: TABLE
-StartText: .PP\\fBTable ${tablenum} ${_followrel child TITLE 1000}\\fR.sp
- ${_calstable tbl tablestart}
-EndText: ${_calstable tbl tableend}
-Increment: tablenum 1
--
-#
-GI: TITLE
-Context: TABLE
-# handled in TABLE element
-Ignore: all
--
-#
-GI: TGROUP
-StartText: ${_calstable tbl tablegroup}${_followrel child THEAD 700}${_followrel child TBODY 700}${_followrel child TFOOT 701}
-EndText: ${_calstable tbl tablegroupend}
--
-#
-GI: COLSPEC
-Ignore: all
--
-#
-GI: SPANSPEC
-Ignore: all
--
-#
-GI: THEAD TBODY TFOOT
-# they're called explicitly from TGROUP, but ignored here
-Ignore: all
--
-#
-GI: _thead_tbody
-SpecID: 700
-# nothing special to do -- just pass through content
--
-#
-GI: _tfoot
-SpecID: 701
-StartText: ${_calstable tbl tablefoot}
--
-#
-GI: ROW
-StartText: ${_calstable tbl rowstart}
-EndText: ${_calstable tbl rowend}
--
-#
-GI: ENTRY
-StartText: ${_calstable tbl entrystart}
-EndText: ${_calstable tbl entryend}
--
-#
-GI: ENTRYTBL
-StartText:
-EndText:
-Message: IMPLEMENT <${_gi} ${_allatts}>
--
-#
-#
-#############################################################################
-#
-# Index terms
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: INDEXTERM
-#StartText: .iX\s
-#EndText: 
-Ignore: all
--
-#
-GI: PRIMARY
-StartText: "
-EndText: "
--
-#
-GI: SECONDARY
-StartText: \s"
-EndText: "
--
-#
-GI: TERTIARY
-StartText: \s"
-EndText: "
--
-#
-GI: SEE
-StartText: \s"See:\s
-EndText: "
--
-#
-GI: SEEALSO
-StartText: \s"SeeAlso:\s
-EndText: "
--
-#
-#
-#############################################################################
-#
-# Author / OtherCredit material
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: OTHERCREDIT
-# nothing specific -- defer to content
--
-#
-GI: HONORIFIC
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: FIRSTNAME
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: SURNAME
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: LINEAGE
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: OTHERNAME
-# nothing specific -- defer to content
-StartText: (
-EndText: )\s
--
-#
-GI: AFFILIATION
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: SHORTAFFIL
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: JOBTITLE
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: ORGNAME
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: ORGDIV
-# nothing specific -- defer to content
-EndText: \s
--
-#
-GI: CONTRIB
-# nothing specific -- defer to content
-EndText: \s
--
-#
-#
-#############################################################################
-#
-# "Leaf" material
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: ABBREV
-# no special presentation
--
-#
-GI: ACCEL
-# no special presentation
--
-#
-GI: ACRONYM
-# Small Bold
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: AUTHORINITIALS
-# no special presentation
--
-#
-GI: CITATION
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: CITETITLE
-AttValue: PUBWORK
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: CITETITLE
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: CITEREFENTRY
-# defer to content..
--
-#
-GI: REFENTRYTITLE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: MANVOLNUM
-StartText: (
-EndText: )
--
-#
-GI: COMMENT
-# docbook says to inhibit this from finished products...
-Ignore: all
--
-#
-GI: EMAIL
-# no special presentation
--
-#
-GI: EMPHASIS
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: ERRORCODE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: ENVAR
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: FIRSTTERM
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: FOREIGNPHRASE
-# no special presentation
--
-#
-GI: PHRASE
-# no special presentation
--
-#
-GI: QUOTE
-StartText: ``\\fI
-EndText: \\fR''
--
-#
-GI: TRADEMARK
-EndText: \\u\\s-2TM\\s+2\\d
--
-#
-GI: WORDASWORD
-# no special presentation
--
-#
-GI: ACTION
-# no special presentation
--
-#
-GI: APPLICATION
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: CLASSNAME
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: COMMAND
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: COMPUTEROUTPUT
-StartText: \\f(CW
-EndText: \\fR
--
-#
-GI: DATABASE
-# no special presentation
--
-#
-GI: ERRORNAME
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: ERRORTYPE
-# no special presentation
--
-#
-GI: FILENAME
-AttValue: CLASS HEADERFILE
-StartText: \\fB<
-EndText: >\\fR
--
-#
-GI: FILENAME
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: FUNCTION
-Relation: parent FUNCDEF
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: FUNCTION
-Relation: descendant PARAMETER
-StartText: \\fB
-EndText: )\\fR
--
-#
-GI: FUNCTION
-StartText: \\fB
-EndText: (\\|)\\fR
--
-#
-GI: GUIBUTTON
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: GUIICON
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: GUILABEL
-# no special presentation
--
-#
-GI: GUIMENU
-# no special presentation
--
-#
-GI: GUIMENUITEM
-# no special presentation
--
-#
-GI: GUISUBMENU
-# no special presentation
--
-#
-GI: HARDWARE
-# no special presentation
--
-#
-GI: INTERFACE
-# no special presentation
--
-#
-GI: INTERFACEDEFINITION
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: KEYCAP
-StartText: \\fB<
-EndText: >\\fR
--
-#
-GI: KEYCODE
-# no special presentation
--
-#
-GI: KEYCOMBO
-# no special presentation -- defer to the content
--
-#
-GI: KEYSYM
-StartText: \\fB<
-EndText: >\\fR
--
-#
-GI: LINEANNOTATION
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: LITERAL
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: MARKUP
-StartText: \\f(CW
-EndText: \\fR
--
-#
-GI: MEDIALABEL
-# no special presentation
--
-#
-GI: MENUCHOICE
-# no special presentation
--
-#
-GI: SHORTCUT
-# no special presentation
--
-#
-GI: MOUSEBUTTON
-# no special presentation
--
-#
-GI: OPTION
-AttValue: ROLE PLUS
-StartText: +\\fB
-EndText: \\fR
--
-#
-GI: OPTION
-AttValue: ROLE NODASH
-StartText: \\fB
-EndText: \\fR
--
-GI: OPTION
-StartText: -\\fB
-EndText: \\fR
--
-#
-GI: OPTIONAL
-StartText: [
-EndText: ]
--
-#
-GI: PARAMETER
-Relation: parent PARAMDEF
-StartText: \\fI
-EndText: \\fP
--
-#
-GI: PARAMETER
-Relation: parent FUNCTION
-NthChild: 1
-StartText: (\\fI
-EndText: \\fP
--
-#
-GI: PARAMETER
-Relation: parent FUNCTION
-StartText: ,\s\\fI
-EndText: \\fP
--
-#
-GI: PARAMETER
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: PROPERTY
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: REPLACEABLE
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: RETURNVALUE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: SGMLTAG
-AttValue: CLASS ELEMENT
-StartText: \\fB<
-EndText: >\\fR
--
-#
-GI: SGMLTAG
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: STRUCTFIELD
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: STRUCTNAME
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: SYMBOL
-AttValue: ROLE Variable
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: SYMBOL
-StartText: \\fI
-EndText: \\fR
--
-#
-GI: SYSTEMITEM
-AttValue: CLASS CONSTANT
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: SYSTEMITEM
-AttValue: CLASS ENVIRONVAR
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: SYSTEMITEM
-AttValue: CLASS RESOURCE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: SYSTEMITEM
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: TOKEN
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: TYPE
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: USERINPUT
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: AUTHOR
-# no special presentation - defer to content
--
-#
-GI: CORPAUTHOR
-# no special presentation
--
-#
-GI: MODESPEC
-# nothing to render (this is meta information for Links)
--
-#
-GI: PRODUCTNAME
-StartText: \\fB
-EndText: \\fR
--
-#
-GI: PRODUCTNUMBER
-# no special presentation
--
-#
-GI: SUBSCRIPT
-StartText: \\d
-EndText: \\u
--
-#
-GI: SUPERSCRIPT
-AttValue: REMAP nopower
-StartText: \\u
-EndText: \\d
--
-#
-GI: SUPERSCRIPT
-StartText: .ie t \\u\\c.el \\h'-1'**\\c
-EndText: .ie t \\d\\c.el \\h'-1'\\c
--
-#
-#
-#############################################################################
-#
-# stuff that gets ignored (and doesn't belong elsewhere)
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: TITLEABBREV
-# this element is ignored in favor of the real title
-Ignore: all
--
-#
-#
-#
-#############################################################################
-#
-# handle layout-specific stuff and PIs
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: BEGINPAGE
-StartText: .br\s
-EndText: 
--
-#
-GI: _x-break
-StartText: .br\s
-EndText: 
--
-#
-GI: _sml-break
-StartText: .br\s
-EndText: 
--
-#
-GI: _sml-need
-StartText: .ne\s
-EndText: 
--
-#
-GI: _sml-size
-StartText: .ps\s
-EndText: 
--
-#
-GI: _sml-indent
-StartText: .in\s
-EndText: 
--
-#
-GI: _sml-space
-StartText: .sp\s
-EndText: 
--
-#
-GI: _sml-tabset
-StartText: .ta\s
-EndText: 
--
-#
-#
-#############################################################################
-#
-# General purpose transpecs
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: _passthrough
-SpecID: 1000
-Substitute: " ""
--
-#
-GI: _passthrough2
-SpecID: 2000
--
-#
-GI: _doTitle
-SpecID: 1010
-StartText: .PP\\fB
-EndText: \\fR.PP
--
-#
-#
-#############################################################################
-#
-# Catch-all for unknown PIs -- ignore them...
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: _*
-Ignore: data
--
-#
-#
-#############################################################################
-#
-# Catch-all for unknown elements -- just output their content..
-#
-# #### ##### ##### ##### ##### ##### #### #####
-#
-GI: *
--
-#
diff --git a/usr/src/cmd/man/src/util/ereview.gml b/usr/src/cmd/man/src/util/ereview.gml
deleted file mode 100644
index 8ef63cd890..0000000000
--- a/usr/src/cmd/man/src/util/ereview.gml
+++ /dev/null
@@ -1,111 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!--
-ArborText: 19910809
-
-$Header: ereview.gml,v 1.3 92/11/13 15:21:36 twb Exp $
-
-The following declarations may be referred to using a public entity as
-follows:
-
-<!ENTITY % ereview PUBLIC "-//USA-DOD//DTD SUP MIL-M-28001B EREVIEW//EN">
-
--->
-
-<!-- The %mrinfo entity is required for support of the electronic review
-declaration set. Note that this entity matches an identical set of elements
-in the base document being reviewed, and may therefore require tailoring
-accordingly. For documents conforming to the Template Doctype for Technical
-Documents contained in Appendix A of this specification, the %mrinfo entity is
-declared as follows:
-
-<!ENTITY % mrinfo "(pubno+, (revnum|(chgnum, chgdate)|pubdate))" >
-
--->
-
-<!-- The %mrtext entity indicates what elements from the base DTD can occur in
-the "textual" (i.e., mrpara and mritem) elements in a modreq. For documents
-conforming to the Template Doctype for Technical Documents contained in
-Appendix A of this specification, the %mrtext entity is declared as follows:
-
-<!ENTITY % mrtext "#PCDATA | symbol" >
-
--->
-
-<!-- The %mrelems entity indicates what elements from the base DTD can occur
-along with the mrpara and mrlist elements (e.g., within mrreason, mrinstr,
-mrgenmod, and mrrespns) in a modreq. For documents conforming to the Template
-Doctype for Technical Documents contained in Appendix A of this specification,
-the %mrelems entity is declared as follows:
-
-<!ENTITY % mrelems "| graphic" >
-
--->
-
-
-
-<!-- Generic default definitions of %mrinfo, %mrtext, and %mrelems are given
-below. These are to be replaced by a definition appropriate to the document
-being reviewed: -->
-
-<!ENTITY % mrinfo "ANY" >
-
-<!ENTITY % mrtext "#PCDATA" >
-
-<!ENTITY % mrelems " " >
-
-<!-- Beginning of modification request declaration set -->
-
-<!ELEMENT modreq - - (mrinfo?, mrmod, mrrespns?) >
-<!ATTLIST modreq id ID #REQUIRED
- xref NMTOKEN #IMPLIED
- refpos (prexref|postxref|xref) "xref"
- by CDATA #REQUIRED
- date CDATA #REQUIRED
- organiz NMTOKEN #IMPLIED
- orgcat NMTOKEN #IMPLIED
- cmntrcat NMTOKEN #IMPLIED
- priority (1|2|3|4|5) #IMPLIED
- category NMTOKEN #IMPLIED
- topic CDATA #IMPLIED
- locmodel CDATA #IMPLIED >
-
-<!ELEMENT mrinfo - - %mrinfo; >
-<!ELEMENT mrmod - - (mrreason?, (mrgenmod|(mrinstr?, mrchgtxt))) >
-<!ELEMENT (mrreason|mrinstr|mrgenmod) - o (mrpara|mrlist %mrelems;)+ >
-<!ELEMENT mrchgtxt - - ANY >
-<!ATTLIST mrchgtxt chgloc NUMBER #IMPLIED
- chglen NUMBER #IMPLIED
- action (insert|delete|replace) "replace" >
-<!ELEMENT mrrespns - - (mrpara|mrlist %mrelems;)* >
-<!ATTLIST mrrespns disposn NMTOKEN #IMPLIED
- status NMTOKEN #IMPLIED >
-<!ELEMENT (mrpara|mritem) - - (%mrtext;) >
-<!ELEMENT mrlist - - (mritem+) >
-
-<!-- End of modification request declaration set -->
diff --git a/usr/src/cmd/man/src/util/html-latin.sgml b/usr/src/cmd/man/src/util/html-latin.sgml
deleted file mode 100644
index 82df4b8ffa..0000000000
--- a/usr/src/cmd/man/src/util/html-latin.sgml
+++ /dev/null
@@ -1,164 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- Portions of this text are copyright ISO:
-
- (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 % HTMLlat1 PUBLIC
- "-//W3O//ENTITIES W3 Latin 1 for HTML//EN">
- %HTMLlat1;
--->
-<!-- Modified for use in HTML
- $Id: ISOlat1.sgml,v 1.1 1994/09/24 14:06:34 connolly Exp $ =
-
--->
-<!-- Modified to add characters in the range &161; to &191; in
- the ISO Latin-1 character set, which could only be referred =
-
- to by numeric references. Entity names based on relevant entities in
- ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN"
- Also added the standard lt gt amp entities from HTML 2.0
- Chris Lilley, 13 March 1995
- =
-
- This covers all of Latin 1, but we are still unable to display a =
-
- Trade Mark (TM)
--->
-
-<!ENTITY AElig CDATA "&#198;" -- capital AE diphthong (ligature) -->
-<!ENTITY Aacute CDATA "&#193;" -- capital A, acute accent -->
-<!ENTITY Acirc CDATA "&#194;" -- capital A, circumflex accent -->
-<!ENTITY Agrave CDATA "&#192;" -- capital A, grave accent -->
-<!ENTITY Aring CDATA "&#197;" -- capital A, ring -->
-<!ENTITY Atilde CDATA "&#195;" -- capital A, tilde -->
-<!ENTITY Auml CDATA "&#196;" -- capital A, dieresis or umlaut mark -->
-<!ENTITY Ccedil CDATA "&#199;" -- capital C, cedilla -->
-<!ENTITY ETH CDATA "&#208;" -- capital Eth, Icelandic -->
-<!ENTITY Eacute CDATA "&#201;" -- capital E, acute accent -->
-<!ENTITY Ecirc CDATA "&#202;" -- capital E, circumflex accent -->
-<!ENTITY Egrave CDATA "&#200;" -- capital E, grave accent -->
-<!ENTITY Euml CDATA "&#203;" -- capital E, dieresis or umlaut mark -->
-<!ENTITY Iacute CDATA "&#205;" -- capital I, acute accent -->
-<!ENTITY Icirc CDATA "&#206;" -- capital I, circumflex accent -->
-<!ENTITY Igrave CDATA "&#204;" -- capital I, grave accent -->
-<!ENTITY Iuml CDATA "&#207;" -- capital I, dieresis or umlaut mark -->
-<!ENTITY Ntilde CDATA "&#209;" -- capital N, tilde -->
-<!ENTITY Oacute CDATA "&#211;" -- capital O, acute accent -->
-<!ENTITY Ocirc CDATA "&#212;" -- capital O, circumflex accent -->
-<!ENTITY Ograve CDATA "&#210;" -- capital O, grave accent -->
-<!ENTITY Oslash CDATA "&#216;" -- capital O, slash -->
-<!ENTITY Otilde CDATA "&#213;" -- capital O, tilde -->
-<!ENTITY Ouml CDATA "&#214;" -- capital O, dieresis or umlaut mark -->
-<!ENTITY THORN CDATA "&#222;" -- capital THORN, Icelandic -->
-<!ENTITY Uacute CDATA "&#218;" -- capital U, acute accent -->
-<!ENTITY Ucirc CDATA "&#219;" -- capital U, circumflex accent -->
-<!ENTITY Ugrave CDATA "&#217;" -- capital U, grave accent -->
-<!ENTITY Uuml CDATA "&#220;" -- capital U, dieresis or umlaut mark -->
-<!ENTITY Yacute CDATA "&#221;" -- capital Y, acute accent -->
-<!ENTITY aacute CDATA "&#225;" -- small a, acute accent -->
-<!ENTITY acirc CDATA "&#226;" -- small a, circumflex accent -->
-<!ENTITY aelig CDATA "&#230;" -- small ae diphthong (ligature) -->
-<!ENTITY agrave CDATA "&#224;" -- small a, grave accent -->
-<!ENTITY aring CDATA "&#229;" -- small a, ring -->
-<!ENTITY atilde CDATA "&#227;" -- small a, tilde -->
-<!ENTITY auml CDATA "&#228;" -- small a, dieresis or umlaut mark -->
-<!ENTITY ccedil CDATA "&#231;" -- small c, cedilla -->
-<!ENTITY eacute CDATA "&#233;" -- small e, acute accent -->
-<!ENTITY ecirc CDATA "&#234;" -- small e, circumflex accent -->
-<!ENTITY egrave CDATA "&#232;" -- small e, grave accent -->
-<!ENTITY eth CDATA "&#240;" -- small eth, Icelandic -->
-<!ENTITY euml CDATA "&#235;" -- small e, dieresis or umlaut mark -->
-<!ENTITY iacute CDATA "&#237;" -- small i, acute accent -->
-<!ENTITY icirc CDATA "&#238;" -- small i, circumflex accent -->
-<!ENTITY igrave CDATA "&#236;" -- small i, grave accent -->
-<!ENTITY iuml CDATA "&#239;" -- small i, dieresis or umlaut mark -->
-<!ENTITY ntilde CDATA "&#241;" -- small n, tilde -->
-<!ENTITY oacute CDATA "&#243;" -- small o, acute accent -->
-<!ENTITY ocirc CDATA "&#244;" -- small o, circumflex accent -->
-<!ENTITY ograve CDATA "&#242;" -- small o, grave accent -->
-<!ENTITY oslash CDATA "&#248;" -- small o, slash -->
-<!ENTITY otilde CDATA "&#245;" -- small o, tilde -->
-<!ENTITY ouml CDATA "&#246;" -- small o, dieresis or umlaut mark -->
-<!ENTITY szlig CDATA "&#223;" -- small sharp s, German (sz ligature) -->
-<!ENTITY thorn CDATA "&#254;" -- small thorn, Icelandic -->
-<!ENTITY uacute CDATA "&#250;" -- small u, acute accent -->
-<!ENTITY ucirc CDATA "&#251;" -- small u, circumflex accent -->
-<!ENTITY ugrave CDATA "&#249;" -- small u, grave accent -->
-<!ENTITY uuml CDATA "&#252;" -- small u, dieresis or umlaut mark -->
-<!ENTITY yacute CDATA "&#253;" -- small y, acute accent -->
-<!ENTITY yuml CDATA "&#255;" -- small y, dieresis or umlaut mark -->
-<!-- =
-
- Ones that aren't accented characters, and so not in ISO Added Latin =
-1.
-
- umlaut. macron, acute, cedilla
- were not in ISO Numeric and Special Graphic
- either; I took their names from the numeric entity list in
- http://www.hpl.hp.co.uk/people/dsr/html/latin1.html =
-
- Chris Lilley, 13 March 1995 =
-
--->
-
-<!ENTITY iexcl SDATA "=A1" --=3D inverted exclamation mark &161; -->
-<!ENTITY cent SDATA "=A2" --=3D cent sign &162; -->
-<!ENTITY pound SDATA "=A3" --=3D pound sterling sign &163; -->
-<!ENTITY curren SDATA "=A4" --=3D general currency sign &164; -->
-<!ENTITY yen SDATA "=A5" --=3D yen sign &165; -->
-<!ENTITY brvbar SDATA "=A6" --=3D broken (vertical) bar &166; -->
-<!ENTITY sect SDATA "=A7" --=3D section sign &167; -->
-<!ENTITY umlaut SDATA "=A8" --=3D umlaut (dieresis) &168; -->
-<!ENTITY copy SDATA "=A9" --=3D copyright sign &169; -->
-<!ENTITY ordf SDATA "=AA" --=3D ordinal indicator, feminine &170; -->
-<!ENTITY laquo SDATA "=AB" --=3D angle quotation mark, left &171; -->
-<!ENTITY not SDATA "=AC" --=3D not sign &172; -->
-<!ENTITY shy SDATA "=AD" --=3D soft hyphen &173;-->
-<!ENTITY reg SDATA "=AE" --=3D registered trademark &174; -->
-<!ENTITY macron SDATA "=AF" --=3D macron &175; -->
-<!ENTITY deg SDATA "=B0" --=3D degree sign &176; -->
-<!ENTITY plusmn SDATA "=B1" --=3D plus-or-minus sign &177; -->
-<!ENTITY sup2 SDATA "=B2" --=3D superscript two &178; -->
-<!ENTITY sup3 SDATA "=B3" --=3D superscript three &179; -->
-<!ENTITY acute SDATA "=B4" --=3D acute accent &180; -->
-<!ENTITY micro SDATA "=B5" --=3D micro sign &181; -->
-<!ENTITY para SDATA "=B6" --=3D pilcrow (paragraph sign) &182; -->
-<!ENTITY middot SDATA "=B7" --=3D middle dot (centred decimal point) &183; -->
-<!ENTITY cedilla SDATA "=B8" --=3D cedilla accent &184; -->
-<!ENTITY sup1 SDATA "=B9" --=3D superscript one -->
-<!ENTITY ordm SDATA "=BA" --=3D ordinal indicator, masculine -->
-<!ENTITY raquo SDATA "=BB" --=3D angle quotation mark, right -->
-<!ENTITY frac14 SDATA "=BC" --=3D fraction one-quarter -->
-<!ENTITY frac12 SDATA "=BD" --=3D fraction one-half -->
-<!ENTITY frac34 SDATA "=BE" --=3D fraction three-quarters -->
-<!ENTITY iquest SDATA "=BF" --=3D inverted question mark -->
-<!-- the odd ones tucked in amongs the accented letters -->
-<!ENTITY times SDATA "=D7" --=3D multiply sign -->
-<!ENTITY divide SDATA "=F7" --=3D divide sign -->
-
-<!ENTITY amp CDATA "&#38;" -- ampersand -->
-<!ENTITY gt CDATA "&#62;" -- greater than -->
-<!ENTITY lt CDATA "&#60;" -- less than -->
-<!ENTITY quot CDATA "&#34;" -- double quote -->
-
-<!--
- Should the dollar sign and such like also be given entity names?
- There are suitable ones around. For example, people using =
-
- internationalised keyboards in various countries might not be =
-
- readily able to access some of these characters.
- =
-
- On such grounds, I suggest entity names for these:
- ! " # $ % ' ( ) * + , - . / : ; =3D ? [ \ ] ^ _ ` { | } ~
- Lastly, what about &tab; for those whose editors convert all
- tabs to spaces?
-
--->
diff --git a/usr/src/cmd/man/src/util/instant.src/Makefile b/usr/src/cmd/man/src/util/instant.src/Makefile
deleted file mode 100644
index c3da6d59bf..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/Makefile
+++ /dev/null
@@ -1,144 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# 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) 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.
-#
-#
-# For building 'instant'.
-#
-# J.Bowe, 1993
-#
-# $Header: /usr/src/docbook-to-man/Instant/RCS/Makefile,v 1.10 1996/06/15 22:49:42 fld Exp $
-#
-# This assumes you have the (tpt)regexp package (includes and library)
-# available.
-#
-# Some things you could set at your site.
-# XDEFINES = ... # for extra defines
-# REGEX_INC = -I../tptregexp # should be here with release
-# REGEX_LIB = ../lib/tptregexp # assumes you built it there
-# BINDIR = /usr/local/bin # where you keep your programs
-# (You should set DEF_TPT_LIB to something, or set it in general.h.
-# At OSF we use the default in that file.)
-
-include ../../../../Makefile.cmd
-
-SHELL = /bin/sh
-
-ROOTLIB = /usr/lib
-ROOTSHLIB = /usr/share/lib
-
-PROGROOT = $(ROOTLIB)/sgml
-
-TPTLIB = $(ROOTSHLIB)/sgml/locale/C/transpec
-REGEX_INC = -Itptregexp
-REGEX_LIB = tptregexp
-BINDIR = $(PROGROOT)
-DEFINES = -DDEF_TPT_LIB=\"$(TPTLIB)\" $(XDEFINES)
-
-#OPT = -O
-CFLAGS += $(OPT) $(REGEX_INC) $(DEFINES)
-LDFLAGS += $(OPT)
-REGEX = -L$(REGEX_LIB) -ltptregexp
-
-CFILES = main.c util.c info.c translate.c traninit.c tranvar.c tables.c \
- browse.c
-HFILES = general.h translate.h
-OBJ = main.o util.o info.o translate.o traninit.o tranvar.o tables.o \
- browse.o masterVersion.o
-PROGS = instant
-
-all: dotptregexp .WAIT $(PROGS) THIRDPARTYLICENSE
-
-dotptregexp:
- cd tptregexp; $(MAKE) all
-
-instant: $(OBJ)
- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(REGEX)
- $(POST_PROCESS)
- cp $@ ..
-
-install: all
- cp $(PROGS) $(BINDIR)
-
-
-Version: allVersion.o
-
-allVersion.c: $(HFILES) $(CFILES) Makefile
- co -l allVersion.c
- makeVersionFile $(HFILES) $(CFILES) Makefile > allVersion.c
- ci -u -m"new master version number" allVersion.c
- makeVersionFile -n instant allVersion.c > masterVersion.c
-
-clean: _localclean
-
-_localclean:
- rm -f $(OBJ) allVersion.o lint.out core
- cd tptregexp; $(MAKE) clean
-
-clobber: clean _localclobber
-
-_localclobber:
- rm -f $(PROGS)
- cd tptregexp; $(MAKE) clobber
- $(RM) THIRDPARTYLICENSE
-
-.PARALLEL: $(OBJ)
-
-# dependencies
-main.o: main.c general.h
-util.o: util.c general.h
-info.o: info.c general.h
-translate.o: translate.c general.h translate.h
-traninit.o: traninit.c general.h translate.h
-tranvar.o: tranvar.c general.h translate.h
-tables.o: tables.c general.h translate.h
-browse.o: browse.c general.h
-
-THIRDPARTYLICENSE: README
- $(SED) -n -e '2d' -e '/# Copyright/,/# written authorization/p' \
- README > $@
diff --git a/usr/src/cmd/man/src/util/instant.src/README b/usr/src/cmd/man/src/util/instant.src/README
deleted file mode 100644
index fe60b887e4..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/README
+++ /dev/null
@@ -1,179 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-#
-# 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 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).
-
-
-____________________________________________________________________________
-
diff --git a/usr/src/cmd/man/src/util/instant.src/THIRDPARTYLICENSE.descrip b/usr/src/cmd/man/src/util/instant.src/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index d76018f8f4..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-INSTANT: A FORMATTING APPLICATION FOR OSF SGML INSTANCES
diff --git a/usr/src/cmd/man/src/util/instant.src/allVersion.c b/usr/src/cmd/man/src/util/instant.src/allVersion.c
deleted file mode 100644
index 1f8cb5c34e..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/allVersion.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* version summary file created by makeVersionFile on Mon Jun 29 0:14:15 1998 */
-#pragma ident "%Z%%M% %I% %E% SMI"
-char _HeadVeRsIoN_[] = "$Id: general.h 1.6 1997/08/26 04:04:40;
-translate.h 1.5 1998/06/29 04:13:40;
-main.c 1.12 1998/06/28 20:10:39;
-util.c 1.6 1998/06/28 19:36:03;
-info.c 1.2 1996/06/02 21:46:10;
-translate.c 1.16 1998/06/29 04:13:40;
-traninit.c 1.6 1998/06/28 19:15:41;
-tranvar.c 1.8 1998/06/28 18:53:40;
-tables.c 1.14 1998/06/28 19:50:54;
-browse.c 1.2 1996/06/02 21:46:10;
-Makefile 1.10 1996/06/15 22:49:42 $";
diff --git a/usr/src/cmd/man/src/util/instant.src/browse.c b/usr/src/cmd/man/src/util/instant.src/browse.c
deleted file mode 100644
index 5af8229226..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/browse.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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 file [outfile]",
- " With trans spec in 'file' translate into 'outfile' (stdout)",
- " sdata file Read SDATA map file (for translations).",
- " cmap file Read character map file (for translations).",
- " 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, *cmapfile, *sdatafile;
- 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 > 2){
- if (!(fp = fopen(av[2], "w"))) {
- perror("Can not open output file");
- continue;
- }
- }
- else fp = stdout;
- DoTranslate(ce, av[1], fp);
- if (ac > 2) fclose(fp);
- }
- else if (!strcmp(cmd, "sdata")){
- sdatafile = strdup(av[1]);
- ReadSDATA(sdatafile);
- }
- else if (!strcmp(cmd, "cmap")){
- cmapfile = strdup(av[1]);
- ReadCharMap(cmapfile);
- }
-
- 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]);
-}
-
-/* ______________________________________________________________________ */
diff --git a/usr/src/cmd/man/src/util/instant.src/general.h b/usr/src/cmd/man/src/util/instant.src/general.h
deleted file mode 100644
index 04ec3eabf1..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/general.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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.6 1997/08/26 04:04:40 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 "/project/tools/libdata/tpt"
-#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)
-
-#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 main.c */
-
-Entity_t * FindEntity(char *);
-
-/* 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 *);
-void OutputString(char *, FILE *, int);
-FILE *OpenFile(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 *, char *);
-char *FindMappingVal(Map_t *, char *);
-void SetMapping(Map_t *, char *);
-void SetMappingNV(Map_t *, char *, char *);
-void AddID(Element_t *, char *);
-Element_t *FindElemByID(char *);
-
-/* things defined in translate.c */
-void DoTranslate(Element_t*, char *, FILE *);
-
-/* things defined in traninit.c */
-void ReadTransSpec(char *);
-void ReadSDATA(char *);
-void ReadCharMap(char *);
-
-/* things defined in tranvar.c */
-char *Get_A_C_value(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();
-
-/* ----- other declarations ----- */
-
-#ifdef ultrix
-#define strdup(s) strcpy((char *)malloc(strlen(s)+1), s)
-#endif
-
diff --git a/usr/src/cmd/man/src/util/instant.src/hyper.c b/usr/src/cmd/man/src/util/instant.src/hyper.c
deleted file mode 100644
index c45d1b1ff8..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/hyper.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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;
-}
-
-/* ______________________________________________________________________ */
-
diff --git a/usr/src/cmd/man/src/util/instant.src/info.c b/usr/src/cmd/man/src/util/instant.src/info.c
deleted file mode 100644
index d631cd6ff6..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/info.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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);
- }
-}
-
-/* ______________________________________________________________________ */
-
diff --git a/usr/src/cmd/man/src/util/instant.src/main.c b/usr/src/cmd/man/src/util/instant.src/main.c
deleted file mode 100644
index 2537b31021..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/main.c
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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: /usr/src/docbook-to-man/Instant/RCS/main.c,v 1.12 1998/06/28 20:10:39 fld Exp fld $";
-#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>
-
-#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, *cmapfile, *sdatafile;
-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 */
-extern char _HeadVeRsIoN_[];
-
-/* ______________________________________________________________________ */
-/* 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[]
-)
-{
- Initialize1(av[0]);
- HandleArgs(ac, av);
- Initialize2();
-
- 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 (sdatafile) ReadSDATA(sdatafile);
- if (cmapfile) ReadCharMap(cmapfile);
- /* 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;
- DoTranslate(e, tranfile, outfp);
- }
- 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:vc:s:o:huSxIl:bHVWi:D:Z")) != EOF) {
- switch (c) {
- case 't': tranfile = optarg; break;
- case 'v': do_validate = 1; break;
- case 's': sdatafile = optarg; break;
- case 'c': cmapfile = optarg; 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>",
- " -s file <file> contains a list of SDATA entity mappings",
- " -c file <file> contains a list of character mappings",
- " -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.
- */
-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. */
- if (!strcmp(tok[1], "CDATA") || !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;
- }
- }
- if ( e && e->gi )
- fprintf(stderr, "Error: End of AccumElemInfo - should not be here: %s\n", e->gi);
- else
- fprintf(stderr, "Invalid SGML. File cannot be formatted\n");
-/* return e;*/
- exit(1);
-}
-
-/* Read ESIS lines.
- */
-
-#define BASECONTSIZE 500 /* starting size for number of children */
-#define GROWCONTSIZE 500 /* if we need to grow that, by this much */
-
-static Element_t *
-ReadESIS(
- FILE *fp,
- int depth
-)
-{
- char *buf;
- int i, c, ncont, contsize;
- Element_t *e;
- Content_t *cont;
-
- Malloc( LINESIZE+1, buf, char );
- contsize = BASECONTSIZE; /* starting content size */
- Malloc( contsize, cont, Content_t );
-
- /* 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;
- if ( ncont >= contsize ) {
- contsize += GROWCONTSIZE;
- Realloc( contsize, cont, Content_t );
- }
-
- 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') ) {
- buf[0] = -1; /* simulate "^" command */
- memcpy(&buf[1], &buf[2], strlen(buf)-1);
- }
- cont[ncont].ch.data = strdup(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);
- free(cont);
- 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;
- }
- }
- if( e && e->gi)
- fprintf(stderr, "Error: End of ReadESIS - should not be here: %s\n", e->gi);
- else
- fprintf(stderr, "Error: Invalid SGML: End of ReadESIS - should not be here:\n");
-
- free(buf);
- free(cont);
- 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;
-}
-
-/* ______________________________________________________________________ */
diff --git a/usr/src/cmd/man/src/util/instant.src/masterVersion.c b/usr/src/cmd/man/src/util/instant.src/masterVersion.c
deleted file mode 100644
index 771e3200ad..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/masterVersion.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* version summary file created by makeVersionFile on Mon Jun 29 0:14:15 1998 */
-#pragma ident "%Z%%M% %I% %E% SMI"
-char _HeadVeRsIoN_[] = "$Id: instant 1.116 1998/06/29 04:14:15 $";
diff --git a/usr/src/cmd/man/src/util/instant.src/tables.c b/usr/src/cmd/man/src/util/instant.src/tables.c
deleted file mode 100644
index 131942cd4b..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tables.c
+++ /dev/null
@@ -1,2124 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-
-/*
- * Copyright 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 1996 X Consortium
- * Copyright 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.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * ________________________________________________________________________
- *
- * Program to manipulate SGML instances.
- *
- * Originally coded for OSF DTD tables, now recoded (fld 3/27/95)
- * for CALS-type tables (fragment taken from the DocBook DTD). Then,
- * *really* upgraded to CALS tables by FLD on 5/28/96.
- *
- * This module is for handling table markup, printing TeX or tbl
- * (tbl) markup to the output stream. Also, table markup checking is
- * done here. Yes, this depends on the DTD, but it makes translation
- * specs much cleaner (and makes some things possible).
- *
- * Incomplete / not implemented / limitations / notes:
- * vertical alignment (valign attr)
- * vertical spanning
- * row separators are for the whole line, not per cell (the prog looks
- * at rowsep for the 1st cell and applies it to the whole row)
- * trusts that units in colwidths are acceptable to LaTeX and tbl
- * "s" is an acceptable shorthand for "span" in model attributes
- *
- * A note on use of OutputString(): Strings with backslashes (\) need lots
- * of backslashes. You have to escape them for the C compiler, and escape
- * them again for OutputString() itself.
- * ________________________________________________________________________
- */
-
-#ifndef lint
-static char *RCSid =
- "$Header: /usr/src/docbook-to-man/Instant/\
-RCS/tables.c,v 1.14 1998/06/28 19:50:54 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 <tptregexp.h>
-#include "general.h"
-#include "translate.h"
-
-/* text width of page, in inches */
-#define TEXTWIDTH 5.5
-#define MAXCOLS 100
-#define MAXWIDTH 50 /* max storage for width parameters */
-#define SPAN_NOT 0
-#define SPAN_START 1
-#define SPAN_CONT 2
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-/* table parameters */
-
-#define TBLMAXCOL 30 /* max number of columns in tbl table */
-#define NAMELEN 40 /* max length of a name */
-#define BOFTTHRESHOLD 35
- /*
- * text length over which to consider
- * generating a block of filled text
- */
-
-
-/* handy declarations */
-
-typedef enum { Left, Right, Center, Justify, Char, Span } tblalign;
-
-typedef enum { TGroup, THead, TFoot, TBody } tblsource; /* source of a spec */
-
-
-/* table line format information structures */
-
-struct tblcolspec {
-
- char name[NAMELEN]; /* colspec's name */
- short num; /* column number */
- tblsource source; /* where defined */
-
- tblalign align; /* column's alignment */
- char alignchar; /* character for alignment */
- short aligncharoff; /* offset for alignment */
- char colwidth[MAXWIDTH]; /* width for column */
- char colpwidth[MAXWIDTH];
- /* proportional widths for column */
- bool colsep; /* separator to right of column? */
- bool rowsep; /* separator to bottom of column? */
- short moreRows; /* value for Morerows */
-
- struct tblcolspec *next; /* next colspec */
-};
-
-struct tblspanspec {
-
- char name[NAMELEN]; /* spanspec's name */
- tblsource source; /* where defined */
-
- struct tblcolspec *start; /* start column */
- struct tblcolspec *end; /* end column */
- tblalign align; /* span's alignment */
- char alignchar; /* character for alignment */
- short aligncharoff; /* offset for alignment */
- bool colsep; /* separator to right of column? */
- bool rowsep; /* separator to bottom of column? */
-
- struct tblspanspec *next; /* next spanspec */
-};
-
-struct tblformat {
- short count; /* count of rows matching this spec */
-
- short cols; /* # of columns */
- short rowNum; /* row number */
- char colformat[TBLMAXCOL]; /* per-column formats */
- char colwidth[TBLMAXCOL][MAXWIDTH]; /* per-column widths */
- char colpwidth[TBLMAXCOL][MAXWIDTH];
- /* per-column proportional widths */
- char font[TBLMAXCOL][3]; /* column fonts (headers) */
- bool colsep[TBLMAXCOL]; /* column separators */
- bool rowsep[TBLMAXCOL]; /* row separators */
- short moreRows[TBLMAXCOL]; /* moreRows indicator */
-
- struct tblformat *next; /* for the next row */
-};
-
-
-/* table state info */
-
-static short tblcols = 0; /* number of columns in the table */
-static short tblrow = 0; /* the current row in the table */
-
-static bool tblTGroupSeen = FALSE; /* seen a TGroup in this table yet? */
-
-static char *tblFrame; /* table frame info */
-static bool tblgcolsep; /* global colsep (in table) */
-static bool tblgrowsep; /* global rowsep (in table) */
-
-static int tblBOFTCount = 0;
- /* count of bofts that we've created (per table) */
-int BOFTTextThresh = BOFTTHRESHOLD;
- /* length of text before we call it a BOFT */
-static bool tblboft = FALSE; /* within a block of filled text? */
-static bool tblinBOFT = FALSE; /* within a boft now? */
-
-static struct tblformat *formP = 0; /* THead/TBody format lines */
-
-static struct tblcolspec *tblColSpec = 0; /* colspec structure for table */
-static struct tblspanspec *tblSpanSpec = 0; /* spanspec structure for table */
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
-/* these cover the attributes on the Table, TGroup, Colspec elements */
-typedef struct {
- char *cols;
- char *align, **align_v;
- char *colwidth, **colwidth_v;
- char *colsep, **colsep_v;
- char *rowsep, **rowsep_v;
- char *frame;
- char *orient;
- int pgwide;
- int n_align, n_model, n_colwidth, n_colsep;
- int nc;
-} TableInfo;
-
-
-/* some flags, set when the table tag is processed, used later */
-static int rowsep, siderules;
-static int frametop, framebot, frameall;
-static char basemodel[128]; /* model for table (in formatting language) */
-static int spaninfo[MAXCOLS]; /* 100 columns, max */
-static TableInfo TheTab;
-
-/* forward references */
-void SetTabAtts(Element_t *, TableInfo *, int);
-void FreeTabAtts(TableInfo *);
-void ClearTable(TableInfo *);
-void CheckTable(Element_t *);
-void TblTStart(Element_t *, FILE *);
-void TblTEnd(Element_t *, FILE *);
-void TblTGroup(Element_t *, FILE *);
-void TblTGroupEnd(Element_t *, FILE *);
-void TblTFoot(Element_t *, FILE *);
-void TblBuildFormat(Element_t *, struct tblformat **, tblsource);
-struct tblformat *TblBuild1Format(Element_t *, bool, tblsource);
-char TblGetAlign(short, Element_t *, tblsource);
-char *TblGetWidth(short, Element_t *, bool, tblsource);
-char *TblGetFont(short, Element_t *, tblsource);
-bool TblGetColSep(short, Element_t *, tblsource);
-bool TblGetRowSep(short, Element_t *, tblsource);
-short TblGetMoreRows(short, Element_t *, tblsource);
-bool TblColAdv(short, Element_t *, struct tblformat *, tblsource);
-struct tblcolspec *TblEntryColSpec(short, Element_t *, tblsource);
-struct tblspanspec *TblEntrySpanSpec(short, Element_t *, tblsource);
-bool TblFormatMatch(struct tblformat *, struct tblformat *);
-void TblPrintFormat(FILE *, struct tblformat *);
-void TblTRowStart(Element_t *, FILE *);
-void TblTRowEnd(Element_t *, FILE *);
-void TblTCellStart(Element_t *, FILE *);
-int TblCountContent(Element_t *);
-void TblTCellEnd(Element_t *, FILE *);
-struct tblcolspec *TblDoColSpec(short, Element_t *,
- struct tblcolspec *, tblsource);
-struct tblspanspec *TblDoSpanSpec(Element_t *,
- struct tblspanspec *, tblsource);
-struct tblcolspec *TblFindColSpec(char *, tblsource);
-struct tblcolspec *TblFindColNum(short, tblsource);
-struct tblspanspec *TblFindSpanSpec(char *, tblsource);
-void TexTable(Element_t *, FILE *);
-void TexTableCellStart(Element_t *, FILE *);
-void TexTableCellEnd(Element_t *, FILE *);
-void TexTableRowStart(Element_t *, FILE *);
-void TexTableRowEnd(Element_t *, FILE *);
-void TexTableTop(Element_t *, FILE *);
-void TexTableBottom(Element_t *, FILE *);
-
-/* ______________________________________________________________________ */
-/*
- * Hard-coded stuff for CALS-style DTD tables.
- * Here are the TABLE attributes (for handy reference):
- *
- * Table/InformalTable:
- * Colsep NUMBER separate all columns in table?
- * Frame (Top|Bottom|Topbot|All|Sides|None) frame style
- * Orient (Port | Land) orientation
- * Pgwide NUMBER wide table?
- * Rowsep NUMBER separate all rows in the table?
- * Tabstyle NMTOKEN FOSI table style
- *
- * TGroup:
- * Align (Left|Right|Center|Justify|Char) alignment of cols
- * Char CDATA Alignment specifier
- * Charoff NUTOKEN "" ""
- * Cols NUMBER number of columns
- * Colsep NUMBER separate all columns in tgroup?
- * Rowsep NUMBER separate all rows in tgroup?
- * TGroupstyle NMTOKEN FOSI table group style
- *
- * Colspec:
- * Align (Left|Right|Center|Justify|Char) entry align
- * Char CDATA Alignment specifier
- * Charoff NUTOKEN "" ""
- * Colname NMTOKEN Column identifier
- * Colnum NUMBER number of column
- * Colsep NUMBER separate this col from next?
- * Colwidth CDATA width spec
- * Rowsep NUMBER serarate entry from following row?
- *
- * SpanSpec:
- * Align (Left|Right|Center|Justify|Char) entry align
- * Char CDATA Alignment specifier
- * Charoff NUTOKEN "" ""
- * Colsep NUMBER separate this col from next?
- * Nameend NMTOKEN name of rightmost col of a span
- * Namest NMTOKEN name of leftmost col of a span
- * Rowsep NUMBER serarate entry from following row?
- * Spanname NMTOKEN name of a horiz. span
- *
- * THead/TFoot/TBody:
- * VAlign (Top | Middle | Bottom) group placement
- *
- * Row:
- * Rowsep NUMBER separate this row from next?
- * VAlign (Top | Middle | Bottom) row placement
- *
- * Entry:
- * Align (Left|Right|Center|Justify|Char) entry align
- * Char CDATA Alignment specifier
- * Charoff NUTOKEN "" ""
- * Colname NMTOKEN Column identifier
- * Colsep NUMBER separate this col from next?
- * Morerows NUMBER number of addn'l rows in vert straddle
- * Nameend NMTOKEN name of rightmost col of a span
- * Namest NMTOKEN name of leftmost col of a span
- * Rotate NUMBER 90 degree rotation counterclockwise to table?
- * Rowsep NUMBER serarate entry from following row?
- * Spanname NMTOKEN name of a horiz. span
- * VAlign (Top | Middle | Bottom) text vert alignment
- *
- *
- * OBSOLETE OSF DTD FORM (still used for TeX form):
- * Usage in transpec: _calstable [tex|check|clear] ['aspect']
- * where 'aspect' is:
- * rowstart stuff to do at start of a row (tests for spanning)
- * rowend stuff to do at end of a row (eg, rules, etc.)
- * cellstart stuff to do at start of a cell (eg, handle actual
- * spanning instructions, etc.)
- * cellend stuff to do at end of a cell (eg, cell separator)
- * top stuff to do at top of the table
- * (like whether or not it needs a starting horiz rule)
- * bottom stuff to do at bottom of the table
- * (like whether or not it needs an ending horiz rule)
- * (nothing) the 'cols' param to LaTeX's \begin{tabular}[pos]{cols}
- * or 'options' and 'formats' part in tbl
- *
- *
- * New tbl form:
- * Usage in transpec: _calstable [tbl] ['aspect']
- * where 'aspect' is:
- * tablestart start a table and do style info
- * tableend end the table and clean up
- * tablegroup table TGroup (.T& if not 1st, line format info)
- * tablegroupend end a TGroup
- * tablefoot TFoot within a TGroup
- * rowstart start of a row
- * rowend end of a row
- * entrystart start of an entry (block of filled text, if
- * appropriate)
- * entryend end of a cell (eg, cell separator)
- */
-
-/*
- * Procedure to
- * Arguments:
- * Pointer to element under consideration.
- * FILE pointer to where to write output.
- * Vector of args to _osftable
- * Count of args to _osftable
- */
-void
-CALStable(
- Element_t *e,
- FILE *fp,
- char **av,
- int ac
-)
-{
- /* Check params and dispatch to appropriate routine */
-
- if (strcmp(av[1], "tbl") == 0) {
-
- if (ac > 2) {
- if (strcmp(av[2], "tablestart") == 0)
- TblTStart(e, fp);
- else if (strcmp(av[2], "tableend") == 0)
- TblTEnd(e, fp);
- else if (strcmp(av[2], "tablegroup") == 0)
- TblTGroup(e, fp);
- else if (strcmp(av[2], "tablegroupend") == 0)
- TblTGroupEnd(e, fp);
- else if (strcmp(av[2], "tablefoot") == 0)
- TblTFoot(e, fp);
- else if (strcmp(av[2], "rowstart") == 0)
- TblTRowStart(e, fp);
- else if (strcmp(av[2], "rowend") == 0)
- TblTRowEnd(e, fp);
- else if (strcmp(av[2], "entrystart") == 0)
- TblTCellStart(e, fp);
- else if (strcmp(av[2], "entryend") == 0)
- TblTCellEnd(e, fp);
- else fprintf(stderr, "Unknown %s table "
- "instruction: %s\n", av[1], av[2]);
- } else {
- fprintf(stderr, "Incomplete %s table instruction\n");
- }
- }
-
- else if (strcmp(av[1], "tex") == 0) {
- if (ac > 1 && (strcmp(av[1], "check") == 0))
- CheckTable(e);
-
- else
- if (ac > 1 && (strcmp(av[1], "clear") == 0))
- ClearTable(&TheTab);
-
- if (ac > 2) {
- if (strcmp(av[2], "cellstart") == 0) TexTableCellStart(e, fp);
- else if (strcmp(av[2], "cellend") == 0) TexTableCellEnd(e, fp);
- else if (strcmp(av[2], "rowstart") == 0) TexTableRowStart(e, fp);
- else if (strcmp(av[2], "rowend") == 0) TexTableRowEnd(e, fp);
- else if (strcmp(av[2], "top") == 0) TexTableTop(e, fp);
- else if (strcmp(av[2], "bottom") == 0) TexTableBottom(e, fp);
- else fprintf(stderr, "Unknown %s table instruction: %s\n",
- av[1], av[2]);
- } else
- TexTable(e, fp);
- }
-
- else fprintf(stderr, "Unknown table type: %s\n", av[1]);
-
-}
-
-/* ClearTable -- start a new table process */
-
-
-void
-ClearTable(TableInfo *t)
-{
- memset(t, 0, sizeof (TableInfo));
-}
-
-
-/* ______________________________________________________________________ */
-/*
- * Set values of the our internal table structure based on the table's
- * attributes. (This is called for tables, tgroups, colspecs, and rows,
- * since tables and rows share many of the same attributes.)
- * Arguments:
- * Pointer to element under consideration.
- * Pointer table info structure which will be filled in.
- * Flag saying whether or not to set global variables based on attrs.
- */
-void
-SetTabAtts(
- Element_t *e,
- TableInfo *t,
- int set_globals
-)
-{
- char *at;
- Element_t *ep;
-
- /* remember values of attributes */
- if ((at = FindAttValByName(e, "ALIGN"))) t->align = at;
- if ((at = FindAttValByName(e, "COLWIDTH"))) t->colwidth = at;
- if ((at = FindAttValByName(e, "COLSEP"))) t->colsep = at;
- if ((at = FindAttValByName(e, "FRAME"))) t->frame = at;
- if ((at = FindAttValByName(e, "COLS"))) t->cols = at;
-
- /* Set some things for later when processing this table */
- if (set_globals) {
-
- rowsep = 1;
- frametop = framebot = 1; /* default style */
-
- /*
- * For now we look at the first number of rowsep - it controls the
- * horiz rule for then entire row. (not easy to specify lines that
- * span only some columns in tex or tbl.
- */
- if ((at = FindAttValByName(e, "ROWSEP"))) rowsep = atoi(at);
- }
-
- if (t->frame) {
- /* Top|Bottom|Topbot|All|Sides|None */
- if ((strcmp(t->frame, "NONE") == 0) ||
- (strcmp(t->frame, "SIDES") == 0))
- frametop = framebot = 0;
- else
- if (strcmp(t->frame, "TOP") == 0)
- framebot = 0;
- else
- if (strcmp(t->frame, "BOTTOM") == 0)
- frametop = 0;
- }
-
- /* tbl and tex like lower case for units. convert. */
- if (t->colwidth) {
- char *cp;
- for (cp = t->colwidth; *cp; cp++)
- if (isupper(*cp)) *cp = tolower(*cp);
- }
-
- /*
- * Now, split (space-separated) strings into vectors. Hopefully, the
- * number of elements in each vector matches the number of columns.
- */
- t->align_v = Split(t->align, &t->n_align, S_STRDUP|S_ALVEC);
- t->colwidth_v = Split(t->colwidth, &t->n_colwidth, S_STRDUP|S_ALVEC);
- t->colsep_v = Split(t->colsep, &t->n_colsep, S_STRDUP|S_ALVEC);
-
- /*
- * Determine the _numeric_ number of columns, "nc". MUST be specified
- * in Cols attribute of TGroup element.
- */
- if (t->cols) t->nc = atoi(t->cols);
-}
-
-/* ______________________________________________________________________ */
-
-/*
- * Free the storage of info use by the table info structure. (not the
- * structure itself, but the strings its elements point to)
- * Arguments:
- * Pointer table info structure to be freed.
- */
-void
-FreeTabAtts(
- TableInfo *t
-)
-{
- if (!t)
- return;
- if (t->align_v) free(*t->align_v);
- if (t->colwidth_v) free(*t->colwidth_v);
- if (t->colsep_v) free(*t->colsep_v);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Check the attributes and children of the table pointed to by e.
- * Report problems and inconsistencies to stderr.
- * Arguments:
- * Pointer to element (table) under consideration.
- */
-
-void
-CheckTable(
- Element_t *e
-)
-{
- int pr_loc = 0; /* flag to say if we printed location */
- int i, r, c;
- Element_t *ep, *ep2;
- float wt;
- char *tpref = "Table Check"; /* prefix for err messages */
- char *ncolchk =
- "Table Check: %s ('%s') has wrong number of tokens. Expecting %d.\n";
-
- if (strcmp(e->gi, "TABLE") &&
- strcmp(e->gi, "INFORMALTABLE") &&
- strcmp(e->gi, "TGROUP") &&
- strcmp(e->gi, "COLSPEC") &&
- strcmp(e->gi, "ROW")) {
- fprintf(stderr, "%s: Not pointing to a table element(%s)!\n",
- tpref, e->gi);
- return;
- }
-
- FreeTabAtts(&TheTab); /* free storage, if allocated earlier */
- SetTabAtts(e, &TheTab, 1); /* look at attributes */
-
-#if FALSE
- /* NCOLS attribute set? */
- if (!TheTab.ncols) {
- pr_loc++;
- fprintf(stderr, "%s: NCOLS attribute missing. "
- "Inferred as %d.\n", tpref, TheTab.nc);
- }
-
- /* ALIGN attribute set? */
- if (!TheTab.align) {
- pr_loc++;
- fprintf(stderr, "%s: ALIGN attribute "
- "missing.\n", tpref);
- }
-
- /* See if the number of cells in each row matches */
- for (r = 0; r < e->necont &&
- (ep = e->econt[r]); r++) {
- /* each TGroup */
- for (i = 0; i < ep->necont &&
- (ep2 = ep->econt[i]); i++) {
- if (strcmp(ep2->gi, "TBODY")) {
- /* only TBodys */
- continue;
- }
-
- for (c = 0; c < ep2->necont; c++) {
- if (ep2->econt[c]->necont != TheTab.nc) {
- pr_loc++;
- fprintf(stderr, "%s: COLS (%d)"
- "differs from actual number of "
- "cells (%d) in row %d.\n",
- tpref, TheTab.nc,
- ep2->econt[c]->necont, c);
- }
- }
- }
- }
-#endif
-
- /* Check ALIGN */
- if (TheTab.align) {
- if (TheTab.nc != TheTab.n_align) {
- /* number of tokens OK? */
- pr_loc++;
- fprintf(stderr, ncolchk, "ALIGN",
- TheTab.align, TheTab.nc);
- } else {
- /* values OK? */
- for (i = 0; i < TheTab.nc; i++) {
- if (*TheTab.align_v[i] != 'C' &&
- *TheTab.align_v[i] != 'L' &&
- *TheTab.align_v[i] != 'R') {
- pr_loc++;
- fprintf(stderr, "%s: ALIGN (%d) "
- "value wrong: %s\n",
- tpref, i, TheTab.align_v[i]);
- }
- }
- }
- }
-
- /* check COLWIDTH */
- if (TheTab.colwidth) {
- if (TheTab.nc != TheTab.n_colwidth) {
- /* number of tokens OK? */
- pr_loc++;
- fprintf(stderr, ncolchk, "COLWIDTH",
- TheTab.colwidth, TheTab.nc);
- } else { /* values OK? */
- for (i = 0; i < TheTab.nc; i++) {
- /*
- * check that the units after the numbers are OK
- * we want "in", "cm".
- */
- }
- }
- }
-
- /* check COLSEP */
- if (TheTab.colsep) {
- if (TheTab.nc != TheTab.n_colsep) {
- /* number of tokens OK? */
- pr_loc++;
- fprintf(stderr, ncolchk, "COLSEP",
- TheTab.colsep, TheTab.nc);
- } else {
- /* values OK? */
- for (i = 0; i < TheTab.nc; i++) {
- }
- }
- }
-
- if (pr_loc) {
- fprintf(stderr, "%s: ", tpref);
- fprintf(stderr, "Above problem in table located at:\n");
- PrintLocation(e, stderr);
- }
-}
-
-/* ______________________________________________________________________ */
-
-/*
- * Look at colspec attribute for spanning. If set, remember info for when
- * doing the cells. Called by TblTableRowStart() and TexTableRowStart().
- * Arguments:
- * Pointer to element (row) under consideration.
- */
-int
-check_for_spans(
- Element_t *e
-)
-{
- char *at;
- char **spans;
- int n, i, inspan;
-
-#if FALSE /* NOT IMPLEMENTED RIGHT NOW */
-
- /* See if COLSPEC element present */
- for (i = 0; i < e->necont; i++) {
-
- }
-
-
- if ((at = FindAttValByName(e, "MODEL"))) {
-
- /* Split into tokens, then look at each for the word "span" */
- n = TheTab.nc;
- spans = Split(at, &n, S_STRDUP|S_ALVEC);
-
- /*
- * Mark columns as start-of-span, in-span, or not spanned. Remember
- * in at list, "spaningo". (Span does not make sense in 1st column.)
- */
- for (i = 1, inspan = 0; i < n; i++) {
- if (StrEq(spans[i], "span") || StrEq(spans[i], "s")) {
- if (inspan == 0) spaninfo[i-1] = SPAN_START;
- spaninfo[i] = SPAN_CONT;
- inspan = 1;
- } else {
- spaninfo[i] = SPAN_NOT;
- inspan = 0;
- }
- }
- free(*spans); /* free string */
- free(spans); /* free vector */
- spaninfo[TheTab.nc] = SPAN_NOT; /* after last cell */
- return (1);
- }
- /* if model not set, mark all as not spanning */
- else
-
-#endif /* NOT CURRENTLY IMPLEMENTED */
-
- for (i = 0; i < MAXCOLS; i++) spaninfo[i] = SPAN_NOT;
- return (0);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Do the "right thing" for the table spec for TeX tables. This will
- * generate the arg to \begin{tabular}[xxx].
- * Arguments:
- * Pointer to element (table) under consideration.
- * FILE pointer to where to write output.
- */
-void
-TexTable(
- Element_t *e,
- FILE *fp
-)
-{
- int i, n;
- float tot;
- char *cp, wbuf[1500], **widths = 0, **widths_v = 0;
-
- FreeTabAtts(&TheTab); /* free storage, if allocated earlier */
- SetTabAtts(e, &TheTab, 1); /* look at attributes */
- SetTabAtts(e->econt[0], &TheTab, 1); /* attrs of TGroup */
-
- /* Figure out the widths, based either on "colwidth". */
- if (TheTab.colwidth && TheTab.nc == TheTab.n_colwidth) {
- widths = TheTab.colwidth_v;
- }
-
- siderules = 1;
- if (TheTab.frame)
- if (strcmp(TheTab.frame, "ALL") &&
- strcmp(TheTab.frame, "SIDES"))
- siderules = 0;
-
- if (siderules) OutputString("|", fp, 1);
- for (i = 0; i < TheTab.nc; i++) {
- /* If width specified, use it; */
- /* else if align set, use it; else left. */
- if (widths && widths[i][0] != '0' && widths[i][1] != EOS) {
- fprintf(fp, "%sp{%s}", (i?" ":""), widths[i]);
- }
- else
- if (TheTab.align && TheTab.nc == TheTab.n_align) {
- fprintf(fp, "%s%s", (i?" ":""),
- TheTab.align_v[i]);
- }
- else
- fprintf(fp, "%sl", (i?" ":""));
- /* See if we want column separators. */
- if (TheTab.colsep) {
-
- if ((i+1) < TheTab.nc) {
- if (*TheTab.colsep_v[i] == '1') {
- fprintf(fp, " |");
- }
- if (*TheTab.colsep_v[i] == '2') {
- fprintf(fp, " ||");
- }
- }
-
- }
- }
- if (siderules) OutputString("|", fp, 1);
-
- if (widths_v) free(widths_v);
-}
-
-/*
- * Arguments:
- * Pointer to element (cell) under consideration.
- * FILE pointer to where to write output.
- */
-void
-TexTableCellStart(
- Element_t *e,
- FILE *fp
-)
-{
- int n, i;
- char buf[50], *at;
-
- if (spaninfo[e->my_eorder] == SPAN_START) {
- for (i = e->my_eorder+1, n = 1; ; i++) {
- if (spaninfo[i] == SPAN_CONT) n++;
- else break;
- }
- sprintf(buf, "\\\\multicolumn{%d}{%sc%s}", n,
- (siderules?"|":""), (siderules?"|":""));
- OutputString(buf, fp, 1);
- }
-#ifdef New
- if ((at = FindAttValByName(e->parent, "ALIGN"))) {
- /* no span, but user wants to change the alignment */
- h_v = Split(wbuf, 0, S_ALVEC|S_STRDUP);
- OutputString("\\\\multicolumn{1}{%sc%s}", n,
- fp, 1);
- }
-#endif
-
- if (spaninfo[e->my_eorder] != SPAN_CONT) OutputString("{", fp, 1);
-}
-
-/*
- * Arguments:
- * Pointer to element (cell) under consideration.
- * FILE pointer to where to write output.
- */
-void
-TexTableCellEnd(
- Element_t *e,
- FILE *fp
-)
-{
- if (spaninfo[e->my_eorder] != SPAN_CONT) OutputString("} ", fp, 1);
-
- /* do cell/col separators */
- if (e->my_eorder < (TheTab.nc-1)) {
- if (spaninfo[e->my_eorder] == SPAN_NOT ||
- spaninfo[e->my_eorder+1] != SPAN_CONT)
- OutputString("& ", fp, 1);
- }
-}
-
-/*
- * Look at model for spanning. If set, remember it for when doing the cells.
- * Arguments:
- * Pointer to element (row) under consideration.
- * FILE pointer to where to write output.
- */
-void
-TexTableRowStart(
- Element_t *e,
- FILE *fp
-)
-{
- check_for_spans(e);
-}
-
-/*
- * Arguments:
- * Pointer to element (row) under consideration.
- * FILE pointer to where to write output.
- */
-void
-TexTableRowEnd(
- Element_t *e,
- FILE *fp
-)
-{
- char *at;
-
- /* check this row's attributes */
- if ((at = FindAttValByName(e, "ROWSEP"))) {
- if (at[0] == '1')
- OutputString("\\\\\\\\[2mm] \\\\hline ", fp, 1);
- }
- else
- if (rowsep) OutputString("\\\\\\\\ ", fp, 1);
- else OutputString("\\\\\\\\ ", fp, 1);
-
-}
-
-/*
- * Arguments:
- * Pointer to element (table) under consideration.
- * FILE pointer to where to write output.
- */
-void
-TexTableTop(Element_t *e, FILE *fp)
-{
- if (frametop) OutputString("\\\\hline", fp, 1);
-}
-
-void
-TexTableBottom(Element_t *e, FILE *fp)
-{
- if (framebot) OutputString("\\\\hline", fp, 1);
-}
-
-/* ______________________________________________ */
-/* ______________________________________________ */
-/* ______________________________________________ */
-/* ______________________________________________ */
-/* ______________________________________________ */
-/* ___| |____________________________ */
-/* ___| TBL STUFF |____________________________ */
-/* ___| |____________________________ */
-/* ___|_____________|____________________________ */
-/* ______________________________________________ */
-/* ______________________________________________ */
-/* ______________________________________________________________________ */
-/* ______________________________________________________________________ */
-
-
-
-/*
- * TblTStart() -- start a table and do style information
- *
- * TO DO:
- *
- * do .TS
- * find global rowsep and colsep
- */
-
-
-void
-TblTStart(Element_t *ep,
- FILE *fP)
-{
- register char *cp;
- register struct Element_t *ep2;
-
-
-
- OutputString(".TS", fP, 1);
-
- tblTGroupSeen = FALSE;
- tblinBOFT = FALSE; /* within a boft? */
- /* count of Blocks of Filled Text that we've created */
- tblBOFTCount = 0;
-
- tblgcolsep = (cp = FindAttValByName(ep, "COLSEP")) &&
- (strcmp(cp, "1") == 0);
- tblgrowsep = (cp = FindAttValByName(ep, "ROWSEP")) &&
- (strcmp(cp, "1") == 0);
-}
-
-/*
- * TblTEnd() -- end a table and do any cleanup
- *
- * TO DO:
- *
- * do .TE
- *
- * deallocate format line info
- */
-
-
-
-void
-TblTEnd(Element_t *ep,
- FILE *fP)
-{
- register struct tblformat *ffp, *ffp2;
-
-/*
- * defed out since this message does not apply to SunOS and errors are
- * passed on to tbl
- */
-#ifdef notdef
- if (tblBOFTCount > 31) {
- fprintf(stderr, "# warning, line %d: ", ep->lineno);
- fprintf(stderr, "created %d blocks of filled ", tblBOFTCount);
- fprintf(stderr, "text in one table\n");
- fprintf(stderr, "#\t\t(31 is the limit in some systems)\n");
- }
-#endif
-
- OutputString(".TE", fP, 1);
-
- for (ffp = formP; ffp; ffp = ffp2) {
- ffp2 = ffp->next;
- free(ffp); /* clear entire list */
- }
- formP = 0;
-}
-
-/*
- * TblTTGroup() -- do body work (row format info)
- *
- * TO DO:
- *
- * set number of columns
- *
- * if this is the first TGroup of this table, do style info:
- * a. alignment
- * b. defaults: tab
- * c. box vx allbox
- *
- * do format info:
- * a. generate tableformat structure
- * b. output it
- *
- * prepare structures for colspecs and spanspecs
- *
- */
-
-
-
-void
-TblTGroup(Element_t *ep,
- FILE *fP)
-{
- register int i, j, k;
- register char *cp, *cp2;
- register Element_t *ep2, ep3;
- register struct tblcolspec *tcsp, *tcsp2;
- register struct tblspanspec *tssp, *tssp2;
-
-
- tblColSpec = 0; /* make sure they're clear */
- tblSpanSpec = 0;
-
- /* set the number of columns */
-
- tblcols = atoi(FindAttValByName(ep, "COLS"));
-
- /* do colspecs */
-
- tblColSpec = tcsp = TblDoColSpec(0, ep, 0, TGroup);
- /* do TGroup first -- it becomes the default */
-
- for (i = 0, k = 1; i < ep->necont; i++) {
-
- if (strcmp(ep->econt[i]->gi, "COLSPEC") == 0) {
- tcsp2 = TblDoColSpec(k, ep->econt[i],
- tblColSpec, TGroup);
- tcsp->next = tcsp2; /* put into list */
- tcsp = tcsp2;
- k = tcsp2->num + 1; /* next column number */
- }
-
- if (strcmp(ep->econt[i]->gi, "THEAD") == 0) {
- ep2 = ep->econt[i];
- for (j = 0, k = 1; j < ep2->necont; j++) {
- if (strcmp(ep2->econt[j]->gi,
- "COLSPEC") == 0) {
- tcsp2 = TblDoColSpec(k, ep2->econt[j],
- tblColSpec, THead);
- /* put into list */
- tcsp->next = tcsp2;
- tcsp = tcsp2;
- /* next column number */
- k = tcsp2->num + 1;
- }
- }
- }
-
- if (strcmp(ep->econt[i]->gi, "TFOOT") == 0) {
- ep2 = ep->econt[i];
- for (j = 0, k = 1; j < ep2->necont; j++) {
- if (strcmp(ep2->econt[j]->gi,
- "COLSPEC") == 0) {
- tcsp2 = TblDoColSpec(k, ep2->econt[j],
- tblColSpec, TFoot);
- /* put into list */
- tcsp->next = tcsp2;
- tcsp = tcsp2;
- /* next column number */
- k = tcsp2->num + 1;
- }
- }
- }
-
- if (strcmp(ep->econt[i]->gi, "TBODY") == 0) {
- ep2 = ep->econt[i];
- for (j = 0, k = 1; j < ep2->necont; j++) {
- if (strcmp(ep2->econt[j]->gi,
- "COLSPEC") == 0) {
- tcsp2 = TblDoColSpec(k, ep2->econt[j],
- tblColSpec, TBody);
- /* put into list */
- tcsp->next = tcsp2;
- tcsp = tcsp2;
- /* next column number */
- k = tcsp2->num + 1;
- }
- }
- }
- }
-
- /* do spanspecs */
-
- tblSpanSpec = tssp = TblDoSpanSpec(ep, 0, TGroup);
- /* do TGroup first -- it becomes the default */
-
- for (i = 0; i < ep->necont; i++) {
- if (strcmp(ep->econt[i]->gi, "SPANSPEC") == 0) {
- tssp2 = TblDoSpanSpec(ep->econt[i],
- tblSpanSpec, TGroup);
- tssp->next = tssp2; /* put into list */
- tssp = tssp2;
- }
- }
-
-
- /* if this is the first TGroup in this table, do style stuff */
-
- if (! tblTGroupSeen) {
-
- OutputString("tab(\007)", fP, 1);
-
- ep2 = ep->parent;
- if (! (tblFrame = FindAttValByName(ep2, "FRAME")))
- tblFrame = "";
-
- if (strcmp(tblFrame, "ALL") == 0) {
- if (tcsp->colsep && tcsp->rowsep)
- OutputString(" allbox", fP, 1);
- else
- OutputString(" box", fP, 1);
- }
-
- if ((cp = FindAttValByName(ep, "ALIGN")) &&
- (strcmp(cp, "CENTER") == 0)) {
- OutputString(" center", fP, 1);
- }
-
- OutputString(";\n", fP, 1);
-
- tblTGroupSeen = TRUE;
- }
-
-
- /*
- * do format stuff -- step through all THead rows then all TBody
- * rows. Build a list of tblformats that describe all of them.
- * then output the resulting list.
- */
-
- for (i = 0; i < ep->necont; i++) {
- if (strcmp(ep->econt[i]->gi, "THEAD") == 0) {
- TblBuildFormat(ep->econt[i], &formP, THead);
- /* add in those rows */
- break;
- }
- }
-
- for (i = 0; i < ep->necont; i++) {
- if (strcmp(ep->econt[i]->gi, "TBODY") == 0) {
- TblBuildFormat(ep->econt[i], &formP, TBody);
- /* add in those rows */
- break;
- }
- }
-
- TblPrintFormat(fP, formP);
-
- tblrow = 0; /* the current row within this format */
-}
-
-/*
- * TblTGroupEnd() -- end a TGroup
- *
- * TO DO:
- *
- * deallocate colspecs and spanspecs
- */
-
-
-void
-TblTGroupEnd(Element_t *ep,
- FILE *fP)
-{
- register struct tblcolspec *tcsp, *tcsp2;
- register struct tblspanspec *tssp, *tssp2;
-
-
- for (tcsp = tblColSpec; tcsp; tcsp = tcsp2) {
- tcsp2 = tcsp->next;
- free(tcsp);
- }
- for (tssp = tblSpanSpec; tssp; tssp = tssp2) {
- tssp2 = tssp->next;
- free(tssp);
- }
-}
-
-/*
- * TblTTFoot() -- do body foot work (row format info)
- *
- * TO DO:
- *
- * do format info:
- * a. generate tableformat structure
- * i. if it is only 1 line long and matches the
- * prevailing format, just output rows.
- * ii. else, output a .T& and the new format specs
- */
-
-
-
-void
-TblTFoot(Element_t *ep,
- FILE *fP)
-{
- register struct tblformat *ffp, *ffp2;
- static struct tblformat *tfp, *tfp2;
-
-
- TblBuildFormat(ep, &tfp, TFoot); /* gen format for the foot */
-
- for (tfp2 = formP; tfp2 && tfp2->next; tfp2 = tfp2->next);
-
- if (tfp->next || !TblFormatMatch(tfp, tfp2)) {
-
- for (ffp = formP; ffp; ffp = ffp2) {
- ffp2 = ffp->next;
- free(ffp); /* clear entire list */
- }
-
- formP = tfp; /* this becomes the prevailing format */
-
- OutputString(".T&", fP, 1);
- TblPrintFormat(fP, formP);
- }
-
- tblrow = 0; /* the current row within this format */
-}
-
-/*
- * TblBuildFormat() -- build a format structure out of a set of
- * rows and columns
- *
- */
-
-
-void
-TblBuildFormat(Element_t *ep, /* parent of rows.. */
- struct tblformat **fp, /* pointer to head of struct we're building */
- tblsource source) /* type of record */
-{
- register int i;
- register struct tblformat *lfp; /* "current" format */
- register struct tblformat *nfp; /* the next format */
-
-
- for (lfp = *fp; lfp && lfp->next; lfp = lfp->next) {
- /* find end of format list */
- }
-
- for (i = 0; i < ep->necont; i++)
- if (strcmp(ep->econt[i]->gi, "ROW") == 0)
- break; /* find where rows start */
-
- for (; i < ep->necont; i++) {
-
- nfp = TblBuild1Format(ep->econt[i], FALSE, source);
- /* do one row */
-
- if (!lfp)
- lfp = *fp = nfp; /* first one */
- else
- if (TblFormatMatch(lfp, nfp))
- lfp->count++; /* matches */
- else {
- lfp->count = 1; /* only 1 so far */
- lfp->next = nfp; /* new one */
- lfp = nfp;
- }
- }
-}
-
-/*
- * TblBuild1Format() -- build one row's worth of format information
- *
- */
-
-
-
-struct tblformat *
-TblBuild1Format(Element_t *rp, /* the row to deal with */
- bool addinRowsep, /* insert rowsep into model? */
- tblsource source) /* type type of row */
-{
- register int i;
- register bool allProp;
- float totalProp;
- register struct tblformat *tfp;
- register Element_t *ep; /* entry pointer */
-
-
- Calloc(1, tfp, struct tblformat);
- tfp->cols = tblcols;
- ep = (rp->necont) ? rp->econt[0] : 0; /* first entry */
- allProp = TRUE;
- totalProp = 0;
-
- for (i = 1; i <= tblcols; i++) {
- tfp->colformat[i] = TblGetAlign(i, ep, source);
- strcpy(tfp->colwidth[i], TblGetWidth(i, ep, TRUE, source));
- strcpy(tfp->colpwidth[i], TblGetWidth(i, ep, FALSE, source));
- if (allProp) {
- allProp = tfp->colpwidth[i][0];
- totalProp += atof(tfp->colpwidth[i]);
- }
- strcpy(tfp->font[i], TblGetFont(i, ep, source));
- tfp->colsep[i] = tblgcolsep || TblGetColSep(i, ep, source);
- if (addinRowsep)
- tfp->rowsep[i] = tblgrowsep ||
- TblGetRowSep(i, ep, source);
- tfp->moreRows[i] = TblGetMoreRows(i, ep, source);
-
- if ((i < rp->necont) && TblColAdv(i, ep, tfp, source)) {
- ep = rp->econt[i];
- }
- }
-
- /* turn proportional widths into real widths */
-
- if (allProp) {
- for (i = 1; i <= tblcols; i++) {
- sprintf(tfp->colwidth[i], "%fi",
- (atof(tfp->colpwidth[i]) / totalProp) *
- TEXTWIDTH);
- }
- }
-
- return (tfp);
-}
-
-/*
- * TblGetAlign() -- get alignment spec for a entry
- *
- */
-
-
-char
-TblGetAlign(short col, /* column number */
- Element_t *entry, /* the entry */
- tblsource source) /* context */
-{
- register struct tblcolspec *tcsp;
- register struct tblspanspec *tssp;
- register tblalign talign;
- char retVal;
-
-
- if (entry && (tssp = TblEntrySpanSpec(col, entry, source))) {
- talign = tssp->align;
- free(tssp);
- } else
- if (entry && (tcsp = TblEntryColSpec(col, entry, source))) {
- talign = tcsp->align;
- free(tcsp);
- } else {
- return ('l');
- }
-
- switch (talign) {
- case Left: retVal = 'l'; break;
- case Right: retVal = 'r'; break;
- case Center: retVal = 'c'; break;
- case Justify: retVal = 'l'; break;
- case Char: retVal = 'd'; break;
- case Span: retVal = 's'; break;
- default: retVal = 'l';
- }
- return (retVal);
-}
-
-/*
- * TblGetWidth() -- get width spec, if any, for a entry
- *
- */
-
-
-char *
-TblGetWidth(short col, /* column number */
- Element_t *entry, /* the entry */
- bool literal, /* literal (or proportional) */
- tblsource source) /* context */
-{
- register struct tblcolspec *tcsp;
- register struct tblspanspec *tssp;
- static char colWidth[MAXWIDTH];
-
-
- colWidth[0] = 0;
-
- if (entry &&
- (tcsp = TblEntryColSpec(col, entry, source)) &&
- tcsp->colwidth[0]) {
-
- if (!strstr(tcsp->colwidth, "*")) {
- if (literal)
- strcpy(colWidth, tcsp->colwidth);
- } else {
- if (! literal)
- strcpy(colWidth, tcsp->colwidth);
- }
- free(tcsp);
- }
-
- return (colWidth);
-}
-
-/*
- * TblGetFont() -- get font spec, if any, for a entry
- *
- */
-
-
-char *
-TblGetFont(short col, /* column number */
- Element_t *entry, /* the entry */
- tblsource source) /* context */
-{
- register struct tblcolspec *tcsp;
- register struct tblspanspec *tssp;
-
-
- return ("");
-}
-
-/*
- * TblGetColSep() -- get column separater spec, if any, for a entry
- *
- */
-
-
-bool
-TblGetColSep(short col, /* column number */
- Element_t *entry, /* the entry */
- tblsource source) /* context */
-{
- register struct tblcolspec *tcsp;
- register struct tblspanspec *tssp;
- register bool colsep;
-
-
- if (entry && (tssp = TblEntrySpanSpec(col, entry, source))) {
- colsep = tssp->colsep;
- free(tssp);
- } else
- if (entry && (tcsp = TblEntryColSpec(col, entry, source))) {
- colsep = tcsp->colsep;
- free(tcsp);
- } else
- colsep = FALSE;
-
- return (colsep);
-}
-
-/*
- * TblGetRowSep() -- get row separater spec, if any, for a entry
- *
- */
-
-
-bool
-TblGetRowSep(short col, /* column number */
- Element_t *entry, /* the entry */
- tblsource source) /* context */
-{
- register struct tblcolspec *tcsp;
- register struct tblspanspec *tssp;
- register bool rowsep;
-
- if (entry && (tssp = TblEntrySpanSpec(col, entry, source))) {
- rowsep = tssp->rowsep;
- free(tssp);
- } else
- if (entry && (tcsp = TblEntryColSpec(col, entry, source))) {
- rowsep = tcsp->rowsep;
- free(tcsp);
- } else {
- rowsep = FALSE;
- }
-
- return (rowsep);
-}
-
-/*
- * TblGetmoreRows() -- get moreRows value
- *
- */
-
-
-bool
-TblGetMoreRows(short col, /* column number */
- Element_t *entry, /* the entry */
- tblsource source) /* context */
-{
- register char *cp;
-
-
- if (cp = FindAttValByName(entry, "MOREROWS"))
- return (atoi(cp));
- else
- return (0);
-}
-
-/*
- * TblColAdv() -- advance pointer to next entry, if appropriate
- *
- */
-
-
-bool
-TblColAdv(short col, /* the current column */
- Element_t *ep, /* pointer to entry */
- struct tblformat *tfp, /* pointer to prevailing format */
- tblsource source) /* context */
-{
- register bool bump;
- register struct tblspanspec *tssp;
-
-
- bump = TRUE;
-
- if (tssp = TblEntrySpanSpec(col, ep, source)) {
- bump = tssp->align != Span;
- free(tssp);
- }
-
- return (bump);
-}
-
-/*
- * TblEntryColSpec() -- get a completely localized colspec for an entry
- *
- */
-
-
-struct tblcolspec *
-TblEntryColSpec(short num, /* column number */
- Element_t *ep, /* entry */
- tblsource source) /* context */
-{
- register int i;
- register bool throwAway;
- register char *cp;
- register struct tblcolspec *tcsp, *tcsp2;
-
-
- tcsp = tcsp2 = 0;
- throwAway = FALSE;
-
- if ((cp = FindAttValByName(ep, "COLNAME"))) {
- if (! (tcsp = TblFindColSpec(cp, source))) {
- fprintf(stderr, "? can't find column name '%s'\n", cp);
- }
- }
-
- if (tcsp2 = TblFindColNum(num, source)) {
- tcsp = TblDoColSpec(num, ep, tcsp2, source);
- throwAway = TRUE;
- }
-
- tcsp2 = TblDoColSpec(num, ep, tcsp, source);
-
- if (throwAway)
- free(tcsp);
-
- return (tcsp2);
-}
-
-/*
- * TblEntrySpanSpec() -- get a completely localized spanspec for an entry
- *
- */
-
-
-struct tblspanspec *
-TblEntrySpanSpec(short num, /* column number */
- Element_t *ep, /* entry */
- tblsource source) /* context */
-{
- register char *cp, *cp2;
- register struct tblspanspec *tssp, *tssp2;
-
-
- tssp2 = 0;
-
- if (!(cp = FindAttValByName(ep, "SPANNAME")) ||
- !(tssp2 = TblFindSpanSpec(cp, source))) {
-
- if (!FindAttValByName(ep, "NAMEST"))
- return (0);
- }
-
- tssp = TblDoSpanSpec(ep, tssp2, source);
-
- if (tssp->start && tssp->end &&
- (tssp->start->num < num) && (tssp->end->num >= num)) {
- tssp->align = Span;
- }
-
- return (tssp);
-}
-
-/*
- * TblFormatMatch() -- compare two format rows for consistency
- *
- */
-
-
-bool
-TblFormatMatch(struct tblformat *tf1, /* one row */
- struct tblformat *tf2) /* the other */
-{
- register int i;
-
- if (tf1->cols != tf2->cols) {
- return (FALSE);
- }
-
- for (i = 0; i < tf1->cols; i++) {
-
- if (tf1->colformat[i] != tf2->colformat[i]) {
- return (FALSE);
- }
- if (strcmp(tf1->colwidth[i], tf2->colwidth[i])) {
- return (FALSE);
- }
- if (strcmp(tf1->font[i], tf2->font[i])) {
- return (FALSE);
- }
- if (tf1->colsep[i] != tf2->colsep[i]) {
- return (FALSE);
- }
- if (tf1->rowsep[i] != tf2->rowsep[i]) {
- return (FALSE);
- }
- if (tf1->moreRows[i] || tf2->moreRows[i]) {
- return (FALSE);
- }
- }
-
- return (TRUE);
-}
-
-/*
- * TblPrintFormat() -- print a tbl format structure
- *
- */
-
-
-void
-TblPrintFormat(FILE *fP, /* where to print */
- struct tblformat *tfp) /* the structure */
-{
- register int i;
- register struct tblformat *tfp2, *tfp3;
- static char buf[3] = "\000\000";
-
-
- for (tfp2 = tfp, tfp3 = 0; tfp2; tfp2 = tfp2->next) {
- for (i = 1; i <= tfp->cols; i++) {
- if (i > 1)
- OutputString(" ", fP, 1);
- if (tfp3 && tfp3->moreRows[i])
- OutputString("\\", fP, 1);
- else {
- buf[0] = tfp2->colformat[i];
- OutputString(buf, fP, 1);
- }
- if (tfp2->colwidth[i][0]) {
- OutputString("w(", fP, 1);
- OutputString(tfp2->colwidth[i], fP, 1);
- OutputString(")", fP, 1);
- }
- if (tfp2->font[i][0])
- OutputString(tfp2->font[i], fP, 1);
- if (tfp2->colsep[i] && i < tfp->cols)
- OutputString("|", fP, 1);
- }
- if (! tfp2->next)
- OutputString(".", fP, 1);
- OutputString("", fP, 1);
- tfp3 = tfp2;
- }
-}
-
-/*
- * TblTRowStart() -- start a row (not much to do)
- *
- * TO DO:
- *
- * nothing..
- *
- */
-
-
-
-void
-TblTRowStart(Element_t *ep,
- FILE *fP)
-{
-
- /* nothing to do */
-
- tblrow++; /* except note that we're within a new row */
-
-}
-
-/*
- * TblTRowEnd() -- end a row
- *
- * TO DO:
- *
- * output a row end character (newline)
- * if the current row had a rowsep, then output a "fake" row
- * with underlines in the proper place(s).
- */
-
-
-
-void
-TblTRowEnd(Element_t *ep,
- FILE *fP)
-{
- register int i, k;
- register tblsource source;
- register bool startedRow, didSep;
- register struct tblformat *rfp;
-
-
- OutputString("", fP, 1);
-
- /* get the format for this row */
-
- if (strcmp(ep->parent->gi, "TFoot") == 0)
- source = TFoot;
- else
- if (strcmp(ep->parent->gi, "THead") == 0)
- source = THead;
- else
- source = TBody;
-
- rfp = TblBuild1Format(ep, TRUE, source);
- startedRow = FALSE;
- didSep = FALSE;
-
- for (i = 1; i <= formP->cols; i++) {
- if (rfp->rowsep[i] ||
- (didSep && (rfp->colformat[i] == 's'))) {
- if (! startedRow) {
- OutputString("", fP, 1);
- for (k = 1; k < i; k++)
- OutputString("\007", fP, 1);
- startedRow = TRUE;
- }
- didSep = TRUE;
- } else {
- if (startedRow)
- OutputString("\007", fP, 1);
- }
- didSep = FALSE;
- }
- free(rfp); /* clear that row.. */
-
- if (startedRow)
- OutputString("", fP, 1);
-}
-
-/*
- * TblTEntryStart() -- start an entry (block of filled text if
- * appropriate)
- *
- * TO DO:
- *
- * if text length > BOFTTextThresh or there is PI,
- * then output "T{\n", else do nothing
- *
- */
-
-
-
-void
-TblTCellStart(Element_t *ep,
- FILE *fP)
-{
- register int i;
- register Element_t *ep2;
- register bool sawPIorPara;
-
-
- for (i = 0, sawPIorPara = FALSE; i < ep->ncont; i++) {
- if ((ep->cont[i].type == '?') ||
- (i &&
- (ep->cont[i].type == '(') &&
- (strcmp(ep->cont[i].ch.elem->gi, "PARA") == 0))) {
- sawPIorPara = TRUE;
- break;
- }
- }
-
- if (sawPIorPara || (TblCountContent(ep) > BOFTTextThresh)) {
- tblBOFTCount++;
- OutputString("T{", fP, 1);
- tblinBOFT = TRUE; /* within a boft now */
- }
-}
-
-/* TblCountContent() -- count all content below the given element */
-
-
-
-int
-TblCountContent(Element_t *ep) /* the element to look under */
-{
- register int i, count;
- register char *cp;
-
-
- count = 0;
-
- for (i = 0; i < ep->ncont; i++) {
- if (ep->cont[i].type == '-') {
- for (cp = ep->cont[i].ch.data; *cp; cp++, count++)
- if (*cp == -1)
- return (BOFTTextThresh + 1);
- } else
- if (ep->cont[i].type == '(') {
- count += TblCountContent(ep->cont[i].ch.elem);
- }
- }
-
- return (count);
-}
-
-/*
- * TblTEntryEnd() -- end an entry
- * TO DO:
- * if within BOFT, output "T}"
- * if not last entry, output tab character
- */
-
-
-
-void
-TblTCellEnd(Element_t *ep,
- FILE *fP)
-{
- register Element_t *ep2;
-
-
- if (tblinBOFT) {
- OutputString("T}", fP, 1);
- tblinBOFT = FALSE; /* back out again */
- }
-
- for (ep2 = ep->next; ep2; ep2 = ep2->next) {
- if ((strcmp(ep2->gi, "ENTRY") == 0) ||
- (strcmp(ep2->gi, "ENTRYTBL") == 0)) {
- OutputString("\007", fP, 1);
- break;
- }
- if (strcmp(ep2->gi, "ROW") == 0)
- break;
- }
-}
-
-/* TblDoColSpec() -- process one element to create a new colspec */
-
-
-struct tblcolspec *
-TblDoColSpec(short number, /* this column number */
- Element_t *ep, /* element containing colspec stuff */
- struct tblcolspec *pcsp, /* prevailing colspec (with defaults) */
- tblsource source) /* precedence level of the resulting spec */
-{
- register char *cp;
- register struct tblcolspec *tcsp;
-
-
- Calloc(1, tcsp, struct tblcolspec);
-
- if (cp = FindAttValByName(ep, "COLNAME"))
- strcpy(tcsp->name, cp);
-
- tcsp->num = number;
- tcsp->source = source;
-
- if (cp = FindAttValByName(ep, "ALIGN")) {
- if (strcmp(cp, "LEFT") == 0) tcsp->align = Left;
- else if (strcmp(cp, "RIGHT") == 0) tcsp->align = Right;
- else if (strcmp(cp, "CENTER") == 0) tcsp->align = Center;
- else if (strcmp(cp, "JUSTIFY") == 0) tcsp->align = Justify;
- else if (strcmp(cp, "CHAR") == 0) tcsp->align = Char;
- } else
- tcsp->align = (pcsp) ? pcsp->align : Left;
-
- if (cp = FindAttValByName(ep, "CHAR"))
- tcsp->alignchar = cp[0];
- else
- tcsp->alignchar = (pcsp) ? pcsp->alignchar : 0;
-
- if (cp = FindAttValByName(ep, "CHAROFF"))
- tcsp->aligncharoff = atoi(cp);
- else
- tcsp->aligncharoff = (pcsp) ? pcsp->aligncharoff : 0;
-
- if (cp = FindAttValByName(ep, "COLWIDTH"))
- strcpy(tcsp->colwidth, cp);
- else
- strcpy(tcsp->colwidth, (pcsp) ? pcsp->colwidth : "");
-
- if (cp = FindAttValByName(ep, "COLSEP"))
- tcsp->colsep = (strcmp(cp, "1") == 0);
- else
- tcsp->colsep = (pcsp) ? pcsp->colsep : FALSE;
-
- if (cp = FindAttValByName(ep, "ROWSEP"))
- tcsp->rowsep = (strcmp(cp, "1") == 0);
- else
- tcsp->rowsep = (pcsp) ? pcsp->rowsep : FALSE;
-
- return (tcsp);
-}
-
-/*
- * TblDoSpanSpec() -- process one element to create a new spanspec
- * Note that there's a hack inside here... NameSt and NameEnd are
- * supposed to point at colnames, but if no colname is found, this
- * code will look for a colnum by the same value.
- */
-
-
-
-struct tblspanspec *
-TblDoSpanSpec(Element_t *ep, /* element containing spanspec stuff */
- struct tblspanspec *pssp, /* prevailing spanspec (with defaults) */
- tblsource source) /* precedence level of the resulting spec */
-{
- register char *cp;
- register struct tblspanspec *tssp;
- register struct tblcolspec *tcsp;
-
-
- Calloc(1, tssp, struct tblspanspec);
-
- if (cp = FindAttValByName(ep, "SPANNAME")) strcpy(tssp->name, cp);
- tssp->source = source;
-
- if (cp = FindAttValByName(ep, "NAMEST")) {
- if ((tcsp = TblFindColSpec(cp, source)) ||
- (tcsp = TblFindColNum(atoi(cp), source))) {
- tssp->start = tcsp;
- } else {
- fprintf(stderr, "? spanspec namest points ");
- fprintf(stderr, "to unknown column '%s'\n", cp);
- tssp->start = 0;
- }
- } else {
- if (pssp && pssp->start) {
- tssp->start = pssp->start;
- }
- }
-
- if (cp = FindAttValByName(ep, "NAMEEND")) {
- if ((tcsp = TblFindColSpec(cp, source)) ||
- (tcsp = TblFindColNum(atoi(cp), source))) {
- tssp->end = tcsp;
- } else {
- fprintf(stderr, "? spanspec nameend points ");
- fprintf(stderr, "to unknown column '%s'\n", cp);
- tssp->end = 0;
- }
- } else {
- if (pssp && pssp->end) {
- tssp->end = pssp->end;
- }
- }
-
- if (cp = FindAttValByName(ep, "ALIGN")) {
- if (strcmp(cp, "LEFT") == 0) tssp->align = Left;
- else if (strcmp(cp, "RIGHT") == 0) tssp->align = Right;
- else if (strcmp(cp, "CENTER") == 0) tssp->align = Center;
- else if (strcmp(cp, "JUSTIFY") == 0) tssp->align = Justify;
- else if (strcmp(cp, "CHAR") == 0) tssp->align = Char;
- } else {
- if (pssp)
- tssp->align = pssp->align;
- }
-
- if (cp = FindAttValByName(ep, "CHAR"))
- tssp->alignchar = cp[0];
- else {
- if (pssp)
- tssp->alignchar = pssp->alignchar;
- }
- if (cp = FindAttValByName(ep, "CHAROFF"))
- tssp->aligncharoff = atoi(cp);
- else {
- if (pssp)
- tssp->alignchar = pssp->alignchar;
- }
-
- if (cp = FindAttValByName(ep, "COLSEP"))
- tssp->colsep = (strcmp(cp, "1") == 0);
- else {
- if (pssp)
- tssp->colsep = pssp->colsep;
- }
- if (cp = FindAttValByName(ep, "ROWSEP"))
- tssp->rowsep = (strcmp(cp, "1") == 0);
- else {
- if (pssp)
- tssp->rowsep = pssp->rowsep;
- }
-
- return (tssp);
-}
-
-/* TblFindColSpec() -- find a table colspec by name (colname) */
-
-
-
-struct tblcolspec *
-TblFindColSpec(char *name, /* the name we're looking for */
- tblsource source) /* the context in which to find it */
-{
- register struct tblcolspec *tcsp;
-
-
- /* first, try to find the one in the right "source" */
-
- for (tcsp = tblColSpec; tcsp; tcsp = tcsp->next) {
- if ((tcsp->source == source) &&
- (strcmp(tcsp->name, name) == 0))
- return (tcsp);
- }
-
- /* else, try to find one from a TGroup.. */
-
- for (tcsp = tblColSpec; tcsp; tcsp = tcsp->next) {
- if ((tcsp->source == TGroup) &&
- (strcmp(tcsp->name, name) == 0))
- return (tcsp);
- }
-
- /* else not found.. */
-
- return (0);
-}
-
-/* TblFindColNum() -- find a table colspec by number */
-
-
-
-struct tblcolspec *
-TblFindColNum(short number, /* the number we're looking for */
- tblsource source) /* the context in which to find it */
-{
- register struct tblcolspec *tcsp;
-
- /* first, try to find the one in the right "source" */
-
- for (tcsp = tblColSpec; tcsp; tcsp = tcsp->next) {
- if ((tcsp->num == number) &&
- ((tcsp->source == source) ||
- ((source == THead) &&
- (tcsp->source == TGroup))))
- return (tcsp);
- }
-
- /* else, try to find one from a TGroup.. */
-
- for (tcsp = tblColSpec; tcsp; tcsp = tcsp->next) {
- if ((tcsp->source == TGroup) && (tcsp->num == number))
- return (tcsp);
- }
-
- /* else not found.. */
-
- return (0);
-}
-
-/* TblFindSpanSpec() -- find a table spanspec by name (spanname) */
-
-
-
-struct tblspanspec *
-TblFindSpanSpec(char *name, /* the name we're looking for */
- tblsource source) /* the context in which to find it */
-{
- register struct tblspanspec *tssp;
-
-
- /* first, try to find the one in the right "source" */
-
- for (tssp = tblSpanSpec; tssp; tssp = tssp->next) {
- if ((strcmp(tssp->name, name) == 0) &&
- ((tssp->source == source) ||
- ((source == THead) &&
- (tssp->source == TGroup))))
- return (tssp);
- }
-
- /* else not found.. */
-
- return (0);
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/Imakefile b/usr/src/cmd/man/src/util/instant.src/tptregexp/Imakefile
deleted file mode 100644
index 7e61bd97e3..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/Imakefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-#define DoNormalLib YES
-#define DoSharedLib NO
-#define DoDebugLib NO
-#define DoProfileLib NO
-#define LibName tptregexp
-#define LibHeaders NO
-#define LibInstall NO
-
-SRCS = regexp.c regsub.c regerror.c
-OBJS = regexp.o regsub.o regerror.o
-
-INCLUDES = -I.
-
-#include <Library.tmpl>
-
-DependTarget()
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/Makefile b/usr/src/cmd/man/src/util/instant.src/tptregexp/Makefile
deleted file mode 100644
index b677158fbb..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-#
-# 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) 1995
-# Dalrymple Consulting
-#
-#
-# $Header: /usr/src/docbook-to-man/Instant/tptregexp/RCS/Makefile,v 1.2 1996/06/15 22:55:56 fld Exp $
-#
-include ../../../../../Makefile.cmd
-
-ROOT = /usr/lib/sgml
-
-MAKE = make
-SHELL = /bin/sh
-
-LIBDIR = $(ROOT)/lib
-#CC = gcc
-
-# Things you might want to put in ENV and LENV:
-# -Dvoid=int compilers that don't do void
-# -DCHARBITS=0377 compilers that don't do unsigned char
-# -DSTATIC=extern compilers that don't like "static foo();" as forward decl
-# -DSTRCSPN library does not have strcspn()
-# -Dstrchr=index library does not have strchr()
-# -DERRAVAIL have utzoo-compatible error() function and friends
-#ENV=-Dvoid=int -DCHARBITS=0377 -DSTATIC=extern
-#LENV=-Dvoid=int -DCHARBITS=0377
-
-# Things you might want to put in TEST:
-# -DDEBUG debugging hooks
-# -I. tptregexp.h from current directory, not /usr/include
-TEST= -I.
-
-# Things you might want to put in PROF:
-# -Dstatic='/* */' make everything global so profiler can see it.
-# -p profiler
-PROF=
-
-OPT=
-
-CFLAGS += $(OPT) $(ENV) $(TEST) $(PROF)
-LINTFLAGS = $(LENV) $(TEST) -ha
-LDFLAGS =
-
-OBJ=regexp.o regsub.o regerror.o strerror.o
-LSRC=regexp.c regsub.c regerror.c strerror.c
-DTR=README dMakefile regexp.3 tptregexp.h regexp.c regsub.c regerror.c \
- regmagic.h try.c timer.c tests
-
-all: libtptregexp.a
-install: libtptregexp.a
-# @echo "No install of regex lib - install in a lib directory by hand if desired."
- cp libtptregexp.a $(LIBDIR)
-
-try: try.o $(OBJ)
- $(CC) $(LDFLAGS) try.o $(OBJ) -o try
-
-# Making timer will probably require putting stuff in $(PROF) and then
-# recompiling everything; the following is just the final stage.
-timer: timer.o $(OBJ)
- $(CC) $(LDFLAGS) $(PROF) timer.o $(OBJ) -o timer
-
-timer.o: timer.c timer.t.h
-
-timer.t.h: tests
- sed 's/ /","/g;s/\\/&&/g;s/.*/{"&"},/' tests >timer.t.h
-
-# Regression test.
-r: try tests
- @echo 'No news is good news...'
- try <tests
-
-lint: timer.t.h
- @echo 'Complaints about multiply-declared regerror() are legit.'
- lint $(LINTFLAGS) $(LSRC) try.c
- lint $(LINTFLAGS) $(LSRC) timer.c
-
-regexp.o: regexp.c tptregexp.h regmagic.h
-regsub.o: regsub.c tptregexp.h regmagic.h
-
-clean:
- rm -f *.o core mon.out timer.t.h dMakefile dtr try timer
-
-clobber: clean
- rm -f libtptregexp.a
-
-dtr: r makedtr $(DTR)
- makedtr $(DTR) >dtr
-
-dMakefile: Makefile
- sed '/^L*ENV=/s/ *-DERRAVAIL//' Makefile >dMakefile
-
-
-lib: libtptregexp.a
-libtptregexp.a: $(OBJ)
- ar rcv $@ $(OBJ)
- if [ -f /usr/bin/ranlib ] ; then ranlib $@ ; else true ; fi
-
-.PARALLEL: $(OBJ)
-
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/README b/usr/src/cmd/man/src/util/instant.src/tptregexp/README
deleted file mode 100644
index 5ff8ad80ed..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/README
+++ /dev/null
@@ -1,103 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-#
-# 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.
-#
-
-This is a nearly-public-domain reimplementation of the V8 regexp(3) package.
-It gives C programs the ability to use egrep-style regular expressions, and
-does it in a much cleaner fashion than the analogous routines in SysV.
-
- Copyright (c) 1986 by University of Toronto.
- Written by Henry Spencer. Not derived from licensed software.
-
- Permission is granted to anyone to use this software for any
- purpose on any computer system, and to redistribute it freely,
- subject to the following restrictions:
-
- 1. The author is not responsible for the consequences of use of
- this software, no matter how awful, even if they arise
- from defects in it.
-
- 2. The origin of this software must not be misrepresented, either
- by explicit claim or by omission.
-
- 3. Altered versions must be plainly marked as such, and must not
- be misrepresented as being the original software.
-
-Barring a couple of small items in the BUGS list, this implementation is
-believed 100% compatible with V8. It should even be binary-compatible,
-sort of, since the only fields in a "struct regexp" that other people have
-any business touching are declared in exactly the same way at the same
-location in the struct (the beginning).
-
-This implementation is *NOT* AT&T/Bell code, and is not derived from licensed
-software. Even though U of T is a V8 licensee. This software is based on
-a V8 manual page sent to me by Dennis Ritchie (the manual page enclosed
-here is a complete rewrite and hence is not covered by AT&T copyright).
-The software was nearly complete at the time of arrival of our V8 tape.
-I haven't even looked at V8 yet, although a friend elsewhere at U of T has
-been kind enough to run a few test programs using the V8 regexp(3) to resolve
-a few fine points. I admit to some familiarity with regular-expression
-implementations of the past, but the only one that this code traces any
-ancestry to is the one published in Kernighan & Plauger (from which this
-one draws ideas but not code).
-
-Simplistically: put this stuff into a source directory, copy regexp.h into
-/usr/include, inspect Makefile for compilation options that need changing
-to suit your local environment, and then do "make r". This compiles the
-regexp(3) functions, compiles a test program, and runs a large set of
-regression tests. If there are no complaints, then put regexp.o, regsub.o,
-and regerror.o into your C library, and regexp.3 into your manual-pages
-directory.
-
-Note that if you don't put regexp.h into /usr/include *before* compiling,
-you'll have to add "-I." to CFLAGS before compiling.
-
-The files are:
-
-Makefile instructions to make everything
-regexp.3 manual page
-regexp.h header file, for /usr/include
-regexp.c source for regcomp() and regexec()
-regsub.c source for regsub()
-regerror.c source for default regerror()
-regmagic.h internal header file
-try.c source for test program
-timer.c source for timing program
-tests test list for try and timer
-
-This implementation uses nondeterministic automata rather than the
-deterministic ones found in some other implementations, which makes it
-simpler, smaller, and faster at compiling regular expressions, but slower
-at executing them. In theory, anyway. This implementation does employ
-some special-case optimizations to make the simpler cases (which do make
-up the bulk of regular expressions actually used) run quickly. In general,
-if you want blazing speed you're in the wrong place. Replacing the insides
-of egrep with this stuff is probably a mistake; if you want your own egrep
-you're going to have to do a lot more work. But if you want to use regular
-expressions a little bit in something else, you're in luck. Note that many
-existing text editors use nondeterministic regular-expression implementations,
-so you're in good company.
-
-This stuff should be pretty portable, given appropriate option settings.
-If your chars have less than 8 bits, you're going to have to change the
-internal representation of the automaton, although knowledge of the details
-of this is fairly localized. There are no "reserved" char values except for
-NUL, and no special significance is attached to the top bit of chars.
-The string(3) functions are used a fair bit, on the grounds that they are
-probably faster than coding the operations in line. Some attempts at code
-tuning have been made, but this is invariably a bit machine-specific.
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/README.osf b/usr/src/cmd/man/src/util/instant.src/tptregexp/README.osf
deleted file mode 100644
index b3de9dacf9..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/README.osf
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-#
-# 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.
-#
-
-OSF did not write this code.
-
-Changes made:
-
- Renamed "regexp.h" to "tptregexp.h" to avoid conflicts with systems that
- have a /usr/include/regexp.h. Changed the *.c files in the appropriate
- places.
-
- Renamed these routines:
- regcomp() -> tpt_regcomp()
- regexec() -> tpt_regexec()
- regsub() -> tpt_regsub()
- regerror() -> tpt_regerror()
- This is to avoid conflicts in the standard C library.
-
- In Makefile - wrote "all" and "install" targets. Changed "regexp.h"
- to "tptregexp.h", as appropriate.
-
- In regexp.c - added #include <string.h> to keep compiler happy.
-
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/regerror.c b/usr/src/cmd/man/src/util/instant.src/tptregexp/regerror.c
deleted file mode 100644
index 1b9899f692..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/regerror.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-#pragma ident "%Z%%M% %I% %E% SMI"
-void
-tpt_regerror(s)
-char *s;
-{
-#ifdef ERRAVAIL
- error("tpt_regexp: %s", s);
-#else
- fprintf(stderr, "tpt_regexp(3): %s", s);
- exit(1);
-#endif
- /* NOTREACHED */
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.3 b/usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.3
deleted file mode 100644
index d714b629e4..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.3
+++ /dev/null
@@ -1,182 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-.TH REGEXP 3 local
-.DA 30 Nov 1985
-.SH NAME
-regcomp, regexec, regsub, regerror \- regular expression handler
-.SH SYNOPSIS
-.ft B
-.nf
-#include <regexp.h>
-
-regexp *regcomp(exp)
-char *exp;
-
-int regexec(prog, string)
-regexp *prog;
-char *string;
-
-regsub(prog, source, dest)
-regexp *prog;
-char *source;
-char *dest;
-
-regerror(msg)
-char *msg;
-.SH DESCRIPTION
-These functions implement
-.IR egrep (1)-style
-regular expressions and supporting facilities.
-.PP
-.I Regcomp
-compiles a regular expression into a structure of type
-.IR regexp ,
-and returns a pointer to it.
-The space has been allocated using
-.IR malloc (3)
-and may be released by
-.IR free .
-.PP
-.I Regexec
-matches a NUL-terminated \fIstring\fR against the compiled regular expression
-in \fIprog\fR.
-It returns 1 for success and 0 for failure, and adjusts the contents of
-\fIprog\fR's \fIstartp\fR and \fIendp\fR (see below) accordingly.
-.PP
-The members of a
-.I regexp
-structure include at least the following (not necessarily in order):
-.PP
-.RS
-char *startp[NSUBEXP];
-.br
-char *endp[NSUBEXP];
-.RE
-.PP
-where
-.I NSUBEXP
-is defined (as 10) in the header file.
-Once a successful \fIregexec\fR has been done using the \fIregexp\fR,
-each \fIstartp\fR-\fIendp\fR pair describes one substring
-within the \fIstring\fR,
-with the \fIstartp\fR pointing to the first character of the substring and
-the \fIendp\fR pointing to the first character following the substring.
-The 0th substring is the substring of \fIstring\fR that matched the whole
-regular expression.
-The others are those substrings that matched parenthesized expressions
-within the regular expression, with parenthesized expressions numbered
-in left-to-right order of their opening parentheses.
-.PP
-.I Regsub
-copies \fIsource\fR to \fIdest\fR, making substitutions according to the
-most recent \fIregexec\fR performed using \fIprog\fR.
-Each instance of `&' in \fIsource\fR is replaced by the substring
-indicated by \fIstartp\fR[\fI0\fR] and
-\fIendp\fR[\fI0\fR].
-Each instance of `\e\fIn\fR', where \fIn\fR is a digit, is replaced by
-the substring indicated by
-\fIstartp\fR[\fIn\fR] and
-\fIendp\fR[\fIn\fR].
-To get a literal `&' or `\e\fIn\fR' into \fIdest\fR, prefix it with `\e';
-to get a literal `\e' preceding `&' or `\e\fIn\fR', prefix it with
-another `\e'.
-.PP
-.I Regerror
-is called whenever an error is detected in \fIregcomp\fR, \fIregexec\fR,
-or \fIregsub\fR.
-The default \fIregerror\fR writes the string \fImsg\fR,
-with a suitable indicator of origin,
-on the standard
-error output
-and invokes \fIexit\fR(2).
-.I Regerror
-can be replaced by the user if other actions are desirable.
-.SH "REGULAR EXPRESSION SYNTAX"
-A regular expression is zero or more \fIbranches\fR, separated by `|'.
-It matches anything that matches one of the branches.
-.PP
-A branch is zero or more \fIpieces\fR, concatenated.
-It matches a match for the first, followed by a match for the second, etc.
-.PP
-A piece is an \fIatom\fR possibly followed by `*', `+', or `?'.
-An atom followed by `*' matches a sequence of 0 or more matches of the atom.
-An atom followed by `+' matches a sequence of 1 or more matches of the atom.
-An atom followed by `?' matches a match of the atom, or the null string.
-.PP
-An atom is a regular expression in parentheses (matching a match for the
-regular expression), a \fIrange\fR (see below), `.'
-(matching any single character), `^' (matching the null string at the
-beginning of the input string), `$' (matching the null string at the
-end of the input string), a `\e' followed by a single character (matching
-that character), or a single character with no other significance
-(matching that character).
-.PP
-A \fIrange\fR is a sequence of characters enclosed in `[]'.
-It normally matches any single character from the sequence.
-If the sequence begins with `^',
-it matches any single character \fInot\fR from the rest of the sequence.
-If two characters in the sequence are separated by `\-', this is shorthand
-for the full list of ASCII characters between them
-(e.g. `[0-9]' matches any decimal digit).
-To include a literal `]' in the sequence, make it the first character
-(following a possible `^').
-To include a literal `\-', make it the first or last character.
-.SH AMBIGUITY
-If a regular expression could match two different parts of the input string,
-it will match the one which begins earliest.
-If both begin in the same place but match different lengths, or match
-the same length in different ways, life gets messier, as follows.
-.PP
-In general, the possibilities in a list of branches are considered in
-left-to-right order, the possibilities for `*', `+', and `?' are
-considered longest-first, nested constructs are considered from the
-outermost in, and concatenated constructs are considered leftmost-first.
-The match that will be chosen is the one that uses the earliest
-possibility in the first choice that has to be made.
-If there is more than one choice, the next will be made in the same manner
-(earliest possibility) subject to the decision on the first choice.
-And so forth.
-.PP
-For example, `(ab|a)b*c' could match `abc' in one of two ways.
-The first choice is between `ab' and `a'; since `ab' is earlier, and does
-lead to a successful overall match, it is chosen.
-Since the `b' is already spoken for,
-the `b*' must match its last possibility\(emthe empty string\(emsince
-it must respect the earlier choice.
-.PP
-In the particular case where no `|'s are present and there is only one
-`*', `+', or `?', the net effect is that the longest possible
-match will be chosen.
-So `ab*', presented with `xabbbby', will match `abbbb'.
-Note that if `ab*' is tried against `xabyabbbz', it
-will match `ab' just after `x', due to the begins-earliest rule.
-(In effect, the decision on where to start the match is the first choice
-to be made, hence subsequent choices must respect it even if this leads them
-to less-preferred alternatives.)
-.SH SEE ALSO
-egrep(1), expr(1)
-.SH DIAGNOSTICS
-\fIRegcomp\fR returns NULL for a failure
-(\fIregerror\fR permitting),
-where failures are syntax errors, exceeding implementation limits,
-or applying `+' or `*' to a possibly-null operand.
-.SH HISTORY
-Both code and manual page were
-written at U of T.
-They are intended to be compatible with the Bell V8 \fIregexp\fR(3),
-but are not derived from Bell code.
-.SH BUGS
-Empty branches and empty regular expressions are not portable to V8.
-.PP
-The restriction against
-applying `*' or `+' to a possibly-null operand is an artifact of the
-simplistic implementation.
-.PP
-Does not support \fIegrep\fR's newline-separated branches;
-neither does the V8 \fIregexp\fR(3), though.
-.PP
-Due to emphasis on
-compactness and simplicity,
-it's not strikingly fast.
-It does give special attention to handling simple cases quickly.
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.c b/usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.c
deleted file mode 100644
index fadd5a7337..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/regexp.c
+++ /dev/null
@@ -1,1216 +0,0 @@
-/*
- * regcomp and regexec -- regsub and regerror are elsewhere
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * subject to the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of
- * this software, no matter how awful, even if they arise
- * from defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * Beware that some of this code is subtly aware of the way operator
- * precedence is structured in regular expressions. Serious changes in
- * regular-expression syntax might require a total rethink.
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-#include <stdio.h>
-#include <string.h>
-#include <tptregexp.h>
-#include "regmagic.h"
-
-/*
- * The "internal use only" fields in regexp.h are present to pass info from
- * compile to execute that permits the execute phase to run lots faster on
- * simple cases. They are:
- *
- * regstart char that must begin a match; '\0' if none obvious
- * reganch is the match anchored (at beginning-of-line only)?
- * regmust string (pointer into program) that match must include, or NULL
- * regmlen length of regmust string
- *
- * Regstart and reganch permit very fast decisions on suitable starting points
- * for a match, cutting down the work a lot. Regmust permits fast rejection
- * of lines that cannot possibly match. The regmust tests are costly enough
- * that regcomp() supplies a regmust only if the r.e. contains something
- * potentially expensive (at present, the only such thing detected is * or +
- * at the start of the r.e., which can involve a lot of backup). Regmlen is
- * supplied because the test in regexec() needs it and regcomp() is computing
- * it anyway.
- */
-
-/*
- * Structure for regexp "program". This is essentially a linear encoding
- * of a nondeterministic finite-state machine (aka syntax charts or
- * "railroad normal form" in parsing technology). Each node is an opcode
- * plus a "next" pointer, possibly plus an operand. "Next" pointers of
- * all nodes except BRANCH implement concatenation; a "next" pointer with
- * a BRANCH on both ends of it is connecting two alternatives. (Here we
- * have one of the subtle syntax dependencies: an individual BRANCH (as
- * opposed to a collection of them) is never concatenated with anything
- * because of operator precedence.) The operand of some types of node is
- * a literal string; for others, it is a node leading into a sub-FSM. In
- * particular, the operand of a BRANCH node is the first node of the branch.
- * (NB this is *not* a tree structure: the tail of the branch connects
- * to the thing following the set of BRANCHes.) The opcodes are:
- */
-
-/* definition number opnd? meaning */
-#define END 0 /* no End of program. */
-#define BOL 1 /* no Match "" at beginning of line. */
-#define EOL 2 /* no Match "" at end of line. */
-#define ANY 3 /* no Match any one character. */
-#define ANYOF 4 /* str Match any character in this string. */
-#define ANYBUT 5 /* str Match any character not in this string. */
-#define BRANCH 6 /* node Match this alternative, or the next... */
-#define BACK 7 /* no Match "", "next" ptr points backward. */
-#define EXACTLY 8 /* str Match this string. */
-#define NOTHING 9 /* no Match empty string. */
-#define STAR 10 /* node Match this (simple) thing 0 or more times. */
-#define PLUS 11 /* node Match this (simple) thing 1 or more times. */
-#define OPEN 20 /* no Mark this point in input as start of #n. */
- /* OPEN+1 is number 1, etc. */
-#define CLOSE 30 /* no Analogous to OPEN. */
-
-/*
- * Opcode notes:
- *
- * BRANCH The set of branches constituting a single choice are hooked
- * together with their "next" pointers, since precedence prevents
- * anything being concatenated to any individual branch. The
- * "next" pointer of the last BRANCH in a choice points to the
- * thing following the whole choice. This is also where the
- * final "next" pointer of each individual branch points; each
- * branch starts with the operand node of a BRANCH node.
- *
- * BACK Normal "next" pointers all implicitly point forward; BACK
- * exists to make loop structures possible.
- *
- * STAR,PLUS '?', and complex '*' and '+', are implemented as circular
- * BRANCH structures using BACK. Simple cases (one character
- * per match) are implemented with STAR and PLUS for speed
- * and to minimize recursive plunges.
- *
- * OPEN,CLOSE ...are numbered at compile time.
- */
-
-/*
- * A node is one char of opcode followed by two chars of "next" pointer.
- * "Next" pointers are stored as two 8-bit pieces, high order first. The
- * value is a positive offset from the opcode of the node containing it.
- * An operand, if any, simply follows the node. (Note that much of the
- * code generation knows about this implicit relationship.)
- *
- * Using two bytes for the "next" pointer is vast overkill for most things,
- * but allows patterns to get big without disasters.
- */
-#define OP(p) (*(p))
-#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
-
-#define OPERAND(p) ((p) + 3)
-
-/*
- * See regmagic.h for one further detail of program structure.
- */
-
-
-/*
- * Utility definitions.
- */
-#ifndef CHARBITS
-#define UCHARAT(p) ((int)*(unsigned char *)(p))
-#else
-#define UCHARAT(p) ((int)*(p)&CHARBITS)
-#endif
-
-#define FAIL(m) { tpt_regerror(m); return(NULL); }
-#define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?')
-#define META "^$.[()|?+*\\"
-
-/*
- * Flags to be passed up and down.
- */
-#define HASWIDTH 01 /* Known never to match null string. */
-#define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */
-#define SPSTART 04 /* Starts with * or +. */
-#define WORST 0 /* Worst case. */
-
-/*
- * Global work variables for regcomp().
- */
-static char *regparse; /* Input-scan pointer. */
-static int regnpar; /* () count. */
-static char regdummy;
-static char *regcode; /* Code-emit pointer; &regdummy = don't. */
-static long regsize; /* Code size. */
-
-/*
- * Forward declarations for regcomp()'s friends.
- */
-#ifndef STATIC
-#define STATIC static
-#endif
-STATIC char *reg();
-STATIC char *regbranch();
-STATIC char *regpiece();
-STATIC char *regatom();
-STATIC char *regnode();
-STATIC char *regnext();
-STATIC void regc();
-STATIC void reginsert();
-STATIC void regtail();
-STATIC void regoptail();
-#ifdef STRCSPN
-STATIC int strcspn();
-#endif
-
-/*
- - regcomp - compile a regular expression into internal code
- *
- * We can't allocate space until we know how big the compiled form will be,
- * but we can't compile it (and thus know how big it is) until we've got a
- * place to put the code. So we cheat: we compile it twice, once with code
- * generation turned off and size counting turned on, and once "for real".
- * This also means that we don't allocate space until we are sure that the
- * thing really will compile successfully, and we never have to move the
- * code and thus invalidate pointers into it. (Note that it has to be in
- * one piece because free() must be able to free it all.)
- *
- * Beware that the optimization-preparation code in here knows about some
- * of the structure of the compiled regexp.
- */
-regexp *
-tpt_regcomp(exp)
-char *exp;
-{
- register regexp *r;
- register char *scan;
- register char *longest;
- register int len;
- int flags;
- extern char *malloc();
-
- if (exp == NULL)
- FAIL("NULL argument");
-
- /* First pass: determine size, legality. */
- regparse = exp;
- regnpar = 1;
- regsize = 0L;
- regcode = &regdummy;
- regc(MAGIC);
- if (reg(0, &flags) == NULL)
- return(NULL);
-
- /* Small enough for pointer-storage convention? */
- if (regsize >= 32767L) /* Probably could be 65535L. */
- FAIL("regexp too big");
-
- /* Allocate space. */
- r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize);
- if (r == NULL)
- FAIL("out of space");
-
- /* Second pass: emit code. */
- regparse = exp;
- regnpar = 1;
- regcode = r->program;
- regc(MAGIC);
- if (reg(0, &flags) == NULL)
- return(NULL);
-
- /* Dig out information for optimizations. */
- r->regstart = '\0'; /* Worst-case defaults. */
- r->reganch = 0;
- r->regmust = NULL;
- r->regmlen = 0;
- scan = r->program+1; /* First BRANCH. */
- if (OP(regnext(scan)) == END) { /* Only one top-level choice. */
- scan = OPERAND(scan);
-
- /* Starting-point info. */
- if (OP(scan) == EXACTLY)
- r->regstart = *OPERAND(scan);
- else if (OP(scan) == BOL)
- r->reganch++;
-
- /*
- * If there's something expensive in the r.e., find the
- * longest literal string that must appear and make it the
- * regmust. Resolve ties in favor of later strings, since
- * the regstart check works with the beginning of the r.e.
- * and avoiding duplication strengthens checking. Not a
- * strong reason, but sufficient in the absence of others.
- */
- if (flags&SPSTART) {
- longest = NULL;
- len = 0;
- for (; scan != NULL; scan = regnext(scan))
- if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
- longest = OPERAND(scan);
- len = strlen(OPERAND(scan));
- }
- r->regmust = longest;
- r->regmlen = len;
- }
- }
-
- return(r);
-}
-
-/*
- - reg - regular expression, i.e. main body or parenthesized thing
- *
- * Caller must absorb opening parenthesis.
- *
- * Combining parenthesis handling with the base level of regular expression
- * is a trifle forced, but the need to tie the tails of the branches to what
- * follows makes it hard to avoid.
- */
-static char *
-reg(paren, flagp)
-int paren; /* Parenthesized? */
-int *flagp;
-{
- register char *ret;
- register char *br;
- register char *ender;
- register int parno;
- int flags;
-
- *flagp = HASWIDTH; /* Tentatively. */
-
- /* Make an OPEN node, if parenthesized. */
- if (paren) {
- if (regnpar >= NSUBEXP)
- FAIL("too many ()");
- parno = regnpar;
- regnpar++;
- ret = regnode(OPEN+parno);
- } else
- ret = NULL;
-
- /* Pick up the branches, linking them together. */
- br = regbranch(&flags);
- if (br == NULL)
- return(NULL);
- if (ret != NULL)
- regtail(ret, br); /* OPEN -> first. */
- else
- ret = br;
- if (!(flags&HASWIDTH))
- *flagp &= ~HASWIDTH;
- *flagp |= flags&SPSTART;
- while (*regparse == '|') {
- regparse++;
- br = regbranch(&flags);
- if (br == NULL)
- return(NULL);
- regtail(ret, br); /* BRANCH -> BRANCH. */
- if (!(flags&HASWIDTH))
- *flagp &= ~HASWIDTH;
- *flagp |= flags&SPSTART;
- }
-
- /* Make a closing node, and hook it on the end. */
- ender = regnode((paren) ? CLOSE+parno : END);
- regtail(ret, ender);
-
- /* Hook the tails of the branches to the closing node. */
- for (br = ret; br != NULL; br = regnext(br))
- regoptail(br, ender);
-
- /* Check for proper termination. */
- if (paren && *regparse++ != ')') {
- FAIL("unmatched ()");
- } else if (!paren && *regparse != '\0') {
- if (*regparse == ')') {
- FAIL("unmatched ()");
- } else
- FAIL("junk on end"); /* "Can't happen". */
- /* NOTREACHED */
- }
-
- return(ret);
-}
-
-/*
- - regbranch - one alternative of an | operator
- *
- * Implements the concatenation operator.
- */
-static char *
-regbranch(flagp)
-int *flagp;
-{
- register char *ret;
- register char *chain;
- register char *latest;
- int flags;
-
- *flagp = WORST; /* Tentatively. */
-
- ret = regnode(BRANCH);
- chain = NULL;
- while (*regparse != '\0' && *regparse != '|' && *regparse != ')') {
- latest = regpiece(&flags);
- if (latest == NULL)
- return(NULL);
- *flagp |= flags&HASWIDTH;
- if (chain == NULL) /* First piece. */
- *flagp |= flags&SPSTART;
- else
- regtail(chain, latest);
- chain = latest;
- }
- if (chain == NULL) /* Loop ran zero times. */
- (void) regnode(NOTHING);
-
- return(ret);
-}
-
-/*
- - regpiece - something followed by possible [*+?]
- *
- * Note that the branching code sequences used for ? and the general cases
- * of * and + are somewhat optimized: they use the same NOTHING node as
- * both the endmarker for their branch list and the body of the last branch.
- * It might seem that this node could be dispensed with entirely, but the
- * endmarker role is not redundant.
- */
-static char *
-regpiece(flagp)
-int *flagp;
-{
- register char *ret;
- register char op;
- register char *next;
- int flags;
-
- ret = regatom(&flags);
- if (ret == NULL)
- return(NULL);
-
- op = *regparse;
- if (!ISMULT(op)) {
- *flagp = flags;
- return(ret);
- }
-
- if (!(flags&HASWIDTH) && op != '?')
- FAIL("*+ operand could be empty");
- *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH);
-
- if (op == '*' && (flags&SIMPLE))
- reginsert(STAR, ret);
- else if (op == '*') {
- /* Emit x* as (x&|), where & means "self". */
- reginsert(BRANCH, ret); /* Either x */
- regoptail(ret, regnode(BACK)); /* and loop */
- regoptail(ret, ret); /* back */
- regtail(ret, regnode(BRANCH)); /* or */
- regtail(ret, regnode(NOTHING)); /* null. */
- } else if (op == '+' && (flags&SIMPLE))
- reginsert(PLUS, ret);
- else if (op == '+') {
- /* Emit x+ as x(&|), where & means "self". */
- next = regnode(BRANCH); /* Either */
- regtail(ret, next);
- regtail(regnode(BACK), ret); /* loop back */
- regtail(next, regnode(BRANCH)); /* or */
- regtail(ret, regnode(NOTHING)); /* null. */
- } else if (op == '?') {
- /* Emit x? as (x|) */
- reginsert(BRANCH, ret); /* Either x */
- regtail(ret, regnode(BRANCH)); /* or */
- next = regnode(NOTHING); /* null. */
- regtail(ret, next);
- regoptail(ret, next);
- }
- regparse++;
- if (ISMULT(*regparse))
- FAIL("nested *?+");
-
- return(ret);
-}
-
-/*
- - regatom - the lowest level
- *
- * Optimization: gobbles an entire sequence of ordinary characters so that
- * it can turn them into a single node, which is smaller to store and
- * faster to run. Backslashed characters are exceptions, each becoming a
- * separate node; the code is simpler that way and it's not worth fixing.
- */
-static char *
-regatom(flagp)
-int *flagp;
-{
- register char *ret;
- int flags;
-
- *flagp = WORST; /* Tentatively. */
-
- switch (*regparse++) {
- case '':
- ret = regnode(BOL);
- break;
- case '$':
- ret = regnode(EOL);
- break;
- case '.':
- ret = regnode(ANY);
- *flagp |= HASWIDTH|SIMPLE;
- break;
- case '[': {
- register int class;
- register int classend;
-
- if (*regparse == '') { /* Complement of range. */
- ret = regnode(ANYBUT);
- regparse++;
- } else
- ret = regnode(ANYOF);
- if (*regparse == ']' || *regparse == '-')
- regc(*regparse++);
- while (*regparse != '\0' && *regparse != ']') {
- if (*regparse == '-') {
- regparse++;
- if (*regparse == ']' || *regparse == '\0')
- regc('-');
- else {
- class = UCHARAT(regparse-2)+1;
- classend = UCHARAT(regparse);
- if (class > classend+1)
- FAIL("invalid [] range");
- for (; class <= classend; class++)
- regc(class);
- regparse++;
- }
- } else
- regc(*regparse++);
- }
- regc('\0');
- if (*regparse != ']')
- FAIL("unmatched []");
- regparse++;
- *flagp |= HASWIDTH|SIMPLE;
- }
- break;
- case '(':
- ret = reg(1, &flags);
- if (ret == NULL)
- return(NULL);
- *flagp |= flags&(HASWIDTH|SPSTART);
- break;
- case '\0':
- case '|':
- case ')':
- FAIL("internal urp"); /* Supposed to be caught earlier. */
- break;
- case '?':
- case '+':
- case '*':
- FAIL("?+* follows nothing");
- break;
- case '\\':
- if (*regparse == '\0')
- FAIL("trailing \\");
- ret = regnode(EXACTLY);
- regc(*regparse++);
- regc('\0');
- *flagp |= HASWIDTH|SIMPLE;
- break;
- default: {
- register int len;
- register char ender;
-
- regparse--;
- len = strcspn(regparse, META);
- if (len <= 0)
- FAIL("internal disaster");
- ender = *(regparse+len);
- if (len > 1 && ISMULT(ender))
- len--; /* Back off clear of ?+* operand. */
- *flagp |= HASWIDTH;
- if (len == 1)
- *flagp |= SIMPLE;
- ret = regnode(EXACTLY);
- while (len > 0) {
- regc(*regparse++);
- len--;
- }
- regc('\0');
- }
- break;
- }
-
- return(ret);
-}
-
-/*
- - regnode - emit a node
- */
-static char * /* Location. */
-regnode(op)
-char op;
-{
- register char *ret;
- register char *ptr;
-
- ret = regcode;
- if (ret == &regdummy) {
- regsize += 3;
- return(ret);
- }
-
- ptr = ret;
- *ptr++ = op;
- *ptr++ = '\0'; /* Null "next" pointer. */
- *ptr++ = '\0';
- regcode = ptr;
-
- return(ret);
-}
-
-/*
- - regc - emit (if appropriate) a byte of code
- */
-static void
-regc(b)
-char b;
-{
- if (regcode != &regdummy)
- *regcode++ = b;
- else
- regsize++;
-}
-
-/*
- - reginsert - insert an operator in front of already-emitted operand
- *
- * Means relocating the operand.
- */
-static void
-reginsert(op, opnd)
-char op;
-char *opnd;
-{
- register char *src;
- register char *dst;
- register char *place;
-
- if (regcode == &regdummy) {
- regsize += 3;
- return;
- }
-
- src = regcode;
- regcode += 3;
- dst = regcode;
- while (src > opnd)
- *--dst = *--src;
-
- place = opnd; /* Op node, where operand used to be. */
- *place++ = op;
- *place++ = '\0';
- *place++ = '\0';
-}
-
-/*
- - regtail - set the next-pointer at the end of a node chain
- */
-static void
-regtail(p, val)
-char *p;
-char *val;
-{
- register char *scan;
- register char *temp;
- register int offset;
-
- if (p == &regdummy)
- return;
-
- /* Find last node. */
- scan = p;
- for (;;) {
- temp = regnext(scan);
- if (temp == NULL)
- break;
- scan = temp;
- }
-
- if (OP(scan) == BACK)
- offset = scan - val;
- else
- offset = val - scan;
- *(scan+1) = (offset>>8)&0377;
- *(scan+2) = offset&0377;
-}
-
-/*
- - regoptail - regtail on operand of first argument; nop if operandless
- */
-static void
-regoptail(p, val)
-char *p;
-char *val;
-{
- /* "Operandless" and "op != BRANCH" are synonymous in practice. */
- if (p == NULL || p == &regdummy || OP(p) != BRANCH)
- return;
- regtail(OPERAND(p), val);
-}
-
-/*
- * regexec and friends
- */
-
-/*
- * Global work variables for regexec().
- */
-static char *reginput; /* String-input pointer. */
-static char *regbol; /* Beginning of input, for  check. */
-static char **regstartp; /* Pointer to startp array. */
-static char **regendp; /* Ditto for endp. */
-
-/*
- * Forwards.
- */
-STATIC int regtry();
-STATIC int regmatch();
-STATIC int regrepeat();
-
-#ifdef DEBUG
-int regnarrate = 0;
-void regdump();
-STATIC char *regprop();
-#endif
-
-/*
- - regexec - match a regexp against a string
- */
-int
-tpt_regexec(prog, string)
-register regexp *prog;
-register char *string;
-{
- register char *s;
- extern char *strchr();
-
- /* Be paranoid... */
- if (prog == NULL || string == NULL) {
- tpt_regerror("NULL parameter");
- return(0);
- }
-
- /* Check validity of program. */
- if (UCHARAT(prog->program) != MAGIC) {
- tpt_regerror("corrupted program");
- return(0);
- }
-
- /* If there is a "must appear" string, look for it. */
- if (prog->regmust != NULL) {
- s = string;
- while ((s = strchr(s, prog->regmust[0])) != NULL) {
- if (strncmp(s, prog->regmust, prog->regmlen) == 0)
- break; /* Found it. */
- s++;
- }
- if (s == NULL) /* Not present. */
- return(0);
- }
-
- /* Mark beginning of line for  . */
- regbol = string;
-
- /* Simplest case: anchored match need be tried only once. */
- if (prog->reganch)
- return(regtry(prog, string));
-
- /* Messy cases: unanchored match. */
- s = string;
- if (prog->regstart != '\0')
- /* We know what char it must start with. */
- while ((s = strchr(s, prog->regstart)) != NULL) {
- if (regtry(prog, s))
- return(1);
- s++;
- }
- else
- /* We don't -- general case. */
- do {
- if (regtry(prog, s))
- return(1);
- } while (*s++ != '\0');
-
- /* Failure. */
- return(0);
-}
-
-/*
- - regtry - try match at specific point
- */
-static int /* 0 failure, 1 success */
-regtry(prog, string)
-regexp *prog;
-char *string;
-{
- register int i;
- register char **sp;
- register char **ep;
-
- reginput = string;
- regstartp = prog->startp;
- regendp = prog->endp;
-
- sp = prog->startp;
- ep = prog->endp;
- for (i = NSUBEXP; i > 0; i--) {
- *sp++ = NULL;
- *ep++ = NULL;
- }
- if (regmatch(prog->program + 1)) {
- prog->startp[0] = string;
- prog->endp[0] = reginput;
- return(1);
- } else
- return(0);
-}
-
-/*
- - regmatch - main matching routine
- *
- * Conceptually the strategy is simple: check to see whether the current
- * node matches, call self recursively to see whether the rest matches,
- * and then act accordingly. In practice we make some effort to avoid
- * recursion, in particular by going through "ordinary" nodes (that don't
- * need to know whether the rest of the match failed) by a loop instead of
- * by recursion.
- */
-static int /* 0 failure, 1 success */
-regmatch(prog)
-char *prog;
-{
- register char *scan; /* Current node. */
- char *next; /* Next node. */
- extern char *strchr();
-
- scan = prog;
-#ifdef DEBUG
- if (scan != NULL && regnarrate)
- fprintf(stderr, "%s(\n", regprop(scan));
-#endif
- while (scan != NULL) {
-#ifdef DEBUG
- if (regnarrate)
- fprintf(stderr, "%s...\n", regprop(scan));
-#endif
- next = regnext(scan);
-
- switch (OP(scan)) {
- case BOL:
- if (reginput != regbol)
- return(0);
- break;
- case EOL:
- if (*reginput != '\0')
- return(0);
- break;
- case ANY:
- if (*reginput == '\0')
- return(0);
- reginput++;
- break;
- case EXACTLY: {
- register int len;
- register char *opnd;
-
- opnd = OPERAND(scan);
- /* Inline the first character, for speed. */
- if (*opnd != *reginput)
- return(0);
- len = strlen(opnd);
- if (len > 1 && strncmp(opnd, reginput, len) != 0)
- return(0);
- reginput += len;
- }
- break;
- case ANYOF:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
- return(0);
- reginput++;
- break;
- case ANYBUT:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
- return(0);
- reginput++;
- break;
- case NOTHING:
- break;
- case BACK:
- break;
- case OPEN+1:
- case OPEN+2:
- case OPEN+3:
- case OPEN+4:
- case OPEN+5:
- case OPEN+6:
- case OPEN+7:
- case OPEN+8:
- case OPEN+9: {
- register int no;
- register char *save;
-
- no = OP(scan) - OPEN;
- save = reginput;
-
- if (regmatch(next)) {
- /*
- * Don't set startp if some later
- * invocation of the same parentheses
- * already has.
- */
- if (regstartp[no] == NULL)
- regstartp[no] = save;
- return(1);
- } else
- return(0);
- }
- break;
- case CLOSE+1:
- case CLOSE+2:
- case CLOSE+3:
- case CLOSE+4:
- case CLOSE+5:
- case CLOSE+6:
- case CLOSE+7:
- case CLOSE+8:
- case CLOSE+9: {
- register int no;
- register char *save;
-
- no = OP(scan) - CLOSE;
- save = reginput;
-
- if (regmatch(next)) {
- /*
- * Don't set endp if some later
- * invocation of the same parentheses
- * already has.
- */
- if (regendp[no] == NULL)
- regendp[no] = save;
- return(1);
- } else
- return(0);
- }
- break;
- case BRANCH: {
- register char *save;
-
- if (OP(next) != BRANCH) /* No choice. */
- next = OPERAND(scan); /* Avoid recursion. */
- else {
- do {
- save = reginput;
- if (regmatch(OPERAND(scan)))
- return(1);
- reginput = save;
- scan = regnext(scan);
- } while (scan != NULL && OP(scan) == BRANCH);
- return(0);
- /* NOTREACHED */
- }
- }
- break;
- case STAR:
- case PLUS: {
- register char nextch;
- register int no;
- register char *save;
- register int min;
-
- /*
- * Lookahead to avoid useless match attempts
- * when we know what character comes next.
- */
- nextch = '\0';
- if (OP(next) == EXACTLY)
- nextch = *OPERAND(next);
- min = (OP(scan) == STAR) ? 0 : 1;
- save = reginput;
- no = regrepeat(OPERAND(scan));
- while (no >= min) {
- /* If it could work, try it. */
- if (nextch == '\0' || *reginput == nextch)
- if (regmatch(next))
- return(1);
- /* Couldn't or didn't -- back up. */
- no--;
- reginput = save + no;
- }
- return(0);
- }
- break;
- case END:
- return(1); /* Success! */
- break;
- default:
- tpt_regerror("memory corruption");
- return(0);
- break;
- }
-
- scan = next;
- }
-
- /*
- * We get here only if there's trouble -- normally "case END" is
- * the terminating point.
- */
- tpt_regerror("corrupted pointers");
- return(0);
-}
-
-/*
- - regrepeat - repeatedly match something simple, report how many
- */
-static int
-regrepeat(p)
-char *p;
-{
- register int count = 0;
- register char *scan;
- register char *opnd;
-
- scan = reginput;
- opnd = OPERAND(p);
- switch (OP(p)) {
- case ANY:
- count = strlen(scan);
- scan += count;
- break;
- case EXACTLY:
- while (*opnd == *scan) {
- count++;
- scan++;
- }
- break;
- case ANYOF:
- while (*scan != '\0' && strchr(opnd, *scan) != NULL) {
- count++;
- scan++;
- }
- break;
- case ANYBUT:
- while (*scan != '\0' && strchr(opnd, *scan) == NULL) {
- count++;
- scan++;
- }
- break;
- default: /* Oh dear. Called inappropriately. */
- tpt_regerror("internal foulup");
- count = 0; /* Best compromise. */
- break;
- }
- reginput = scan;
-
- return(count);
-}
-
-/*
- - regnext - dig the "next" pointer out of a node
- */
-static char *
-regnext(p)
-register char *p;
-{
- register int offset;
-
- if (p == &regdummy)
- return(NULL);
-
- offset = NEXT(p);
- if (offset == 0)
- return(NULL);
-
- if (OP(p) == BACK)
- return(p-offset);
- else
- return(p+offset);
-}
-
-#ifdef DEBUG
-
-STATIC char *regprop();
-
-/*
- - regdump - dump a regexp onto stdout in vaguely comprehensible form
- */
-void
-regdump(r)
-regexp *r;
-{
- register char *s;
- register char op = EXACTLY; /* Arbitrary non-END op. */
- register char *next;
- extern char *strchr();
-
-
- s = r->program + 1;
- while (op != END) { /* While that wasn't END last time... */
- op = OP(s);
- printf("%2d%s", s-r->program, regprop(s)); /* Where, what. */
- next = regnext(s);
- if (next == NULL) /* Next ptr. */
- printf("(0)");
- else
- printf("(%d)", (s-r->program)+(next-s));
- s += 3;
- if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
- /* Literal string, where present. */
- while (*s != '\0') {
- putchar(*s);
- s++;
- }
- s++;
- }
- putchar('\n');
- }
-
- /* Header fields of interest. */
- if (r->regstart != '\0')
- printf("start `%c' ", r->regstart);
- if (r->reganch)
- printf("anchored ");
- if (r->regmust != NULL)
- printf("must have \"%s\"", r->regmust);
- printf("\n");
-}
-
-/*
- - regprop - printable representation of opcode
- */
-static char *
-regprop(op)
-char *op;
-{
- register char *p;
- static char buf[50];
-
- (void) strcpy(buf, ":");
-
- switch (OP(op)) {
- case BOL:
- p = "BOL";
- break;
- case EOL:
- p = "EOL";
- break;
- case ANY:
- p = "ANY";
- break;
- case ANYOF:
- p = "ANYOF";
- break;
- case ANYBUT:
- p = "ANYBUT";
- break;
- case BRANCH:
- p = "BRANCH";
- break;
- case EXACTLY:
- p = "EXACTLY";
- break;
- case NOTHING:
- p = "NOTHING";
- break;
- case BACK:
- p = "BACK";
- break;
- case END:
- p = "END";
- break;
- case OPEN+1:
- case OPEN+2:
- case OPEN+3:
- case OPEN+4:
- case OPEN+5:
- case OPEN+6:
- case OPEN+7:
- case OPEN+8:
- case OPEN+9:
- sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN);
- p = NULL;
- break;
- case CLOSE+1:
- case CLOSE+2:
- case CLOSE+3:
- case CLOSE+4:
- case CLOSE+5:
- case CLOSE+6:
- case CLOSE+7:
- case CLOSE+8:
- case CLOSE+9:
- sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE);
- p = NULL;
- break;
- case STAR:
- p = "STAR";
- break;
- case PLUS:
- p = "PLUS";
- break;
- default:
- tpt_regerror("corrupted opcode");
- break;
- }
- if (p != NULL)
- (void) strcat(buf, p);
- return(buf);
-}
-#endif
-
-/*
- * The following is provided for those people who do not have strcspn() in
- * their C libraries. They should get off their butts and do something
- * about it; at least one public-domain implementation of those (highly
- * useful) string routines has been published on Usenet.
- */
-#ifdef STRCSPN
-/*
- * strcspn - find length of initial segment of s1 consisting entirely
- * of characters not from s2
- */
-
-static int
-strcspn(s1, s2)
-char *s1;
-char *s2;
-{
- register char *scan1;
- register char *scan2;
- register int count;
-
- count = 0;
- for (scan1 = s1; *scan1 != '\0'; scan1++) {
- for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */
- if (*scan1 == *scan2++)
- return(count);
- count++;
- }
- return(count);
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/regmagic.h b/usr/src/cmd/man/src/util/instant.src/tptregexp/regmagic.h
deleted file mode 100644
index 404f66d579..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/regmagic.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * The first byte of the regexp internal "program" is actually this magic
- * number; the start node begins in the second byte.
- */
-#define MAGIC 0234
-#pragma ident "%Z%%M% %I% %E% SMI"
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/regsub.c b/usr/src/cmd/man/src/util/instant.src/tptregexp/regsub.c
deleted file mode 100644
index 0fc272d118..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/regsub.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * regsub
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * subject to the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of
- * this software, no matter how awful, even if they arise
- * from defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-#include <stdio.h>
-#include <tptregexp.h>
-#include "regmagic.h"
-
-#ifndef CHARBITS
-#define UCHARAT(p) ((int)*(unsigned char *)(p))
-#else
-#define UCHARAT(p) ((int)*(p)&CHARBITS)
-#endif
-
-/*
- - regsub - perform substitutions after a regexp match
- */
-void
-tpt_regsub(prog, source, dest)
-regexp *prog;
-char *source;
-char *dest;
-{
- register char *src;
- register char *dst;
- register char c;
- register int no;
- register int len;
- extern char *strncpy();
-
- if (prog == NULL || source == NULL || dest == NULL) {
- tpt_regerror("NULL parm to regsub");
- return;
- }
- if (UCHARAT(prog->program) != MAGIC) {
- tpt_regerror("damaged regexp fed to regsub");
- return;
- }
-
- src = source;
- dst = dest;
- while ((c = *src++) != '\0') {
- if (c == '&')
- no = 0;
- else if (c == '\\' && '0' <= *src && *src <= '9')
- no = *src++ - '0';
- else
- no = -1;
-
- if (no < 0) { /* Ordinary character. */
- if (c == '\\' && (*src == '\\' || *src == '&'))
- c = *src++;
- *dst++ = c;
- } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
- len = prog->endp[no] - prog->startp[no];
- (void) strncpy(dst, prog->startp[no], len);
- dst += len;
- if (len != 0 && *(dst-1) == '\0') { /* strncpy hit NUL. */
- tpt_regerror("damaged match string");
- return;
- }
- }
- }
- *dst++ = '\0';
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/strerror.c b/usr/src/cmd/man/src/util/instant.src/tptregexp/strerror.c
deleted file mode 100644
index ce8c6e198e..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/strerror.c
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/* standin for strerror(3) which is missing on some systems
- * (eg, SUN)
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-char *
-strerror(int num)
-{
- perror(num);
- return "";
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/tests b/usr/src/cmd/man/src/util/instant.src/tptregexp/tests
deleted file mode 100644
index 4301e9f5c4..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/tests
+++ /dev/null
@@ -1,130 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-abc abc y & abc
-abc xbc n - -
-abc axc n - -
-abc abx n - -
-abc xabcy y & abc
-abc ababc y & abc
-ab*c abc y & abc
-ab*bc abc y & abc
-ab*bc abbc y & abbc
-ab*bc abbbbc y & abbbbc
-ab+bc abbc y & abbc
-ab+bc abc n - -
-ab+bc abq n - -
-ab+bc abbbbc y & abbbbc
-ab?bc abbc y & abbc
-ab?bc abc y & abc
-ab?bc abbbbc n - -
-ab?c abc y & abc
-^abc$ abc y & abc
-^abc$ abcc n - -
-^abc abcc y & abc
-^abc$ aabc n - -
-abc$ aabc y & abc
-^ abc y &
-$ abc y &
-a.c abc y & abc
-a.c axc y & axc
-a.*c axyzc y & axyzc
-a.*c axyzd n - -
-a[bc]d abc n - -
-a[bc]d abd y & abd
-a[b-d]e abd n - -
-a[b-d]e ace y & ace
-a[b-d] aac y & ac
-a[-b] a- y & a-
-a[b-] a- y & a-
-a[b-a] - c - -
-a[]b - c - -
-a[ - c - -
-a] a] y & a]
-a[]]b a]b y & a]b
-a[^bc]d aed y & aed
-a[^bc]d abd n - -
-a[^-b]c adc y & adc
-a[^-b]c a-c n - -
-a[^]b]c a]c n - -
-a[^]b]c adc y & adc
-ab|cd abc y & ab
-ab|cd abcd y & ab
-()ef def y &-\1 ef-
-()* - c - -
-*a - c - -
-^* - c - -
-$* - c - -
-(*)b - c - -
-$b b n - -
-a\ - c - -
-a\(b a(b y &-\1 a(b-
-a\(*b ab y & ab
-a\(*b a((b y & a((b
-a\\b a\b y & a\b
-abc) - c - -
-(abc - c - -
-((a)) abc y &-\1-\2 a-a-a
-(a)b(c) abc y &-\1-\2 abc-a-c
-a+b+c aabbabc y & abc
-a** - c - -
-a*? - c - -
-(a*)* - c - -
-(a*)+ - c - -
-(a|)* - c - -
-(a*|b)* - c - -
-(a+|b)* ab y &-\1 ab-b
-(a+|b)+ ab y &-\1 ab-b
-(a+|b)? ab y &-\1 a-a
-[^ab]* cde y & cde
-(^)* - c - -
-(ab|)* - c - -
-)( - c - -
- abc y &
-abc n - -
-a* y &
-([abc])*d abbbcd y &-\1 abbbcd-c
-([abc])*bcd abcd y &-\1 abcd-a
-a|b|c|d|e e y & e
-(a|b|c|d|e)f ef y &-\1 ef-e
-((a*|b))* - c - -
-abcd*efg abcdefg y & abcdefg
-ab* xabyabbbz y & ab
-ab* xayabbbz y & a
-(ab|cd)e abcde y &-\1 cde-cd
-[abhgefdc]ij hij y & hij
-^(ab|cd)e abcde n x\1y xy
-(abc|)ef abcdef y &-\1 ef-
-(a|b)c*d abcd y &-\1 bcd-b
-(ab|ab*)bc abc y &-\1 abc-a
-a([bc]*)c* abc y &-\1 abc-bc
-a([bc]*)(c*d) abcd y &-\1-\2 abcd-bc-d
-a([bc]+)(c*d) abcd y &-\1-\2 abcd-bc-d
-a([bc]*)(c+d) abcd y &-\1-\2 abcd-b-cd
-a[bcd]*dcdcde adcdcde y & adcdcde
-a[bcd]+dcdcde adcdcde n - -
-(ab|a)b*c abc y &-\1 abc-ab
-((a)(b)c)(d) abcd y \1-\2-\3-\4 abc-a-b-d
-[a-zA-Z_][a-zA-Z0-9_]* alpha y & alpha
-^a(bc+|b[eh])g|.h$ abh y &-\1 bh-
-(bc+d$|ef*g.|h?i(j|k)) effgz y &-\1-\2 effgz-effgz-
-(bc+d$|ef*g.|h?i(j|k)) ij y &-\1-\2 ij-ij-j
-(bc+d$|ef*g.|h?i(j|k)) effg n - -
-(bc+d$|ef*g.|h?i(j|k)) bcdd n - -
-(bc+d$|ef*g.|h?i(j|k)) reffgz y &-\1-\2 effgz-effgz-
-((((((((((a)))))))))) - c - -
-(((((((((a))))))))) a y & a
-multiple words of text uh-uh n - -
-multiple words multiple words, yeah y & multiple words
-(.*)c(.*) abcde y &-\1-\2 abcde-ab-de
-\((.*), (.*)\) (a, b) y (\2, \1) (b, a)
-[k] ab n - -
-abcd abcd y &-\&-\\& abcd-&-\abcd
-a(bc)d abcd y \1-\\1-\\\1 bc-\1-\bc
-[ -~]* abc y & abc
-[ -~ -~]* abc y & abc
-[ -~ -~ -~]* abc y & abc
-[ -~ -~ -~ -~]* abc y & abc
-[ -~ -~ -~ -~ -~]* abc y & abc
-[ -~ -~ -~ -~ -~ -~]* abc y & abc
-[ -~ -~ -~ -~ -~ -~ -~]* abc y & abc
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/timer.c b/usr/src/cmd/man/src/util/instant.src/tptregexp/timer.c
deleted file mode 100644
index e67b6dc667..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/timer.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Simple timing program for regcomp().
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * subject to the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of
- * this software, no matter how awful, even if they arise
- * from defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * Usage: timer ncomp nexec nsub
- * or
- * timer ncomp nexec nsub regexp string [ answer [ sub ] ]
- *
- * The second form is for timing repetitions of a single test case.
- * The first form's test data is a compiled-in copy of the "tests" file.
- * Ncomp, nexec, nsub are how many times to do each regcomp, regexec,
- * and regsub. The way to time an operation individually is to do something
- * like "timer 1 50 1".
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-#include <stdio.h>
-
-struct try {
- char *re, *str, *ans, *src, *dst;
-} tests[] = {
-#include "timer.t.h"
-{ NULL, NULL, NULL, NULL, NULL }
-};
-
-#include <tptregexp.h>
-
-int errreport = 0; /* Report errors via errseen? */
-char *errseen = NULL; /* Error message. */
-
-char *progname;
-
-/* ARGSUSED */
-main(argc, argv)
-int argc;
-char *argv[];
-{
- int ncomp, nexec, nsub;
- struct try one;
- char dummy[512];
-
- if (argc < 4) {
- ncomp = 1;
- nexec = 1;
- nsub = 1;
- } else {
- ncomp = atoi(argv[1]);
- nexec = atoi(argv[2]);
- nsub = atoi(argv[3]);
- }
-
- progname = argv[0];
- if (argc > 5) {
- one.re = argv[4];
- one.str = argv[5];
- if (argc > 6)
- one.ans = argv[6];
- else
- one.ans = "y";
- if (argc > 7) {
- one.src = argv[7];
- one.dst = "xxx";
- } else {
- one.src = "x";
- one.dst = "x";
- }
- errreport = 1;
- try(one, ncomp, nexec, nsub);
- } else
- multiple(ncomp, nexec, nsub);
- exit(0);
-}
-
-void
-tpt_regerror(s)
-char *s;
-{
- if (errreport)
- errseen = s;
- else
- error(s, "");
-}
-
-#ifndef ERRAVAIL
-error(s1, s2)
-char *s1;
-char *s2;
-{
- fprintf(stderr, "regexp: ");
- fprintf(stderr, s1, s2);
- fprintf(stderr, "\n");
- exit(1);
-}
-#endif
-
-int lineno = 0;
-
-multiple(ncomp, nexec, nsub)
-int ncomp, nexec, nsub;
-{
- register int i;
- extern char *strchr();
-
- errreport = 1;
- for (i = 0; tests[i].re != NULL; i++) {
- lineno++;
- try(tests[i], ncomp, nexec, nsub);
- }
-}
-
-try(fields, ncomp, nexec, nsub)
-struct try fields;
-int ncomp, nexec, nsub;
-{
- regexp *r;
- char dbuf[BUFSIZ];
- register int i;
-
- errseen = NULL;
- r = tpt_regcomp(fields.re);
- if (r == NULL) {
- if (*fields.ans != 'c')
- complain("tpt_regcomp failure in `%s'", fields.re);
- return;
- }
- if (*fields.ans == 'c') {
- complain("unexpected tpt_regcomp success in `%s'", fields.re);
- free((char *)r);
- return;
- }
- for (i = ncomp-1; i > 0; i--) {
- free((char *)r);
- r = tpt_regcomp(fields.re);
- }
- if (!tpt_regexec(r, fields.str)) {
- if (*fields.ans != 'n')
- complain("tpt_regexec failure in `%s'", "");
- free((char *)r);
- return;
- }
- if (*fields.ans == 'n') {
- complain("unexpected tpt_regexec success", "");
- free((char *)r);
- return;
- }
- for (i = nexec-1; i > 0; i--)
- (void) tpt_regexec(r, fields.str);
- errseen = NULL;
- for (i = nsub; i > 0; i--)
- tpt_regsub(r, fields.src, dbuf);
- if (errseen != NULL) {
- complain("tpt_regsub complaint", "");
- free((char *)r);
- return;
- }
- if (strcmp(dbuf, fields.dst) != 0)
- complain("tpt_regsub result `%s' wrong", dbuf);
- free((char *)r);
-}
-
-complain(s1, s2)
-char *s1;
-char *s2;
-{
- fprintf(stderr, "try: %d: ", lineno);
- fprintf(stderr, s1, s2);
- fprintf(stderr, " (%s)\n", (errseen != NULL) ? errseen : "");
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/tptregexp.h b/usr/src/cmd/man/src/util/instant.src/tptregexp/tptregexp.h
deleted file mode 100644
index 4680daa393..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/tptregexp.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Definitions etc. for regexp(3) routines.
- *
- * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
- * not the System V one.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-#define NSUBEXP 10
-typedef struct regexp {
- char *startp[NSUBEXP];
- char *endp[NSUBEXP];
- char regstart; /* Internal use only. */
- char reganch; /* Internal use only. */
- char *regmust; /* Internal use only. */
- int regmlen; /* Internal use only. */
- char program[1]; /* Unwarranted chumminess with compiler. */
-} regexp;
-
-extern regexp *tpt_regcomp();
-extern int tpt_regexec();
-extern void tpt_regsub();
-extern void tpt_regerror();
diff --git a/usr/src/cmd/man/src/util/instant.src/tptregexp/try.c b/usr/src/cmd/man/src/util/instant.src/tptregexp/try.c
deleted file mode 100644
index 2a4d4d5403..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tptregexp/try.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Simple test program for regexp(3) stuff. Knows about debugging hooks.
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * subject to the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of
- * this software, no matter how awful, even if they arise
- * from defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * Usage: try re [string [output [-]]]
- * The re is compiled and dumped, regexeced against the string, the result
- * is applied to output using regsub(). The - triggers a running narrative
- * from regexec(). Dumping and narrative don't happen unless DEBUG.
- *
- * If there are no arguments, stdin is assumed to be a stream of lines with
- * five fields: a r.e., a string to match it against, a result code, a
- * source string for regsub, and the proper result. Result codes are 'c'
- * for compile failure, 'y' for match success, 'n' for match failure.
- * Field separator is tab.
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-#include <stdio.h>
-#include <tptregexp.h>
-
-#ifdef ERRAVAIL
-char *progname;
-extern char *mkprogname();
-#endif
-
-#ifdef DEBUG
-extern int regnarrate;
-#endif
-
-char buf[BUFSIZ];
-
-int errreport = 0; /* Report errors via errseen? */
-char *errseen = NULL; /* Error message. */
-int status = 0; /* Exit status. */
-
-/* ARGSUSED */
-main(argc, argv)
-int argc;
-char *argv[];
-{
- regexp *r;
- int i;
-
-#ifdef ERRAVAIL
- progname = mkprogname(argv[0]);
-#endif
-
- if (argc == 1) {
- multiple();
- exit(status);
- }
-
- r = tpt_regcomp(argv[1]);
- if (r == NULL)
- error("tpt_regcomp failure", "");
-#ifdef DEBUG
- regdump(r);
- if (argc > 4)
- regnarrate++;
-#endif
- if (argc > 2) {
- i = tpt_regexec(r, argv[2]);
- printf("%d", i);
- for (i = 1; i < NSUBEXP; i++)
- if (r->startp[i] != NULL && r->endp[i] != NULL)
- printf(" \\%d", i);
- printf("\n");
- }
- if (argc > 3) {
- tpt_regsub(r, argv[3], buf);
- printf("%s\n", buf);
- }
- exit(status);
-}
-
-void
-tpt_regerror(s)
-char *s;
-{
- if (errreport)
- errseen = s;
- else
- error(s, "");
-}
-
-#ifndef ERRAVAIL
-error(s1, s2)
-char *s1;
-char *s2;
-{
- fprintf(stderr, "regexp: ");
- fprintf(stderr, s1, s2);
- fprintf(stderr, "\n");
- exit(1);
-}
-#endif
-
-int lineno;
-
-regexp badregexp; /* Implicit init to 0. */
-
-multiple()
-{
- char rbuf[BUFSIZ];
- char *field[5];
- char *scan;
- int i;
- regexp *r;
- extern char *strchr();
-
- errreport = 1;
- lineno = 0;
- while (fgets(rbuf, sizeof(rbuf), stdin) != NULL) {
- rbuf[strlen(rbuf)-1] = '\0'; /* Dispense with \n. */
- lineno++;
- scan = rbuf;
- for (i = 0; i < 5; i++) {
- field[i] = scan;
- if (field[i] == NULL) {
- complain("bad testfile format", "");
- exit(1);
- }
- scan = strchr(scan, '\t');
- if (scan != NULL)
- *scan++ = '\0';
- }
- try(field);
- }
-
- /* And finish up with some internal testing... */
- lineno = 9990;
- errseen = NULL;
- if (tpt_regcomp((char *)NULL) != NULL || errseen == NULL)
- complain("tpt_regcomp(NULL) doesn't complain", "");
- lineno = 9991;
- errseen = NULL;
- if (tpt_regexec((regexp *)NULL, "foo") || errseen == NULL)
- complain("tpt_regexec(NULL, ...) doesn't complain", "");
- lineno = 9992;
- r = tpt_regcomp("foo");
- if (r == NULL) {
- complain("tpt_regcomp(\"foo\") fails", "");
- return;
- }
- lineno = 9993;
- errseen = NULL;
- if (tpt_regexec(r, (char *)NULL) || errseen == NULL)
- complain("tpt_regexec(..., NULL) doesn't complain", "");
- lineno = 9994;
- errseen = NULL;
- tpt_regsub((regexp *)NULL, "foo", rbuf);
- if (errseen == NULL)
- complain("tpt_regsub(NULL, ..., ...) doesn't complain", "");
- lineno = 9995;
- errseen = NULL;
- tpt_regsub(r, (char *)NULL, rbuf);
- if (errseen == NULL)
- complain("tpt_regsub(..., NULL, ...) doesn't complain", "");
- lineno = 9996;
- errseen = NULL;
- tpt_regsub(r, "foo", (char *)NULL);
- if (errseen == NULL)
- complain("tpt_regsub(..., ..., NULL) doesn't complain", "");
- lineno = 9997;
- errseen = NULL;
- if (tpt_regexec(&badregexp, "foo") || errseen == NULL)
- complain("tpt_regexec(nonsense, ...) doesn't complain", "");
- lineno = 9998;
- errseen = NULL;
- tpt_regsub(&badregexp, "foo", rbuf);
- if (errseen == NULL)
- complain("tpt_regsub(nonsense, ..., ...) doesn't complain", "");
-}
-
-try(fields)
-char **fields;
-{
- regexp *r;
- char dbuf[BUFSIZ];
-
- errseen = NULL;
- r = tpt_regcomp(fields[0]);
- if (r == NULL) {
- if (*fields[2] != 'c')
- complain("tpt_regcomp failure in `%s'", fields[0]);
- return;
- }
- if (*fields[2] == 'c') {
- complain("unexpected tpt_regcomp success in `%s'", fields[0]);
- free((char *)r);
- return;
- }
- if (!tpt_regexec(r, fields[1])) {
- if (*fields[2] != 'n')
- complain("tpt_regexec failure in `%s'", "");
- free((char *)r);
- return;
- }
- if (*fields[2] == 'n') {
- complain("unexpected tpt_regexec success", "");
- free((char *)r);
- return;
- }
- errseen = NULL;
- tpt_regsub(r, fields[3], dbuf);
- if (errseen != NULL) {
- complain("tpt_regsub complaint", "");
- free((char *)r);
- return;
- }
- if (strcmp(dbuf, fields[4]) != 0)
- complain("tpt_regsub result `%s' wrong", dbuf);
- free((char *)r);
-}
-
-complain(s1, s2)
-char *s1;
-char *s2;
-{
- fprintf(stderr, "try: %d: ", lineno);
- fprintf(stderr, s1, s2);
- fprintf(stderr, " (%s)\n", (errseen != NULL) ? errseen : "");
- status = 1;
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/traninit.c b/usr/src/cmd/man/src/util/instant.src/traninit.c
deleted file mode 100644
index 91dae1e74b..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/traninit.c
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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
- * ReadSDATA(sdatafile) read/store SDATA mappings from file
- * ReadMapping(mapfile) read/store char mappings from file
- * ________________________________________________________________________
- */
-
-#ifndef lint
-static char *RCSid =
- "$Header: /usr/src/docbook-to-man/Instant/RCS/traninit.c,v 1.6 1998/06/28 19:15:41 fld Exp fld $";
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include <memory.h>
-#include <sys/types.h>
-#include <errno.h>
-
-#include <tptregexp.h>
-#include "general.h"
-#include "translate.h"
-
-#ifndef TRUE
-#define TRUE (1 == 1)
-#endif
-
-/* forward references */
-void RememberTransSpec(Trans_t *, int);
-
-/* ______________________________________________________________________ */
-/* Read the translation specs from the input file, storing in memory.
- * Arguments:
- * Name of translation spec file.
- */
-
-void
-ReadTransSpec(
- char *transfile
-)
-{
- FILE *fp;
- char buf[LINESIZE], *cp, *fn, *cp2;
- int lineno=0, c, i;
- Trans_t T;
-
- if ((fp=OpenFile(transfile)) == NULL) {
- fprintf(stderr, "Can not open translation spec file '%s'.\n%s\n",
- transfile, strerror(errno));
- return;
- }
-
- memset(&T, 0, sizeof T); /* initialize/clear structure */
- while (fgets(buf, LINESIZE, fp)) /* read line from .ts file */
- {
- lineno++;
- /* skip comment and blank lines */
- if (buf[0] == '#' || buf[0] == NL) continue;
-
- /* '-' indicates end of a spec. When we hit one, remember what we've
- * accumulated so far, and null-out the accumulating structure. */
- if (buf[0] == '-') {
- T.lineno = lineno;
- RememberTransSpec(&T, lineno);
- memset(&T, 0, sizeof T);
- continue;
- }
-
- stripNL(buf);
-
- /* See if next line is continued from this one -- ie. it starts with
- * whitespace. If so, append to current line. (This is similar to
- * how e-mail headers work...) */
- while (1) {
- c = getc(fp); /* 1st char of next line */
- if (IsWhite(c)) { /* space or tab? */
- /* keep getting characters until it's a non-whitespace */
- c = getc(fp);
- while (IsWhite(c)) c = getc(fp);
- ungetc(c, fp); /* put back non-whitespace */
- i = strlen(buf);
- buf[i++] = ' ';
- fn = buf + i; /* point to end of string in buffer */
- fgets(fn, LINESIZE-i, fp); /* read and append to buf */
- lineno++;
- stripNL(buf);
- }
- else {
- ungetc(c, fp); /* put back non-whitespace */
- break;
- }
- }
- /* Isolate field value */
- if ((cp=strchr(buf, ':'))) {
- cp++; /* point past colon */
- while (*cp && IsWhite(*cp)) cp++; /* point to content */
- }
- else {
- fprintf(stderr,
- "Trans spec error, missing colon (skipping line):\n %s\n", fn);
- continue;
- }
- fn = buf; /* fn is name of the field, cp the value. */
-
- /* Check field names in order that they're likely to occur. */
- if (!strncmp("GI:", fn, 3)) {
- /* 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 (!strncmp("StartText:", fn, 10)) T.starttext = strdup(cp);
- else if (!strncmp("EndText:", fn, 8)) T.endtext = strdup(cp);
- else if (!strncmp("Relation:", fn, 9)) {
- if (!T.relations) T.relations = NewMap(IMS_relations);
- SetMapping(T.relations, cp);
- }
- else if (!strncmp("Replace:", fn, 8)) T.replace = strdup(cp);
- else if (!strncmp("AttValue:", fn, 9)) {
- 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++;
- }
- /* If there's only one item in context, it's the parent. Treat
- * it specially, since it's easier to just check parent gi.
- */
- else if (!strncmp("Context:", fn, 8)) T.context = strdup(cp);
- else if (!strncmp("Message:", fn, 8)) T.message = strdup(cp);
- else if (!strncmp("SpecID:", fn, 7)) T.my_id = atoi(cp);
- else if (!strncmp("Action:", fn, 7)) T.use_id = atoi(cp);
- else if (!strncmp("Content:", fn, 8)) T.content = strdup(cp);
- else if (!strncmp("PAttSet:", fn, 8)) T.pattrset = strdup(cp);
- else if (!strncmp("Verbatim:", fn, 9)) T.verbatim = TRUE;
- else if (!strncmp("Ignore:", fn, 7)) {
- 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 (line %d): %s\n",
- lineno, cp);
- }
- else if (!strncmp("VarValue:", fn, 9)) {
- char **tok;
- i = 2;
- tok = Split(cp, &i, S_STRDUP);
- T.var_name = tok[0];
- T.var_value = tok[1];
- }
- else if (!strncmp("VarREValue:", fn, 11)) {
- char **tok;
- i = 2;
- tok = Split(cp, &i, S_STRDUP);
- T.var_RE_name = tok[0];
- ExpandVariables(tok[1], buf, 0);
- if (!(T.var_RE_value=tpt_regcomp(buf))) {
- fprintf(stderr, "Regex error in VarREValue Content: %s\n",
- tok[1]);
- }
- }
- else if (!strncmp("Set:", fn, 4)) {
- if (!T.set_var) T.set_var = NewMap(IMS_setvar);
- SetMapping(T.set_var, cp);
- }
- else if (!strncmp("Increment:", fn, 10)) {
- if (!T.incr_var) T.incr_var = NewMap(IMS_incvar);
- SetMapping(T.incr_var, cp);
- }
- else if (!strncmp("Substitute:", fn, 11)) {
- if (!T.incr_var) T.substitute = NewMap(IMS_incvar);
- SetMapping(T.substitute, cp);
- }
- else if (!strncmp("NthChild:", fn, 9)) T.nth_child = atoi(cp);
- else if (!strncmp("Var:", fn, 4)) SetMapping(Variables, cp);
- else if (!strncmp("Quit:", fn, 5)) T.quit = strdup(cp);
- else if (!strncmp("Trim:", fn, 5)) T.trim = strdup(cp);
- else
- fprintf(stderr, "Unknown translation spec (skipping it): %s\n", fn);
- }
- fclose(fp);
-}
-
-/* ______________________________________________________________________ */
-/* 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=tpt_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=tpt_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=tpt_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;
-}
-
-
-/* ______________________________________________________________________ */
-/* Read mapping file, filling in structure slots (just name-value pairs).
- * Arguments:
- * Name of character mapping file.
- */
-
-void
-ReadCharMap(
- char *filename
-)
-{
- FILE *fp;
- char buf[LINESIZE], *name, *val;
- int lineno=0;
- int n_alloc=0; /* number of slots allocated so far */
-
- if ((fp=OpenFile(filename)) == NULL) {
- fprintf(stderr, "Can not open character mapping file '%s'.\n%s\n",
- filename, strerror(errno));
- return;
- }
-
- /* We allocate slots in blocks of N, so we don't have to call
- * malloc so many times. */
- n_alloc = 32;
- Calloc(n_alloc, CharMap, Mapping_t);
-
- nCharMap = 0;
- while (fgets(buf, LINESIZE, fp))
- {
- lineno++;
- /* skip comment and blank lines */
- if (buf[0] == '#' || buf[0] == NL) continue;
- stripNL(buf);
-
- /* Need more slots for mapping structures? */
- if (nCharMap >= n_alloc) {
- n_alloc += 32;
- Realloc(n_alloc, CharMap, Mapping_t);
- }
- name = val = buf;
- while (*val && !IsWhite(*val)) val++; /* point past end of name */
- if (*val) {
- *val++ = EOS; /* terminate name */
- while (*val && IsWhite(*val)) val++; /* point to value */
- }
- if (name) {
- CharMap[nCharMap].name = strdup(name);
- if (val) CharMap[nCharMap].sval = strdup(val);
- if (CharMap[nCharMap].name[0] == '\\') CharMap[nCharMap].name++;
- nCharMap++;
- }
- }
- fclose(fp);
-}
-
-/* ______________________________________________________________________ */
-/* Read SDATA mapping file, remembering the mappings in memory.
- * Input file format is 2 columns, name and value, separated by one or
- * more tabs (not spaces).
- * This can be called multuple times, reading several files.
- * Arguments:
- * Name of SDATA entity mapping file.
- */
-
-void
-ReadSDATA(
- char *filename
-)
-{
- FILE *fp;
- char buf[LINESIZE], *name, *val;
- int lineno=0;
-
- if ((fp=OpenFile(filename)) == NULL) {
- fprintf(stderr, "Can not open SDATA file '%s': %s", filename,
- strerror(errno));
- return;
- }
-
- if (!SDATAmap) SDATAmap = NewMap(IMS_sdata);
-
- while (fgets(buf, LINESIZE, fp))
- {
- lineno++;
- /* skip comment and blank lines */
- if (buf[0] == '#' || buf[0] == NL) continue;
- stripNL(buf);
-
- name = val = buf;
- while (*val && *val != TAB) val++; /* point past end of name */
- if (*val) {
- *val++ = EOS; /* terminate name */
- while (*val && *val == TAB) val++; /* point to value */
- }
-
- SetMappingNV(SDATAmap, name, val);
- }
- fclose(fp);
-}
-
-/* ______________________________________________________________________ */
diff --git a/usr/src/cmd/man/src/util/instant.src/translate.c b/usr/src/cmd/man/src/util/instant.src/translate.c
deleted file mode 100644
index 61961b2e1f..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/translate.c
+++ /dev/null
@@ -1,1016 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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, transfile, mapfile, fp)
- * ________________________________________________________________________
- */
-
-#ifndef lint
-static char *RCSid =
- "$Header: /usr/src/docbook-to-man/Instant/RCS/translate.c,v 1.16 1998/06/29 04:13:40 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 <tptregexp.h>
-#include "general.h"
-#define STORAGE
-#include "translate.h"
-
-static Trans_t NullTrans; /* an empty one */
-
-/* stack for nested Transpecs */
-
-#define MAXTRANSPECDEPTH 500 /* max depth of transpec nesting */
-
-static Trans_t *tsStack[MAXTRANSPECDEPTH];
-static int tsStacki = -1; /* index into used stack */
-
-/* forward references */
-void ProcesOutputSpec(char *, Element_t *, FILE *, int);
-static void WasProcessed(Element_t *);
-
-/* ______________________________________________________________________ */
-/* Translate the subtree starting at 'e'. Use 'transfile' for translation
- * specs. Output goes to 'fp'. This is the entry point for translating
- * an instance.
- * Assumes you've read SDATA and CharMap files (optionally).
- * Arguments:
- * Pointer to element under consideration.
- * Pointer to name of translation spec file.
- * FILE pointer to where to write output.
- */
-
-void
-DoTranslate(
- Element_t *e,
- char *transfile,
- FILE *fp
-)
-{
- Trans_t *t, *tn;
-
- if (!transfile) {
- fprintf(stderr,
- "Translation spec file not specified. Skipping translation.\n");
- return;
- }
- ReadTransSpec(transfile);
-
- /* 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, k;
- 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 {
- if ( warnings )
- if (! IsContPI(e, i) )
- fprintf(stderr, "warning: ${+current} skipped element content\n");
- }
- }
-
- } else
-
- if ( ! strcmp(vp, "+caps") ) {
- for ( i=k=0; i<e->ncont; i++ ) {
- if ( IsContData(e, i) ) {
- for ( j=0; ContData(e, i)[j]; j++ ) {
- *op++ = toupper(ContData(e, i)[j]);
- }
- } else {
-#if FALSE
- if ( warnings )
- fprintf(stderr, "warning: ${+caps} skipped element content\n");
-#endif
- }
- }
- *op = 0;
-
- } 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) {
- /* Is esc-$ next? If so, just copy the '$'. */
- if (*ib == '\\' && ib[1] == '$') {
- ib++; /* skip esc */
- *dest++ = *ib++; /* copy $ */
- continue;
- }
-
- /* 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 (! tpt_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 (!tpt_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 || !tpt_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 (tpt_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,
- Trans_t *t
-)
-{
- char *cp, buf[LINESIZE], *dp, *sub, prev;
- int i, j, mapped;
- Mapping_t *m;
-
- /* Worry about embedded newlines? */
-
- if (!fp) return;
-
- /* CLEANUP: this should really all be done in OutputString(). (I think) */
-
- if (nCharMap) {
- /* for each character, see if it's mapped to something else */
- for (prev=0,cp=data,dp=buf; *cp; cp++) {
- if (prev == '\\') {
- *dp++ = *cp;
- prev = *cp;
- continue;
- }
- for (mapped=0,i=0; !t->verbatim && (i<nCharMap); i++) {
- if ((*cp != CharMap[i].name[0]) ||
- ((*cp == '\\') && (*(cp+1) != '\\')) )
- continue;
- if ( *cp == '\\' )
- *cp++;
- sub = CharMap[i].sval;
- while (*sub) *dp++ = *sub++;
- mapped = 1;
- break;
- }
- for ( j=tsStacki; j >= 0; j-- ) {
- if (tsStack[j]->substitute) {
- for (m=tsStack[j]->substitute->maps,i=0;
- i<tsStack[j]->substitute->n_used; i++) {
- if ( *cp == m[i].name[0] ) {
- sub = m[i].sval;
- while (*sub)
- *dp++ = *sub++;
- mapped = 2;
- break;
- }
- }
- if ( mapped == 2 )
- break;
- }
- }
- if ( *cp == -1 ) *cp = '';
- if (!mapped && t->trim && (strchr(t->trim, *cp) != NULL)) {
- continue;
- }
- if (!mapped) *dp++ = *cp;
- prev = *cp;
- }
- *dp = EOS;
- dp = buf;
- }
- else dp = data;
- OutputString(dp, 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[5000];
-
- /* 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);
- }
-
- /* stack this element */
- PushTranspecName(t);
-
- /* 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 */
- PopTranspecName();
- 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);
- }
- 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;
- PopTranspecName();
-}
-
-/* ______________________________________________________________________ */
-/* 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);
-}
-
-/* ______________________________________________________________________ */
-/* push the name of a transpec (the new active one) onto the stack
- * Arguments:
- * transpec name
- */
-
-void
-PushTranspecName(
- Trans_t *t
-)
-{
- if ( tsStacki >= MAXTRANSPECDEPTH ) {
- fprintf(stderr, "Transpec stack overflow (%d)\n", MAXTRANSPECDEPTH);
- exit(1);
- }
- tsStack[++tsStacki] = t;
-}
-
-/* ______________________________________________________________________ */
-/* pop the top name of a transpec off the stack
- */
-
-void
-PopTranspecName(
- Trans_t *t
-)
-{
- if ( tsStacki < 0 ) {
- fprintf(stderr, "Transpec stack underflow\n");
- exit(1);
- }
- tsStacki--;
-}
diff --git a/usr/src/cmd/man/src/util/instant.src/translate.h b/usr/src/cmd/man/src/util/instant.src/translate.h
deleted file mode 100644
index 5fe2b0526a..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/translate.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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.5 1998/06/29 04:13:40 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 *substitute; /* substitute text as specified */
- Map_t *incr_var; /* increment these variables */
- char *quit; /* print message and exit */
- char *trim; /* characters to trim from pass-through */
-
- /* 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 *);
-void PushTranspecName(Trans_t *);
-void PopTranspecName();
-
-/* 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);
-
-/* ______________________________________________________________________ */
-
diff --git a/usr/src/cmd/man/src/util/instant.src/tranvar.c b/usr/src/cmd/man/src/util/instant.src/tranvar.c
deleted file mode 100644
index afd94751e9..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/tranvar.c
+++ /dev/null
@@ -1,769 +0,0 @@
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-/*
-#pragma ident "%Z%%M% %I% %E% SMI"
- * 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.8 1998/06/28 18:53:40 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 <tptregexp.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, *cp2, *atval;
- char **tok;
- int ntok, n, i, actioni;
- char *action, *action1;
- Element_t *ep;
- Trans_t *t, *tt;
- Entity_t *entp;
-
- /* 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 ( ntok >= 2 ) {
- cp2 = FindAttValByName(e, tok[1]);
- if ( ! (entp = FindEntity(cp2)) ) {
- fprintf(stderr, "Can't find entity named %s (via _filename expression):\n", tok[1]);
- PrintLocation(e, stderr);
- return;
- }
- OutputString(entp->sysid, fp, track_pos);
- } else {
- if (!e->entity) {
- fprintf(stderr, "Expected ext entity (element %s) - no ->entity (internal error? bug?):\n", e->gi);
- PrintLocation(e, stderr);
- return;
- }
- if (!e->entity->fname) {
- fprintf(stderr, "Expected filename (element %s) - no ->entity->fname (internal error? bug?):\n", e->gi);
- PrintLocation(e, stderr);
- return;
- }
- OutputString(e->entity->sysid, 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.
- * Format: _followrel relationship gi action */
- else if (StrEq(tok[0], "followrel")) {
- if (ntok >= 4)
- (void)CheckRelation(e, tok[1], tok[2], tok[3], fp, RA_Related);
- }
-
- /* 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
- * Format: _issete varname [value] action -- expands value */
- else if (StrEq(tok[0], "isset") || StrEq(tok[0], "issete")) {
- if ((cp = FindMappingVal(Variables, tok[1]))) {
- if (ntok == 3) TranTByAction(e, tok[2], fp);
- else
- if (ntok > 3) {
- if ( StrEq(tok[0], "issete") ) {
- ExpandVariables(tok[2], buf, e);
- cp2 = buf;
- } else
- cp2 = tok[2];
- if ( !strcmp(cp, cp2))
- 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);
- }
- }
-
- /* 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(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);
- }
- }
- }
- }
- /* 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);
- }
-}
-
-/* ______________________________________________________________________ */
-
diff --git a/usr/src/cmd/man/src/util/instant.src/util.c b/usr/src/cmd/man/src/util/instant.src/util.c
deleted file mode 100644
index 613ad7416e..0000000000
--- a/usr/src/cmd/man/src/util/instant.src/util.c
+++ /dev/null
@@ -1,1152 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
- * All rights reserved.
- */
-
-/*
- * Copyright 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 1996 X Consortium
- * Copyright 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.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * ________________________________________________________________________
- *
- * General utility functions for 'instant' program. These are used
- * throughout the rest of the program.
- *
- * Entry points for this module:
- * Split(s, &n, flags) split string into n tokens
- * NewMap(slot_incr) create a new mapping structure
- * FindMapping(map, name) find mapping by name; return mapping
- * FindMappingVal(map, name) find mapping by name; return value
- * SetMapping(map, s) set mapping based on string
- * OpenFile(filename) open file, looking in inst path
- * FindElementPath(elem, s) find path to element
- * PrintLocation(ele, fp) print location of element in tree
- * NearestOlderElem(elem, name) find prev elem up tree with name
- * OutputString(s, fp, track_pos) output string
- * AddElemName(name) add elem to list of known elements
- * AddAttName(name) add att name to list of known atts
- * FindAttByName(elem, name) find an elem's att by name
- * FindContext(elem, lev, context) find context of elem
- * QRelation(elem, name, rel_flag) find relation elem has to named elem
- * DescendTree(elem, enter_f, leave_f, data_f, dp) descend doc tree,
- * calling functions for each elem/node
- * ________________________________________________________________________
- */
-
-#ifndef lint
-static char *RCSid =
-"$Header: /usr/local/src/docbook-to-man/\
-Instant/RCS/util.c,v 1.7 1998/12/14 05:06:24 fld Exp $";
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include <memory.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/file.h>
-/*
- * CSS don't have it and I don't see where it's used
- * #include <values.h>
- */
-
-#include "general.h"
-
-/* forward references */
-static char *LookupSDATA(char *);
-
-/* ______________________________________________________________________ */
-/*
- * "Split" a string into tokens. Given a string that has space-separated
- * (space/tab) tokens, return a pointer to an array of pointers to the
- * tokens. Like what the shell does with *argv[]. The array can be is
- * static or allocated. Space can be allocated for string, or allocated.
- * Arguments:
- * Pointer to string to pick apart.
- * Pointer to max number of tokens to find; actual number found is
- * returned. If 0 or null pointer, use a 'sane' maximum number (hard-
- * code). If more tokens than the number specified, make last token be
- * a single string composed of the rest of the tokens (includes spaces).
- * Flag. Bit 0 says whether to make a copy of input string (since we'll
- * clobber parts of it). To free the string, use the pointer to
- * the first token returned by the function (or *ret_value).
- * Bit 1 says whether to allocate the vector itself. If not, use
- * (and return) a static vector.
- * Return:
- * Pointer to the provided string (for convenience of caller).
- */
-
-char **
-Split(
- char *s, /* input string */
- int *ntok, /* # of tokens desired (input)/found (return) */
- int flag /* dup string? allocate a vector? */
-)
-{
- int quote, maxnt, i = 0;
- int n_alloc;
- char **tokens;
- static char *local_tokens[100];
-
- /*
- * Figure max number of tokens (maxnt) to find.
- * 0 means find them all.
- */
- if (ntok == NULL)
- maxnt = 100;
- else {
- if (*ntok <= 0 || *ntok > 100)
- maxnt = 100; /* arbitrary size */
- else maxnt = *ntok;
- *ntok = 0;
- }
-
- if (!s)
- return (0); /* no string */
-
- /* Point to 1st token (there may be initial space) */
- while (*s && IsWhite(*s)) s++; /* skip initial space, if any */
- if (*s == EOS)
- return (0); /* none found? */
-
- /* See if caller wants us to copy the input string. */
- if (flag & S_STRDUP) s = strdup(s);
-
- /* See if caller wants us to allocate the returned vector. */
- if (flag & S_ALVEC) {
- n_alloc = 20;
- Malloc(n_alloc, tokens, char *);
- /*
- * if caller did not specify max tokens to find,
- * set to more than there will possibly ever be
- */
- if (!ntok || !(*ntok)) maxnt = 10000;
- } else tokens = local_tokens;
-
- i = 0; /* index into vector */
- tokens[0] = s; /* s already points to 1st token */
- while (i < maxnt) {
- quote = (*s == '\007');
- if (quote) s++; /* skip quote */
- tokens[i] = s; /* point vector member at start of token */
- i++;
- /* If we allocated vector, see if we need more space. */
- if ((flag & S_ALVEC) && i >= n_alloc) {
- n_alloc += 20;
- Realloc(n_alloc, tokens, char *);
- }
- if (i >= maxnt) break; /* is this the last one? */
- while (*s && (quote || !IsWhite(*s)) &&
- (!quote || (*s != '\007'))) s++;
- /* skip past end of token */
- if (*s && quote) {
- *s = EOS;
- s++;
- }
- if (*s == EOS) break; /* at end of input string? */
- if (*s) *s++ = EOS; /* terminate token string */
- while (*s && IsWhite(*s)) s++; /* skip space - to next token */
- }
- if (ntok) *ntok = i; /* return number of tokens found */
- tokens[i] = 0; /* null-terminate vector */
- return (tokens);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Mapping routines. These are used for name-value pairs, like attributes,
- * variables, and counters. A "Map" is an opaque data structure used
- * internally by these routines. The caller gets one when creating a new
- * map, then hands it to other routines that need it. A "Mapping" is a
- * name/value pair. The user has access to this.
- * Here's some sample usage:
- *
- * Map *V;
- * V = NewMap(20);
- * SetMappingNV(V, "home", "/users/bowe");
- * printf("Home: %s\n", FindMappingVal(V, "home");
- */
-
-/*
- * Allocate new map structure. Only done once for each map/variable list.
- * Arg:
- * Number of initial slots to allocate space for. This is also the
- * "chunk size" - how much to allocate when we use up the given space.
- * Return:
- * Pointer to the (opaque) map structure. (User passes this to other
- * mapping routines.)
- */
-Map_t *
-NewMap(
- int slot_increment
-)
-{
- Map_t *M;
- Calloc(1, M, Map_t);
- /*
- * should really do the memset's in Calloc/Malloc/Realloc
- * macros, but that will have to wait until time permits -CSS
- */
- memset((char *)M, 0, sizeof (Map_t));
- if (!slot_increment) slot_increment = 1;
- M->slot_incr = slot_increment;
- return (M);
-}
-
-/*
- * Given pointer to a Map and a name, find the mapping.
- * Arguments:
- * Pointer to map structure (as returned by NewMap().
- * Variable name.
- * Return:
- * Pointer to the matching mapping structure, or null if not found.
- */
-Mapping_t *
-FindMapping(
- Map_t *M,
- char *name
-)
-{
- int i;
- Mapping_t *m;
-
- if (!M || M->n_used == 0)
- return (NULL);
- for (m = M->maps, i = 0; i < M->n_used; i++)
- if (m[i].name[0] == name[0] &&
- (strcmp(m[i].name, name) == 0))
- return (&m[i]);
- return (NULL);
-
-}
-
-/*
- * Given pointer to a Map and a name, return string value of the mapping.
- * Arguments:
- * Pointer to map structure (as returned by NewMap().
- * Variable name.
- * Return:
- * Pointer to the value (string), or null if not found.
- */
-char *
-FindMappingVal(
- Map_t *M,
- char *name
-)
-{
- Mapping_t *m;
-
- if ((strcmp(name, "each_A") == 0) ||
- (strcmp(name, "each_C") == 0)) {
- return (Get_A_C_value(name));
- }
-
- /*
- * if (!M || M->n_used == 0) return NULL;
- * if ((m = FindMapping(M, name))) return m->sval;
- * return (NULL);
- */
- if (!M || M->n_used == 0) {
- return (NULL);
- }
- if ((m = FindMapping(M, name))) {
- return (m->sval);
- }
- return (NULL);
-
-}
-
-/*
- * Set a mapping/variable in Map M. Input string is a name-value pair where
- * there is some amount of space after the name. The correct mapping is done.
- * Arguments:
- * Pointer to map structure (as returned by NewMap().
- * Pointer to variable name (string).
- * Pointer to variable value (string).
- */
-void
-SetMappingNV(
- Map_t *M,
- char *name,
- char *value
-)
-{
- FILE *pp;
- char buf[LINESIZE], *cp, *s;
- int i;
- Mapping_t *m;
- Mapping_t *xx;
-
- /* First, look to see if it's a "well-known" variable. */
- if (strcmp(name, "verbose") == 0) {
- verbose = atoi(value); return;
- }
- if (strcmp(name, "warnings") == 0) {
- warnings = atoi(value); return;
- }
- if (strcmp(name, "foldcase") == 0) {
- fold_case = atoi(value); return;
- }
-
- m = FindMapping(M, name); /* find existing mapping (if set) */
-
- /* OK, we have a string mapping */
- if (m) { /* exists - just replace value */
- free(m->sval);
- if (value) m->sval = strdup(value);
- else m->sval = NULL;
- } else {
- if (name) { /* just in case */
- /* Need more slots for mapping structures? Allocate in clumps. */
- if (M->n_used == 0) {
- M->n_alloc = M->slot_incr;
- Malloc(M->n_alloc, M->maps, Mapping_t);
- } else
- if (M->n_used >= M->n_alloc) {
- M->n_alloc += M->slot_incr;
- Realloc(M->n_alloc, M->maps, Mapping_t);
- }
-
- m = &M->maps[M->n_used];
- M->n_used++;
- m->name = strdup(name);
- if (value) m->sval = strdup(value);
- else m->sval = NULL;
- }
- }
-
- if (value) {
- /*
- * See if the value is a command to run. If so, run the command
- * and replace the value with the output.
- */
- s = value;
- if (*s == '!') {
- s++; /* point to command */
- if ((pp = popen(s, "r"))) {
- /* run cmd, read its output */
- i = 0;
- cp = buf;
- while (fgets(cp, LINESIZE-i, pp)) {
- i += strlen(cp);
- cp = &buf[i];
- if (i >= LINESIZE) {
- fprintf(stderr,
- "Prog execution of "
- "variable '%s' too "
- "long.\n", m->name);
- break;
- }
- }
- free(m->sval);
- stripNL(buf);
- m->sval = strdup(buf);
- pclose(pp);
- } else {
- sprintf(buf, "Could not start program '%s'", s);
- perror(buf);
- }
- }
- }
-}
-
-/*
- * Separate name and value from input string, then pass to SetMappingNV.
- * Arguments:
- * Pointer to map structure (as returned by NewMap().
- * Pointer to variable name and value (string), in form "name value".
- */
-void
-SetMapping(
- Map_t *M,
- char *s
-)
-{
- char buf[LINESIZE];
- char *name, *val;
-
- if (!M) {
- fprintf(stderr, "SetMapping: Map not initialized.\n");
- return;
- }
- strcpy(buf, s);
- name = val = buf;
- while (*val && !IsWhite(*val)) val++; /* point past end of name */
- if (*val) {
- *val++ = EOS; /* terminate name */
- while (*val && IsWhite(*val)) val++; /* point to value */
- }
- if (name) SetMappingNV(M, name, val);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Opens a file for reading. If not found in current directory, try
- * lib directories (from TPT_LIB env variable, or -l option).
- * Arguments:
- * Filename (string).
- * Return:
- * FILE pointer to open file, or null if it not found or can't open.
- */
-
-FILE *
-OpenFile(
- char *filename
-)
-{
- FILE *fp;
- char buf[LINESIZE];
- int i;
- static char **libdirs;
- static int nlibdirs = -1;
-
- if ((fp = fopen(filename, "r")))
- return (fp);
-
- if (*filename == '/')
- return (NULL); /* full path specified? */
-
- if (nlibdirs < 0) {
- char *cp, *s;
- if (tpt_lib) {
- s = strdup(tpt_lib);
- for (cp = s; *cp; cp++)
- if (*cp == ':')
- *cp = ' ';
- nlibdirs = 0;
- libdirs = Split(s, &nlibdirs, S_ALVEC);
- } else
- nlibdirs = 0;
- }
- for (i = 0; i < nlibdirs; i++) {
- sprintf(buf, "%s/%s", libdirs[i], filename);
- if ((fp = fopen(buf, "r")))
- return (fp);
- }
- return (NULL);
-}
-
-/* ______________________________________________________________________ */
-/*
- * This will find the path to an tag. The format is the:
- * tag1(n1):tag2(n2):tag3
- * where the tags are going down the tree and the numbers indicate which
- * child (the first is numbered 1) the next tag is.
- * Returns pointer to the string just written to (so you can use this
- * function as a printf arg).
- * Arguments:
- * Pointer to element under consideration.
- * String to write path into (provided by caller).
- * Return:
- * Pointer to the provided string (for convenience of caller).
- */
-char *
-FindElementPath(
- Element_t *e,
- char *s
-)
-{
- Element_t *ep;
- int i, e_path[MAX_DEPTH];
- char *cp;
-
- /* Move up the tree, noting "birth order" of each element encountered */
- for (ep = e; ep; ep = ep->parent)
- e_path[ep->depth-1] = ep->my_eorder;
- /* Move down the tree, printing the element names to the string. */
- for (cp = s, i = 0, ep = DocTree; i < e->depth;
- ep = ep->econt[e_path[i]], i++) {
- sprintf(cp, "%s(%d) ", ep->gi, e_path[i]);
- cp += strlen(cp);
- }
- sprintf(cp, "%s", e->gi);
- return (s);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Print some location info about a tag. Helps user locate error.
- * Messages are indented 2 spaces (convention for multi-line messages).
- * Arguments:
- * Pointer to element under consideration.
- * FILE pointer of where to print.
- */
-
-void
-PrintLocation(
- Element_t *e,
- FILE *fp
-)
-{
- char *s, buf[LINESIZE];
-
- if (!e || !fp)
- return;
- fprintf(fp, " Path: %s\n", FindElementPath(e, buf));
- if ((s = NearestOlderElem(e, "TITLE")))
- fprintf(fp, " Position hint: TITLE='%s'\n", s);
- if (e->lineno) {
- if (e->infile)
- fprintf(fp, " At or near instance file: %s, "
- "line: %d\n", e->infile, e->lineno);
- else
- fprintf(fp, " At or near instance line: "
- "%d\n", e->lineno);
- }
- if (e->id)
- fprintf(fp, " ID: %s\n", e->id);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Finds the data part of the nearest "older" tag (up the tree, and
- * preceding) whose tag name matches the argument, or "TITLE", if null.
- * Returns a pointer to the first chunk of character data.
- * Arguments:
- * Pointer to element under consideration.
- * Name (GI) of element we'll return data from.
- * Return:
- * Pointer to that element's data content.
- */
-char *
-NearestOlderElem(
- Element_t *e,
- char *name
-)
-{
- int i;
- Element_t *ep;
-
- if (!e)
- return (0);
- if (!name) name = "TITLE"; /* useful default */
-
- for (; e->parent; e = e->parent) /* move up tree */
- for (i = 0; i <= e->my_eorder; i++) {
- /* check preceding sibs */
- ep = e->parent;
- if (strcmp(name, ep->econt[i]->gi) == 0)
- return ep->econt[i]->ndcont ?
- ep->econt[i]->dcont[0] : "-empty-";
- }
-
- return (NULL);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Expands escaped strings in the input buffer (things like tabs, newlines,
- * octal characters - using C style escapes) and outputs buffer to specified
- * fp. The hat/anchor character forces that position to appear at the
- * beginning of a line. The cursor position is kept track of (optionally)
- * so that this can be done.
- * Arguments:
- * Pointer to element under consideration.
- * FILE pointer of where to print.
- * Flag saying whether or not to keep track of our position in the output
- * stream. (We want to when writing to a file, but not for stderr.)
- */
-
-void
-OutputString(
- char *s,
- FILE *fp,
- int track_pos
-)
-{
- int i;
- char c, *sdata, *cp;
- char saved_c, *saved_cp;
- static int char_pos; /* remembers our character position */
-
- if (!fp)
- return;
- if (!s) s = ""; /* no string - go to start of line */
-
- for (; *s; s++) {
- if (*s == '\\') {
- s++;
- if (track_pos) char_pos++;
- switch (*s) {
- default: c = *s; break;
-
- case 's': c = ' '; break;
-
- case 't': c = TAB; break;
-
- case 'n': c = NL;
- char_pos = 0; break;
-
- case 'r': c = CR;
- char_pos = 0; break;
-
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- /* for octal numbers (C style) */
- /* of the form \012 */
- c = *s - '0';
- for (i = 1, s++; ((*s >= '0') &&
- (*s <= '7') &&
- (i <= 2)); s++, i++)
- c = (c << 3) + (*s - '0');
- s--;
- break;
-
- case '|': /* SDATA */
- s++; /* point past \| */
- sdata = s;
- /* find matching/closing \| */
- cp = s;
- while (*cp && *cp != '\\' &&
- cp[1] != '|') cp++;
- if (!*cp) break;
-
- saved_cp = cp;
- saved_c = *saved_cp;
- *cp = EOS; /* terminate sdata string */
- cp++;
- s = cp; /* s now points to | */
-
- cp = LookupSDATA(sdata);
- if (cp) OutputString(cp, fp, track_pos);
- else {
- /* not found - output sdata */
- /* thing in brackets */
- putc('[', fp);
- fputs(sdata, fp);
- putc(']', fp);
- }
-
- *saved_cp = saved_c;
-
- c = 0;
- break;
- }
- } else { /* not escaped - just pass the character */
- c = *s;
- /*
- * If caller wants us to track position, see if it's an anchor
- * (ie, align at a newline).
- */
- if (track_pos) {
- if (c == ANCHOR) {
- /*
- * If we're already at the start of
- * a line, don't do another newline.
- */
- if (char_pos != 0) c = NL;
- else c = 0;
- } else
- char_pos++;
- if (c == NL) char_pos = 0;
- } else if (c == ANCHOR) c = NL;
- }
- if (c) putc(c, fp);
- }
-}
-
-/* ______________________________________________________________________ */
-/*
- * Figure out value of SDATA entity.
- * We rememeber lookup hits in a "cache" (a shorter list), and look in
- * cache before general list. Typically there will be LOTS of entries
- * in the general list and only a handful in the hit list. Often, if an
- * entity is used once, it'll be used again.
- * Arguments:
- * Pointer to SDATA entity token in ESIS.
- * Return:
- * Mapped value of the SDATA entity.
- */
-
-static char *
-LookupSDATA(
- char *s
-)
-{
- char *v;
- static Map_t *Hits; /* remember lookup hits */
-
- /* If we have a hit list, check it. */
- if (Hits) {
- if ((v = FindMappingVal(Hits, s)))
- return (v);
- }
-
- v = FindMappingVal(SDATAmap, s);
-
- /* If mapping found, remember it, then return it. */
- if ((v = FindMappingVal(SDATAmap, s))) {
- if (!Hits) Hits = NewMap(IMS_sdatacache);
- SetMappingNV(Hits, s, v);
- return (v);
- }
-
- fprintf(stderr, "Error: Could not find SDATA substitution '%s'.\n", s);
- return (NULL);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Add tag 'name' of length 'len' to list of tag names (if not there).
- * This is a list of null-terminated strings so that we don't have to
- * keep using the name length.
- * Arguments:
- * Pointer to element name (GI) to remember.
- * Return:
- * Pointer to the SAVED element name (GI).
- */
-
-char *
-AddElemName(
- char *name
-)
-{
- int i;
- static int n_alloc = 0; /* number of slots allocated so far */
-
- /* See if it's already in the list. */
- for (i = 0; i < nUsedElem; i++)
- if (UsedElem[i][0] == name[0] &&
- (strcmp(UsedElem[i], name) == 0))
- return (UsedElem[i]);
-
- /*
- * Allocate slots in blocks of N, so we don't have to call malloc
- * so many times.
- */
- if (n_alloc == 0) {
- n_alloc = IMS_elemnames;
- Calloc(n_alloc, UsedElem, char *);
- } else if (nUsedElem >= n_alloc) {
- n_alloc += IMS_elemnames;
- Realloc(n_alloc, UsedElem, char *);
- }
- UsedElem[nUsedElem] = strdup(name);
- return (UsedElem[nUsedElem++]);
-}
-/* ______________________________________________________________________ */
-/*
- * Add attrib name to list of attrib names (if not there).
- * This is a list of null-terminated strings so that we don't have to
- * keep using the name length.
- * Arguments:
- * Pointer to attr name to remember.
- * Return:
- * Pointer to the SAVED attr name.
- */
-
-char *
-AddAttName(
- char *name
-)
-{
- int i;
- static int n_alloc = 0; /* number of slots allocated so far */
-
- /* See if it's already in the list. */
- for (i = 0; i < nUsedAtt; i++)
- if (UsedAtt[i][0] == name[0] && (strcmp(UsedAtt[i], name) == 0))
- return (UsedAtt[i]);
-
- /*
- * Allocate slots in blocks of N, so we don't have to call malloc
- * so many times.
- */
- if (n_alloc == 0) {
- n_alloc = IMS_attnames;
- Calloc(n_alloc, UsedAtt, char *);
- } else
- if (nUsedAtt >= n_alloc) {
- n_alloc += IMS_attnames;
- Realloc(n_alloc, UsedAtt, char *);
- }
- UsedAtt[nUsedAtt] = strdup(name);
- return (UsedAtt[nUsedAtt++]);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Find an element's attribute value given element pointer and attr name.
- * Typical use:
- * a = FindAttByName("TYPE", t);
- * do something with a->val;
- * Arguments:
- * Pointer to element under consideration.
- * Pointer to attribute name.
- * Return:
- * Pointer to the value of the attribute.
- */
-
-/*
- * Mapping_t *
- * FindAttByName(
- * Element_t *e,
- * char *name
- * )
- * {
- * int i;
- * if (!e) return NULL;
- * for (i=0; i<e->natts; i++)
- * if (e->atts[i].name[0] == name[0] && !strcmp(e->atts[i].name, name))
- * return &(e->atts[i]);
- * return NULL;
- * }
- */
-
-char *
-FindAttValByName(
- Element_t *e,
- char *name
-)
-{
- int i;
- if (!e)
- return (NULL);
- for (i = 0; i < e->natts; i++)
- if (e->atts[i].name[0] == name[0] &&
- (strcmp(e->atts[i].name, name) == 0))
- return (e->atts[i].sval);
- return (NULL);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Find context of a tag, 'levels' levels up the tree.
- * Space for string is passed by caller.
- * Arguments:
- * Pointer to element under consideration.
- * Number of levels to look up tree.
- * String to write path into (provided by caller).
- * Return:
- * Pointer to the provided string (for convenience of caller).
- */
-
-char *
-FindContext(
- Element_t *e,
- int levels,
- char *con
-)
-{
- char *s;
- Element_t *ep;
- int i;
-
- if (!e)
- return (NULL);
- s = con;
- *s = EOS;
- for (i = 0, ep = e->parent; ep && levels;
- ep = ep->parent, i++, levels--) {
- if (i != 0) *s++ = ' ';
- strcpy(s, ep->gi);
- s += strlen(s);
- }
- return (con);
-}
-
-
-/* ______________________________________________________________________ */
-/*
- * Tests relationship (specified by argument/flag) between given element
- * (structure pointer) and named element.
- * Returns pointer to matching tag if found, null otherwise.
- * Arguments:
- * Pointer to element under consideration.
- * Pointer to name of elem whose relationsip we are trying to determine.
- * Relationship we are testing.
- * Return:
- * Pointer to the provided string (for convenience of caller).
- */
-
-Element_t *
-QRelation(
- Element_t *e,
- char *s,
- Relation_t rel
-)
-{
- int i;
- Element_t *ep;
-
- if (!e)
- return (0);
-
- /* we'll call e the "given element" */
- switch (rel) {
- case REL_Parent:
- if (!e->parent || !e->parent->gi)
- return (0);
- if (strcmp(e->parent->gi, s) == 0)
- return (e->parent);
- break;
- case REL_Child:
- for (i = 0; i < e->necont; i++)
- if (strcmp(s, e->econt[i]->gi) == 0)
- return (e->econt[i]);
- break;
- case REL_Ancestor:
- if (!e->parent || !e->parent->gi)
- return (0);
- for (ep = e->parent; ep; ep = ep->parent)
- if (strcmp(ep->gi, s) == 0)
- return (ep);
- break;
- case REL_Descendant:
- if (e->necont == 0)
- return (0);
- /* check immediate children first */
- for (i = 0; i < e->necont; i++)
- if (strcmp(s, e->econt[i]->gi) == 0)
- return (e->econt[i]);
- /* then children's children (recursively) */
- for (i = 0; i < e->necont; i++)
- if ((ep = QRelation(e->econt[i], s, REL_Descendant)))
- return (ep);
- break;
- case REL_Sibling:
- if (!e->parent)
- return (0);
- ep = e->parent;
- for (i = 0; i < ep->necont; i++)
- if ((strcmp(s, ep->econt[i]->gi) == 0) &&
- i != e->my_eorder)
- return (ep->econt[i]);
- break;
- case REL_Preceding:
- if (!e->parent || e->my_eorder == 0)
- return (0);
- ep = e->parent;
- for (i = 0; i < e->my_eorder; i++)
- if (strcmp(s, ep->econt[i]->gi) == 0)
- return (ep->econt[i]);
- break;
- case REL_ImmPreceding:
- if (!e->parent || e->my_eorder == 0)
- return (0);
- ep = e->parent->econt[e->my_eorder-1];
- if (strcmp(s, ep->gi) == 0)
- return (ep);
- break;
- case REL_Following:
- if (!e->parent || e->my_eorder == (e->parent->necont-1))
- return (0); /* last? */
- ep = e->parent;
- for (i = (e->my_eorder+1); i < ep->necont; i++)
- if (strcmp(s, ep->econt[i]->gi) == 0)
- return (ep->econt[i]);
- break;
- case REL_ImmFollowing:
- if (!e->parent || e->my_eorder == (e->parent->necont-1))
- return (0); /* last? */
- ep = e->parent->econt[e->my_eorder+1];
- if (strcmp(s, ep->gi) == 0)
- return (ep);
- break;
- case REL_Cousin:
- if (!e->parent)
- return (0);
- /* Now, see if element's parent has that thing as a child. */
- return (QRelation(e->parent, s, REL_Child));
- break;
- case REL_None:
- case REL_Unknown:
- fprintf(stderr, "You can not query 'REL_None' or 'REL_Unknown'.\n");
- break;
- }
- return (NULL);
-}
-
-/*
- * Given a relationship name (string), determine enum symbol for it.
- * Arguments:
- * Pointer to relationship name.
- * Return:
- * Relation_t enum.
- */
-Relation_t
-FindRelByName(
- char *relname
-)
-{
- if (strcmp(relname, "?") == 0) {
- fprintf(stderr, "Supported query/relationships %s\n%s.\n",
- "child, parent, ancestor, descendant,",
- "sibling, sibling+, sibling+1, sibling-, sibling-1");
- return (REL_None);
- } else if (StrEq(relname, "child"))
- return (REL_Child);
- else if (StrEq(relname, "parent"))
- return (REL_Parent);
- else if (StrEq(relname, "ancestor"))
- return (REL_Ancestor);
- else if (StrEq(relname, "descendant"))
- return (REL_Descendant);
- else if (StrEq(relname, "sibling"))
- return (REL_Sibling);
- else if (StrEq(relname, "sibling-"))
- return (REL_Preceding);
- else if (StrEq(relname, "sibling-1"))
- return (REL_ImmPreceding);
- else if (StrEq(relname, "sibling+"))
- return (REL_Following);
- else if (StrEq(relname, "sibling+1"))
- return (REL_ImmFollowing);
- else if (StrEq(relname, "cousin"))
- return (REL_Cousin);
- else fprintf(stderr, "Unknown relationship: %s\n", relname);
- return (REL_Unknown);
-}
-
-/* ______________________________________________________________________ */
-/*
- * This will descend the element tree in-order. (enter_f)() is called
- * upon entering the node. Then all children (data and child elements)
- * are operated on, calling either DescendTree() with a pointer to
- * the child element or (data_f)() for each non-element child node.
- * Before leaving the node (ascending), (leave_f)() is called. enter_f
- * and leave_f are passed a pointer to this node and data_f is passed
- * a pointer to the data/content (which includes the data itself and
- * type information). dp is an opaque pointer to any data the caller
- * wants to pass.
- * Arguments:
- * Pointer to element under consideration.
- * Pointer to procedure to call when entering element.
- * Pointer to procedure to call when leaving element.
- * Pointer to procedure to call for each "chunk" of content data.
- * Void data pointer, passed to the avobe 3 procedures.
- */
-
-void
-DescendTree(
- Element_t *e,
- void (*enter_f)(),
- void (*leave_f)(),
- void (*data_f)(),
- void *dp
-)
-{
- int i;
- if (enter_f) (enter_f)(e, dp);
- for (i = 0; i < e->ncont; i++) {
- if (e->cont[i].type == CMD_OPEN)
- DescendTree(e->cont[i].ch.elem, enter_f, leave_f, data_f, dp);
- else
- if (data_f) (data_f)(&e->cont[i], dp);
- }
- if (leave_f) (leave_f)(e, dp);
-}
-
-/* ______________________________________________________________________ */
-/*
- * Add element, 'e', whose ID is 'idval', to a list of IDs.
- * This makes it easier to find an element by ID later.
- * Arguments:
- * Pointer to element under consideration.
- * Element's ID attribute value (a string).
- */
-
-void
-AddID(
- Element_t *e,
- char *idval
-)
-{
- static ID_t *id_last;
-
- if (!IDList) {
- Malloc(1, id_last, ID_t);
- IDList = id_last;
- } else {
- Malloc(1, id_last->next, ID_t);
- id_last = id_last->next;
- }
- id_last->elem = e;
- id_last->id = idval;
-}
-
-/* ______________________________________________________________________ */
-/*
- * Return pointer to element who's ID is given.
- * Arguments:
- * Element's ID attribute value (a string).
- * Return:
- * Pointer to element whose ID matches.
- */
-
-Element_t *
-FindElemByID(
- char *idval
-)
-{
- ID_t *id;
- for (id = IDList; id; id = id->next)
- if (id->id[0] == idval[0] && (strcmp(id->id, idval) == 0))
- return (id->elem);
- return (0);
-}
-
-/* ______________________________________________________________________ */
-
-#if !defined(linux) && !defined(sun)
-
-char *
-strerror(int number)
-{
- char buf[100];
-
- sprintf(buf, "error number %d\n", number);
- perror(buf);
-}
-
-#endif
diff --git a/usr/src/cmd/man/src/util/iso-amsa.gml b/usr/src/cmd/man/src/util/iso-amsa.gml
deleted file mode 100644
index b01b2926fa..0000000000
--- a/usr/src/cmd/man/src/util/iso-amsa.gml
+++ /dev/null
@@ -1,69 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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 -->
diff --git a/usr/src/cmd/man/src/util/iso-amsb.gml b/usr/src/cmd/man/src/util/iso-amsb.gml
deleted file mode 100644
index 78504593e2..0000000000
--- a/usr/src/cmd/man/src/util/iso-amsb.gml
+++ /dev/null
@@ -1,55 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-amsc.gml b/usr/src/cmd/man/src/util/iso-amsc.gml
deleted file mode 100644
index b839986c19..0000000000
--- a/usr/src/cmd/man/src/util/iso-amsc.gml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-amsn.gml b/usr/src/cmd/man/src/util/iso-amsn.gml
deleted file mode 100644
index fa8c22cd7f..0000000000
--- a/usr/src/cmd/man/src/util/iso-amsn.gml
+++ /dev/null
@@ -1,73 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-amso.gml b/usr/src/cmd/man/src/util/iso-amso.gml
deleted file mode 100644
index d2569ab25a..0000000000
--- a/usr/src/cmd/man/src/util/iso-amso.gml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-amsr.gml b/usr/src/cmd/man/src/util/iso-amsr.gml
deleted file mode 100644
index ce11faa66b..0000000000
--- a/usr/src/cmd/man/src/util/iso-amsr.gml
+++ /dev/null
@@ -1,97 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-box.gml b/usr/src/cmd/man/src/util/iso-box.gml
deleted file mode 100644
index ffa4253bd6..0000000000
--- a/usr/src/cmd/man/src/util/iso-box.gml
+++ /dev/null
@@ -1,65 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-cyr1.gml b/usr/src/cmd/man/src/util/iso-cyr1.gml
deleted file mode 100644
index d06df49826..0000000000
--- a/usr/src/cmd/man/src/util/iso-cyr1.gml
+++ /dev/null
@@ -1,80 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-cyr2.gml b/usr/src/cmd/man/src/util/iso-cyr2.gml
deleted file mode 100644
index 971863def5..0000000000
--- a/usr/src/cmd/man/src/util/iso-cyr2.gml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-dia.gml b/usr/src/cmd/man/src/util/iso-dia.gml
deleted file mode 100644
index 54af3eb837..0000000000
--- a/usr/src/cmd/man/src/util/iso-dia.gml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-grk1.gml b/usr/src/cmd/man/src/util/iso-grk1.gml
deleted file mode 100644
index 6d1b99bef1..0000000000
--- a/usr/src/cmd/man/src/util/iso-grk1.gml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-grk2.gml b/usr/src/cmd/man/src/util/iso-grk2.gml
deleted file mode 100644
index 603d802628..0000000000
--- a/usr/src/cmd/man/src/util/iso-grk2.gml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-grk3.gml b/usr/src/cmd/man/src/util/iso-grk3.gml
deleted file mode 100644
index e1277036bc..0000000000
--- a/usr/src/cmd/man/src/util/iso-grk3.gml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-grk4.gml b/usr/src/cmd/man/src/util/iso-grk4.gml
deleted file mode 100644
index 166179da15..0000000000
--- a/usr/src/cmd/man/src/util/iso-grk4.gml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-lat1.gml b/usr/src/cmd/man/src/util/iso-lat1.gml
deleted file mode 100644
index 480c95dc3b..0000000000
--- a/usr/src/cmd/man/src/util/iso-lat1.gml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-lat2.gml b/usr/src/cmd/man/src/util/iso-lat2.gml
deleted file mode 100644
index 1e36431163..0000000000
--- a/usr/src/cmd/man/src/util/iso-lat2.gml
+++ /dev/null
@@ -1,134 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-num.gml b/usr/src/cmd/man/src/util/iso-num.gml
deleted file mode 100644
index c0bb25496f..0000000000
--- a/usr/src/cmd/man/src/util/iso-num.gml
+++ /dev/null
@@ -1,94 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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-->
diff --git a/usr/src/cmd/man/src/util/iso-pub.gml b/usr/src/cmd/man/src/util/iso-pub.gml
deleted file mode 100644
index 54f107af4a..0000000000
--- a/usr/src/cmd/man/src/util/iso-pub.gml
+++ /dev/null
@@ -1,103 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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 -->
diff --git a/usr/src/cmd/man/src/util/iso-tech.gml b/usr/src/cmd/man/src/util/iso-tech.gml
deleted file mode 100644
index f9c1756f01..0000000000
--- a/usr/src/cmd/man/src/util/iso-tech.gml
+++ /dev/null
@@ -1,76 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!-- (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)-->
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/COPYING b/usr/src/cmd/man/src/util/nsgmls.src/COPYING
deleted file mode 100644
index 02ca705ce1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/COPYING
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 1994, 1995, 1996 James Clark
-
-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 JAMES CLARK 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 name of James Clark shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from James Clark.
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/COPYING.descrip b/usr/src/cmd/man/src/util/nsgmls.src/COPYING.descrip
deleted file mode 100644
index a4b64e6f6b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/COPYING.descrip
+++ /dev/null
@@ -1 +0,0 @@
-SGML PARSER
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/Makefile b/usr/src/cmd/man/src/util/nsgmls.src/Makefile
deleted file mode 100644
index 1ac9941842..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/Makefile
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#
-#
-# Copyright 1994, 1995 James Clark
-#
-
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../../Makefile.cmd
-prefix=$(ROOTLIB)
-exec_prefix=$(prefix)
-# Where to install the binaries
-bindir=$(exec_prefix)/sgml
-# Extension for man pages.
-man1ext=1
-# Directory for man pages
-man1dir=$(prefix)/man/man$(man1ext)
-INSTALL=cp
-# You might want to change this to uncomment this on BSD systems
-#INSTALL=install
-
-# If you use gcc, then you must have at least version 2.6.1 and
-# you must use -fno-implicit-templates
-# and -O (or any optimization level >= 1).
-# c++ is a front-end for gcc which takes care of linking with -lstdc++
-#CXX=c++ -fno-implicit-templates -O2
-#CXX=$(CCC) -O
-WARN=-Wall -Wno-reorder -Wwrite-strings -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast
-# Executables will be *very* large if you use -g.
-DEBUG=
-# Add -DSP_HAVE_BOOL if you have the bool type.
-# Add -DSP_ANSI_CLASS_INST for ANSI style explicit class template instantiation.
-# Add -DSP_MULTI_BYTE for multi-byte support.
-# Add -DSP_HAVE_LOCALE if you have setlocale().
-# Add -DSP_HAVE_GETTEXT if you gettext() and friends (eg Solaris 2.3).
-# Add -DSP_HAVE_SOCKET if you have sockets and you want support for HTTP
-# Add -DSGML_CATALOG_FILES_DEFAULT=\"/usr/local/lib/sgml/catalog\"
-# (for example) to change the value used if the SGML_CATALOG_FILES
-# environment variable is unset. SP now automatically searches for a file
-# called "catalog" in the same directory as the document entity.
-XDEFINES=-DSP_MULTI_BYTE -DSP_HAVE_LOCALE -DSP_HAVE_GETTEXT -DSP_HAVE_SOCKET -DSGML_CATALOG_FILES_DEFAULT=\"/usr/share/lib/sgml/locale/C/dtds/catalog\"
-DEFINES=$(XDEFINES)
-#CXXFLAGS=-ansi $(DEBUG) $(WARN)
-CXXFLAGS=
-# Flag to pass to CXX to make it output list of dependencies as a Makefile.
-LDFLAGS += -norunpath -nolib
-OPT=
-CFLAGS += $(OPT) $(DEBUG)
-CCFLAGS += -noex
-# Missing library functions
-# Uncomment these if your C++ system doesn't provide them.
-LIBOBJS=#strerror.o memmove.o
-# iostreams are required
-# If you defined SP_HAVE_SOCKET, add any libraries that are needed for sockets
-#-lsocket -lnsl needed on Solaris 2.x
-# -lnsl on SunOS 4.1.3
-XLIBS=-lsocket -lnsl
-# -L/usr/local/lib may be needed on the RS/6000
-LIBS += $(ENVLDLIBS1) $(ENVLDLIBS2) $(XLIBS) $(CCNEEDED) -lc
-# If you're building in another directory, copy or link this Makefile
-# to the build directory, and set srcdir to point to the source directory.
-srcdir=.
-AR=ar
-RANLIB=:
-# Uncomment this for SunOS 4.1.3 or FreeBSD
-# (and probably other BSD flavor systems as well)
-#RANLIB=ranlib
-M4=m4
-# perl is needed if you change or add messages
-PERL=perl
-# Suffix for executables.
-EXE=
-# Uncomment this for OS/2.
-#EXE=.exe
-
-LIBDIRS=lib $(XLIBDIRS)
-PROGDIRS=nsgmls $(XPROGDIRS)
-dodirs=$(LIBDIRS) $(PROGDIRS)
-PURIFYFLAGS=
-PURIFY=purify $(PURIFYFLAGS) -g++=yes -collector=`dirname \`gcc -print-libgcc-file-name\``/ld
-
-MDEFINES='CXX=$(CXX)' 'CC=$(CC)' 'LIBOBJS=$(LIBOBJS)' 'CXXFLAGS=$(CXXFLAGS)' \
- 'CCFLAGS=$(CCFLAGS)' \
- 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'DEFINES=$(DEFINES)' \
- 'srcdir=$(srcdir)' 'AR=$(AR)' 'RANLIB=$(RANLIB)' \
- 'M4=$(M4)' 'PERL=$(PERL)' 'LIBS=$(LIBS)' 'PURIFY=$(PURIFY)' \
- 'PIC_FLAG=$(PIC_FLAG)' 'XPROGDIRS=$(XPROGDIRS)' 'XLIBDIRS=$(XLIBDIRS)' \
- 'libMakefile=$(libMakefile)' 'EXE=$(EXE)' 'bindir=$(bindir)' \
- 'man1dir=$(man1dir)' 'man1ext=$(man1ext)' 'INSTALL=$(INSTALL)'
-
-
-# Automatic template instantiation can cause compilers to generate
-# various extra files; the clean target won't delete these.
-TARGETS=all install depend gen clean clobber
-libMakefile=Makefile.lib
-do=all
-
-$(TARGETS): FORCE
- @$(MAKE) -f $(srcdir)/Makefile $(MDEFINES) do=$@ $(dodirs)
-
-
-$(LIBDIRS): FORCE
- @if test $(srcdir) = .; \
- then srcdir=.; \
- else srcdir=`cd $(srcdir); pwd`/$@; \
- fi; \
- test -d $@ || mkdir $@; \
- cd $@; \
- test -f $$srcdir/Makefile.dep || touch $$srcdir/Makefile.dep; \
- $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
- -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
- -f $$srcdir/../$(libMakefile) -f $$srcdir/Makefile.dep $(do)
-
-$(PROGDIRS): FORCE
- @if test $(srcdir) = .; \
- then srcdir=.; \
- else srcdir=`cd $(srcdir); pwd`/$@; \
- fi; \
- test -d $@ || mkdir $@; \
- cd $@; \
- test -f $$srcdir/Makefile.dep || touch $$srcdir/Makefile.dep; \
- $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
- -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
- -f $$srcdir/../Makefile.prog -f $$srcdir/Makefile.dep $(do)
-
-$(PROGDIRS): lib
-
-# GNU tar
-TAR=tar
-
-dist: FORCE
- #cd test; ./CLEAN
- #version=`cat VERSION`; \
- #rm -f sp-$$version; \
- #ln -s `pwd` sp-$$version; \
- #$(TAR) -c -f sp-$$version.tar.gz -h -z \
- #--exclude sp-$$version/test/cap \
- #--exclude sp-$$version/test/out \
- #--exclude sp-$$version/test/err \
- #`sed -e "s|.*|sp-$$version/&|" FILES`; \
- #rm -f sp-$$version
-
-#check: FORCE
- #NSGMLS=`pwd`/nsgmls/nsgmls; export NSGMLS; cd $(srcdir); ./dotest
-
-FORCE:
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/Makefile.comm b/usr/src/cmd/man/src/util/nsgmls.src/Makefile.comm
deleted file mode 100644
index 39eb8172e1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/Makefile.comm
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright (c) 1998 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-include ../../../../../Makefile.cmd
-
-CXXFLAGS=$(DEBUG) $(OPTIMIZE) $(WARN)
-ALL_CXXFLAGS=$(CXXFLAGS) -I$(srcdir) -I$(srcdir)/../include $(INCLUDE) \
- $(DEFINES)
-ALL_CFLAGS=$(CFLAGS) $(DEBUG) $(OPTIMIZE) $(INCLUDE) $(DEFINES)
-MSGGENFLAGS=
-CXXDEPGENFLAGS=-MM
-AR=ar
-RANLIB=:
-M4=m4
-GENSRCS=
-OBJS=
-COBJS=
-PROG=
-#PERL=perl
-
-.SUFFIXES: .cxx .c .o .m4 .msg
-
-.cxx.o:
- $(CCC) $(ALL_CXXFLAGS) $(CCFLAGS) $(CPPFLAGS) -c $(OUTPUT_OPTION) $<
- $(POST_PROCESS_O)
-
-#.c.o:
-# $(CC) $(ALL_CFLAGS) -c $<
-
-.m4.cxx:
- $(RM) $@
- $(M4) $(srcdir)/../lib/instmac.m4 $< >$@
- $(CHMOD) -w $@
-
-# We don't use perl... just use static .h files
-#.msg.h:
-# $(PERL) -w $(srcdir)/../msggen.pl $(MSGGENFLAGS) $<
-
-depend_src: depend.temp
- $(MV) depend.temp Makefile.dep
-
-depend.temp: FORCE
- $(CXX) $(CXXDEPGENFLAGS) $(ALL_CXXFLAGS) $(OBJS:.o=.cxx) \
- | sed -e 's; \([^/ ][^/ ]*\)/; $$(srcdir)/\1/;g' >depend.temp
-
-clean: FORCE
- -$(RM) $(CLEANFILES)
-
-clobber: FORCE
- -$(RM) -r SunWS_cache
- -$(RM) $(CLEANFILES)
-
-FORCE:
-
-%: RCS/%,v
- test -w $@ || co -u $@
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/Makefile.lib b/usr/src/cmd/man/src/util/nsgmls.src/Makefile.lib
deleted file mode 100644
index fc3668d52d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/Makefile.lib
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../../../Makefile.cmd
-CLEANFILES=lib$(LIB).a $(OBJS) $(COBJS) core
-
-all: lib$(LIB).a
-
-lib$(LIB).a: $(OBJS) $(COBJS) $(DEPLIBS)
- $(AR) r $@ $?
- $(RANLIB) $@
-
-install:
-install-man:
-depend: depend_src
-depend.temp: $(GENSRCS)
-gen: $(GENSRCS)
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/Makefile.prog b/usr/src/cmd/man/src/util/nsgmls.src/Makefile.prog
deleted file mode 100644
index 3c10d0062e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/Makefile.prog
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-
-include ../../../../../Makefile.cmd
-CLEANFILES=$(PROG)$(EXE) $(OBJS) core
-
-all: $(PROG)$(EXE)
-
-pure: $(PROG).pure
-
-$(PROG)$(EXE): $(OBJS) $(COBJS) $(XLIBS)
- $(CCC) $(ALL_CXXFLAGS) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(XLIBS) $(LIBS)
- $(POST_PROCESS)
- cp $@ ../..
-
-$(PROG).pure: $(OBJS) $(COBJS) $(XLIBS)
- $(PURIFY) $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(XLIBS) $(LIBS)
-
-install: $(PROG)$(EXE)
- -test -d $(bindir) || mkdir $(bindir)
- -rm -f $(bindir)/$(PROG)$(EXE)
- $(INSTALL) $(PROG)$(EXE) $(bindir)/$(PROG)$(EXE)
-
-depend: depend_src
-depend.temp: $(GENSRCS)
-gen: $(GENSRCS)
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/VERSION b/usr/src/cmd/man/src/util/nsgmls.src/VERSION
deleted file mode 100644
index 3a3cd8cc8b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.3.1
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/Makefile b/usr/src/cmd/man/src/util/nsgmls.src/doc/Makefile
deleted file mode 100644
index f3d8992cdd..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-NSGMLS=nsgmls
-DOCS=archform.htm \
- build.htm \
- catalog.htm \
- features.htm \
- generic.htm \
- ideas.htm \
- index.htm \
- new.htm \
- nsgmls.htm \
- sgmldecl.htm \
- sgmlnorm.htm \
- sgmlsout.htm \
- spam.htm \
- spent.htm \
- sysdecl.htm \
- sysid.htm \
- winntu.htm
-
-validate: $(DOCS)
- $(NSGMLS) -sB $(DOCS)
- touch validate
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/archform.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/archform.htm
deleted file mode 100644
index bc8849fe57..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/archform.htm
+++ /dev/null
@@ -1,407 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>Architectural Form Processing</TITLE>
-</HEAD>
-<BODY>
-<H1>Architectural Form Processing</H1>
-<P>
-The Hytime standard (ISO/IEC 10744) introduced the concept of
-architectural forms. This document assumes you are already familiar
-with this concept. The first Technical Corrigendum to HyTime, which is
-soon to be published, generalizes this, and makes it possible to have
-an <I>architecture engine</I> which can perform architectural form
-processing for arbitrary architectures. SP now includes such an
-architecture engine.
-<P>
-Non-markup sensitive applications built using SP now support
-architectural form processing using the <SAMP>-A
-<VAR>archname</VAR></SAMP> option. When this option is specified, the
-document will be validated against all declared base architectures,
-and the output will be for the architectural document for that
-architecture: the element types, notations and attributes will be
-those defined in the meta-DTD.
-<P>
-This option is experimental and has not been subject to much testing.
-Please be sure to report any bugs or problems you encounter.
-<P>
-Although spam does not support the <SAMP>-A</SAMP> option because it
-works with the markup of your document, sgmlnorm does.
-
-<H2>Architectural Support Attributes</H2>
-<P>
-To use the <SAMP>-A</SAMP> option with a document, you must add
-<UL>
-<LI>
-an architecture base declaration for <SAMP><VAR>archname</VAR></SAMP>,
-<LI>
-a notation declaration and associated attribute definition list
-declaration for <SAMP><VAR>archname</VAR></SAMP>;
-this is called the <I>architecture notation declaration</I>.
-</UL>
-<P>
-An architecture base declaration is a processing instruction of the form:
-<PRE>
-&lt;?ArcBase <VAR>archname</VAR>&gt;
-</PRE>
-<P>
-The processing instruction is recognized either in the DTD or in an
-active LPD.
-<P>
-The architecture notation declaration and associated attribute
-definition list declaration serve to declare a number of architectural
-support attributes which control the architecture engine. The value
-for each architecture support attribute is taken from the default
-value, if any, specified for that attribute in the attribute
-definition list declaration. It is an error to declare an
-architecture support attribute as <SAMP>#REQUIRED</SAMP>.
-<P>
-The following architectural support attributes are recognized:
-<DL>
-<DT>
-<SAMP>ArcDTD</SAMP>
-<DD>
-The name of an external entity that contains the meta-DTD.
-This attribute is required.
-If the name starts with the PERO delimiter <SAMP>%</SAMP>,
-the entity is a parameter entity,
-otherwise it is a general entity.
-<DT>
-<SAMP>ArcQuant</SAMP>
-<DD>
-A list of tokens that looks like what follows <SAMP>QUANTITY SGMLREF</SAMP>
-in the quantity set section of an SGML declaration.
-The quantities used for parsing the meta-DTD
-and validating the architectural document
-will be the maximum of the quantities in the document's concrete syntax
-and the quantities specified here.
-<DT>
-<SAMP>ArcDocF</SAMP>
-<DD>
-The name of the document element type in the meta-DTD.
-This would be <SAMP>HyDoc</SAMP> for HyTime.
-This defaults to <SAMP><VAR>archname</VAR></SAMP>.
-<DT>
-<SAMP>ArcFormA</SAMP>
-<DD>
-The name of the attribute that elements use to specify the
-corresponding element type, if any, in the meta-DTD.
-Data entities also use this attribute to specify the corresponding
-notation in the meta-DTD.
-This would be <SAMP>HyTime</SAMP> for HyTime.
-This defaults to <SAMP><VAR>archname</VAR></SAMP>.
-<DT>
-<SAMP>ArcNamrA</SAMP>
-<DD>
-The name of the attribute that elements use to specify substitutes for
-the names of attributes in the meta-DTD. A value of
-<SAMP>#DEFAULT</SAMP> is allowed for a substitute name; this inhibits
-mapping of an attribute to an architectural attribute, but specifies
-that the value of the architectural attribute should be defaulted
-rather than taken from the value of another attribute in the document.
-For HyTime the value of this attribute would be <SAMP>HyNames</SAMP>.
-By default no attribute name substitutition is done.
-<DT>
-<SAMP>ArcSuprA</SAMP>
-<DD>
-The name of an attribute that elements may use to suppress processing
-of their descendants. This attribute is not recognized for data
-entities. The value of the attribute must be one of the following
-tokens:
-<DL>
-<DT>
-<SAMP>sArcAll</SAMP>
-<DD>
-Completely suppress all architectural processing of descendants.
-It is not possible to restore architectural processing
-for a descendant.
-<DT>
-<SAMP>sArcForm</SAMP>
-<DD>
-Suppress processing of the <SAMP>ArcFormA</SAMP> attribute of all
-descendants of this element, except for those elements that have a
-non-implied <SAMP>ArcSuprA</SAMP> attribute.
-<DT>
-<SAMP>sArcNone</SAMP>
-<DD>
-Don't suppress architectural processing for the descendants of
-this element.
-</DL>
-<P>
-The value may also be implied, in which case the state of
-architectural processing is inherited.
-<P>
-If an element has an ArcSuprA attribute that was processed, its
-ArcFormA attribute will always be processed. Otherwise its ArcFormA
-attribute will be processed unless its closest ancestor that has a
-non-implied value for the ArcSuprA attribute suppressed processing of
-the ArcFormA attribute. An element whose ArcFormA attribute is
-processed will not be treated as architectural if it has an implied
-value for the ArcFormA attribute.
-<DT>
-<SAMP>ArcSuprF</SAMP>
-<DD>
-The name of the element type in the meta-DTD that suppresses
-architectural processing in the same manner as does the
-<SAMP>sHyTime</SAMP> form in HyTime. By default, no element type
-does. This behaves like an element with an
-<SAMP>ArcSuprA</SAMP> attribute of <SAMP>sArcForm</SAMP>. The element
-type should be declared in the meta-DTD. You should not specify a
-value for this attribute if you specified a value for the
-<SAMP>ArcSuprA</SAMP> attribute.
-<P>
-This is a non-standardized extension.
-<DT>
-<SAMP>ArcIgnDA</SAMP>
-<DD>
-The name of an attribute that elements may use to control whether
-data is ignored.
-The value of the attribute must be one of the following values:
-<DL>
-<DT>
-<SAMP>nArcIgnD</SAMP>
-<DD>
-Data is not ignored.
-It is an error if data occurs where not allowed by the meta-DTD.
-<DT>
-<SAMP>cArcIgnD</SAMP>
-<DD>
-Data is conditionally ignored.
-Data will be ignored only when it occurs where the meta-DTD
-does not allow it.
-<DT>
-<SAMP>ArcIgnD</SAMP>
-<DD>
-Data is always ignored.
-</DL>
-<P>
-The value may also be implied, in which case the state of
-architectural processing is inherited.
-If no the document element has no value specified,
-<SAMP>cArcIgnD</SAMP> will be used.
-<DT>
-<SAMP>ArcBridF</SAMP>
-<DD>
-The name of a default element type declared in a meta-DTD,
-to which elements in the document should be automatically mapped
-if they have an ID and would not otherwise be considered
-architectural.
-This would be <SAMP>HyBrid</SAMP> for HyTime.
-If your meta-DTD declares IDREF attributes, it will
-usually be appropriate to specify a value for
-<SAMP>ArcBridF</SAMP>, and to declare an ID attribute
-for that form in your meta-DTD.
-<DT>
-<SAMP>ArcDataF</SAMP>
-<DD>
-The name of a default notation declared in the meta-DTD,
-to which the external data entities in the document
-should be automatically mapped if they would
-not otherwise be considered architectural.
-If this attribute is defined,
-then general entities will be automatically architectural:
-any external data entity whose notation cannot otherwise be mapped
-into a notation in the meta-DTD will be automatically treated
-as an instance of the <SAMP>ArcDataF</SAMP> notation.
-This would be <SAMP>data</SAMP> for HyTime.
-If your meta-DTD declares entity attributes, it will usually
-be appropriate to specify a value for <SAMP>ArcDataF</SAMP>
-even if your meta-DTD declares no data attributes for the
-notation.
-<DT>
-<SAMP>ArcAuto</SAMP>
-<DD>
-This must have one of the following values:
-<DL>
-<DT>
-<SAMP>ArcAuto</SAMP>
-<DD>
-If an element does not have an <SAMP>ArcFormA</SAMP> attribute and the
-meta-DTD defines an element type with the same name as the element's
-type, the element will be automatically treated as being an instance
-of the meta-type. This rule does not apply to the
-document element type; this is automatically treated as being an
-instance of the meta-DTD's document element type.
-Note that this automatic mapping is prevented if
-the element has an <SAMP>ArcFormA</SAMP> attribute with an implied
-value. It is also prevented if processing of the
-<SAMP>ArcFormA</SAMP> attribute is suppressed. This applies equally
-to the notations of external data entities.
-The default element or notation specified with the
-<SAMP>ArcBridF</SAMP> or <SAMP>ArcDfltN</SAMP> attribute
-is only considered after the mapping specified by <SAMP>ArcAuto</SAMP>.
-<DT>
-<SAMP>nArcAuto</SAMP>
-<DD>
-Automatic mapping is not performed.
-</DL>
-<P>
-The default value is <SAMP>ArcAuto</SAMP>.
-<DT>
-<SAMP>ArcOptSA</SAMP>
-<DD>
-A list of names of architectural support attributes,
-each of which is interpreted as a list of parameter entities
-to be defined with a replacement text of <SAMP>INCLUDE</SAMP>
-when parsing the meta-DTD.
-The default value is <SAMP>ArcOpt</SAMP>.
-</DL>
-<H2>Meta-DTDs</H2>
-<P>
-A meta-DTD is allowed to use the following extensions:
-<UL>
-<LI>
-a single element type or notation is allowed to be an associated
-element type or associated notation name for multiple attribute
-definition lists.
-<LI>
-<SAMP>#ALL</SAMP> can be used as an associated element type
-or associated notation name in an attribute definition list
-to define attributes for all element types or notations
-in the meta-DTD
-</UL>
-<P>
-Before any of these extensions can be used, the meta-DTD must include a
-declaration
-<PRE>
-&lt;!AFDR "ISO/IEC 10744:1992"&gt;
-</PRE>
-<P>
-This declaration should only be included if the extensions are used.
-<P>
-In all other respects a meta-DTD must be a valid SGML DTD.
-<P>
-A declared value of ENTITY for an attribute in a meta-DTD means that
-the value of the attribute must be an entity declared in
-the (non-meta) DTD that is architectural.
-An external data entity is architectural only if its notation can be
-mapped into a notation in the meta-DTD.
-All other kinds of data entities and subdoc entities are automatically
-architectural.
-<P>
-An IDREF attribute in the meta-document must have a corresponding ID
-in the meta-document. An attribute with a declared value of ID in the
-document will be automatically mapped to an attribute with a declared
-value of ID in the meta-DTD.
-<P>
-A declared value of NOTATION in the meta-DTD means that the value of
-the attribute must have one the values specified in the name group and
-that it must be a notation in the meta-DTD.
-(Perhaps if the attribute also has a declared value of NOTATION
-in the non-meta-DTD, the value should be mapped in a similar
-way to the notation of an external data entity.)
-
-<H2>Differences from HyTime</H2>
-<P>
-There are a number of differences from how architectural processing is
-defined in the pre-Corringendum version of the HyTime standard.
-<UL>
-<LI>
-The <SAMP>ArcNamrA</SAMP> and <SAMP>ArcFormA</SAMP> attributes are not
-part of the meta-DTD. Rather they are used by the architecture engine
-in deriving the meta-document that is validated against the meta-DTD.
-<LI>
-The <SAMP>use:</SAMP> conventional comment is not recognized. Instead
-a single element type is allowed to be an associated element type for
-multiple attribute definition lists.
-<LI>
-The notation and data attributes of an external data entity are
-treated just like the element type and attributes of an element. The
-notation of an external data entity is mapped into a notation in the
-meta-DTD and the data attributes of the entity are mapped onto
-attributes defined for the meta-DTD notation.
-<LI>
-<SAMP>#FIXED</SAMP> has the same meaning in a meta-DTD that it does in
-a regular DTD: the value of the attribute must be the same as the
-default value of the attribute specified in the meta-DTD.
-</UL>
-
-<H2>Specifying architectural processing with an LPD</H2>
-<P>
-Link attributes defined by an implicit link process are treated in the
-same way as non-link attributes. The only complication is that SGML
-allows link attributes to have the same name as non-link attributes.
-If there is a link attribute and a non-link attribute with the same
-name, the architecture engine will only look at the link attribute,
-even if the value of the link attribute is implied. The only
-exception is the <SAMP>ArcNamrA</SAMP> attribute: the architecture
-engine will use both the link attribute and the non-link attribute,
-but the substitute names in the value of the non-link attribute cannot
-refer to link attribute names.
-<P>
-The <SAMP>-A <VAR>archname</VAR></SAMP> option automatically activates
-any link type <SAMP><VAR>archname</VAR></SAMP>.
-<P>
-The architecture notation declaration and associated attribute
-definition list declaration are allowed in the LPD. Although the
-productions of ISO 8879 do not allow a notation declaration in a link
-type declaration subset, it is clearly the intent of the standard that
-they be allowed. You can use a <SAMP>-wlpd-notation</SAMP> option to
-disallow them.
-
-<H2>Notation set architecture</H2>
-<P>
-An architecture for which <VAR>archname</VAR> is declared
-as a notation with a public identifier of
-<PRE>
-"ISO/IEC 10744//NOTATION AFDR ARCBASE
-Notation Set Architecture Definition Document//EN"
-</PRE>
-<P>
-is special. The element types in the meta-DTD for this architecture
-are the notations of the document DTD and the attributes defined for
-the element types in the meta-DTD are the data attributes defined for
-the notations in the document DTD. For each element, the attribute
-with a declared value of NOTATION performs the function that the
-ArcFormA attribute performs for normal architectures. Only the
-<SAMP>ArcNamrA</SAMP> and <SAMP>ArcSuprA</SAMP> architectural support
-attributes can be used with this architecture.
-<P>
-The notation set architecture can also be declared using
-an architecture base declaration of the form:
-<PRE>
-&lt;?ArcBase #NOTATION&gt;
-</PRE>
-<P>
-In this case, no architecture support attributes can be declared;
-<SAMP>ArcNamrA</SAMP> will be defaulted to <SAMP>notnames</SAMP>,
-and <SAMP>ArcSuprA</SAMP> to <SAMP>notsupr</SAMP>.
-
-<H2>Derived architectures</H2>
-<P>
-A meta-DTD can have one or more base architectures in the same way as
-a normal DTD. Multiple <SAMP>-A</SAMP> options can be used to exploit
-this. For example,
-<PRE>
--A <VAR>arch1</VAR> -A <VAR>arch2</VAR>
-</PRE>
-<P>
-will perform architectural processing on the source document to
-produce an architectural document conforming to the architecture
-<SAMP><VAR>arch1</VAR></SAMP> declared in the source document, and
-will then perform architectural processing on this architectural
-document to produce an architectural document conforming to the
-<SAMP><VAR>arch2</VAR></SAMP> architecture declared in
-<SAMP><VAR>arch1</VAR></SAMP>'s meta-DTD.
-<P>
-A document that is validated against a meta-DTD will automatically
-be validated against any base architectures of that meta-DTD.
-
-<H2>Not implemented</H2>
-<P>
-The following features in the current AFDR draft are not implemented:
-<UL>
-<LI>
-<SAMP>ArcIndr</SAMP> architectural support attribute with value
-other than <SAMP>nArcIndr</SAMP>.
-</UL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/build.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/build.htm
deleted file mode 100644
index 176a76711b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/build.htm
+++ /dev/null
@@ -1,106 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>Building SP</TITLE>
-</HEAD>
-<BODY>
-<H1>Building SP</H1>
-<P>
-You will need a C++ compiler with good template support to build this.
-Support for exceptions is not required.
-<P>
-In most cases you should be able to port to a new compiler just by
-editing <code>include/config.h</code>.
-
-<H2>Unix</H2>
-<P>
-To build on Unix, edit the Makefile, and do a make. You can also
-build in a different directory. This requires GNU make or another
-make that implements VPATH. Copy or link the top-level Makefile to
-the build directory, change srcdir in the Makefile to point to the
-original directory, and do a make in the build directory.
-<P>
-<SAMP>make check</SAMP> runs some tests. You shouldn't get any reports
-of differences.
-<P>
-<SAMP>make install</SAMP> installs the programs; `make install-man'
-installs the man pages.
-<P>
-You can use the following compilers:
-<DL>
-<DT>
-gcc
-<DD>
-gcc 2.7.2 works (gcc 2.7.0 won't work at least on the sparc). You
-will also an iostream library (eg as provided by libg++ 2.7). This
-distribution builds on Solaris 2.3 and on Linux 1.2. I expect it will
-build on SunOS 4 as well with little difficulty.
-<P>
-With gcc 2.6.3/SunOS 4, you'll need to compile with
-<CODE>-Dsig_atomic_t=int</CODE>, and, if you want to compile with
--DSP_HAVE_SOCKET, you'll need to make netdb.h and arpa/inet.h C++
-compatible.
-<DT>
-Sun C++
-<DD>
-To compile with Sun C++ 4.0.1, run first sunfix.sh. Also in the
-top-level Makefile, change set libMakefile to Makefile.lib.sun.
-This makes the library build use the -xar option.
-</DL>
-<P>
-Nelson Beebe has ported SP to a variety of other Unix systems and has
-produced some <A
-HREF="http://www.math.utah.edu/~beebe/sp-notes-1.0.1.html">notes</A>
-about his experiences.
-
-<H2>DOS/Windows</H2>
-<P>
-You must use a compiler that generates 32-bit code.
-
-<H3></H3>
-<P>
-The following compilers have been tested:
-<DL>
-<DT>
-Visual C++ 4.1
-<DD>
-Open SP.mak as a Makefile in the Developer Studio and build whatever
-you want.
-Don't use <SAMP>Batch Build</SAMP> or <SAMP>Rebuild All</SAMP>: these
-rebuild the library repeatedly.
-You can build all the targets in a particular configuration by
-building the all target.
-The <SAMP>sp-generate.mak</SAMP> makefile can be used to make
-all the .cxx and .h files that are automatically generated.
-(These are included in the distribution, so you don't need to do this
-unless you want to modify SP.)
-<P>
-To create a new program, make a new project in the SP project
-workspace using the <SAMP>Build&gt;Subprojects</SAMP> command, and
-include <SAMP>lib</SAMP> and maybe <SAMP>generic</SAMP> as
-subprojects. You may also want to add your project as a subproject to
-<SAMP>all</SAMP>.
-Then, in <SAMP>Build&gt;Settings</SAMP> under the <SAMP>C/C++</SAMP>
-tab in the <SAMP>Preprocessor</SAMP> category, copy the
-<SAMP>Preprocessor definitions</SAMP> and <SAMP>Additional include
-directories</SAMP> entries from the nsgmls subproject.
-In the <SAMP>Code Generation</SAMP> category make sure you've selected
-the same run-time library as that used by the corresponding configuration
-of <SAMP>lib</SAMP>.
-<DT>
-Watcom C++ 10.5a
-<DD>
-Use Makefile.wat.
-<P>
-You must compile on a platform that supports long filenames.
-</DL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/catalog b/usr/src/cmd/man/src/util/nsgmls.src/doc/catalog
deleted file mode 100644
index 58902ebe57..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/catalog
+++ /dev/null
@@ -1,4 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-CATALOG ../pubtext/html.soc
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/catalog.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/catalog.htm
deleted file mode 100644
index 3dca90ceca..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/catalog.htm
+++ /dev/null
@@ -1,168 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP - Catalogs</TITLE>
-</HEAD>
-<BODY>
-<H1>Catalogs</H1>
-<P>
-The entity manager generates a system identifier for every external
-entity using catalog entry files in the format defined by <A
-HREF="http://www.sgmlopen.org/sgml/docs/library/9401.htm">SGML Open
-Technical Resolution TR9401:1995</A>. The entity manager will give an
-error if it is unable to generate a system identifier for an external
-entity. Normally if the external identifier for an entity includes a
-system identifier then the entity manager will use that as the
-effective system identifier for the entity; this behaviour can be
-changed using <CODE>OVERRIDE</CODE> or <CODE>SYSTEM</CODE> entries in
-a catalog entry file.
-<P>
-A catalog entry file contains a sequence of entries in one of the
-following forms:
-<DL>
-<DT>
-<SAMP>PUBLIC <VAR>pubid</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used as
-the effective system identifier if the public identifier is
-<SAMP><VAR>pubid</VAR></SAMP>. <SAMP><VAR>Sysid</VAR></SAMP> is a
-system identifier as defined in ISO 8879 and
-<SAMP><VAR>pubid</VAR></SAMP> is a public identifier as defined in ISO
-8879.
-<DT>
-<SAMP>ENTITY <VAR>name</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <VAR>sysid</VAR> should be used as the effective
-system identifier if the entity is a general entity whose name is
-<VAR>name</VAR>.
-<DT>
-<SAMP>ENTITY %<VAR>name</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used as
-the effective system identifier if the entity is a parameter entity
-whose name is <VAR>name</VAR>. Note that there is no space between
-the <SAMP>%</SAMP> and the <SAMP><VAR>name</VAR></SAMP>.
-<DT>
-<SAMP>DOCTYPE <VAR>name</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used as
-the effective system identifier if the entity is an entity declared in
-a document type declaration whose document type name is <VAR>name</VAR>.
-<DT>
-<SAMP>LINKTYPE <VAR>name</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used as the
-effective system identifier if the entity is an entity declared in a
-link type declaration whose link type name is <VAR>name</VAR>.
-<DT>
-<SAMP>NOTATION <VAR>name</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used as
-the effective system identifier for a notation whose name is
-<SAMP><VAR>name</VAR></SAMP>. This is an extension to the SGML Open
-format. This is relevant only with the <SAMP>-n</SAMP> option.
-<DT>
-<SAMP>OVERRIDE <VAR>bool</VAR></SAMP>
-<DD>
-<SAMP><VAR>bool</VAR></SAMP> may be <SAMP>YES</SAMP> or
-<SAMP>NO</SAMP>. This sets the overriding mode for entries up to the
-next occurrence of OVERRIDE or the end of the catalog entry file. At
-the beginning of a catalog entry file the overriding mode will be NO.
-A PUBLIC, ENTITY, DOCTYPE, LINKTYPE or NOTATION entry with an
-overriding mode of YES will be used whether or not the external
-identifier has an explicit system identifier; those with an overriding
-mode of NO will be ignored if external identifier has an explicit
-system identifier. This is an extension to the SGML Open format.
-<DT>
-<SAMP>SYSTEM <VAR>sysid1</VAR> <VAR>sysid2</VAR></SAMP>
-<DD>
-This specifies that <VAR>sysid2</VAR> should be used as the effective
-system identifier if the system identifier specified in the external
-identifier was <SAMP><VAR>sysid1</VAR></SAMP>. This is an extension
-to the SGML Open format. <VAR>sysid2</VAR> should always be quoted to
-ensure that it is not misinterpreted when parsed by a system that does
-not support this extension.
-<DT>
-<A NAME="sgmldecl"><SAMP>SGMLDECL <VAR>sysid</VAR></SAMP></A>
-<DD>
-This specifies that if the document does not contain an SGML declaration,
-the SGML declaration in <SAMP><VAR>sysid</VAR></SAMP> should be implied.
-<DT>
-<SAMP>DOCUMENT <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that the document entity is <SAMP><VAR>sysid</VAR></SAMP>.
-This entry is used only with the <SAMP>-C</SAMP> option.
-<DT>
-<SAMP>CATALOG <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that <SAMP><VAR>sysid</VAR></SAMP> is the system
-identifier of an additional catalog entry file to be read after this
-one. Multiple <SAMP>CATALOG</SAMP> entries are allowed and will be
-read in order. This is an extension to the SGML Open format.
-<DT>
-<SAMP>BASE <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that relative storage object identifiers in system
-identifiers in the catalog entry file following this entry should be
-resolved using first storage object identifier in
-<SAMP><VAR>sysid</VAR></SAMP> as the base, instead of the storage
-object identifiers of the storage objects comprising the catalog entry
-file. This is an extension to the SGML Open format. This extension
-is proposed in <A HREF=
-"ftp://ftp.internic.net/internet-drafts/draft-ietf-mimesgml-exch-02.txt">Using
-SGML Open Catalogs and MIME to Exchange SGML Documents</A>.
-Note that the <CODE><VAR>sysid</VAR></CODE> must exist.
-<DT>
-<SAMP>DELEGATE <VAR>pubid-prefix</VAR> <VAR>sysid</VAR></SAMP>
-<DD>
-This specifies that entities with a public identifier that has
-<SAMP><VAR>pubid-prefix</VAR></SAMP> as a prefix should be resolved
-using a catalog whose system identfier is
-<SAMP><VAR>sysid</VAR></SAMP>. For more details, see <A
-HREF="http://www.entmp.org/fpi-urn/delegate.html">A Proposal for
-Delegating SGML Open Catalogs</A>. This is an extension to the SGML
-Open format.
-</DL>
-<P>
-The delimiters can be omitted from the <SAMP><VAR>sysid</VAR></SAMP>
-provided it does not contain any white space. Comments are allowed
-between parameters delimited by <SAMP>--</SAMP> as in SGML.
-<P>
-The environment variable <SAMP>SGML_CATALOG_FILES</SAMP> contains a
-list of catalog entry files. The list is separated by colons under
-Unix and by semi-colons under MS-DOS and Windows.. These will be
-searched after any catalog entry files specified using the
-<SAMP>-m</SAMP> option, and after the catalog entry file called
-<SAMP>catalog</SAMP> in the same place as the document entity. If
-this environment variable is not set, then a system dependent list of
-catalog entry files will be used. In fact catalog entry files are not
-restricted to being files: the name of a catalog entry file is
-interpreted as a system identifier.
-<P>
-A match in one catalog entry file will take precedence over any match
-in a later catalog entry file. A more specific matching entry in one
-catalog entry file will take priority over a less specific matching
-entry in the same catalog entry file. For this purpose, the order of
-specificity is (most specific first):
-<UL>
-<LI>
-<SAMP>SYSTEM</SAMP> entries;
-<LI>
-<SAMP>PUBLIC</SAMP> entries;
-<LI>
-<SAMP>DELEGATE</SAMP> entries ordered by the length of the prefix,
-longest first;
-<LI>
-<SAMP>ENTITY</SAMP>, <SAMP>DOCTYPE</SAMP>, <SAMP>LINKTYPE</SAMP> and
-<SAMP>NOTATION</SAMP> entries.
-</UL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/features.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/features.htm
deleted file mode 100644
index 2b40ea7cc5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/features.htm
+++ /dev/null
@@ -1,141 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP - Features Summary</TITLE>
-<BODY>
-<H1>
-SP
-</H1>
-<H3>
-A free, object-oriented toolkit for SGML parsing and entity management
-</H3>
-<H2>
-Features summary
-</H2>
-<UL>
-<LI>
-Includes nsgmls
-<UL>
-<LI>
-Compatible with sgmls
-<LI>
-Also generates RAST (ISO/IEC 13673)
-</UL>
-<LI>
-Provides access to all information about SGML document
-<UL>
-<LI>
-Access to DTD and SGML declaration as well as document instance
-<LI>
-Access to markup as well as abstract document
-<LI>
-Sufficient to recreate character-for-character identical
-copy of any SGML document
-</UL>
-<LI>
-Supports almost all optional SGML features
-<UL>
-<LI>
-Arbitrary concrete syntaxes
-<LI>
-SHORTTAG, OMITTAG, RANK
-<LI>
-SUBDOC
-<LI>
-LINK (SIMPLE, IMPLICIT and EXPLICIT)
-<LI>
-Only DATATAG and CONCUR not supported
-</UL>
-<LI>
-Sophisticated entity manager
-<UL>
-<LI>
-Supports ISO/IEC 10744 Formal System Identifiers
-<LI>
-Supports SGML Open catalogs
-<LI>
-Supports WWW
-<LI>
-Can be used independently of parser
-</UL>
-<LI>
-Supports multi-byte character sets
-<UL>
-<LI>
-Parser can use 16-bit characters internally
-<LI>
-16-bit characters can be used in tag names and other markup
-<LI>
-Supports ISO/IEC 10646 (Unicode) using both UCS-2 and UTF-8
-<LI>
-Supports Japanese character sets (Shift-JIS, EUC)
-</UL>
-<LI>
-Object-oriented
-<LI>
-Written in C++ from scratch
-<UL>
-<LI>
-Not a modified version of a parser originally written in C
-<LI>
-Reentrant
-<LI>
-Sophisticated architecture
-</UL>
-<LI>
-Fast
-<UL>
-<LI>
-Up to twice as fast as sgmls on large documents
-</UL>
-<LI>
-Portable
-<UL>
-<LI>
-All major Unix variants
-<LI>
-MS-DOS
-<LI>
-Win32: Windows 95/Windows NT
-<LI>
-OS/2
-</UL>
-<LI>
-Production quality
-<UL>
-<LI>
-Version 1.0 recently released, after a year of test releases
-<LI>
-Tested using several SGML test suites
-<LI>
-Already used in several new commercial products
-<LI>
-Written by James Clark, previously responsible for turning arcsgml into sgmls
-</UL>
-<LI>
-Free
-<UL>
-<LI>
-Includes source code
-<LI>
-No restrictions on commercial use
-</UL>
-<LI>
-Disadvantages
-<UL>
-<LI>
-Programmer-level documentation only for generic API
-and not for native API.
-</UL>
-</UL>
-
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/generic.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/generic.htm
deleted file mode 100644
index 5a521d8273..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/generic.htm
+++ /dev/null
@@ -1,1084 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<html>
-<head>
-<title>The generic API to SP</title>
-</head>
-<body>
-<h1>The generic API to SP</h1>
-<p>
-SP provides a generic API in addition to its native API. The generic
-interface is much simpler than the native interface. It is generic in
-the sense that it could be easily implemented using parsers other than
-SP. It provides all ESIS information as well as some other
-information about the instance that is commonly needed by
-applications. However, it doesn't provide access to all information
-available from SP; in particular, it doesn't provide information about
-the DTD. It is also slightly less efficient than the native
-interface.
-<p>
-The interface uses two related abstract classes. An
-<code>SGMLApplication</code> is an object that can handle a number of
-different kinds of event which correspond to information in an SGML
-document. An <code>EventGenerator</code> is an object that can
-generate a sequence of events of the kinds handled by an
-<code>SGMLApplication</code>. The
-<code>ParserEventGeneratorKit</code> class makes an
-<code>EventGenerator</code> that generates events using SP.
-
-<h2>Types</h2>
-<p>
-<code>SGMLApplication</code> has a number of local types that are used
-in several contexts:
-<dl>
-<dt>
-<code>Char</code>
-<dd>
-This typedef is an unsigned integral type that represents a single bit
-combination (character). It is <code>unsigned short</code> if
-<code>SP_MULTI_BYTE</code> is defined and <code>unsigned char</code>
-otherwise.
-<dt>
-<code>CharString</code>
-<dd>
-This struct represents a string of <code>Char</code>.
-It has the following members:
-<dl>
-<dt>
-<code>const Char *ptr</code>
-<dd>
-A pointer to the <code>Char</code>s of the string.
-<dt>
-<code>size_t len</code>
-<dd>
-The number of <code>Char</code>s in the string.
-</dl>
-<dt>
-<code>Location</code>
-<dd>
-This struct holds information about a location in the entity structure
-of a document. It is constucted using an <code>OpenEntityPtr</code>
-and a <code>Position</code>. The <code>CharString</code>s in it will
-remain valid as long as the <code>OpenEntity</code> that is pointed to
-by the <code>OpenEntityPtr</code> that was used to construct it
-remains valid.
-<p>
-It has the following members:
-<dl>
-<dt>
-<code>unsigned long lineNumber</code>
-<dd>
-The line number.
-<code>(unsigned long)-1</code> if invalid.
-<dt>
-<code>unsigned long columnNumber</code>
-<dd>
-The column number.
-Note that tabs are not treated specially.
-<code>(unsigned long)-1</code> if invalid.
-<dt>
-<code>unsigned long byteOffset</code>
-<dd>
-The number of bytes in the storage object preceding the location.
-<code>(unsigned long)-1</code> if invalid.
-<dt>
-<code>unsigned long entityOffset</code>
-<dd>
-The number of bit combinations in the entity preceding the location.
-<code>(unsigned long)-1</code> if invalid.
-<dt>
-<code>CharString entityName</code>
-<dd>
-The name of the external entity containing the location.
-An empty string if invalid.
-<dt>
-<code>CharString filename</code>
-<dd>
-The name of the file containing the location.
-An empty string if invalid.
-<dt>
-<code>const void *other</code>
-<dd>
-Other implementation-dependent information about the location. In the
-SP implementation it will be a pointer to a StorageObjectSpec. 0 if
-invalid.
-</dl>
-<p>
-When a location is in an internal entity, the location of the reference
-to the entity will be used instead.
-<dt>
-<code>OpenEntity</code>
-<dd>
-This class represents a currently open entity. The only use for an
-<code>OpenEntity</code> is, in conjunction with a
-<code>Position</code>, to create a <code>Location</code>. An
-<code>OpenEntity</code> is accessed using an
-<code>OpenEntityPtr</code>.
-<dt>
-<code>OpenEntityPtr</code>
-<dd>
-This class is a reference-counted pointer to an <code>OpenEntity</code>.
-<dt>
-<code>Position</code>
-<dd>
-This is an integral type that represents a position in an open entity.
-The meaning of a <code>Position</code> is completely determined by the
-<code>OpenEntity</code> object with which it is associated. The only
-use for an <code>Position</code> is, in conjunction with an
-<code>OpenEntity</code>, to create a <code>Location</code>.
-<dt>
-<code>ExternalId</code>
-<dd>
-This struct represents an external identifier. It has the following
-members:
-<dl>
-<dt>
-<code>bool haveSystemId</code>
-<dd>
-True iff the external identifier included an explicit system identifier.
-<dt>
-<code>CharString systemId</code>
-<dd>
-The system identifier included in the external identifier.
-Valid only if <code>havePublicId</code> is true.
-<dt>
-<code>bool havePublicId</code>
-<dd>
-True iff the external identifier included an explicit public identifier.
-<dt>
-<code>CharString publicId</code>
-<dd>
-The public identifier included in the external identifier.
-Valid only if <code>havePublicId</code> is true.
-<dt>
-<code>bool haveGeneratedSystemId</code>
-<dd>
-True iff a system identifier was generated for the external identifier.
-<dt>
-<dt>
-<code>CharString generatedSystemId</code>
-<dd>
-The system identifier generated for the external identifier.
-Valid only if <code>haveGeneratedSystemId</code> is true.
-</dl>
-<dt>
-<code>Notation</code>
-<dd>
-This struct represents a notation.
-It has the following members:
-<dl>
-<dt>
-<code>CharString name</code>
-<dd>
-The name of the notation.
-<dt>
-<code>ExternalId externalId</code>
-<dd>
-The external identifier of the notation.
-</dl>
-<dt>
-<code>Entity</code>
-<dd>
-This struct represents an entity.
-It has the following members.
-<dl>
-<dt>
-<code>CharString name</code>
-<dd>
-The name of the entity.
-<dt>
-<code>Entity::DataType dataType</code>
-<dd>
-The type of the data of the entity.
-<p>
-<code>Entity::DataType</code> is a local enum with the following possible
-values:
-<dl>
-<dt>
-<code>Entity::sgml</code>
-<dd>
-<dt>
-<code>Entity::cdata</code>
-<dd>
-<dt>
-<code>Entity::sdata</code>
-<dd>
-<dt>
-<code>Entity::ndata</code>
-<dd>
-<dt>
-<code>Entity::subdoc</code>
-<dd>
-<dt>
-<code>Entity::pi</code>
-<dd>
-</dl>
-<dt>
-<code>Entity::DeclType declType</code>
-<dd>
-The type of the declaration of the entity.
-<p>
-<code>Entity::DeclType</code> is a local enum with the following possible
-values:
-<dl>
-<dt>
-<code>Entity::general</code>
-<dd>
-The entity is a general entity.
-<dt>
-<code>Entity::parameter</code>
-<dd>
-The entity is a parameter entity.
-<dt>
-<code>Entity::doctype</code>
-<dd>
-The entity was declared in a doctype declaration.
-<dt>
-<code>Entity::linktype</code>
-<dd>
-The entity was declared in a linktype declaration.
-</dl>
-<dt>
-<code>bool isInternal</code>
-<dd>
-True iff the entity is internal rather than external.
-<dt>
-<code>CharString text</code>
-<dd>
-The replacement text of the entity.
-Valid only if <code>isInternal</code> is true.
-<dt>
-<code>ExternalId externalId</code>
-<dd>
-The external identifier of the entity.
-Valid only if <code>isInternal</code> is false.
-<dt>
-<code>const Attribute *attributes</code>
-<dd>
-Pointer to the data attributes of the entity.
-Valid only if <code>isInternal</code> is false.
-<dt>
-<code>size_t nAttributes</code>
-<dd>
-The number of data attributes of the entity.
-Valid only if <code>isInternal</code> is false.
-<dt>
-<code>Notation notation</code>
-<dd>
-The entity's notation.
-An empty string if the entity has no notation.
-Valid only if <code>isInternal</code> is false.
-</dl>
-<dt>
-<code>Attribute</code>
-<dd>
-This struct represents an attribute. More precisely it represents the
-assignment of an attribute value to an attribute name.
-It has the following members:
-<dl>
-<dt>
-<code>CharString name</code>
-<dd>
-The attribute name.
-<dt>
-<code>Attribute::Type type</code>
-<dd>
-An enumeration describing the type of the attribute.
-<p>
-<code>Attribute::Type</code> is a local type with the following possible
-values:
-<dl>
-<dt><code>Attribute::invalid</code>
-<dd>
-The attribute is invalid.
-<dt><code>Attribute::implied</code>
-<dd>
-The attribute is an impliable attribute for which
-no value was specified.
-<dt><code>Attribute::cdata</code>
-<dd>
-The attribute is a CDATA attribute.
-<dt><code>Attribute::tokenized</code>
-<dd>
-The attribute is a tokenized attribute.
-</dl>
-<dt>
-<code>Attribute::Defaulted defaulted</code>
-<dd>
-An enumeration specifying whether the entity was defaulted, and, if
-so, how.
-This is non-ESIS information.
-<p>
-<code>Attribute::Defaulted</code> is a local enum with the following
-possible values:
-<dl>
-<dt>
-<code>Attribute::specified</code>
-<dd>
-The value was explicitly specified.
-<dt>
-<code>Attribute::definition</code>
-<dd>
-The value was defaulted from the attribute definition.
-<dt>
-<code>Attribute::current</code>
-<dd>
-The value was defaulted using the CURRENT value of the attribute.
-</dl>
-<dt>
-<code>size_t nCdataChunks</code>
-<dd>
-The number of <code>Attribute::CdataChunk</code>s comprising the value
-of the attribute. Valid only if <code>type</code> is
-<code>cdata</code>.
-<dt>
-<code>const Attribute::CdataChunk *cdataChunks</code>
-<dd>
-The <code>Attribute::CdataChunk</code>s comprising the value of this attribute.
-Valid only if <code>type</code> is <code>cdata</code>.
-<p>
-<code>Attribute::CdataChunk</code> is a local struct with the
-following members:
-<dl>
-<dt>
-<code>bool isSdata</code>
-<dd>
-True iff this chunk is the replacement text of an internal SDATA entity.
-<dt>
-<code>CharString data</code>
-<dd>
-The data of this chunk.
-<dt>
-<code>CharString entityName</code>
-<dd>
-The name of the internal SDATA entity that this chunk is the
-replacement text of. Valid only if <code>isSdata</code> is true.
-This is non-ESIS information.
-</dl>
-<dt>
-<code>CharString tokens</code>
-<dd>
-Valid only if <code>type</code> is <code>Attribute::tokenized</code>.
-<dt>
-<code>bool isId</code>
-<dd>
-True iff the declared value is ID.
-This is non-ESIS information.
-<dt>
-<code>size_t nEntities</code>
-<dd>
-The number of entities associated with this attribute.
-This will be zero unless the declared value is ENTITY or ENTITIES.
-<dt>
-<code>const Entity *entities</code>
-<dd>
-The entities associated with this attribute.
-<dt>
-<code>Notation notation</code>
-<dd>
-The notation associated with this attribute.
-If the declared value of the attribute is not NOTATION,
-then the name member will be an empty string.
-</dl>
-</dl>
-<h2>Events</h2>
-<p>
-For each event <code><var>xyz</var>Event</code> handled by
-<code>SGMLApplication</code>, there is a virtual function of
-<code>SGMLApplication</code> named <code><var>xyz</var></code> to
-handle the event, and a local struct of <code>SGMLApplication</code>
-named <code><var>Xyz</var>Event</code>.
-<p>
-Pointers within an event <code><var>xyz</var>Event</code> are valid
-only during the call to <code><var>xyz</var></code>. None of the
-structs in events have copy constructors or assignment operators
-defined. It is up to the event handling function to make a copy of
-any data that it needs to preserve after the function returns.
-<p>
-Except as otherwise stated,
-the information in events is ESIS information.
-All position information is non-ESIS information.
-<p>
-There are the following types of event:
-<dl>
-<dt>
-<code>AppinfoEvent</code>
-<dd>
-Generated for the APPINFO section of the SGML declaration.
-The event has the following members:
-<dl>
-<dt><code>Position pos</code>
-<dd>
-The position of APPINFO parameter of the SGML declaration.
-<dt><code>bool none</code>
-<dd>
-True iff APPINFO NONE was specified.
-<dt><code>CharString string</code>
-<dd>
-The interpreted value of the minimum literal specified
-in the appinfo parameter of the SGML declaration.
-Valid only if <code>none</code> is false.
-</dl>
-<dt>
-<code>PiEvent</code>
-<dd>
-Generated for a processing instruction.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the processing instruction.
-<dt>
-<code>CharString data</code>
-<dd>
-The system data of the processing instuction.
-<dt>
-<code>CharString entityName</code>
-<dd>
-If the processing instruction was the result of the
-reference to a PI entity, the name of the entity.
-If not, an empty string.
-This is non-ESIS information.
-</dl>
-<dt>
-<code>StartElementEvent</code>
-<dd>
-Generated for the start of an element.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the start of the element.
-<dt>
-<code>CharString gi</code>
-<dd>
-The generic identifier of the element.
-<dt>
-<code>Element::ContentType contentType</code>
-<dd>
-The type of the element's content.
-This is non-ESIS information.
-<p>
-<code>Element::ContentType</code> is an enum with the following
-possible values:
-<dl>
-<dt>
-<code>Element::empty</code>
-<dd>
-The element has empty content, either because it was
-declared as EMPTY or because there was a #CONREF attribute.
-<dt>
-<code>Element::cdata</code>
-<dd>
-The element has CDATA content.
-<dt>
-<code>Element::rcdata</code>
-<dd>
-The element has RCDATA content.
-<dt>
-<code>Element::mixed</code>
-<dd>
-The element has mixed content.
-<dt>
-<code>Element::element</code>
-<dd>
-The element has element content.
-</dl>
-<dt>
-<code>bool included</code>
-<dd>
-True iff the element was an included subelement
-(rather than a proper subelement).
-This is non-ESIS information.
-<dt>
-<code>size_t nAttributes</code>
-<dd>
-The number of attributes of this element.
-<dt>
-<code>const Attribute *attributes</code>
-<dd>
-A pointer to the attributes for this element.
-</dl>
-<dt>
-<code>EndElementEvent</code>
-<dd>
-Generated for the end of an elemenet.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the end of the element.
-<dt>
-<code>CharString gi</code>
-<dd>
-The generic identifier of the element.
-</dl>
-<dt>
-<code>DataEvent</code>
-<dd>
-Generated for character data.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the first character of the data.
-<dt>
-<code>CharString data</code>
-<dd>
-The data.
-</dl>
-<dt>
-<code>SdataEvent</code>
-<dd>
-Generated for a reference to an internal sdata entity in content.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the entity reference.
-<dt>
-<code>CharString text</code>
-<dd>
-The replacement text of the entity.
-<dt>
-<code>CharString entityName</code>
-<dd>
-The entity name.
-This is non-ESIS information.
-</dl>
-<dt>
-<code>ExternalDataEntityRefEvent</code>
-<dd>
-Generated for a reference to an external data entity.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the entity reference.
-<dt>
-<code>Entity entity</code>
-<dd>
-The referenced entity.
-</dl>
-<dt>
-<code>SubdocEntityRefEvent</code>
-<dd>
-Generated for a reference to a subdoc entity.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the entity reference.
-<dt>
-<code>Entity entity</code>
-<dd>
-The referenced entity.
-</dl>
-<dt>
-<code>StartDtdEvent</code>
-<dd>
-Generated at the start of a document type declaration.
-This is non-ESIS information.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the start of the document type declaration.
-<dt>
-<code>CharString name</code>
-<dd>
-The document type name.
-<dt>
-<code>bool haveExternalId</code>
-<dd>
-The external identifier for the entity declared in the document type
-declaration.
-<dt>
-<code>ExternalId externalId</code>
-<dd>
-Valid iff haveExternalId is true.
-</dl>
-<dt>
-<code>EndDtdEvent</code>
-<dd>
-Generated at the end of a document type declaration.
-This is non-ESIS information.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the end of the DTD.
-<dt>
-<code>CharString name</code>
-<dd>
-</dl>
-<dt>
-<code>EndPrologEvent</code>
-<dd>
-Generated at the end of the prolog.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the start of the instance.
-</dl>
-<dt>
-<code>GeneralEntityEvent</code>
-<dd>
-Generated for each general entity in the name space of the governing
-doctype, but only if the
-<code>ParserEventGeneratorKit::outputGeneralEntities</code> option is
-enabled. This is non-ESIS information. The event has the following
-members:
-<dl>
-<dt>
-<code>Entity entity</code>
-<dd>
-The entity.
-</dl>
-<p>
-No event will be generated for the declaration of the
-<code>#default</code> entity; instead an event will be generated when
-an entity reference uses the <code>#default</code> entity if that is
-the first time on which an entity with that name is used. This means
-that <code>GeneralEntityEvent</code> can occur after the end of the
-prolog.
-<dt>
-<code>CommentDeclEvent</code>
-<dd>
-Generated for each comment declaration in the instance, but only if
-<code>ParserEventGeneratorKit::outputCommentDecls</code> option is
-enabled. This is non-ESIS information. The event has the following
-members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the start of the comment declaration.
-<dt>
-<code>size_t nComments</code>
-<dd>
-The number of comments in the comment declaration.
-<dt>
-<code>const CharString *comments</code>
-<dd>
-The content of each comment in the declaration.
-This excludes the com delimiters.
-<dt>
-<code>const CharString *seps</code>
-<dd>
-The separator following each comment in the declaration.
-</dl>
-<dt>
-<code>MarkedSectionStartEvent</code>
-<dd>
-Generated for the start of a marked section in the instance,
-but only if the <code>ParserEventGeneratorKit::outputMarkedSections</code>
-option is enabled.
-This is non-ESIS information.
-The event has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the start of the marked section declaration.
-<dt>
-<code>MarkedSectionStartEvent::Status status</code>
-<dd>
-The effective status of the marked section.
-<p>
-<code>MarkedSectionStartEvent::Status</code> is a local enum with the
-following possible values:
-<ul>
-<li><code>MarkedSectionStartEvent::include</code>
-<li><code>MarkedSectionStartEvent::rcdata</code>
-<li><code>MarkedSectionStartEvent::cdata</code>
-<li><code>MarkedSectionStartEvent::ignore</code>
-</ul>
-<dt>
-<code>size_t nParams</code>
-<dd>
-The number of top-level parameters in the status keyword specification.
-<dt>
-<code>const MarkedSectionStartEvent::Param *params</code>
-<dd>
-The top-level parameters in the status keyword specification.
-<p>
-<code>Param</code> is a local struct with the following members:
-<dl>
-<dt>
-<code>MarkedSectionStartEvent::Param::Type type</code>
-<dd>
-The type of top-level parameter:
-<p>
-<code>MarkedSectionStartEvent::Param::Type</code> is a local enum with the
-following possible values:
-<dl>
-<dt>
-<code>MarkedSectionStartEvent::Param::temp</code>
-<dt>
-<code>MarkedSectionStartEvent::Param::include</code>
-<dt>
-<code>MarkedSectionStartEvent::Param::rcdata</code>
-<dt>
-<code>MarkedSectionStartEvent::Param::cdata</code>
-<dt>
-<code>MarkedSectionStartEvent::Param::ignore</code>
-<dd>
-The parameter is the corresponding keyword.
-<dt>
-<code>MarkedSectionStartEvent::Param::entityRef</code>
-<dd>
-The parameter is an entity reference.
-</dl>
-<dt>
-<code>CharString entityName</code>
-<dd>
-Valid when <code>type</code> is
-<code>MarkedSectionStartEvent::Param::entityRef</code>.
-</dl>
-</dl>
-<dt>
-<code>MarkedSectionEndEvent</code>
-<dd>
-Generated for the end of a marked section in the instance, but only if
-the <code>ParserEventGeneratorKit::outputMarkedSections</code> option is
-enabled. This is non-ESIS information. The event has the following
-members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the end of the marked section declaration.
-<dt>
-<code>MarkedSectionEndEvent::Status status</code>
-<dd>
-The effective status of the marked section.
-<p>
-<code>MarkedSectionEndEvent::Status</code> is a local enum with the
-following possible values:
-<ul>
-<li><code>MarkedSectionEndEvent::include</code>
-<li><code>MarkedSectionEndEvent::rcdata</code>
-<li><code>MarkedSectionEndEvent::cdata</code>
-<li><code>MarkedSectionEndEvent::ignore</code>
-</ul>
-</dl>
-<dt>
-<code>IgnoredCharsEvent</code>
-<dd>
-Generated for a sequence of characters in an ignored marked section in
-the instance, but only if the
-<code>ParserEventGeneratorKit::outputMarkedSections</code> option is
-enabled. This is non-ESIS information. The event has the following
-members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position of the first of the ignored characters.
-<dt>
-<code>CharString data</code>
-<dd>
-The ignored characters.
-</dl>
-<dt>
-<code>ErrorEvent</code>
-<dd>
-Generated for each error detected by the parser,
-and also for any other cases where the parser produces a message.
-This is non-ESIS information.
-It has the following members:
-<dl>
-<dt>
-<code>Position pos</code>
-<dd>
-The position at which the error was detected.
-<dt>
-<code>ErrorEvent::Type type</code>
-<dd>
-The type of error.
-<p>
-<code>ErrorEvent::Type</code> is a local enum with the following possible
-values:
-<dl>
-<dt>
-<code>ErrorEvent::quantity</code>
-<dd>
-Exceeding a quantity limit.
-<dt>
-<code>ErrorEvent::idref</code>
-<dd>
-An IDREF to a non-existent ID.
-<dt>
-<code>ErrorEvent::capacity</code>
-<dd>
-Exceeding a capacity limit.
-<dt>
-<code>ErrorEvent::otherError</code>
-<dd>
-Any other kind of error.
-<dt>
-<code>ErrorEvent::warning</code>
-<dd>
-A warning. Not actually an error.
-<dt>
-<code>ErrorEvent::info</code>
-<dd>
-An informational message. Not actually an error.
-</dl>
-<dt>
-<code>CharString message</code>
-<dd>
-The message produced by the parser.
-If messages are not disabled, this will be the same as the message
-printed to standard error.
-</dl>
-</dl>
-<p>
-<code>SGMLApplication</code> also has a virtual function
-<pre>
-void openEntityChange(const OpenEntityPtr &);
-</pre>
-<p>
-which is similar to an event. An application that wishes to makes use
-of position information must maintain a variable of type
-<code>OpenEntityPtr</code> representing the current open entity, and
-must provide an implementation of the <code>openEntityChange</code>
-function that updates this variable. It can then use the value of
-this variable in conjunction with a <code>Position</code> to obtain a
-<code>Location</code>; this can be relatively slow. Unlike events, an
-<code>OpenEntityPtr</code> has copy constructors and assignment
-operators defined.
-
-<h2>EventGenerator</h2>
-<p>
-The <code>EventGenerator</code> interface provides the following
-functions:
-<dl>
-<dt>
-<code>unsigned run(SGMLApplication &<var>app</var>)</code>
-<dd>
-Generate the sequence of events, calling the corresponding member of
-<code><var>app</var></code> for each event. Returns the number of
-errors. This must not be called more than once for any
-<code>EventGenerator</code>object.
-<dt>
-<code>
-EventGenerator *makeSubdocEventGenerator(const SGMLApplication::Char *<var>s</var>, size_t <var>n</var>)
-</code>
-<dd>
-Makes a new <code>EventGenerator</code> for a subdocument of the
-current document. <var>s</var> and <var>n</var> together specify the
-system identifier of the subdocument entity. These should usually be
-obtained from the <code>generatedSystemId</code> member of the
-<code>externalId</code> member of the <code>Entity</code> object for
-the subdocument entity. This function can only be called after
-<code>run</code> has been called; the call to <code>run</code> need
-not have returned, but the <code>SGMLApplication
-</code>
-must have been passed events from the prolog or instance (ie the SGML
-declaration must have been parsed).
-<dt>
-<code>void inhibitMessages(bool <var>b</var>)</code>
-<dd>
-If <var>b</var> is true, disables error and warning messages,
-otherwise enables them. Initially errors and warnings are enabled.
-This function may be called at any time, including while
-<code>run()</code> is executing.
-<dt>
-<code>void halt()</code>
-<dd>
-Halt the generation of events by <code>run()</code>.
-This can be at any point during the execution of <code>run()</code>.
-It is safe to call this function from a different thread from that which
-called <code>run()</code>.
-</dl>
-<h2>ParserEventGeneratorKit</h2>
-<p>
-The <code>ParserEventGeneratorKit</code> class is used to create an
-<code>EventGenerator</code> that generate events using SP. It
-provides the following members:
-<dl>
-<dt>
-<code>EventGenerator *makeEventGenerator(int <var>nFiles</var>, char *const *<var>files</var>)</code>
-<dd>
-This returns a new <code>EventGenerator</code> that will generate events
-for the SGML document whose document entity is contained in the
-<code><var>files</var></code>.
-The returned <code>EventGenerator</code> should be deleted when it
-is no longer needed.
-<code>makeEventGenerator</code> may be called more than once.
-<dt>
-<code>void setOption(ParserEventGeneratorKit::Option <var>opt</var>)</code>
-<dd>
-This can be called any time before <code>makeEventGenerator()</code> is called.
-<p>
-<code>ParserEventGeneratorKit::Option</code> is a local enum with the following possible
-values:
-<dl>
-<dt>
-<code>ParserEventGeneratorKit::showOpenEntities</code>
-<dd>
-This corresponds to the <code>-e</code> option of nsgmls.
-<dt>
-<code>ParserEventGeneratorKit::showOpenElements</code>
-<dd>
-This corresponds to the <code>-g</code> option of nsgmls.
-<dt>
-<code>ParserEventGeneratorKit::outputCommentDecls</code>
-<dd>
-This will cause <code>CommentDeclEvent</code>s to be generated.
-<dt>
-<code>ParserEventGeneratorKit::outputMarkedSections</code>
-<dd>
-This will cause
-<code>MarkedSectionStartEvent</code>s,
-<code>MarkedSectionStartEvent</code>s
-and <code>IgnoredCharsEvent</code>s
-to be generated.
-<dt>
-<code>ParserEventGeneratorKit::outputGeneralEntities</code>
-<dd>
-This will cause <code>GeneralEntityEvent</code>s to be generated.
-</dl>
-<dt>
-<code>
-void setOption(ParserEventGeneratorKit::OptionWithArg <var>opt</var>, const char *<var>arg</var>)
-</code>
-<dd>
-This can be called any time before <code>makeEventGenerator()</code> is called.
-<p>
-<code>ParserEventGeneratorKit::OptionWithArg</code> is a local enum with the following possible
-values:
-<dl>
-<dt>
-<code>ParserEventGeneratorKit::addCatalog</code>
-<dd>
-This corresponds to the <code>-m</code> option of nsgmls.
-<dt>
-<code>ParserEventGeneratorKit::includeParam</code>
-<dd>
-This corresponds to the <code>-i</code> option of nsgmls.
-<dt>
-<code>ParserEventGeneratorKit::enableWarning</code>
-<dd>
-This corresponds to the <code>-w</code> option of nsgmls.
-<dt>
-<code>ParserEventGeneratorKit::addSearchDir</code>
-<dd>
-This corresponds to the <code>-D</code> option of nsgmls.
-</dl>
-</dl>
-
-<h2>Using the interface</h2>
-<p>
-Creating an application with this interface involves the following steps:
-<ul>
-<li>
-Derive a class from <code>SGMLApplication</code>,
-called, say, <code>MyApplication</code>.
-<li>
-For each kind of event <code><var>Foo</var>Event</code> that the application
-needs information from, define a member of <code>MyApplication</code>
-<code>void MyApplication::<var>foo</var>(const <var>Foo</var>Event &)</code>.
-<li>
-Declare an object of type <code>ParserEventGeneratorKit</code>.
-<li>
-Optionally set options for the <code>ParserEventGeneratorKit</code> using
-<code>ParserEventGeneratorKit::setOption</code>.
-<li>
-Create an <code>EventGenerator</code> using
-<code>ParserEventGeneratorKit::makeEventGenerator</code>.
-<li>
-Create an instance of <code>MyApplication</code>
-(usually on the stack).
-<li>
-Call <code>EventGenerator::run</code> passing it a reference to
-the instance of <code>MyApplication</code>.
-<li>
-Delete the <code>EventGenerator</code>.
-</ul>
-<p>
-The application must include the <code>ParserEventGeneratorKit.h</code>
-file (which in turn includes <code>EventGenerator.h</code> and
-<code>SGMLApplication.h</code>), which is in the <code>generic</code>
-directory. If your compiler does not support the standard C++
-<code>bool</code> type, you must ensure that <code>bool</code> is
-defined as a typedef for <code>int</code>, before including this. One
-way to do this is to include <code>config.h</code> and then
-<code>Boolean.h</code> from the <code>lib</code> subdirectory of the SP
-distribution.
-<p>
-On Unix, the application must be linked with the
-<code>lib/libsp.a</code> library.
-
-<h2>Example</h2>
-<p>
-Here's a simple example of an application that uses this interface.
-The application prints an outline of the element structure of a
-document, using indentation to represent nesting.
-<pre>
-// The next two lines are only to ensure bool gets defined appropriately.
-#include "config.h"
-#include "Boolean.h"
-
-#include "ParserEventGeneratorKit.h"
-#include &lt;iostream.h>
-
-ostream &amp;operator<<<!>(ostream &amp;os, SGMLApplication::CharString s)
-{
- for (size_t i = 0; i < s.len; i++)
- os << char(s.ptr[i]);
- return os;
-}
-
-class OutlineApplication : public SGMLApplication {
-public:
- OutlineApplication() : depth_(0) { }
- void startElement(const StartElementEvent &amp;event) {
- for (unsigned i = 0; i < depth_; i++)
- cout << " ";
- cout << event.gi << '\n';
- depth_++;
- }
- void endElement(const EndElementEvent &amp;) { depth_--; }
-private:
- unsigned depth_;
-};
-
-int main(int argc, char **argv)
-{
- ParserEventGeneratorKit parserKit;
- // Use all the arguments after argv[0] as filenames.
- EventGenerator *egp = parserKit.makeEventGenerator(argc - 1, argv + 1);
- OutlineApplication app;
- unsigned nErrors = egp->run(app);
- delete egp;
- return nErrors > 0;
-}
-</pre>
-<p>
-There's a bigger example in the <code>sgmlnorm</code> directory in the SP
-distribution.
-This uses the <code>SGMLApplication</code> interface, but it doesn't
-use the <code>ParserEventGeneratorKit</code> interface.
-<p>
-<address>
-James Clark<BR>
-jjc@jclark.com
-</address>
-</body>
-</html>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/ideas.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/ideas.htm
deleted file mode 100644
index 8c3ecc1c36..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/ideas.htm
+++ /dev/null
@@ -1,491 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>Ideas for improving SP</TITLE>
-</HEAD>
-<BODY>
-<H1>Ideas for improving SP</H1>
-<H2>
-Parser
-</H2>
-<P>
-Have option (fixedDocCharset) in which document charcater set cannot
-be changed by SGML declaration; declared document character set used
-for character references, and to determine which characters are
-non-SGML. Would need separate event for non-SGML character.
-In Text would need separate TextItem for non-SGML data.
-Disallow non-SGML charcters in internal entities.
-<P>
-Supporting caching across multiple runs of parser in single
-process.
-<P>
-Make Dtd copiable.
-<P>
-?Subdoc parser needs character set for system id (should be system
-character set).
-<P>
-Recover better from non-existent documents or subdocuments.
-<P>
-Think about entity declarations/references in inactive LPDs.
-<P>
-Don't allow name groups in parameter entity references in document
-type specifications in start-/end-tags.
-<P>
-With link, don't do a pass 2 unless we replace a referenced entity
-(what about default entity?).
-<P>
-Options to warn about things that HTML disallows: marked sections in
-instance, explicit subsets.
-<P>
-Option to warn about MDCs in comments in comment declarations.
-<P>
-Option to warn about omitted REFC.
-<P>
-Check that names of added functions are valid names in concrete syntax
-(both characters and lengths). Also need to do upper-case
-substitution on them?
-<P>
-Recover from nested doctype declaration intelligently.
-<P>
-Recover from missing doctype declaration intelligently.
-<P>
-Could optimize parsing of attribute literals using technique similar
-to extendData().
-<P>
-attributeValueLength error should give actual length of value.
-<P>
-Recover better from entity reference with name group in literal.
-<P>
-At start of pass 2 clear everything in pass1LPDs except entity sets.
-<P>
-Give an error if EXPLICIT > 1 and LPDs don't chain as required by
-436:5-7 and 436:18-20.
-<P>
-Handle quantity errors by reporting at the end of the prolog and the
-end of the instance any quantities that need to be increased.
-<P>
-Make noSuchReservedName error more helpful.
-<P>
-Function characters should perform their function even when markup
-recognition is suppressed. (I think I've handled this.)
-<P>
-Give a warning for notation attribute that is #CONREF.
-<P>
-Try to separate out Parser::compileModes().
-<P>
-In CompiledModelGroup have vector that gives an index for each element type
-that occurs in the model group. Then in each leaf content token have a
-vector that maps this index to a LeafContentToken *, if there
-is a simple transition (no and groups involved) to that element type.
-<P>
-MatchState::minAndDepth and MatchState::AndInfo should be separated
-off info object pointed to from MatchState; pointer would be null for
-elements with no AND groups.
-<P>
-What to do if we encounter USELINK or USEMAP declaration after DTD in
-prolog? Should stop prolog and start DTD. If we have SCOPE INSTANCE
-then if we get an unknown declaration type in prolog, don't give
-error, but unget token and start instance.
-<P>
-?Have separate version of reportNonSgml() for case where datachar is allowed.
-<P>
-Implement CONCUR.
-<P>
-AttributeDefinition constructors should have Owner&lt;DeclaredValue> &,
-arguments to avoid storage leaks when exceptions are thrown.
-<P>
-Create a list like IList but which keeps track of length. Then
-combine tagLevel into openElement stack, and inputLevel into
-inputStack.
-<P>
-AttributeDefinition::makeValue should return
-ConstResourcePointer&lt;AttributeValue>.
-<P>
-Syntax member functions should use reference for result.
-<P>
-Have a LocationKey data structure that can be used to determine the
-relative order of locations in possibly different concurrent
-instances. Contains: offset in document instance; is it a replacement
-of named character reference; for each entity and numeric character
-reference: location in entity and index of dtd in which instance is
-declared.
-<P>
-On systems with fixed stacks, avoid unlimited stack growth: hard
-limits on number of SUBDOCS and GRPLVL.
-<P>
-With extendData and extendS don't extend more than some fixed amount
-(eg 1024), otherwise could overrun InputSource buffer on 16-bit
-system.
-<P>
-Have a location in ElementType saying where the first mention of the
-element name was. Useful for giving warnings about undefined
-elements.
-<P>
-How to detect 310:8-10?
-<P>
-AttributeSemantics should return const pointers rather than ResourcePointer's
-<P>
-Rename Parser -> ParserImpl SgmlParser -> Parser
-Syntax::isB -> Syntax::isBlank
-<P>
-What mode should be used for parsing other prolog after document element?
-<P>
-Flag out of context data.
-<P>
-Provide mechanism to allow character names to be mapped onto universal
-character numbers.
-<P>
-Provide mechanism to allow specification of wbat characters are
-control characters (for the purposes of SHUNCHAR controls).
-<P>
-With SCOPE INSTANCE, which syntax should be used for delimiters in
-bracketed text entities?
-<P>
-Better error messages for ambiguous delimiters.
-<P>
-Do we need both EndLpd and ComplexLink/SimpleLink events?
-<P>
-What to do about 457:19-21?
-<P>
-Rename lpd_ to activeLpd_; allLpd_ to lpd_.
-<P>
-Test for validity of character numbers in syn ref charset (perhaps
-unnecessary, because bad numbers won't be translateable into doc
-charset).
-<P>
-Option to read bootstrap character set from entity.
-<P>
-In AttributeDefinitionList have a flag that is true if any checking of
-unspecified values in attribute list is needed (ie CURRENT, REQUIRED,
-non-implied ENTITY, non-implied NOTATION). In this case can avoid
-running over attributes in AttributeList::finish, by computing value
-only when user calls Attribute::value().
-<P>
-Construct link attributes from definition if no applicable link rule.
-(RAST maybe doesn't want this. Make it a separate method in LinkProcess and
-use in SgmlsEventHandler. Very useful with ArcEngine.)
-<P>
-Shouldn't have OpenElementInfo in Message. Instead use RTTI.
-<P>
-noSuchAttribute: include gi in message; if element is undefined, don't
-give error at all
-<P>
-noSuchAttributeToken: say what element or entity
-<P>
-nonExistentEntityRef should say document/link type
-<P>
-Distinguish errors that are totally recoverable.
-<P>
-Find better way to unpack entity information in entity attribute.
-
-<H2>
-Entity Manager
-</H2>
-<P>
-Avoid requiring that BASE sysid exist.
-<P>
-When FSI has only a single storage manager and that is a literal,
-return an InternalInputSource.
-<P>
-Allow user of InputSource to specify what bit combinations they
-want to see for RS and RE.
-<P>
-Have environment variable SP_INPUT_BCTF that overrides SP_BCTF for
-input.
-<P>
-Avoid using numeric character references for all characters in storage
-object identifier of literal storage manager in effective system
-identifier.
-<P>
-Instead of registering coding system pass CodingSystemKit that can create
-that can create coding systems.
-<P>
-Need BCTF entry in catalog that specifies default BCTF.
-<P>
-Have catalog entry that describes internet charset as BCTF plus PUBLIC
-identifier of SGML character set; then have charset= storage attribute
-that does the translation.
-<P>
-An SOEntityCatalog should consist of a Vector&lt;ConstPtr&lt;EntityCatalog>
-> which can be shared between several catalogs. This would facilitate
-> caching.
-<P>
-Maybe need to be able to specify two types of catalog entry file: one
-used for all documents; one used for this document alone.
-<P>
-Allow end-tags in FSIs. Support alternative SOSs.
-<P>
-Character sets in the catalog need rethinking. Also character set of
-ParsedSystemId::Map::publicId.
-<P>
-Allow for HTTP proxy.
-<P>
-Cache catalogs.
-<P>
-Use Microsoft ActiveX (formerly Sweeper) DLL on Win95 or NT.
-<P>
-Implement DTDDECL catalog entry.
-<P>
-Support FILE URLs.
-<P>
-Perhaps don't want to do searching for catalog files (and perhaps
-command line files).
-<P>
-Provide mechanism for specifying when (if at all) base dir is searched
-relative to other dirs.
-<P>
-Provide extension to catalog format to distinguish entities declared
-in non-base DTDs. Perhaps precede entity name by document type name
-surrounded by GRPO/GRPC delimiters.
-<P>
-URLStorageManager should use a DescriptorManager shared with
-PosixStorageManager.
-<P>
-URLStorageManager::resolveRelative should delete "xxx/../" and "./"
-components. Might also be a good idea to resolve host names.
-<P>
-Implement JIS encoding system (what should be done with half-width yen
-and overbar in JIS-Roman? translate to Unicode).
-<P>
-ExternalInfoImpl::convertOffset: when the position is the character
-past the last character and the last character was a newline, line
-number should be number of lines + 1.
-<P>
-Try harder to rewind in StdioStorageObject.
-<P>
-charset= storage attribute that infers BCTF from MIME charset assuming
-10646 document character set.
-
-<H2>
-Generic
-</H2>
-<P>
-Provide mechanism to access data entities using generated system id.
-<P>
-Support IMPLICIT/SIMPLE LINK.
-<P>
-Character set information.
-<P>
-Need to know space character that separates token. Alternatively
-provide broken down view of tokens.
-<P>
-Need to know IDREF (and other declared values)?
-
-<H2>
-nsgmls
-</H2>
-<P>
-Problem with "\#n;" escape sequence is that it might get used other
-than in data. Probably should get rid of this feature, and give
-a warning when there's an unencodable character.
-
-<H2>
-Internal
-</H2>
-<P>
-Make all macros that occur in headers begin with SP.
-<P>
-Make sure all files use #pragma i/i.
-<P>
-Get rid of assumption that Vector&lt;T>::size_type, String&lt;T>::size_type
-is size_t.
-<P>
-Maybe align Owner with auto_ptr.
-<P>
-Get rid of uses of string as identifier.
-<P>
-?Maybe support non-const copy constructors for NCVector/Owner.
-<P>
-Get rid of asEntityOrigin (as far as possible). Make
-InputSourceOrigin::defLocation virtual on origin. Avoid excessive use
-of asInputSourceOrigin.
-<P>
-Hash should define Hash(String&lt;unsigned char>),
-Hash(String&lt;unsigned short>) etc.
-<P>
-Invert sense of SP_HAVE_BOOL define.
-<P>
-Get rid of OutputCharStream::open. Instead have
-OutputCharStream::setEncoding. (Perhaps make a friend so we can use
-ostream if we're not interested in encodings.) Allow use of ostream
-instead of OutputCharStream. Change ParserToolkit::errorStream_'s coding
-system when we change the coding system.
-<P>
-Support 32-bit Char. Need to fix XcharMap and SubstTable.
-Detemplatize SubstTable. Then support UTF-16.
-<P>
-Have a common version of Ptr for things that have a virtual
-destructor.
-<P>
-Have a common version of Owner for all things that have a virtual
-destructor.
-<P>
-Inheritance in AttributeSemantics unnecesary.
-<P>
-Rename ISet -> RangeSet.
-<P>
-ISet and RangeMap should use binary search.
-<P>
-Better hash function for wide characters.
-<P>
-OutputCharStream should canonically use RS/RE and translate to system
-newline char with raw option that prevents this.
-<P>
-Avoid having Entity.h depend on ParserState, perhaps by double
-dispatching.
-<P>
-Add uses of explicit keyword.
-<P>
-When generating message.h file; if we don't have .cxx file and
-namespaces are supported, use anonymous namespace.
-
-<H2>
-Application framework
-</H2>
-<P>
-Only use static programName for outOfMemory message.
-<P>
-Need to use AppChar *const * not AppChar ** in CmdLineApp.
-<P>
-When reporting message with MessageEventHandler need to be able to
-update error count.
-<P>
-Option argument names need to be internationalized.
-<P>
-Support response files for DOS.
-<P>
-Sort options in usage message.
-<P>
-StringMessageArg should be associated with a character set (in
-particular, need to distinguish parser character sets from
-StorageManager character sets).
-<P>
-Should translate StringMessageArg from document character set to
-system character set. Have MessageReporter::setDocumentCharacter
-function.
-<P>
-In MessageReporter, maybe distinguish messages coming from the parser.
-<P>
-Don't ever give a non-existent file as a location in a error message.
-<P>
-Text of messages should be able to specify that an open quote or close
-quote should be inserted at a particular point.
-<P>
-When outputting a StringMessageArg translate \r to \n.
-<P>
-Make sure wild cards work in VC++ and MS-DOS.
-
-<H2>
-Win32
-</H2>
-<P>
-Compilers can typically eliminate unused templates. Reengineer Vector
-to reduce code size with such compilers.
-<P>
-Store messages in resources; requires numeric tags for messages.
-<P>
-Should automatically register all available code pages.
-<P>
-Make use of IsTextUnicode() API.
-<P>
-Have StorageManager that uses Win32 API directly. Would avoid limits
-on number of open files. Also use flag that says file is being
-accessed sequentially.
-<P>
-Allow DTDs to be compiled into binary by having storage manager that
-uses resource ids.
-
-<H2>
-Architecture engine
-</H2>
-<P>
-Should give an error with -A if the specified arch does not exist.
-<P>
-Interpret APPINFO parameter, and automatically enable architectural
-processing based on this.
-<P>
-Handle derived architecture support attributes.
-<P>
-When doing architectural processing in link type, not possible to have
-notation declaration, so need some other way to specify public
-identifier for architecture.
-<P>
-Allow DOCTYPE to be declared inline (as with CONCUR or EXPLICIT LINK).
-<P>
-Grok conventional comments.
-<P>
-Make work automatically with EventHandlers that process subdoc. Make
-references to subdocs architectural.
-<P>
-Support different SGML declaration for meta-DTD.
-<P>
-Maybe should map internal sdata/cdata entities to copies in meta-DTD.
-<P>
-Perhaps when getting open element info should indicate that gis are
-architectural.
-<P>
-Think about references to SDATA entities in default values in meta-DTD.
-<P>
-Add default entity from real DTD to meta-DTD.
-<P>
-Tokenize ArcForm attribute appropriately.
-<P>
-Make special case for parsing DTD when entity can't be accessed.
-<P>
-Try to provide extension that would allow architecture elements be
-asynchronous with actual elements? This would provide CONCUR
-functionality.
-
-<H2>
-sgmlnorm
-</H2>
-<P>
-Avoid bogus newline from invalid empty document.
-<P>
-Avoid always escaping >.
-<P>
-Option to say whether to use character references for 8-bit characters.
-<P>
-Option to output implied attributes.
-<P>
-Option to output all non-implied attributes.
-<P>
-Option to omit attribute name with name tokens.
-<P>
-Protect against recognition of short references.
-<P>
-Option to preserve CDATA entity references.
-<P>
-Option to output general entity declarations in DTD subset
-(but what about data attributes)?
-
-<H2>
-spam
-</H2>
-<P>
-Option to normalize names.
-<P>
-Add comments round expanded entities to prevent false delimiter
-recognition.
-<P>
-Add newline at the end if last thing was omitted tag.
-<P>
-Option to warn about changes in internal entities when not expanding.
-
-<H2>
-Documentation
-</H2>
-<P>
-Error message format.
-<P>
-&lt;catalog&gt; FSI tag.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/index.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/index.htm
deleted file mode 100644
index b776083b87..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/index.htm
+++ /dev/null
@@ -1,96 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP</TITLE>
-</HEAD>
-<BODY>
-<H1>SP</H1>
-<H3>
-An SGML System Conforming to International Standard ISO 8879 --
-Standard Generalized Markup Language
-</H3>
-<P>
-The following documents are available:
-<P>
-<UL>
-<LI>
-<A HREF="features.htm">Summary of SP's features</A>
-<LI>
-<A HREF="http://www.jclark.com/sp/howtoget.htm">How to get SP</A>
-<LI>
-<A HREF="build.htm">How to build and install SP from source</A>
-<LI>
-Using SP
-<UL>
-<LI>
-<A HREF="new.htm">What's new in SP?</A>
-<LI>
-<A HREF="nsgmls.htm">nsgmls</A>, a replacement for sgmls
-<LI>
-<A HREF="sgmlsout.htm">nsgmls output format</A>,
-an extension to the output format of sgmls
-<LI>
-<A HREF="spam.htm">spam</A>, a sophisticated normalizer,
-perhaps better thought of as a markup stream editor
-<LI>
-<A HREF="sgmlnorm.htm">sgmlnorm</A>, a simpler normalizer
-that focuses on producing the same ESIS rather than
-preserving details of the markup
-<LI>
-<A HREF="spent.htm">spent</A>, a program providing access
-to SP's entity manager
-<LI>
-<A HREF="sysdecl.htm">System declaration</A>
-<LI>
-<A HREF="sgmldecl.htm">Handling of SGML declarations</A>
-<LI>
-<A HREF="sysid.htm">System identifiers</A>
-<LI>
-<A HREF="catalog.htm">Using SGML Open catalogs to generate
-system identifiers</A>
-<LI>
-<A HREF="archform.htm">Architectural form support</A>
-<LI>
-<A HREF="winntu.htm">Notes on SP Unicode support under Windows NT</A>
-</UL>
-<LI>
-Programming with SP
-<UL>
-<LI>
-<A HREF="generic.htm">Generic API to SP</A>
-<LI>
-<A HREF="ideas.htm">Ideas for improving SP</A>
-</UL>
-</UL>
-<P>
-There is a mailing list for programmer-level discussions of SP. Mail
-subscription requests <A
-HREF="mailto:sp-prog-request@jclark.com">sp-prog-request@jclark.com</A>.
-Messages for the list should go to <A
-HREF="mailto:sp-prog@jclark.com">sp-prog@jclark.com</A>.
-<P>
-For information about SGML, see
-<UL>
-<LI>
-<A
-HREF="http://www.sil.org/sgml/sgml.html">The SGML Web Page</A>.
-<LI>
-<A HREF="http://www.iso.ch/cate/d16387.html">ISO 8879:1986</A>
-<LI>
-The SGML Handbook, Charles F. Goldfarb
-</UL>
-<P>
-I would like to hear about any bugs you find in SP. When reporting a
-bug, please always include a complete self-contained file that will
-enable me to reproduce the bug. I am also interested in receiving
-suggestions for improvements to SP no matter how small.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/new.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/new.htm
deleted file mode 100644
index 70e77edf34..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/new.htm
+++ /dev/null
@@ -1,168 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>What's new in SP?</TITLE>
-</HEAD>
-<BODY>
-<H1>What's new?</H1>
-<P>
-This document describes recent user-visible changes in SP. Bug fixes
-are not described.
-
-<H2>Version 1.1</H2>
-<P>
-There is now generalized support for <A
-HREF="archform.htm">architectural form processing</A>.
-<P>
-Documentation is now in HTML format.
-<P>
-A BASE catalog entry can be used to specify a base system identifier
-for resolving relative storage object identifiers occurring in the
-catalog.
-<P>
-A LITERAL storage manager is now provided.
-<P>
-Programs have a -E option that sets the maximum number of errors.
-<P>
-A DELEGATE catalog entry allows distributed resolution of public
-identifiers.
-<P>
-nsgmls has a -B (batch mode) option that allows you to parse multiple
-documents with a single invocation of nsgmls.
-<P>
-In nsgmls the -c option now specifies a catalog as it does in spam and
-sgmlnorm, in addition to the -m option that previously did this.
-<P>
-The <SAMP>-n</SAMP> option has been replaced by a
-<SAMP>-onotation-sysid</SAMP> which applies to nsgmls only, and a
-<SAMP>-wnotation-sysid</SAMP> which applies generally.
-<P>
-SP can be built as a DLL under Win32.
-
-<H2>Version 1.0</H2>
-<P>
-The syntax of system identifiers has completely changed. The new
-syntax is based on the syntax of formal system identifiers defined in
-ISO/IEC 10744 (HyTime) Technical Corrigendum 1, Annex D.
-<P>
-The NSGMLS_CODE environment variable has been renamed to SP_BCTF.
-nsgmls has a -b option to specify the bit combination transformation
-format to be used for output.
-<P>
-A list of directories in which files specified in system identifiers
-should be searched for can be specified using the environment variable
-SGML_SEARCH_PATH or the option -D.
-<P>
-Individual SYSTEM identifiers in external identifiers can be
-overridden using SYSTEM entries in the catalog.
-<P>
-The OVERRIDE catalog entry now takes a YES/NO argument. (This change
-was required for conformance to the SGML Open TR.) It applies to each
-entry individually rather than to the entire catalog.
-<P>
-The -w options of nsgmls and spam have been enhanced. In spam, the -w
-option takes an argument as with nsgmls. There are new warnings for
-minimized start and end tags (-wunclosed, -wempty, -wnet and
--wmin-tag); for unused short reference maps (-wunused-maps); for
-unused parameter entities (-wunused-param). -wall now doesn't include
-those warnings that are about conditions that, in the opinion of the
-author, there is no reason to avoid. A warning can be turned off by
-using its name prefixed by no-; thus -wmin-tag -wno-net is equivalent
-to -wunclosed -wempty. The -w option is also used to turn off errors:
--wno-idref replaces the -x option; -wno-significant replaces the -X
-option.
-<P>
-In the output of nsgmls, characters that cannot be represented in the
-encoding translation specified by the NSGMLS_BCTF environment variable
-are represented using an escape sequence of the form \#N; when N is a
-decimal integer.
-<P>
-In the multi-byte versions of nsgmls there are new BCTFs is8859-N
-for N = 1,...,9.
-<P>
-There is a -o option to nsgmls which makes it output additional
-information: -oentity outputs information about all entities; -oid
-distinguish attributes with a declared value of id; -oincluded
-distinguishes included subelements.
-<P>
-nsgmls now automatically searches for a catalog entry file called
-"catalog" in the same place as the document entity. Note that when
-the document entity is specified with a URL, this matches the
-behaviour of Panorama.
-<P>
-A catalog entry file can contain CATALOG entries specifying additional
-catalog entry files. This matches the behaviour of Panorama.
-<P>
-The parser can now make available to an application complete
-information about the markup of prologs and SGML declarations. It
-would now be possible, for example, to use SP to write a DTD editor.
-spam exploits this to a limited extent: if the -p option is specified
-twice, then parameter entity references between declarations will be
-expanded; the -mreserved option puts all reserved names in upper-case;
-with the -mshortref option short reference use declarations and short
-reference mapping declarations will be removed; attribute
-specification lists in data attribute specifications in entity
-declarations can be normalized like attribute specification lists in
-start-tags; with -mms it resolves IGNORE/INCLUDE marked sections.
-<P>
-nsgmls has a -C option which causes the command line filenames to be
-treated as a catalog whose DOCUMENT entry specifies the document
-entity.
-<P>
-nsgmls has a -n option which causes it to generate system identifiers
-for notations in the same way as it does for entities.
-<P>
-spam now has a -f option like nsgmls.
-<P>
-The interface between the parser and entity manager has been
-redesigned so that the entity manager can be used independently of the
-parser. This is exploited by a new program called spent that prints
-an entity with a specified system identifier on the standard output.
-<P>
-In most cases, a Control-Z occurring as the last byte in a file will
-be stripped. This is controlled by the zapeof attribute in formal
-system identifiers.
-
-<H2>Version 0.4</H2>
-<P>
-External concrete syntaxes, character sets and capacity sets are
-supported using PUBLIC entries in catalog files. The multicode code
-core and reference syntaxes are no longer built-in. Only a few
-character sets are now built-in.
-<P>
-Within external concrete syntaxes, various useful extensions are
-permitted. In particular, an ellipsis syntax is allowed for the
-specification of name characters and single character short
-references. It is now practical to specify tens of thousands of
-additional name characters.
-<P>
-The default SGML declaration is more permissive.
-<P>
-nsgmls has a -x option that inhibits checking of idrefs.
-<P>
-nsgmls has a -w option that can enable additional warnings. In
-particular, -wmixed will warn about mixed content models that do not
-allow #pcdata everywhere.
-<P>
-The meaning of the f command in the output of nsgmls has changed
-slightly. It now gives the effective system identifier of the entity.
-<P>
-The functionality of the rast program has been merged into the nsgmls
-program and the rast program has been removed. The -t option makes
-nsgmls generate a RAST result.
-<P>
-spam has a -l option that uses lower-case for added names that were
-subject to upper-case substitution.
-<P>
-spam has a -mcurrent option that adds omitted attribute specifications
-for current attributes.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/nsgmls.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/nsgmls.htm
deleted file mode 100644
index 5922e0d4b0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/nsgmls.htm
+++ /dev/null
@@ -1,450 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>NSGMLS</TITLE>
-</HEAD>
-<BODY>
-<H1>NSGMLS</H1>
-<H4>
-An SGML System Conforming to
-International Standard ISO 8879 --<BR>
-Standard Generalized Markup Language
-</H4>
-<H2>
-SYNOPSIS
-</H2>
-<P>
-<SAMP>nsgmls</SAMP>
-[
-<SAMP>-BCdeglprsuv</SAMP>
-]
-[
-<SAMP>-a<VAR>linktype</VAR></SAMP>
-]
-[
-<SAMP>-b<VAR>bctf</VAR></SAMP>
-]
-[
-<SAMP>-c<VAR>sysid</VAR></SAMP>
-]
-[
-<SAMP>-D<VAR>directory</VAR></SAMP>
-]
-[
-<SAMP>-E<VAR>max_errors</VAR></SAMP>
-]
-[
-<SAMP>-f<VAR>file</VAR></SAMP>
-]
-[
-<SAMP>-i<VAR>name</VAR></SAMP>
-]
-[
-<SAMP>-o<VAR>output_option</VAR></SAMP>
-]
-[
-<SAMP>-t<VAR>file</VAR></SAMP>
-]
-[
-<SAMP>-w<VAR>warning_type</VAR></SAMP>
-]
-[
-<SAMP><VAR>sysid</VAR>...</SAMP>
-]
-<H2>DESCRIPTION</H2>
-<P>
-Nsgmls parses and validates
-the SGML document whose document entity is specified by the
-<A HREF="sysid.htm">system identifiers</A>
-<SAMP><VAR>sysid</VAR>...</SAMP>
-and prints on the standard output a simple text representation of its
-Element Structure Information Set.
-(This is the information set which a structure-controlled
-conforming SGML application should act upon.)
-If more than one system identifier is specified,
-then the corresponding entities will be concatenated to form
-the document entity.
-Thus the document entity may be spread amongst several files;
-for example, the SGML declaration, prolog and document
-instance set could each be in a separate file.
-If no system identifiers are specified, then
-nsgmls
-will read the document entity from the standard input.
-A command line system identifier of
-<SAMP>-</SAMP>
-can be used to refer to the standard input.
-(Normally in a system identifier,
-<SAMP>&lt;osfd>0</SAMP>
-is used to refer to standard input.)
-<H2>OPTIONS</H2>
-<P>
-The following options are available:
-<DL>
-<DT>
-<SAMP>-a<VAR>linktype</VAR></SAMP>
-<DD>
-Make link type
-<SAMP><VAR>linktype</VAR></SAMP>
-active.
-Not all ESIS information is output in this case:
-the active LPDs are not explicitly reported,
-although each link attribute is qualified with
-its link type name;
-there is no information about result elements;
-when there are multiple link rules applicable to the
-current element,
-nsgmls
-always chooses the first.
-<DT>
-<SAMP>-b<VAR>bctf</VAR></SAMP>
-<DD>
-Use the <A HREF="sysid.htm#bctf">BCTF</A> named
-<SAMP><VAR>bctf</VAR></SAMP>
-for output.
-<DT>
-<SAMP>-B</SAMP>
-<DD>
-Batch mode.
-Parse each <SAMP><VAR>sysid...</VAR></SAMP> specified on the command
-line separately, rather than concatenating them.
-This is useful mainly with <SAMP>-s</SAMP>.
-<P>
-If <SAMP>-t<VAR>filename</VAR></SAMP> is also specified, then
-the specified <SAMP><VAR>filename</VAR></SAMP> will be prefixed
-to the <SAMP><VAR>sysid</VAR></SAMP> to make the filename
-for the RAST result for each <SAMP><VAR>sysid</VAR></SAMP>.
-<DT>
-<SAMP>-c<VAR>sysid</VAR></SAMP>
-<DD>
-Map public identifiers and entity names to system identifiers
-using the catalog entry file whose system identifier is
-<SAMP><VAR>sysid</VAR></SAMP>.
-Multiple
-<SAMP>-c</SAMP>
-options are allowed.
-If there is a catalog entry file called
-<SAMP>catalog</SAMP>
-in the same place as the document entity,
-it will be searched for immediately after those specified by
-<SAMP>-c</SAMP>.
-<DT>
-<A NAME="optC"><SAMP>-C</SAMP></A>
-<DD>
-The
-<SAMP><VAR>filename</VAR>...</SAMP>
-arguments specify catalog files rather than the document entity.
-The document entity is specified by the first
-<SAMP>DOCUMENT</SAMP>
-entry in the catalog files.
-<DT>
-<A NAME="optD"><SAMP>-D<VAR>directory</VAR></SAMP></A>
-<DD>
-Search
-<SAMP><VAR>directory</VAR></SAMP>
-for files specified in system identifiers.
-Multiple
-<SAMP>-D</SAMP> options
-are allowed.
-See the description of the
-<SAMP>osfile</SAMP>
-storage manager for more information about file searching.
-<DT>
-<SAMP>-e</SAMP>
-<DD>
-Describe open entities in error messages.
-Error messages always include the position of the most recently
-opened external entity.
-<DT>
-<SAMP>-E<VAR>max_errors</VAR></SAMP>
-<DD>
-Nsgmls
-will exit after
-<SAMP><VAR>max_errors</VAR></SAMP>
-errors.
-If
-<SAMP><VAR>max_errors</VAR></SAMP>
-is 0, there is no limit on the number of errors.
-The default is 200.
-<DT>
-<SAMP>-f<VAR>file</VAR></SAMP>
-<DD>
-Redirect errors to
-<SAMP><VAR>file</VAR></SAMP>.
-This is useful mainly with shells that do not support redirection
-of stderr.
-<DT>
-<SAMP>-g</SAMP>
-<DD>
-Show the generic identifiers of open elements in error messages.
-<DT>
-<A NAME="opti"><SAMP>-i<VAR>name</VAR></SAMP></A>
-<DD>
-Pretend that
-<PRE>
-&lt;!ENTITY % <VAR>name</VAR> "INCLUDE">
-</PRE>
-<P>
-occurs at the start of the document type declaration subset
-in the SGML 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
-<SAMP>-i</SAMP>
-options are allowed.
-If the SGML declaration replaces the reserved name
-<SAMP>INCLUDE</SAMP>
-then the new reserved name will be the replacement text of the entity.
-Typically the document type declaration will contain
-<PRE>
-&lt;!ENTITY % <VAR>name</VAR> "IGNORE">
-</PRE>
-<P>
-and will use
-<SAMP>%<VAR>name</VAR>;</SAMP>
-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.
-<DT>
-<SAMP>-o<VAR>output_option</VAR></SAMP>
-<DD>
-Output additional information accordig to
-<SAMP><VAR>output_option</VAR></SAMP>:
-<DL>
-<DT>
-<SAMP>entity</SAMP>
-<DD>
-Output definitions of all general entities
-not just for data or subdoc entities that are referenced or named in an
-ENTITY or ENTITIES attribute.
-<DT>
-<SAMP>id</SAMP>
-<DD>
-Distinguish attributes whose declared value is ID.
-<DT>
-<SAMP>line</SAMP>
-<DD>
-Output
-<SAMP>L</SAMP>
-commands giving the current line number and filename.
-<DT>
-<SAMP>included</SAMP>
-<DD>
-Output an
-<SAMP>i</SAMP>
-command for included subelements.
-<DT>
-<SAMP>notation-sysid</SAMP>
-<DD>
-Output an <SAMP>f</SAMP> command before an <SAMP>N</SAMP> command,
-if a system identifier could be generated for that notation.
-</DL>
-<P>
-Multiple
-<SAMP>-o</SAMP>
-options are allowed.
-<DT>
-<SAMP>-p</SAMP>
-<DD>
-Parse only the prolog.
-Nsgmls
-will exit after parsing the document type declaration.
-Implies
-<SAMP>-s</SAMP>.
-<DT>
-<SAMP>-s</SAMP>
-<DD>
-Suppress output.
-Error messages will still be printed.
-<DT>
-<SAMP>-t<VAR>file</VAR></SAMP>
-<DD>
-Output to
-<SAMP><VAR>file</VAR></SAMP>
-the RAST result as defined by
-ISO/IEC 13673:1995 (actually this isn't quite an IS yet;
-this implements the Intermediate Editor's Draft of 1994/08/29,
-with changes to implement ISO/IEC JTC1/SC18/WG8 N1777).
-The normal output is not produced.
-<DT>
-<SAMP>-v</SAMP>
-<DD>
-Print the version number.
-<DT>
-<A NAME="optw"><SAMP>-w<VAR>type</VAR></SAMP></A>
-<DD>
-Control warnings and errors.
-Multiple
-<SAMP>-w</SAMP>
-options are allowed.
-The following values of
-<SAMP><VAR>type</VAR></SAMP>
-enable warnings:
-<DL>
-<DT>
-<SAMP>mixed</SAMP>
-<DD>
-Warn about mixed content models that do not allow #pcdata anywhere.
-<DT>
-<SAMP>sgmldecl</SAMP>
-<DD>
-Warn about various dubious constructions in the SGML declaration.
-<DT>
-<SAMP>should</SAMP>
-<DD>
-Warn about various recommendations made in ISO 8879 that the document
-does not comply with.
-(Recommendations are expressed with ``should'', as distinct from
-requirements which are usually expressed with ``shall''.)
-<DT>
-<SAMP>default</SAMP>
-<DD>
-Warn about defaulted references.
-<DT>
-<SAMP>duplicate</SAMP>
-<DD>
-Warn about duplicate entity declarations.
-<DT>
-<SAMP>undefined</SAMP>
-<DD>
-Warn about undefined elements: elements used in the DTD but not defined.
-<DT>
-<SAMP>unclosed</SAMP>
-<DD>
-Warn about unclosed start and end-tags.
-<DT>
-<SAMP>empty</SAMP>
-<DD>
-Warn about empty start and end-tags.
-<DT>
-<SAMP>net</SAMP>
-<DD>
-Warn about net-enabling start-tags and null end-tags.
-<DT>
-<SAMP>min-tag</SAMP>
-<DD>
-Warn about minimized start and end-tags.
-Equivalent to combination of
-<SAMP>unclosed</SAMP>,
-<SAMP>empty</SAMP>
-and
-<SAMP>net</SAMP>
-warnings.
-<DT>
-<SAMP>unused-map</SAMP>
-<DD>
-Warn about unused short reference maps: maps that are declared with a
-short reference mapping declaration but never used in a short
-reference use declaration in the DTD.
-<DT>
-<SAMP>unused-param</SAMP>
-<DD>
-Warn about parameter entities that are defined but not used in a DTD.
-Unused internal parameter entities whose text is
-<SAMP>INCLUDE</SAMP>
-or
-<SAMP>IGNORE</SAMP>
-won't get the warning.
-<DT>
-<SAMP>notation-sysid</SAMP>
-<DD>
-Warn about notations for which no system identifier could be generated.
-<DT>
-<SAMP>all</SAMP>
-<DD>
-Warn about conditions that should usually be avoided
-(in the opinion of the author).
-Equivalent to:
-<SAMP>mixed</SAMP>,
-<SAMP>should</SAMP>,
-<SAMP>default</SAMP>,
-<SAMP>undefined</SAMP>,
-<SAMP>sgmldecl</SAMP>,
-<SAMP>unused-map</SAMP>,
-<SAMP>unused-param</SAMP>,
-<SAMP>empty</SAMP>
-and
-<SAMP>unclosed</SAMP>.
-</DL>
-<P>
-A warning can be disabled by using its name prefixed with
-<SAMP>no-</SAMP>.
-Thus
-<SAMP>-wall -wno-duplicate</SAMP>
-will enable all warnings except those about duplicate entity
-declarations.
-<P>
-The following values for
-<SAMP><VAR>warning_type</VAR></SAMP>
-disable errors:
-<DL>
-<DT>
-<SAMP>no-idref</SAMP>
-<DD>
-Do not give an error for an ID reference value
-which no element has as its ID.
-The effect will be as if each attribute declared as
-an ID reference value had been declared as a name.
-<DT>
-<SAMP>no-significant</SAMP>
-<DD>
-Do not give an error when a character that is not a significant
-character in the reference concrete syntax occurs in a literal in the
-SGML declaration. This may be useful in conjunction with certain
-buggy test suites.
-</DL>
-</DL>
-<P>
-The following options are also supported for backwards compatibility
-with sgmls:
-<DL>
-<DT>
-<SAMP>-d</SAMP>
-<DD>
-Same as
-<SAMP>-wduplicate</SAMP>.
-<DT>
-<SAMP>-l</SAMP>
-<DD>
-Same as
-<SAMP>-oline</SAMP>.
-<DT>
-<SAMP>-m<VAR>sysid</VAR></SAMP>
-<DD>
-Same as <SAMP>-c</SAMP>.
-<DT>
-<SAMP>-r</SAMP>
-<DD>
-Same as
-<SAMP>-wdefault</SAMP>.
-<DT>
-<SAMP>-u</SAMP>
-<DD>
-Same as
-<SAMP>-wundef</SAMP>.
-</DL>
-<H2>ENVIRONMENT</H2>
-<DL>
-<DT>
-<SAMP>SP_BCTF</SAMP>
-<DD>
-If this is set to one of
-<SAMP>identity</SAMP>,
-<SAMP>utf-8</SAMP>,
-<SAMP>euc-jp</SAMP> and <SAMP>sjis</SAMP>, then that BCTF will be used as the
-default BCTF for everything (including file input, file output,
-message output, filenames, environment variable names, environment
-variable values and command line arguments). Note that setting
-<SAMP>SP_BCTF</SAMP> to <SAMP>unicode</SAMP>
-will not work.
-</DL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmldecl.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmldecl.htm
deleted file mode 100644
index 54ef6f6506..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmldecl.htm
+++ /dev/null
@@ -1,275 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP - SGML declaration</TITLE>
-</HEAD>
-<BODY>
-<H1>Handling of the SGML declaration in SP</H1>
-<H2>Default SGML declaration</H2>
-<P>
-If the SGML declaration is omitted
-and there is no applicable
-<A HREF="catalog.htm#sgmldecl"><SAMP>SGMLDECL</SAMP></A>
-entry in a catalog,
-the following declaration will be implied:
-<PRE>
- &lt;!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
-CAPACITY PUBLIC "ISO 8879:1986//CAPACITY Reference//EN"
-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 255
-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 99999999
- ATTSPLEN 99999999
- DTEMPLEN 24000
- ENTLVL 99999999
- GRPCNT 99999999
- GRPGTCNT 99999999
- GRPLVL 99999999
- LITLEN 24000
- NAMELEN 99999999
- PILEN 24000
- TAGLEN 99999999
- TAGLVL 99999999
- FEATURES
-MINIMIZE DATATAG NO
- OMITTAG YES
- RANK YES
- SHORTTAG YES
-LINK SIMPLE YES 1000
- IMPLICIT YES
- EXPLICIT YES 1
-OTHER CONCUR NO
- SUBDOC YES 99999999
- FORMAL YES
- APPINFO NONE>
-</PRE>
-<P>
-with the exception that all characters that are neither significant
-nor shunned will be assigned to DATACHAR.
-<H2>Character sets</H2>
-<P>
-A character in a base character set is described either by giving its
-number in a universal character set, or by specifying a minimum
-literal. The constraints on the choice of universal character set are
-that characters that are significant in the SGML reference concrete
-syntax must be in the universal character set and must have the same
-number in the universal character set as in ISO 646 and that each
-character in the character set must be represented by exactly one
-number; that character numbers in the range 0 to 31 and 127 to 159 are
-control characters (for the purpose of enforcing SHUNCHAR CONTROLS).
-It is recommended that ISO 10646 (Unicode) be used as the universal
-character set, except in environments where the normal document
-character sets are large character set which cannot be compactly
-described in terms of ISO 10646.
-The public identifier of a base character set can be associated
-with an entity that describes it by using a
-<SAMP>PUBLIC</SAMP>
-entry in the catalog entry file.
-The entity must be a fragment
-of an SGML declaration
-consisting of the
-portion of a character set description,
-following the DESCSET keyword,
-that is, it must be a sequence of character descriptions,
-where each character description specifies a described character
-number, the number of characters and
-either a character number in the universal character set, a minimum literal
-or the keyword
-<SAMP>UNUSED</SAMP>.
-Character numbers in the universal character set can be as big as
-99999999.
-<P>
-In addition SP has built in knowledge of a few character sets.
-These are identified using the designating sequence in the
-public identifier. The following designating sequences are
-recognized:
-<DL>
-<DT>
-<SAMP>ESC 2/5 4/0</SAMP>
-<DD>
-The full set of ISO 646 IRV.
-This is not a registered character set,
-but is recommended by ISO 8879 (clause 10.2.2.4).
-<DT>
-<SAMP>ESC 2/8 4/0</SAMP>
-<DD>
-G0 set of ISO 646 IRV,
-ISO Registration Number 2.
-<DT>
-<SAMP>ESC 2/8 4/2</SAMP>
-<DD>
-G0 set of ASCII,
-ISO Registration Number 6.
-<DT>
-<SAMP>ESC 2/1 4/0</SAMP>
-<DD>
-C0 set of ISO 646,
-ISO Registration Number 1.
-</DL>
-<P>
-All the above character sets will be treated as mapping character numbers
-0 to 127 inclusive as in ISO 646.
-<P>
-It is not necessary for every character set used in the SGML
-declaration to be known to SP
-provided that characters in the document character set that are
-significant both in the reference concrete syntax and in the described
-concrete syntax are described using known base character sets and that
-characters that are significant in the described concrete syntax are
-described using the same base character sets or the same minimum
-literals in both the document character set description and the syntax
-reference character set description.
-
-<H2>Concrete syntaxes</H2>
-<P>
-The public identifier for a public concrete syntax can be associated
-with an entity that describes using a
-<SAMP>PUBLIC</SAMP>
-entry in the catalog entry file.
-The entity must be a fragment of an SGML declaration
-consisting of a concrete syntax description
-starting with the
-<SAMP>SHUNCHAR</SAMP>
-keyword
-as in an SGML declaration.
-The entity can also make use of the following extensions:
-<UL>
-<LI>
-An
-<I>added function</I>
-can be expressed as a parameter literal
-instead of a name.
-<LI>
-The replacement for a reference reserved name
-can be expressed as a parameter literal instead of a name.
-<LI>
-The
-<SAMP>LCNMSTRT</SAMP>,
-<SAMP>UCNMSTRT</SAMP>,
-<SAMP>LCNMCHAR</SAMP>
-and
-<SAMP>UCNMCHAR</SAMP>
-keywords may each be followed by more than one parameter literal. A
-sequence of parameter literals has the same meaning as a single
-parameter literal whose content is the concatenation of the content of
-each of the literals in the sequence. This extension is useful
-because of the restriction on the length of a parameter literal in the
-SGML declaration to 240 characters.
-<LI>
-The total number of characters specified for
-<SAMP>UCNMCHAR</SAMP>
-or
-<SAMP>UCNMSTRT</SAMP>
-may exceed the total number of characters specified for
-<SAMP>LCNMCHAR</SAMP>
-or
-<SAMP>LCNMSTRT</SAMP>
-respectively.
-Each character in
-<SAMP>UCNMCHAR</SAMP>
-or
-<SAMP>UCNMSTRT</SAMP>
-which does not have a corresponding character in the same position in
-<SAMP>LCNMCHAR</SAMP>
-or
-<SAMP>LCNMSTRT</SAMP>
-is simply assigned to <SAMP>UCNMCHAR</SAMP> or <SAMP>UCNMSTRT</SAMP>
-without making it the upper-case form of any character.
-<LI>
-A parameter following any of
-<SAMP>LCNMSTRT</SAMP>,
-<SAMP>UCNMSTRT</SAMP>,
-<SAMP>LCNMCHAR</SAMP>
-and
-<SAMP>UCNMCHAR</SAMP>
-keywords may be followed by
-the name token <SAMP>...</SAMP>
-(three periods) and another parameter literal.
-This has the same meaning as the two parameter literals
-with a parameter literal in between
-containing in order each character whose number
-is greater than the number of the last character in
-the first parameter literal and less than the
-number of the first character in the second
-parameter literal.
-A parameter literal must contain at least one character for each
-<SAMP>...</SAMP>
-to which it is adjacent.
-<LI>
-A number may be used as a parameter following the
-<SAMP>LCNMSTRT</SAMP>,
-<SAMP>UCNMSTRT</SAMP>,
-<SAMP>LCNMCHAR</SAMP>
-and
-<SAMP>UCNMCHAR</SAMP>
-keywords or as a delimiter in the
-<SAMP>DELIM</SAMP>
-section with the same meaning as a parameter literal
-containing just a numeric character reference with that number.
-<LI>
-The parameters following the
-<SAMP>LCNMSTRT</SAMP>,
-<SAMP>UCNMSTRT</SAMP>,
-<SAMP>LCNMCHAR</SAMP>
-and
-<SAMP>UCNMCHAR</SAMP>
-keywords may be omitted.
-This has the same meaning as specifying
-an empty parameter literal.
-<LI>
-Within the specification of the short reference delimiters,
-a parameter literal containing exactly one character
-may be followed by the name token <SAMP>...</SAMP>
-and another parameter literal containing exactly one character.
-This has the same meaning as a sequence of parameter literals
-one for each character number that is greater than or equal
-to the number of the character in the first parameter literal
-and less than or equal to the number of the character in the
-second parameter literal.
-</UL>
-<H2>Capacity sets</H2>
-<P>
-The public identifier for a public capacity set can be associated
-with an entity that describes using a
-<SAMP>PUBLIC</SAMP>
-entry in the catalog entry file.
-The entity must be a fragment of an SGML declaration
-consisting of a sequence of capacity names and numbers.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlnorm.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlnorm.htm
deleted file mode 100644
index 97303e4303..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlnorm.htm
+++ /dev/null
@@ -1,153 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SGMLNORM</TITLE>
-</HEAD>
-<BODY>
-<H1>SGMLNORM</H1>
-<H4>
-An SGML System Conforming to
-International Standard ISO 8879 --<BR>
-Standard Generalized Markup Language
-</H4>
-<H2>SYNOPSIS</H2>
-<P>
-<SAMP>sgmlnorm</SAMP>
-[
-<SAMP>-Cdemnv</SAMP>
-]
-[
-<SAMP>-b<VAR>bctf</VAR></SAMP>
-]
-[
-<SAMP>-c<VAR>catalog</VAR></SAMP>
-]
-[
-<SAMP>-D<VAR>dir</VAR></SAMP>
-]
-[
-<SAMP>-i<VAR>name</VAR></SAMP>
-]
-[
-<SAMP>-w<VAR>warning</VAR></SAMP>
-]
-<SAMP><VAR>sysid...</VAR></SAMP>
-
-<H2>DESCRIPTION</H2>
-<P>
-Sgmlnorm prints on the standard output a <I>normalized</I> document instance
-for the SGML document contained in the concatenation of the entities
-with <A HREF="sysid.htm">system identifiers</A>
-<SAMP><VAR>sysid...</VAR></SAMP>.
-<P>
-When the normalized instance is prefixed with the original SGML declaration
-and prolog, it will have the same ESIS as the original SGML document,
-with the following exceptions:
-<UL>
-<LI>
-The output of sgmlnorm does not protect against the recognition of
-short reference delimiters, so any <SAMP>USEMAP</SAMP> declarations
-must be removed from the DTD.
-<LI>
-The normalized instance will use the reference delimiters, even if the
-original instance did not.
-<LI>
-If marked sections are included in the output using the
-<SAMP>-m</SAMP> option, the reference reserved names will be used for
-the status keywords even if the original instance did not.
-<LI>
-Any ESIS information relating to the SGML LINK feature will be lost.
-</UL>
-<P>
-The normalized instance will not use any markup minimization features
-except that:
-<UL>
-<LI>
-Any attributes that were not specified in the original instance
-will not be included in the normalized instance.
-(Current attributes will be included.)
-<LI>
-If the declared value of an attribute was a name token group,
-and a value was specified that was the same as the name of
-the attribute, then the attribute name and value indicator will be
-omitted.
-For example, with HTML sgmlnorm would output <CODE>&lt;DL COMPACT&gt;</CODE>
-rather than <CODE>&lt;DL COMPACT="COMPACT"&gt;</CODE>
-</UL>
-<P>
-The following options are available:
-<DL>
-<DT>
-<SAMP>-b<VAR>bctf</VAR></SAMP>
-<DD>
-Use the <A HREF="sysid.htm#bctf">BCTF</A> with name
-<SAMP><VAR>bctf</VAR></SAMP>
-for output.
-<DT>
-<SAMP>-c<VAR>file</VAR></SAMP>
-<DD>
-Use the catalog entry file
-<SAMP><VAR>file</VAR></SAMP>.
-<DT>
-<SAMP>-C</SAMP>
-<DD>
-This has the same effect as in <A HREF="nsgmls#optC">nsgmls</A>.
-<DT>
-<SAMP>-d</SAMP>
-<DD>
-Output a document type declaration with the same external
-identifier as the input document, and with no
-internal declaration subset.
-No check is performed that the document instance is valid
-with respect to this DTD.
-<DT>
-<SAMP>-D<VAR>directory</VAR></SAMP>
-<DD>
-Search
-<SAMP><VAR>directory</VAR></SAMP>
-for files specified in system identifiers.
-This has the same effect as in <A HREF="nsgmls.htm#optD">nsgmls</A>.
-<DT>
-<SAMP>-e</SAMP>
-<DD>
-Describe open entities in error messages.
-<DT>
-<SAMP>-i<VAR>name</VAR></SAMP>
-<DD>
-This has the same effect as in <A HREF="nsgmls.htm#opti">nsgmls</A>.
-<DT>
-<SAMP>-m</SAMP>
-<DD>
-Output any marked sections that were in the input document instance.
-<DT>
-<SAMP>-n</SAMP>
-<DD>
-Output any comments that were in the input document instance.
-<DT>
-<SAMP>-r</SAMP>
-<DD>
-Raw output.
-Don't perform any conversion on RSs and REs when printing the entity.
-The entity would typically have the storage manager attribute
-<SAMP>records=asis</SAMP>.
-<DT>
-<SAMP>-v</SAMP>
-<DD>
-Print the version number.
-<DT>
-<SAMP>-w<VAR>type</VAR></SAMP>
-<DD>
-Control warnings and errors according to
-<SAMP><VAR>type</VAR></SAMP>.
-This has the same effect as in <A HREF="nsgmls.htm#optw">nsgmls</A>.
-</DL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlsout.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlsout.htm
deleted file mode 100644
index 2398ad730a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/sgmlsout.htm
+++ /dev/null
@@ -1,420 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>Nsgmls Output Format</TITLE>
-</HEAD>
-<BODY>
-<H1>Nsgmls Output Format</H1>
-<P>
-The output is a series of lines.
-Lines can be arbitrarily long.
-Each line consists of an initial command character
-and one or more arguments.
-Arguments are separated by a single space,
-but when a command takes a fixed number of arguments
-the last argument can contain spaces.
-There is no space between the command character and the first argument.
-Arguments can contain the following escape sequences:
-<DL>
-<DT>
-<CODE>\\</CODE>
-<DD>
-A
-<CODE>\</CODE>.
-<DT>
-<CODE>\n</CODE>
-<DD>
-A record end character.
-<DT>
-<CODE>\|</CODE>
-<DD>
-Internal SDATA entities are bracketed by these.
-<DT>
-<CODE>\<VAR>nnn</VAR></CODE>
-<DD>
-The character whose code is
-<CODE><VAR>nnn</VAR></CODE>
-octal.
-<P>
-A record start character will be represented by
-<CODE>\012</CODE>.
-Most applications will need to ignore
-<CODE>\012</CODE>
-and translate
-<CODE>\n</CODE>
-into newline.
-<DT>
-<CODE>\#<VAR>n</VAR>;</CODE>
-<DD>
-The character whose number is
-<CODE><VAR>n</VAR></CODE>
-in decimal.
-<CODE><VAR>n</VAR></CODE>
-can have any number of digits.
-This is used for characters that are not representable by the
-encoding translation used for output
-(as specified by the
-<CODE>SP_BCTF</CODE>
-environment variable).
-This will only occur with the multibyte version of nsgmls.
-</DL>
-<P>
-The possible command characters and arguments are as follows:
-<DL>
-<DT>
-<CODE>(<VAR>gi</VAR></CODE>
-<DD>
-The start of an element whose generic identifier is
-<CODE><VAR>gi</VAR></CODE>.
-Any attributes for this element
-will have been specified with
-<CODE>A</CODE>
-commands.
-<DT>
-<CODE>)<VAR>gi</VAR></CODE>
-<DD>
-The end of an element whose generic identifier is
-<CODE><VAR>gi</VAR></CODE>.
-<DT>
-<CODE>-<VAR>data</VAR></CODE>
-<DD>
-Data.
-<DT>
-<CODE>&amp;<VAR>name</VAR></CODE>
-<DD>
-A reference to an external data entity
-<CODE><VAR>name</VAR></CODE>;
-<CODE><VAR>name</VAR></CODE>
-will have been defined using an
-<CODE>E</CODE>
-command.
-<DT>
-<CODE>?<VAR>pi</VAR></CODE>
-<DD>
-A processing instruction with data
-<CODE><VAR>pi</VAR></CODE>.
-<DT>
-<CODE>A<VAR>name</VAR> <VAR>val</VAR></CODE>
-<DD>
-The next element to start has an attribute
-<CODE><VAR>name</VAR></CODE>
-with value
-<CODE><VAR>val</VAR></CODE>
-which takes one of the following forms:
-<DL>
-<DT>
-<CODE>IMPLIED</CODE>
-<DD>
-The value of the attribute is implied.
-<DT>
-<CODE>CDATA <VAR>data</VAR></CODE>
-<DD>
-The attribute is character data.
-This is used for attributes whose declared value is
-<CODE>CDATA</CODE>.
-<DT>
-<CODE>NOTATION <VAR>nname</VAR></CODE>
-<DD>
-The attribute is a notation name;
-<CODE><VAR>nname</VAR></CODE>
-will have been defined using a
-<CODE>N</CODE>
-command.
-This is used for attributes whose declared value is
-<CODE>NOTATION</CODE>.
-<DT>
-<CODE>ENTITY <VAR>name...</VAR></CODE>
-<DD>
-The attribute is a list of general entity names.
-Each entity name will have been defined using an
-<CODE>I</CODE>,
-<CODE>E</CODE>
-or
-<CODE>S</CODE>
-command.
-This is used for attributes whose declared value is
-<CODE>ENTITY</CODE>
-or
-<CODE>ENTITIES</CODE>.
-<DT>
-<CODE>TOKEN <VAR>token...</VAR></CODE>
-<DD>
-The attribute is a list of tokens.
-This is used for attributes whose declared value is anything else.
-<DT>
-<CODE>ID <VAR>token</VAR></CODE>
-<DD>
-The attribute is an ID value.
-This will be output only if the
-<CODE>-oid</CODE>
-option is specified.
-Otherwise
-<CODE>TOKEN</CODE>
-will be used for ID values.
-</DL>
-<DT>
-<CODE>D<VAR>ename</VAR> <VAR>name</VAR> <VAR>val</VAR></CODE>
-<DD>
-This is the same as the
-<CODE>A</CODE>
-command, except that it specifies a data attribute for an
-external entity named
-<CODE><VAR>ename</VAR></CODE>.
-Any
-<CODE>D</CODE>
-commands will come after the
-<CODE>E</CODE>
-command that defines the entity to which they apply, but
-before any
-<CODE>&amp;</CODE>
-or
-<CODE>A</CODE>
-commands that reference the entity.
-<DT>
-<CODE>a<VAR>type</VAR> <VAR>name</VAR> <VAR>val</VAR></CODE>
-<DD>
-The next element to start has a link attribute with link type
-<CODE><VAR>type</VAR></CODE>,
-name
-<CODE><VAR>name</VAR></CODE>,
-and value
-<CODE><VAR>val</VAR></CODE>,
-which takes the same form as with the
-<CODE>A</CODE>
-command.
-<DT>
-<CODE>N<VAR>nname</VAR></CODE>
-<DD>
-Define a notation <CODE><VAR>nname</VAR></CODE>.
-This command will be preceded by a
-<CODE>p</CODE>
-command if the notation was declared with a public identifier,
-and by a
-<CODE>s</CODE>
-command if the notation was declared with a system identifier.
-If the
-<CODE>-onotation-sysid</CODE>
-option was specified,
-this command will also be preceded by an
-<CODE>f</CODE>
-command giving the system identifier generated by the entity manager
-(unless it was unable to generate one).
-A notation will only be defined if it is to be referenced
-in an
-<CODE>E</CODE>
-command or in an
-<CODE>A</CODE>
-command for an attribute with a declared value of
-<CODE>NOTATION</CODE>.
-<DT>
-<CODE>E<VAR>ename</VAR> <VAR>typ</VAR> <VAR>nname</VAR></CODE>
-<DD>
-Define an external data entity named
-<CODE><VAR>ename</VAR></CODE>
-with type
-<CODE><VAR>typ</VAR></CODE>
-(<CODE>CDATA</CODE>, <CODE>NDATA</CODE> or <CODE>SDATA</CODE>)
-and notation <CODE><VAR>not</VAR></CODE>.
-Thiscommand will be preceded by an
-<CODE>f</CODE>
-command giving the system identifier generated by the entity manager
-(unless it was unable to generate one),
-by a
-<CODE>p</CODE>
-command if a public identifier was declared for the entity,
-and by a
-<CODE>s</CODE>
-command if a system identifier was declared for the entity.
-<CODE><VAR>not</VAR></CODE>
-will have been defined using a
-<CODE>N</CODE>
-command.
-Data attributes may be specified for the entity using
-<CODE>D</CODE>
-commands.
-If the
-<CODE>-oentity</CODE>
-option is not specified,
-an external data entity will only be defined if it is to be referenced in a
-<CODE>&amp;</CODE>
-command or in an
-<CODE>A</CODE>
-command for an attribute whose declared value is
-<CODE>ENTITY</CODE>
-or
-<CODE>ENTITIES</CODE>.
-<DT>
-<CODE>I<VAR>ename</VAR> <VAR>typ</VAR> <VAR>text</VAR></CODE>
-<DD>
-Define an internal data entity named
-<CODE><VAR>ename</VAR></CODE>
-with type
-<CODE><VAR>typ</VAR></CODE>
-and entity text
-<CODE><VAR>text</VAR></CODE>.
-The
-<CODE><VAR>typ</VAR></CODE>
-will be
-<CODE>CDATA</CODE>
-or
-<CODE>SDATA</CODE>
-unless the
-<CODE>-oentity</CODE>
-option was specified,
-in which case it can also be
-<CODE>PI</CODE>
-or
-<CODE>TEXT</CODE>
-(for an SGML text entity).
-If the
-<CODE>-oentity</CODE>
-option is not specified,
-an internal data entity will only be defined if it is referenced in an
-<CODE>A</CODE>
-command for an attribute whose declared value is
-<CODE>ENTITY</CODE>
-or
-<CODE>ENTITIES</CODE>.
-<DT>
-<CODE>S<VAR>ename</VAR></CODE>
-<DD>
-Define a subdocument entity named
-<CODE><VAR>ename</VAR></CODE>.
-This command will be preceded by an
-<CODE>f</CODE>
-command giving the system identifier generated by the entity manager
-(unless it was unable to generate one),
-by a
-<CODE>p</CODE>
-command if a public identifier was declared for the entity,
-and by a
-<CODE>s</CODE>
-command if a system identifier was declared for the entity.
-If the
-<CODE>-oentity</CODE>
-option is not specified,
-a subdocument entity will only be defined if it is referenced
-in a
-<CODE>{</CODE>
-command
-or in an
-<CODE>A</CODE>
-command for an attribute whose declared value is
-<CODE>ENTITY</CODE>
-or
-<CODE>ENTITIES</CODE>.
-<DT>
-<CODE>T<VAR>ename</VAR></CODE>
-<DD>
-Define an external SGML text entity named
-<CODE><VAR>ename</VAR></CODE>.
-This command will be preceded by an
-<CODE>f</CODE>
-command giving the system identifier generated by the entity manager
-(unless it was unable to generate one),
-by a
-<CODE>p</CODE>
-command if a public identifier was declared for the entity,
-and by a
-<CODE>s</CODE>
-command if a system identifier was declared for the entity.
-This command will be output only if the
-<CODE>-oentity</CODE>
-option is specified.
-<DT>
-<CODE>s<VAR>sysid</VAR></CODE>
-<DD>
-This command applies to the next
-<CODE>E</CODE>,
-<CODE>S</CODE>,
-<CODE>T</CODE>
-or
-<CODE>N</CODE>
-command and specifies the associated system identifier.
-<DT>
-<CODE>p<VAR>pubid</VAR></CODE>
-<DD>
-This command applies to the next
-<CODE>E</CODE>,
-<CODE>S</CODE>,
-<CODE>T</CODE>
-or
-<CODE>N</CODE>
-command and specifies the associated public identifier.
-<DT>
-<CODE>f<VAR>sysid</VAR></CODE>
-<DD>
-This command applies to the next
-<CODE>E</CODE>,
-<CODE>S</CODE>,
-<CODE>T</CODE>
-or, if the
-<CODE>-onotation-sysid</CODE>
-option was specified,
-<CODE>N</CODE>
-command and specifies the system identifier
-generated by the entity manager from the specified external identifier
-and other information about the entity or notation.
-<DT>
-<CODE>{<VAR>ename</VAR></CODE>
-<DD>
-The start of the SGML subdocument entity
-<CODE><VAR>ename</VAR></CODE>;
-<CODE><VAR>ename</VAR></CODE>
-will have been defined using a
-<CODE>S</CODE>
-command.
-<DT>
-<CODE>}<VAR>ename</VAR></CODE>
-<DD>
-The end of the SGML subdocument entity
-<CODE><VAR>ename</VAR></CODE>.
-<DT>
-<CODE>L<VAR>lineno</VAR> <VAR>file</VAR></CODE>
-<DT>
-<CODE>L<VAR>lineno</VAR></CODE>
-<DD>
-Set the current line number and filename.
-The
-<CODE><VAR>file</VAR></CODE>
-argument will be omitted if only the line number has changed.
-This will be output only if the
-<CODE>-l</CODE>
-option has been given.
-<DT>
-<CODE>#<VAR>text</VAR></CODE>
-<DD>
-An APPINFO parameter of
-<CODE><VAR>text</VAR></CODE>
-was specified in the SGML declaration.
-This is not strictly part of the ESIS, but a structure-controlled
-application is permitted to act on it.
-No
-<CODE>#</CODE>
-command will be output if
-<CODE>APPINFO NONE</CODE>
-was specified.
-A
-<CODE>#</CODE>
-command will occur at most once,
-and may be preceded only by a single
-<CODE>L</CODE>
-command.
-<DT>
-<CODE>C</CODE>
-<DD>
-This command indicates that the document was a conforming SGML document.
-If this command is output, it will be the last command.
-An SGML document is not conforming if it references a subdocument entity
-that is not conforming.
-</DL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/spam.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/spam.htm
deleted file mode 100644
index d4a1a713f0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/spam.htm
+++ /dev/null
@@ -1,274 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SPAM</TITLE>
-</HEAD>
-<BODY>
-<H1>SPAM</H1>
-<H4>
-An SGML System Conforming to
-International Standard ISO 8879 --<BR>
-Standard Generalized Markup Language
-</H4>
-<H2>
-SYNOPSIS
-</H2>
-<P>
-<CODE>spam</CODE>
-[
-<CODE>-Cehilprvx</CODE>
-]
-[
-<CODE>-c<VAR>catalog_file</VAR></CODE>
-]
-[
-<CODE>-D<VAR>directory</VAR></CODE>
-]
-[
-<CODE>-f<VAR>file</VAR></CODE>
-]
-[
-<CODE>-m<VAR>markup_option</VAR></CODE>
-]
-[
-<CODE>-o<VAR>entity_name</VAR></CODE>
-]
-[
-<CODE>-w<VAR>warning_type</VAR></CODE>
-]
-<CODE><VAR>sysid...</VAR></CODE>
-<H2>DESCRIPTION</H2>
-<P>
-Spam (SP Add Markup)
-is an SGML markup stream editor implemented using the SP parser.
-Spam parses the SGML document contained in
-<CODE><VAR>sysid...</VAR></CODE>
-and copies to the standard output
-the portion of the document entity containing the document
-instance, adding or changing markup as specified by the
-<CODE>-m</CODE> options.
-The <CODE>-p</CODE>
-option can be used to include the SGML declaration and prolog
-in the output.
-The <CODE>-o</CODE>
-option can be used to output other entities.
-The
-<CODE>-x</CODE>
-option can be used to expand entity references.
-<P>
-The following options are available:
-<DL>
-<DT>
-<CODE>-c<VAR>file</VAR></CODE>
-<DD>
-Use the catalog entry file
-<CODE><VAR>file</VAR></CODE>.
-<DT>
-<CODE>-C</CODE>
-<DD>
-This has the same effect as in <A HREF="nsgmls#optC">nsgmls</A>.
-<DT>
-<CODE>-D<VAR>directory</VAR></CODE>
-<DD>
-Search
-<CODE><VAR>directory</VAR></CODE>
-for files specified in system identifiers.
-This has the same effect as in <A HREF="nsgmls.htm#optD">nsgmls</A>.
-<DT>
-<CODE>-e</CODE>
-<DD>
-Describe open entities in error messages.
-<DT>
-<CODE>-f<VAR>file</VAR></CODE>
-<DD>
-Redirect errors to
-<CODE><VAR>file</VAR></CODE>.
-This is useful mainly with shells that do not support redirection
-of stderr.
-<DT>
-<CODE>-h</CODE>
-<DD>
-Hoist omitted tags out from the start of internal entities.
-If the text at the beginning of an internal entity causes
-a tag to be implied,
-the tag will usually be treated as being in that internal entity;
-this option will instead cause it to be treated as being in the entity
-that referenced the internal entity.
-This option makes a difference in conjunction with
-<CODE>-momittag</CODE>
-or
-<CODE>-x -x</CODE>.
-<DT>
-<CODE>-i<VAR>name</VAR></CODE>
-<DD>
-This has the same effect as in <A HREF="nsgmls.htm#opti">nsgmls</A>.
-<DT>
-<CODE>-l</CODE>
-<DD>
-Prefer lower-case.
-Added names that were subject to upper-case substitution
-will be converted to lower-case.
-<DT>
-<CODE>-m<VAR>markup_option</VAR></CODE>
-<DD>
-Change the markup in the output according to the value
-of
-<CODE><VAR>markup_option</VAR></CODE>
-as follows:
-<DL>
-<DT>
-<CODE>omittag</CODE>
-<DD>
-Add tags that were omitted using omitted tag minimization.
-End tags that were omitted because the element has
-a declared content of <SAMP>EMPTY</SAMP>
-or an explicit content reference
-will not be added.
-<DT>
-<CODE>shortref</CODE>
-<DD>
-Replace short references by named entity references.
-<DT>
-<CODE>net</CODE>
-<DD>
-Change null end-tags
-into unminimized end-tags,
-and change net-enabling start-tags
-into unminimized start-tags.
-<DT>
-<CODE>emptytag</CODE>
-<DD>
-Change empty tags into unminimized tags.
-<DT>
-<CODE>unclosed</CODE>
-<DD>
-Change unclosed tags into unminimized tags.
-<DT>
-<CODE>attname</CODE>
-<DD>
-Add omitted attribute names and
-<CODE>vi</CODE>s.
-<DT>
-<CODE>attvalue</CODE>
-<DD>
-Add literal delimiters omitted from attribute values.
-<DT>
-<CODE>attspec</CODE>
-<DD>
-Add omitted attribute specifications.
-<DT>
-<CODE>current</CODE>
-<DD>
-Add omitted attribute specifications for current attributes.
-This option is implied by the
-<CODE>attspec</CODE>
-option.
-<DT>
-<CODE>shorttag</CODE>
-<DD>
-Equivalent to combination of
-<CODE>net</CODE>,
-<CODE>emptytag</CODE>,
-<CODE>unclosed</CODE>,
-<CODE>attname</CODE>,
-<CODE>attvalue</CODE>
-and
-<CODE>attspec</CODE>
-options.
-<DT>
-<CODE>rank</CODE>
-<DD>
-Add omitted rank suffixes.
-<DT>
-<CODE>reserved</CODE>
-<DD>
-Put reserved names in upper-case.
-<DT>
-<CODE>ms</CODE>
-<DD>
-Remove marked section declarations whose effective status
-is IGNORE, and replace each marked section declaration
-whose effective status is INCLUDE by its marked section.
-In the document instance, empty comments will be added
-before or after the marked section declaration to ensure
-that ignored record ends remain ignored.
-</DL>
-<P>
-Multiple
-<CODE>-m</CODE>
-options are allowed.
-<DT>
-<CODE>-o<VAR>name</VAR></CODE>
-<DD>
-Output the general entity
-<CODE><VAR>name</VAR></CODE>
-instead of the document entity.
-The output will correspond to the first time
-that the entity is referenced in content.
-<DT>
-<CODE>-p</CODE>
-<DD>
-Output the part of the document entity containing the SGML declaration
-(if it was explicitly present in the document entity)
-and the prolog before anything else.
-If this option is specified two or more times,
-then all entity references occurring between declarations
-in the prolog will be expanded;
-this includes the implicit reference to the entity
-containing the external subset of the DTD, if there is one.
-Note that the SGML declaration will not be included if it was
-specified by an SGMLDECL entry in a catalog.
-<DT>
-<CODE>-r</CODE>
-<DD>
-Don't perform any conversion on RSs and REs when outputting the entity.
-The entity would typically have the storage manager attribute
-<CODE>records=asis</CODE>.
-<DT>
-<CODE>-v</CODE>
-<DD>
-Print the version number.
-<DT>
-<CODE>-w<VAR>type</VAR></CODE>
-<DD>
-Control warnings and errors according to
-<CODE><VAR>type</VAR></CODE>.
-This has the same effect as in <A HREF="nsgmls.htm#optw">nsgmls</A>.
-<DT>
-<CODE>-x</CODE>
-<DD>
-Expand references to entities that are changed.
-If this option is specified two or more times,
-then all references to entities that contain tags
-will be expanded.
-</DL>
-
-<H2>BUGS</H2>
-<P>
-Omitted tags are added at the point where they are
-implied by the SGML parser (except as modified
-by the
-<CODE>-h</CODE>
-option); this is often not quite where they are wanted.
-<P>
-The case of general delimiters is not preserved.
-<P>
-Incorrect results may be produced if a variant concrete syntax is used
-which is such that there are delimiters in markup to be added that have a
-prefix that is a proper suffix of some other delimiter.
-<P>
-If an entity reference in a default value uses the default entity and
-an entity with that name is subsequently defined and that default
-value is added to the document instance, then the resulting document
-may not be equivalent to the original document.
-Spam will give a warning when the first two conditions are met.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/spent.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/spent.htm
deleted file mode 100644
index 38d8508dea..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/spent.htm
+++ /dev/null
@@ -1,70 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SPENT</TITLE>
-</HEAD>
-<BODY>
-<H1>SPENT</H1>
-<H2>SYNOPSIS</H2>
-<P>
-<CODE>spent</CODE>
-[
-<CODE>-Crv</CODE>
-]
-[
-<CODE>-b<VAR>bctf</VAR></CODE>
-]
-[
-<CODE>-D<VAR>directory</VAR></CODE>
-]
-<CODE><VAR>sysid...</VAR></CODE>
-
-<H2>DESCRIPTION</H2>
-<P>
-Spent (SGML print entity)
-prints the concatenation of the entities with
-<A HREF="sysid">system identifiers</A>
-<CODE><VAR>sysid...</VAR></CODE>
-on the standard output.
-<P>
-The following options are available:
-<DL>
-<DT>
-<CODE>-b<VAR>bctf</VAR></CODE>
-<DD>
-Use the <A HREF="sysid.htm#bctf">BCTF</A> with name
-<CODE><VAR>bctf</VAR></CODE>
-for output.
-<DT>
-<CODE>-C</CODE>
-<DD>
-This has the same effect as in <A HREF="nsgmls#optC">nsgmls</A>.
-<DT>
-<CODE>-D<VAR>directory</VAR></CODE>
-<DD>
-Search
-<CODE><VAR>directory</VAR></CODE>
-for files specified in system identifiers.
-This has the same effect as in <A HREF="nsgmls.htm#optD">nsgmls</A>.
-<DT>
-<CODE>-r</CODE>
-<DD>
-Raw output.
-Don't perform any conversion on RSs and REs when printing the entity.
-The entity would typically have the storage manager attribute
-<CODE>records=asis</CODE>.
-<DT>
-<CODE>-v</CODE>
-<DD>
-Print the version number.
-</DL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/sysdecl.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/sysdecl.htm
deleted file mode 100644
index a9062335ad..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/sysdecl.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP - System declaration</TITLE>
-</HEAD>
-<BODY>
-<H1>SP System Declaration</H1>
-<P>
-The system declaration for SP is as follows:
-<PRE>
- &lt;!SYSTEM "ISO 8879:1986"
- CHARSET
-BASESET "ISO 646-1983//CHARSET
- International Reference Version (IRV)//ESC 2/5 4/0"
-DESCSET 0 128 0
-CAPACITY PUBLIC "ISO 8879:1986//CAPACITY Reference//EN"
- FEATURES
-MINIMIZE DATATAG NO OMITTAG YES RANK YES SHORTTAG YES
-LINK SIMPLE YES 65535 IMPLICIT YES EXPLICIT YES 1
-OTHER CONCUR NO SUBDOC YES 100 FORMAL YES
-SCOPE DOCUMENT
-SYNTAX PUBLIC "ISO 8879:1986//SYNTAX Reference//EN"
-SYNTAX PUBLIC "ISO 8879:1986//SYNTAX Core//EN"
- VALIDATE
- GENERAL YES MODEL YES EXCLUDE YES CAPACITY NO
- NONSGML YES SGML YES FORMAL YES
- SDIF
- PACK NO UNPACK NO&gt;
-</PRE>
-<P>
-The limit for the SUBDOC parameter is memory dependent.
-<P>
-Any legal concrete syntax may be used.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/sysid.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/sysid.htm
deleted file mode 100644
index 68dacac386..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/sysid.htm
+++ /dev/null
@@ -1,307 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP - System identifiers</TITLE>
-</HEAD>
-<BODY>
-<H1>System identifiers</H1>
-<P>
-There are two kinds of system identifier: formal system identifiers
-and simple system identifiers. A system identifier that does not
-start with <SAMP>&lt;</SAMP> will always be interpreted as a simple
-system identifier. A simple system identifier will always be
-interpreted either as a filename or as a URL.
-
-<H2>Formal system identifiers</H2>
-<P>
-Formal system identifiers are based on the
-System Identifier facility defined in ISO/IEC 10744 (HyTime) Technical
-Corrigendum 1, Annex D.
-A system identifier that is a formal system
-identifier consists of a sequence of one or more storage object
-specifications. The objects specified by the storage object
-specifications are concatenated to form the entity. A storage object
-specification consists of an SGML start-tag in the reference concrete
-syntax followed by character data content. The generic identifier of
-the start-tag is the name of a storage manager. The content is a
-storage object identifier which identifies the storage object in a
-manner dependent on the storage manager. The start-tag can also
-specify attributes giving additional information about the storage
-object. Numeric character references are recognized in storage object
-identifiers and attribute value literals in the start-tag. Record
-ends are ignored in the storage object identifier as with SGML. A
-system identifier will be interpreted as a formal system identifier if
-it starts with a <SAMP>&lt;</SAMP> followed by a storage manager name,
-followed by either <SAMP>></SAMP> or white-space; otherwise it will be
-interpreted as a simple system identifier. A storage object
-identifier extends until the end of the system identifier or until the
-first occurrence of <SAMP>&lt;</SAMP> followed by a storage manager
-name, followed by either <SAMP>></SAMP> or white-space.
-<P>
-The following storage managers are available:
-<DL>
-<DT>
-<A NAME="osfile"><SAMP>osfile</SAMP></A>
-<DD>
-The storage object identifier is a filename. If the filename is
-relative it is resolved using a base filename. Normally the base
-filename is the name of the file in which the storage object
-identifier was specified, but this can be changed using the
-<SAMP>base</SAMP> attribute. The filename will be searched for first
-in the directory of the base filename. If it is not found there, then
-it will be searched for in directories specified with the
-<SAMP>-D</SAMP> option in the order in which they were specified on
-the command line, and then in the list of directories specified by the
-environment variable <SAMP>SGML_SEARCH_PATH</SAMP>. The list
-is separated by colons under Unix and by semi-colons under MSDOS.
-<DT>
-<SAMP>osfd</SAMP>
-<DD>
-The storage object identifier is an integer specifying a file
-descriptor. Thus a system identifier of <SAMP>&lt;osfd>0</SAMP> will
-refer to the standard input.
-<DT>
-<SAMP>url</SAMP>
-<DD>
-The storage object identifier is a URL. Only the <SAMP>http</SAMP>
-scheme is currently supported and not on all systems.
-<DT>
-<SAMP>neutral</SAMP>
-<DD>
-The storage manager is the storage manager of storage object in which
-the system identifier was specified (the <I>underlying storage
-manager</I>). However if the underlying storage manager does not
-support named storage objects (ie it is <SAMP>osfd</SAMP>), then the
-storage manager will be <SAMP>osfile</SAMP>. The storage object
-identifier is treated as a relative, hierarchical name separated by
-slashes (<SAMP>/</SAMP>) and will be transformed as appropriate for
-the underlying storage manager.
-<DT>
-<SAMP>literal</SAMP>
-<DD>
-The bit combinations of the storage object identifier are
-the contents of the storage object.
-</DL>
-<P>
-The following attributes are supported:
-<DL>
-<DT>
-<SAMP>records</SAMP>
-<DD>
-This describes how records are delimited in the storage object:
-<DL>
-<DT><SAMP>cr</SAMP>
-<DD>
-Records are terminated by a carriage return.
-<DT>
-<SAMP>lf</SAMP>
-<DD>
-Records are terminated by a line feed.
-<DT>
-<SAMP>crlf</SAMP>
-<DD>
-Records are terminated by a carriage return followed by a line feed.
-<DT>
-<SAMP>find</SAMP>
-<DD>
-Records are terminated by whichever of
-<SAMP>cr</SAMP>,
-<SAMP>lf</SAMP>
-or
-<SAMP>crlf</SAMP>
-is first encountered in the storage object.
-<DT>
-<SAMP>asis</SAMP>
-<DD>
-No recognition of records is performed.
-</DL>
-<P>
-The default is <SAMP>find</SAMP> except for NDATA entities for which
-the default is <SAMP>asis</SAMP>. This attribute is not applicable to
-the <SAMP>literal</SAMP> storage manager.
-<P>
-When records are recognized in a storage object, a record start is
-inserted at the beginning of each record, and a record end at the end
-of each record. If there is a partial record (a record that doesn't
-end with the record terminator) at the end of the entity, then a
-record start will be inserted before it but no record end will be
-inserted after it.
-<P>
-The attribute name and <SAMP>=</SAMP> can be omitted for this attribute.
-<DT>
-<SAMP>zapeof</SAMP>
-<DD>
-This specifies whether a Control-Z character that occurs as the final byte
-in the storage object should be stripped.
-The following values are allowed:
-<DL>
-<DT><SAMP>zapeof</SAMP>
-<DD>
-A final Control-Z should be stripped.
-<DT><SAMP>nozapeof</SAMP>
-<DD>
-A final Control-Z should not be stripped.
-</DL>
-<P>
-The default is <SAMP>zapeof</SAMP> except for NDATA entities, entities
-declared in storage objects with <SAMP>zapeof=nozapeof</SAMP> and
-storage objects with <SAMP>records=asis</SAMP>. This attribute is not
-applicable to the <SAMP>literal</SAMP> storage manager.
-<P>
-The attribute name and <SAMP>=</SAMP> can be omitted for this
-attribute.
-<DT>
-<A NAME="bctf"><SAMP>bctf</SAMP></A>
-<DD>
-The bctf (bit combination transformation format) attribute describes
-how the bit combinations of the storage object are transformed into
-the sequence of bytes that are contained in the object identified by
-the storage object identifier. This inverse of this transformation is
-performed when the entity manager reads the storage object. It has
-one of the following values:
-<DL>
-<DT>
-<SAMP>identity</SAMP>
-<DD>
-Each bit combination is represented by a single byte.
-<DT>
-<SAMP>fixed-2</SAMP>
-<DD>
-Each bit combination is represented by exactly 2
-bytes, with the more significant byte first.
-<DT>
-<SAMP>utf-8</SAMP>
-<DD>
-Each bit combination is represented by a variable number of bytes
-according to UCS Transformation Format 8 defined in Annex P to be
-added by the first proposed drafted amendment (PDAM 1) to ISO/IEC
-10646-1:1993.
-<DT>
-<SAMP>euc-jp</SAMP>
-<DD>
-Each bit combination is treated as a pair of bytes, most significant
-byte first, encoding a character using the
-Extended_UNIX_Code_Fixed_Width_for_Japanese Internet charset, and is
-transformed into the variable length sequence of octets that would
-encode that character using the
-Extended_UNIX_Code_Packed_Format_for_Japanese Internet charset.
-<DT>
-<SAMP>sjis</SAMP>
-<DD>
-Each bit combination is treated as a pair of bytes, most significant
-byte first, encoding a character using the
-Extended_UNIX_Code_Fixed_Width_for_Japanese Internet charset, and is
-transformed into the variable length sequence of bytes that would
-encode that character using the Shift_JIS Internet charset.
-<DT>
-<SAMP>unicode</SAMP>
-<DD>
-Each bit combination is represented by 2 bytes. The bytes
-representing the entire storage object may be preceded by a pair of
-bytes representing the byte order mark character (0xFEFF). The bytes
-representing each bit combination are in the system byte order, unless
-the byte order mark character is present, in which case the order of
-its bytes determines the byte order. When the storage object is read,
-any byte order mark character is discarded.
-<DT>
-<SAMP>is8859-<VAR>n</VAR></SAMP>
-<DD>
-<SAMP><VAR>n</VAR></SAMP> can be any single digit other than 0. Each
-bit combination is interpreted as the number of a character in ISO/IEC
-10646 and is represented by the single byte that would encode that
-character in ISO 8859-<VAR>n</VAR>. These values are not supported
-with the <SAMP>-b</SAMP> option.
-</DL>
-<P>
-Values other than <SAMP>identity</SAMP> are supported only with the
-multi-byte version of nsgmls. This attribute is not applicable to the
-<SAMP>literal</SAMP> storage manager.
-<DT>
-<SAMP>tracking</SAMP>
-<DD>
-This specifies whether line boundaries should be tracked for this
-object: a value of <SAMP>track</SAMP> specifies that they should; a
-value of <SAMP>notrack</SAMP> specifies that they should not. The
-default value is <SAMP>track</SAMP>. Keeping track of where line
-boundaries occur in a storage object requires approximately one byte
-of storage per line and it may be desirable to disable this for very
-large storage objects.
-<P>
-The attribute name and
-<SAMP>=</SAMP>
-can be omitted for this attribute.
-<DT>
-<SAMP>base</SAMP>
-<DD>
-When the storage object identifier specified in the content of the
-storage object specification is relative, this specifies the base
-storage object identifier relative to which that storage object
-identifier should be resolved.
-When not specified a storage object identifier is interpreted
-relative to the storage object in which it is specified,
-provided that this has the same storage manager.
-This applies both to system identifiers specified in SGML
-documents and to system identifiers specified in the catalog entry
-files.
-<DT>
-<SAMP>smcrd</SAMP>
-<DD>
-The value is a single character that will be recognized in storage
-object identifiers (both in the content of storage object
-specifications and in the value of <SAMP>base</SAMP> attributes) as a
-storage manager character reference delimiter when followed by a
-digit. A storage manager character reference is like an SGML numeric
-character reference except that the number is interpreted as a
-character number in the inherent character set of the storage manager
-rather than the document character set. The default is for no
-character to be recognized as a storage manager character reference
-delimiter. Numeric character references cannot be used to prevent
-recognition of storage manager character reference delimiters.
-<DT>
-<SAMP>fold</SAMP>
-<DD>
-This applies only to the <SAMP>neutral</SAMP> storage manager. It
-specifies whether the storage object identifier should be folded to
-the customary case of the underlying storage manager if storage object
-identifiers for the underlying storage manager are case sensitive.
-The following values are allowed:
-<DL>
-<DT><SAMP>fold</SAMP>
-<DD>
-The storage object identifier will be folded.
-<DT>
-<SAMP>nofold</SAMP>
-<DD>
-The storage object identifier will not be folded.
-</DL>
-<P>
-The default value is <SAMP>fold</SAMP>. The attribute name and
-<SAMP>=</SAMP> can be omitted for this attribute.
-<P>
-For example, on Unix filenames are case-sensitive and the customary
-case is lower-case. So if the underlying storage manager were
-<SAMP>osfile</SAMP> and the system was a Unix system, then
-<SAMP>&lt;neutral>FOO.SGM</SAMP> would be equivalent to
-<SAMP>&lt;osfile>foo.sgm</SAMP>.
-</DL>
-<H2>Simple system identfiers</H2>
-<P>
-A simple system identifier is interpreted as a storage object
-identifier with a storage manager that depends on where the system
-identifier was specified: if it was specified in a storage object
-whose storage manager was <SAMP>url</SAMP> or if the system identifier
-looks like an absolute URL in a supported scheme, the storage manager
-will be <SAMP>url</SAMP>; otherwise the storage manager will be
-<SAMP>osfile</SAMP>. The storage manager attributes are defaulted as
-for a formal system identifier. Numeric character references are not
-recognized in simple system identifiers.
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/doc/winntu.htm b/usr/src/cmd/man/src/util/nsgmls.src/doc/winntu.htm
deleted file mode 100644
index 76d9c4ae71..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/doc/winntu.htm
+++ /dev/null
@@ -1,55 +0,0 @@
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
-<TITLE>SP Unicode support under Windows NT</TITLE>
-</HEAD>
-<BODY>
-<H1>Notes on SP Unicode support under Windows NT</H1>
-<P>
-When compiled with the appropriate preprocessor definition
-(<CODE>UNICODE</CODE>), SP now uses Unicode interfaces to NT. This
-means that the <SAMP>SP_BCTF</SAMP> environment variable applies only
-to file input and output, and so <CODE>unicode</CODE> is allowed as
-the value of <SAMP>SP_BCTF</SAMP>.
-<P>
-In order for non-ASCII characters to be correctly displayed on your
-console you must select a TrueType font, such as Lucida Console, as your
-console font.
-<P>
-If you define your own public character sets, you should use Unicode
-(or a superset of Unicode) as your universal character set.
-<P>
-The following additional BCTFs are supported:
-<DL>
-<DT>
-<SAMP>windows</SAMP>
-<DD>
-Specify this BCTF when a storage object is encoded using your
-system's default Windows character set, and your document character
-set is declared as Unicode. This uses the so-called ANSI code page.
-<DT>
-<SAMP>wunicode</SAMP>
-<DD>
-This uses the <SAMP>unicode</SAMP> BCTF if the storage object starts
-with a byte order mark and otherwise the <SAMP>windows</SAMP> BCTF.
-If you are working with Unicode, this is probably the best value
-for <SAMP>SP_BCTF</SAMP>.
-<DT>
-<SAMP>ms-dos</SAMP>
-<DD>
-Specify this BCTF when a storage object (file) uses the OEM code page,
-and your document character set is declared as Unicode.
-The OEM code-page for a particular
-machine is the code-page used by FAT file-systems on that machine and
-is the default code-page for MS-DOS consoles.
-</DL>
-<P>
-<ADDRESS>
-James Clark<BR>
-jjc@jclark.com
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/generic/EventGenerator.h b/usr/src/cmd/man/src/util/nsgmls.src/generic/EventGenerator.h
deleted file mode 100644
index 6d73360e8f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/generic/EventGenerator.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-#ifndef EventGenerator_INCLUDED
-#define EventGenerator_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "SGMLApplication.h"
-
-class SP_API EventGenerator {
-public:
- virtual ~EventGenerator();
- // Can be called at most once for any object.
- // Returns number of errors.
- virtual unsigned run(SGMLApplication &) = 0;
- // may be called at any time
- virtual void inhibitMessages(bool);
- // may be called at any time, even from another thread
- virtual void halt() = 0;
- // called after run
- virtual EventGenerator *
- makeSubdocEventGenerator(const SGMLApplication::Char *systemId,
- size_t systemIdLength);
-};
-
-#endif /* not EventGenerator_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/generic/ParserEventGeneratorKit.h b/usr/src/cmd/man/src/util/nsgmls.src/generic/ParserEventGeneratorKit.h
deleted file mode 100644
index 4da5dc96e3..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/generic/ParserEventGeneratorKit.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ParserEventGeneratorKit_INCLUDED
-#define ParserEventGeneratorKit_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "EventGenerator.h"
-
-class ParserEventGeneratorKitImpl;
-
-class SP_API ParserEventGeneratorKit {
-public:
- ParserEventGeneratorKit();
- ~ParserEventGeneratorKit();
- enum Option {
- showOpenEntities,
- showOpenElements,
- outputCommentDecls,
- outputMarkedSections,
- outputGeneralEntities,
- mapCatalogDocument
- };
- enum OptionWithArg {
- addCatalog,
- includeParam,
- enableWarning,
- addSearchDir,
- activateLink,
- architecture // not implemented
- };
- void setOption(Option);
-#ifdef SP_WIDE_SYSTEM
- void setProgramName(const wchar_t *);
- void setOption(OptionWithArg, const wchar_t *);
- EventGenerator *makeEventGenerator(int nFiles, wchar_t *const *files);
-#else
- void setProgramName(const char *);
- void setOption(OptionWithArg, const char *);
- EventGenerator *makeEventGenerator(int nFiles, char *const *files);
-#endif
-private:
- ParserEventGeneratorKit(const ParserEventGeneratorKit &); // undefined
- void operator=(const ParserEventGeneratorKit &); // undefined
-
- ParserEventGeneratorKitImpl *impl_;
-};
-
-#endif /* not ParserEventGeneratorKit_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/generic/SGMLApplication.h b/usr/src/cmd/man/src/util/nsgmls.src/generic/SGMLApplication.h
deleted file mode 100644
index 29249cc4cb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/generic/SGMLApplication.h
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SGMLApplication_INCLUDED
-#define SGMLApplication_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-
-#ifndef SP_API
-#define SP_API /* as nothing */
-#endif
-
-class SP_API SGMLApplication {
-public:
-#ifdef SP_MULTI_BYTE
-#ifdef SP_WCHAR_T_USHORT
- typedef wchar_t Char;
-#else
- typedef unsigned short Char;
-#endif
-#else
- typedef unsigned char Char;
-#endif
- // A Position represents a position in an OpenEntity.
- // The meaning of a Position depends on the
- // particular implementation of OpenEntity.
- // It might be a line number or it might be
- // an offset in the entity. The only thing
- // that can be done with Position is to use
- // it with an OpenEntityPtr to get a Location.
- typedef unsigned long Position;
- struct CharString {
- const Char *ptr;
- size_t len;
- };
- struct ExternalId {
- bool haveSystemId;
- bool havePublicId;
- bool haveGeneratedSystemId;
- CharString systemId; // valid only if haveSystemId is true
- CharString publicId; // valid only if havePublicId is true
- CharString generatedSystemId; // valid if haveGeneratedSystemId is true
- };
- struct Notation {
- CharString name;
- ExternalId externalId;
- };
- struct Attribute;
- struct Entity {
- CharString name;
- enum DataType { sgml, cdata, sdata, ndata, subdoc, pi };
- enum DeclType { general, parameter, doctype, linktype };
- DataType dataType;
- DeclType declType;
- bool isInternal;
- // Following valid if isInternal is true
- CharString text;
- // Following valid if isInternal is false
- ExternalId externalId;
- size_t nAttributes;
- const Attribute *attributes;
- Notation notation;
- };
- struct Attribute {
- CharString name;
- enum Type {
- invalid,
- implied,
- cdata,
- tokenized
- };
- Type type;
- enum Defaulted {
- specified, // not defaulted
- definition, // defaulted from definition
- current // defaulted from current value
- };
- Defaulted defaulted; // non-ESIS; valid only if type != implied
- struct CdataChunk {
- bool isSdata;
- // This rather awkward representation of non-SGML characters was chosen
- // for backwards compatibility.
- bool isNonSgml; // valid only if !isSdata
- Char nonSgmlChar; // valid only if isNonSgml
- CharString data; // always valid; empty if isNonSgml
- CharString entityName; // non-ESIS; optional for SDATA chunks
- };
- // Following valid if type == cdata
- size_t nCdataChunks;
- const CdataChunk *cdataChunks; // valid if type == cdata
- // Following valid if type == tokenized
- CharString tokens; // separated by spaces
- bool isId; // non-ESIS (probably)
- bool isGroup; // non-ESIS
- size_t nEntities;
- const Entity *entities;
- // length of notation.name will be 0 if no notation
- Notation notation;
- };
- struct PiEvent {
- Position pos;
- CharString data;
- CharString entityName; // non-ESIS; optional for PI entities
- };
- struct StartElementEvent {
- Position pos;
- enum ContentType {
- empty, // declared EMPTY or with CONREF attribute
- cdata,
- rcdata,
- mixed,
- element
- };
- CharString gi;
- ContentType contentType; // non-ESIS
- bool included; // non-ESIS
- size_t nAttributes;
- const Attribute *attributes;
- };
-
- struct EndElementEvent {
- Position pos;
- CharString gi;
- };
- struct DataEvent {
- Position pos;
- CharString data;
- };
- struct SdataEvent {
- Position pos;
- CharString text;
- CharString entityName; // non-ESIS; optional
- };
- struct ExternalDataEntityRefEvent {
- Position pos;
- Entity entity;
- };
- struct SubdocEntityRefEvent {
- Position pos;
- Entity entity;
- };
- struct NonSgmlCharEvent {
- Position pos;
- Char c;
- };
- struct ErrorEvent {
- Position pos;
- enum Type {
- info, // not an error
- warning, // not an error
- quantity,
- idref,
- capacity,
- otherError
- };
- Type type;
- CharString message;
- };
- struct AppinfoEvent {
- Position pos;
- bool none;
- CharString string;
- };
- struct StartDtdEvent {
- Position pos;
- CharString name;
- bool haveExternalId;
- ExternalId externalId;
- };
- struct EndDtdEvent {
- Position pos;
- CharString name;
- };
- struct EndPrologEvent {
- Position pos;
- };
- // non-ESIS
- struct GeneralEntityEvent {
- // no position
- Entity entity;
- };
- // non-ESIS
- struct CommentDeclEvent {
- Position pos;
- size_t nComments;
- const CharString *comments;
- const CharString *seps;
- };
- // non-ESIS
- struct MarkedSectionStartEvent {
- Position pos;
- enum Status {
- include,
- rcdata,
- cdata,
- ignore
- };
- Status status;
- struct Param {
- enum Type {
- temp,
- include,
- rcdata,
- cdata,
- ignore,
- entityRef
- };
- Type type;
- CharString entityName;
- };
- size_t nParams;
- const Param *params;
- };
- // non-ESIS
- struct MarkedSectionEndEvent {
- Position pos;
- enum Status {
- include,
- rcdata,
- cdata,
- ignore
- };
- Status status;
- };
- struct IgnoredCharsEvent {
- Position pos;
- CharString data;
- };
- class OpenEntityPtr;
- struct SP_API Location {
- Location();
- Location(const OpenEntityPtr &, Position);
- void init();
-
- unsigned long lineNumber;
- unsigned long columnNumber;
- unsigned long byteOffset;
- unsigned long entityOffset;
- CharString entityName;
- CharString filename;
- const void *other;
- };
- class OpenEntity;
- class SP_API OpenEntityPtr {
- public:
- OpenEntityPtr();
- OpenEntityPtr(const OpenEntityPtr &);
- void operator=(const OpenEntityPtr &);
- void operator=(OpenEntity *);
- ~OpenEntityPtr();
- const OpenEntity *operator->() const;
- operator int() const;
- private:
- OpenEntity *ptr_;
- };
- class SP_API OpenEntity {
- public:
- OpenEntity();
- virtual ~OpenEntity();
- virtual Location location(Position) const = 0;
- private:
- OpenEntity(const OpenEntity &); // undefined
- void operator=(const OpenEntity &); // undefined
- unsigned count_;
- friend class OpenEntityPtr;
- };
- virtual ~SGMLApplication();
- virtual void appinfo(const AppinfoEvent &);
- virtual void startDtd(const StartDtdEvent &);
- virtual void endDtd(const EndDtdEvent &);
- virtual void endProlog(const EndPrologEvent &);
- virtual void startElement(const StartElementEvent &);
- virtual void endElement(const EndElementEvent &);
- virtual void data(const DataEvent &);
- virtual void sdata(const SdataEvent &);
- virtual void pi(const PiEvent &);
- virtual void externalDataEntityRef(const ExternalDataEntityRefEvent &);
- virtual void subdocEntityRef(const SubdocEntityRefEvent &);
- virtual void nonSgmlChar(const NonSgmlCharEvent &);
- virtual void commentDecl(const CommentDeclEvent &);
- virtual void markedSectionStart(const MarkedSectionStartEvent &);
- virtual void markedSectionEnd(const MarkedSectionEndEvent &);
- virtual void ignoredChars(const IgnoredCharsEvent &);
- virtual void generalEntity(const GeneralEntityEvent &);
- virtual void error(const ErrorEvent &);
- virtual void openEntityChange(const OpenEntityPtr &);
-};
-
-inline
-const SGMLApplication::OpenEntity *
-SGMLApplication::OpenEntityPtr::operator->() const
-{
- return ptr_;
-}
-
-inline
-void SGMLApplication::OpenEntityPtr::operator=(const OpenEntityPtr &ptr)
-{
- *this = ptr.ptr_;
-}
-
-inline
-SGMLApplication::OpenEntityPtr::operator int() const
-{
- return ptr_ != 0;
-}
-
-#endif /* not SGMLApplication_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Allocator.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Allocator.h
deleted file mode 100644
index 74e8fb34b0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Allocator.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Allocator_INCLUDED
-#define Allocator_INCLUDED 1
-
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Allocator {
-public:
- Allocator(size_t maxSize, unsigned blocksPerSegment);
- ~Allocator();
- void *alloc(size_t);
- static void *allocSimple(size_t);
- static void free(void *);
-
- // It would be nice to make these private, but some compilers have problems.
- union ForceAlign {
- unsigned long n;
- struct SP_API {
- char c;
- } s;
- char *cp;
- long *lp;
- };
- struct SegmentHeader;
- union BlockHeader;
- friend union BlockHeader;
- union BlockHeader {
- SegmentHeader *seg;
- ForceAlign align;
- };
- struct Block;
- friend struct Block;
- struct SP_API Block {
- BlockHeader header;
- Block *next;
- };
- friend struct SegmentHeader;
- struct SP_API SegmentHeader {
- union {
- Block **freeList;
- ForceAlign align;
- };
- unsigned liveCount;
- SegmentHeader *next;
- };
-private:
- Allocator(const Allocator &); // undefined
- Allocator &operator=(const Allocator &); // undefined
- Block *freeList_;
- size_t objectSize_;
- unsigned blocksPerSegment_;
- SegmentHeader *segments_;
- void *alloc1();
- void tooBig(size_t);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Allocator_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ArcEngine.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ArcEngine.h
deleted file mode 100644
index 1af6f83b0a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ArcEngine.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ArcEngine_INCLUDED
-#define ArcEngine_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Event.h"
-#include "Vector.h"
-#include "SgmlParser.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ArcDirector {
-public:
- virtual EventHandler *arcEventHandler(const Notation *,
- const Vector<StringC> &,
- const SubstTable<Char> *) = 0;
-};
-
-class SP_API SelectOneArcDirector : public ArcDirector, public Messenger {
-public:
- SelectOneArcDirector(const Vector<StringC> &select, EventHandler &eh)
- : select_(select), eh_(&eh) { }
- EventHandler *arcEventHandler(const Notation *,
- const Vector<StringC> &,
- const SubstTable<Char> *);
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &);
-private:
- Vector<StringC> select_;
- EventHandler *eh_;
-};
-
-class SP_API ArcEngine {
-public:
- static void parseAll(SgmlParser &,
- Messenger &,
- ArcDirector &,
- const volatile sig_atomic_t *cancelPtr = 0);
-private:
- ArcEngine();
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ArcEngine_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Attribute.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Attribute.h
deleted file mode 100644
index 20a8980f57..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Attribute.h
+++ /dev/null
@@ -1,945 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _ATTRIBUTE_H
-#define _ATTRIBUTE_H
-
-#ifndef Attribute_INCLUDED
-#define Attribute_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include "Resource.h"
-#include "Owner.h"
-#include "StringC.h"
-#include "Vector.h"
-#include "CopyOwner.h"
-#include "Boolean.h"
-#include "Text.h"
-#include "Ptr.h"
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Entity;
-class Notation;
-class DeclaredValue;
-class AttributeValue;
-class TokenizedAttributeValue;
-class AttributeSemantics;
-class AttributeContext;
-class Syntax;
-
-class SP_API AttributeValue : public Resource {
-public:
- enum Type {
- implied,
- cdata,
- tokenized
- };
- AttributeValue();
- virtual ~AttributeValue();
- virtual AttributeSemantics *makeSemantics(const DeclaredValue *,
- AttributeContext &,
- const StringC &,
- unsigned &,
- unsigned &) const;
- virtual Type info(const Text *&, const StringC *&) const = 0;
- virtual const Text *text() const;
- virtual Boolean recoverUnquoted(const StringC &, const Location &,
- AttributeContext &, const StringC &);
- static Boolean handleAsUnterminated(const Text &, AttributeContext &);
-};
-
-class SP_API AttributeDefinitionDesc {
-public:
- AttributeDefinitionDesc() { }
- enum DeclaredValue {
- cdata,
- name,
- number,
- nmtoken,
- nutoken,
- entity,
- idref,
- names,
- numbers,
- nmtokens,
- nutokens,
- entities,
- idrefs,
- id,
- notation,
- nameTokenGroup
- };
- DeclaredValue declaredValue;
- enum DefaultValueType {
- required,
- current,
- implied,
- conref,
- defaulted,
- fixed
- };
- DefaultValueType defaultValueType;
- ConstPtr < AttributeValue > defaultValue;
- Vector < StringC > allowedValues;
- // Attribute definitions whose default value type is current and
- // which have the same currentIndex share current values.
- size_t currentIndex;
-private:
- AttributeDefinitionDesc(const AttributeDefinitionDesc &); // undefined
- void operator=(const AttributeDefinitionDesc &); // undefined
-};
-
-class DeclaredValue {
-public:
- DeclaredValue();
- virtual ~DeclaredValue();
- // This performs syntactic checking on the value.
- virtual AttributeValue *makeValue(Text &, AttributeContext &,
- const StringC &name,
- unsigned &specLength) const = 0;
- // This is used to avoid unnecessary syntactic checking in the
- // case where the attribute name and vi have been omitted.
- virtual AttributeValue *makeValueFromToken(Text &,
- AttributeContext &,
- const StringC &name,
- unsigned &specLength) const;
- // This performs semantic checking on the value.
- virtual AttributeSemantics *makeSemantics(
- const TokenizedAttributeValue &,
- AttributeContext &,
- const StringC &,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const;
- virtual Boolean containsToken(const StringC &) const;
- virtual Boolean tokenized() const = 0;
- virtual Boolean isNotation() const;
- virtual Boolean isEntity() const;
- virtual Boolean isId() const;
- virtual Boolean isIdref() const;
- virtual const Vector < StringC > *getTokens() const;
- virtual void buildDesc(AttributeDefinitionDesc &) const = 0;
- virtual DeclaredValue *copy() const = 0;
-};
-
-class CdataDeclaredValue : public DeclaredValue {
-public:
- CdataDeclaredValue();
- Boolean tokenized() const;
- AttributeValue *makeValue(Text &, AttributeContext &, const StringC &,
- unsigned &) const;
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-};
-
-class TokenizedDeclaredValue : public DeclaredValue {
-public:
- // must be in same order as AttributeDefinitionDesc
- enum TokenType {
- name,
- number,
- nameToken,
- numberToken,
- entityName
- };
- TokenizedDeclaredValue(TokenType type, Boolean isList);
- AttributeValue *makeValue(Text &, AttributeContext &, const StringC &,
- unsigned &) const;
- TokenizedAttributeValue *makeTokenizedValue(Text &, AttributeContext &,
- const StringC &, unsigned &) const;
- Boolean tokenized() const;
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-private:
- TokenType type_;
- Boolean isList_;
- unsigned initialCategories_;
- unsigned subsequentCategories_;
-};
-
-class GroupDeclaredValue : public TokenizedDeclaredValue {
-public:
- GroupDeclaredValue(TokenType, Vector < StringC > &);
- Boolean containsToken(const StringC &) const;
- AttributeValue *makeValue(Text &, AttributeContext &, const StringC &,
- unsigned &) const;
- AttributeValue *makeValueFromToken(Text &,
- AttributeContext &,
- const StringC &name,
- unsigned &) const;
- const Vector < StringC > *getTokens() const;
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-private:
- Vector < StringC > allowedValues_;
-};
-
-class NameTokenGroupDeclaredValue : public GroupDeclaredValue {
-public:
- NameTokenGroupDeclaredValue(Vector < StringC > &);
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-};
-
-class NotationDeclaredValue : public GroupDeclaredValue {
-public:
- NotationDeclaredValue(Vector < StringC > &);
- AttributeSemantics *makeSemantics(const TokenizedAttributeValue &,
- AttributeContext &,
- const StringC &,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const;
- Boolean isNotation() const;
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-};
-
-class EntityDeclaredValue : public TokenizedDeclaredValue {
-public:
- EntityDeclaredValue(Boolean isList);
- AttributeSemantics *makeSemantics(const TokenizedAttributeValue &,
- AttributeContext &,
- const StringC &,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const;
- Boolean isEntity() const;
- DeclaredValue *copy() const;
-};
-
-class IdDeclaredValue : public TokenizedDeclaredValue {
-public:
- IdDeclaredValue();
- AttributeSemantics *makeSemantics(const TokenizedAttributeValue &,
- AttributeContext &,
- const StringC &,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const;
- Boolean isId() const;
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-};
-
-class IdrefDeclaredValue : public TokenizedDeclaredValue {
-public:
- IdrefDeclaredValue(Boolean isList);
- AttributeSemantics *makeSemantics(const TokenizedAttributeValue &,
- AttributeContext &,
- const StringC &,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const;
- Boolean isIdref() const;
- void buildDesc(AttributeDefinitionDesc &) const;
- DeclaredValue *copy() const;
-};
-
-class SP_API AttributeDefinition {
-public:
- AttributeDefinition(const StringC &, DeclaredValue *);
- virtual ~AttributeDefinition();
- virtual ConstPtr < AttributeValue >
- makeMissingValue(AttributeContext &) const = 0;
- virtual Boolean missingValueWouldMatch(const Text &,
- const AttributeContext &) const;
- virtual const AttributeValue *
- defaultValue(const AttributeValue *impliedValue) const;
- AttributeValue *makeValue(Text &, AttributeContext &, unsigned &) const;
- AttributeValue *makeValueFromToken(Text &,
- AttributeContext &,
- unsigned &) const;
-
- virtual Boolean isConref() const;
- virtual Boolean isCurrent() const;
- virtual Boolean isFixed() const;
- AttributeSemantics *makeSemantics(const AttributeValue *,
- AttributeContext &,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const;
- Boolean tokenized() const;
- const StringC &name() const;
- Boolean containsToken(const StringC &) const;
- Boolean isNotation() const;
- Boolean isEntity() const;
- Boolean isId() const;
- Boolean isIdref() const;
- void getDesc(AttributeDefinitionDesc &) const;
- const Vector < StringC > *getTokens() const;
- virtual AttributeDefinition *copy() const = 0;
- void setDeclaredValue(DeclaredValue *);
-private:
- virtual void buildDesc(AttributeDefinitionDesc &) const = 0;
- virtual AttributeValue *checkValue(AttributeValue *,
- AttributeContext &) const;
- StringC name_;
- CopyOwner < DeclaredValue > declaredValue_;
-};
-
-class RequiredAttributeDefinition : public AttributeDefinition {
-public:
- RequiredAttributeDefinition(const StringC &, DeclaredValue *);
- ConstPtr < AttributeValue > makeMissingValue(AttributeContext &) const;
- void buildDesc(AttributeDefinitionDesc &) const;
- AttributeDefinition *copy() const;
-};
-
-class CurrentAttributeDefinition : public AttributeDefinition {
-public:
- CurrentAttributeDefinition(const StringC &, DeclaredValue *,
- size_t index);
- ConstPtr < AttributeValue > makeMissingValue(AttributeContext &) const;
- Boolean missingValueWouldMatch(const Text &,
- const AttributeContext &) const;
- AttributeValue *checkValue(AttributeValue *, AttributeContext &) const;
- void buildDesc(AttributeDefinitionDesc &) const;
- Boolean isCurrent() const;
- AttributeDefinition *copy() const;
-private:
- size_t currentIndex_;
-};
-
-class ImpliedAttributeDefinition : public AttributeDefinition {
-public:
- ImpliedAttributeDefinition(const StringC &, DeclaredValue *);
- ConstPtr < AttributeValue > makeMissingValue(AttributeContext &) const;
- const AttributeValue *defaultValue(const AttributeValue *) const;
- void buildDesc(AttributeDefinitionDesc &) const;
- AttributeDefinition *copy() const;
-};
-
-class ConrefAttributeDefinition : public ImpliedAttributeDefinition {
-public:
- ConrefAttributeDefinition(const StringC &, DeclaredValue *);
- Boolean isConref() const;
- void buildDesc(AttributeDefinitionDesc &) const;
- AttributeDefinition *copy() const;
-};
-
-class DefaultAttributeDefinition : public AttributeDefinition {
-public:
- DefaultAttributeDefinition(const StringC &, DeclaredValue *,
- AttributeValue *);
- ConstPtr < AttributeValue > makeMissingValue(AttributeContext &) const;
- Boolean missingValueWouldMatch(const Text &,
- const AttributeContext &) const;
- void buildDesc(AttributeDefinitionDesc &) const;
- AttributeDefinition *copy() const;
- const AttributeValue *defaultValue(const AttributeValue *) const;
-private:
- ConstPtr < AttributeValue > value_;
-};
-
-class FixedAttributeDefinition : public DefaultAttributeDefinition {
-public:
- FixedAttributeDefinition(const StringC &, DeclaredValue *,
- AttributeValue *);
- // check that it's equal to the default
- AttributeValue *checkValue(AttributeValue *, AttributeContext &) const;
- void buildDesc(AttributeDefinitionDesc &) const;
- Boolean isFixed() const;
- AttributeDefinition *copy() const;
-};
-
-class SP_API AttributeDefinitionList : public Resource {
-public:
- AttributeDefinitionList(Vector < CopyOwner < AttributeDefinition > > &,
- size_t listIndex,
- Boolean anyCurrent = 0,
- size_t idIndex = size_t(-1),
- size_t notationIndex = size_t(-1));
- AttributeDefinitionList(const ConstPtr < AttributeDefinitionList > &);
- size_t size() const;
- AttributeDefinition *def(size_t);
- const AttributeDefinition *def(size_t)const;
- Boolean tokenIndex(const StringC &, unsigned &) const;
- Boolean tokenIndexUnique(const StringC &, unsigned) const;
- Boolean attributeIndex(const StringC &, unsigned &) const;
- size_t index() const;
- size_t idIndex() const;
- size_t notationIndex() const;
- Boolean anyCurrent() const;
- void setIndex(size_t);
- void append(AttributeDefinition *);
-private:
- Vector < CopyOwner < AttributeDefinition > > defs_;
- size_t index_;
- size_t idIndex_; // -1 if no ID attribute
- size_t notationIndex_; // -1 if no notation attribute
- Boolean anyCurrent_;
- ConstPtr < AttributeDefinitionList > prev_;
-};
-
-class AttributeSemantics {
-public:
- AttributeSemantics();
- virtual ~AttributeSemantics();
- virtual size_t nEntities() const;
- virtual ConstPtr < Entity > entity(size_t)const;
- virtual ConstPtr < Notation > notation() const;
- virtual AttributeSemantics *copy() const = 0;
-};
-
-class EntityAttributeSemantics : public AttributeSemantics {
-public:
- EntityAttributeSemantics(Vector < ConstPtr < Entity > > &);
- size_t nEntities() const;
- ConstPtr < Entity > entity(size_t)const;
- AttributeSemantics *copy() const;
-private:
- Vector < ConstPtr < Entity > > entity_;
-};
-
-class NotationAttributeSemantics : public AttributeSemantics {
-public:
- NotationAttributeSemantics(const ConstPtr < Notation > &);
- ConstPtr < Notation > notation() const;
- AttributeSemantics *copy() const;
-private:
- ConstPtr < Notation > notation_;
-};
-
-class SP_API ImpliedAttributeValue : public AttributeValue {
-public:
- ImpliedAttributeValue();
- Type info(const Text *&, const StringC *&) const;
-};
-
-class CdataAttributeValue : public AttributeValue {
-public:
- CdataAttributeValue(Text &);
- Type info(const Text *&, const StringC *&) const;
- const Text *text() const;
- Boolean recoverUnquoted(const StringC &, const Location &,
- AttributeContext &, const StringC &);
-private:
- Text text_;
-};
-
-class TokenizedAttributeValue : public AttributeValue {
-public:
- TokenizedAttributeValue(Text &, const Vector < size_t > &);
- size_t nTokens() const;
- AttributeSemantics *makeSemantics(const DeclaredValue *,
- AttributeContext &,
- const StringC &,
- unsigned &,
- unsigned &) const;
- Type info(const Text *&, const StringC *&) const;
- const Text *text() const;
- const StringC &string() const;
- StringC token(size_t)const;
- void token(size_t, const Char *&, size_t &) const;
- Location tokenLocation(size_t)const;
- Boolean tokenLocation(size_t,
- const ConstPtr < Origin > *&, Index &) const;
- Boolean recoverUnquoted(const StringC &, const Location &,
- AttributeContext &, const StringC &);
-private:
- TokenizedAttributeValue(const TokenizedAttributeValue &); // undefined
- void operator=(const TokenizedAttributeValue &); // undefined
- Text text_;
- // index into value of each space
- // length is number of tokens - 1
- Vector < size_t > spaceIndex_;
-};
-
-class SP_API Attribute {
-public:
- Attribute();
- Boolean specified() const;
- size_t specIndex() const;
- const AttributeValue *value() const;
- const ConstPtr < AttributeValue > &valuePointer() const;
- const AttributeSemantics *semantics() const;
- void setSpec(size_t);
- void setValue(const ConstPtr < AttributeValue > &);
- void setSemantics(AttributeSemantics *);
- void clear();
-private:
- size_t specIndexPlus_;
- ConstPtr < AttributeValue > value_;
- CopyOwner < AttributeSemantics > semantics_;
-};
-
-class SP_API AttributeList {
-public:
- AttributeList();
- AttributeList(const ConstPtr < AttributeDefinitionList > &);
- void init(const ConstPtr < AttributeDefinitionList > &);
- // was a conref attribute specified?
- Boolean conref()const;
- size_t size()const;
- const StringC &name(unsigned)const;
- const AttributeValue *value(unsigned)const;
- size_t specIndex(size_t)const;
- const ConstPtr < AttributeValue > &valuePointer(unsigned)const;
- const AttributeSemantics *semantics(unsigned)const;
- Boolean tokenized(unsigned index) const;
- Boolean tokenIndex(const StringC &, unsigned &) const;
- Boolean tokenIndexUnique(const StringC &, unsigned) const;
- Boolean attributeIndex(const StringC &, unsigned &) const;
- void finish(AttributeContext &);
- Boolean setValue(unsigned index, Text &, AttributeContext &,
- unsigned &specLength);
- void setValueToken(unsigned index, Text &, AttributeContext &,
- unsigned &specLength);
- void setSpec(unsigned index, AttributeContext &);
- Boolean recoverUnquoted(const StringC &, const Location &,
- AttributeContext &);
- Boolean handleAsUnterminated(AttributeContext &context);
- void swap(AttributeList &);
- size_t nSpec() const;
- size_t defIndex() const;
- // is the attribute #current
- Boolean current(unsigned)const;
- Boolean anyCurrent()const;
- Boolean specified(unsigned)const;
- Boolean id(unsigned)const;
- Boolean idref(unsigned)const;
- const Vector < StringC > *getAllowedTokens(unsigned)const;
- const StringC *getId() const; // null if none
- Boolean idIndex(unsigned &) const;
- void noteInvalidSpec();
- void changeDef(const ConstPtr < AttributeDefinitionList > &);
- const ConstPtr < AttributeDefinitionList > &def() const;
-private:
- const AttributeDefinition *def(size_t)const;
- PackedBoolean conref_;
- unsigned nIdrefs_;
- unsigned nEntityNames_;
- size_t nSpec_;
- Vector < Attribute > vec_;
- ConstPtr < AttributeDefinitionList > def_;
-};
-
-class SP_API AttributeContext : public Messenger {
-public:
- AttributeContext();
- virtual ~AttributeContext();
- virtual Boolean defineId(const StringC &, const Location &, Location &);
- virtual void noteIdref(const StringC &, const Location &);
- virtual void noteCurrentAttribute(size_t, AttributeValue *);
- virtual ConstPtr < AttributeValue > getCurrentAttribute(size_t)const;
- virtual ConstPtr < Entity > getAttributeEntity(const StringC &,
- const Location &);
- virtual ConstPtr < Notation > getAttributeNotation(const StringC &,
- const Location &);
- virtual const Syntax &attributeSyntax() const = 0;
-
- ConstPtr < AttributeValue > makeImpliedAttributeValue();
- Boolean mayDefaultAttribute() const;
- Boolean validate() const;
-protected:
- Boolean mayDefaultAttribute_;
- Boolean validate_;
-private:
- ConstPtr < AttributeValue > impliedAttributeValue_;
-};
-
-inline
-Boolean AttributeDefinition::tokenized() const
-{
- return (declaredValue_->tokenized());
-}
-
-inline
-Boolean AttributeDefinition::isNotation() const
-{
- return (declaredValue_->isNotation());
-}
-
-inline
-Boolean AttributeDefinition::isEntity() const
-{
- return (declaredValue_->isEntity());
-}
-
-inline
-Boolean AttributeDefinition::isId() const
-{
- return (declaredValue_->isId());
-}
-
-inline
-Boolean AttributeDefinition::isIdref() const
-{
- return (declaredValue_->isIdref());
-}
-
-inline
-const Vector < StringC > *AttributeDefinition::getTokens() const
-{
- return (declaredValue_->getTokens());
-}
-
-inline
-AttributeSemantics *
-AttributeDefinition::makeSemantics(const AttributeValue *value,
- AttributeContext &context, unsigned &nIdrefs,
- unsigned &nEntityNames) const
-{
- return (value->makeSemantics(declaredValue_.pointer(),
- context, name_, nIdrefs, nEntityNames));
-}
-
-inline
-AttributeValue *AttributeDefinition::makeValue(Text &text,
- AttributeContext &context, unsigned &specLength) const
-{
- return (checkValue(declaredValue_->makeValue(text,
- context, name_, specLength), context));
-}
-
-inline
-AttributeValue *
-AttributeDefinition::makeValueFromToken(Text &text,
- AttributeContext &context,
- unsigned &specLength) const
-{
- return (checkValue(declaredValue_->makeValueFromToken(text,
- context, name_, specLength), context));
-}
-
-inline
-Boolean AttributeDefinition::containsToken(const StringC &token) const
-{
- return (declaredValue_->containsToken(token));
-}
-
-inline
-const StringC &AttributeDefinition::name() const
-{
- return (name_);
-}
-
-inline
-void AttributeDefinition::setDeclaredValue(DeclaredValue *declaredValue)
-{
- declaredValue_ = declaredValue;
-}
-
-inline
-size_t AttributeDefinitionList::size() const
-{
- return (defs_.size());
-}
-
-inline
-size_t AttributeDefinitionList::index() const
-{
- return (index_);
-}
-
-inline
-void AttributeDefinitionList::setIndex(size_t index)
-{
- index_ = index;
-}
-
-inline
-size_t AttributeDefinitionList::idIndex() const
-{
- return (idIndex_);
-}
-
-inline
-size_t AttributeDefinitionList::notationIndex() const
-{
- return (notationIndex_);
-}
-
-inline
-Boolean AttributeDefinitionList::anyCurrent() const
-{
- return (anyCurrent_);
-}
-
-inline
-AttributeDefinition *AttributeDefinitionList::def(size_t i)
-{
- return (defs_[i].pointer());
-}
-
-inline
-const AttributeDefinition *AttributeDefinitionList::def(size_t i) const
-{
- return (defs_[i].pointer());
-}
-
-inline
-size_t TokenizedAttributeValue::nTokens() const
-{
- return (spaceIndex_.size() + 1);
-}
-
-inline
-const StringC &TokenizedAttributeValue::string() const
-{
- return (text_.string());
-}
-
-inline
-void TokenizedAttributeValue::token(size_t i,
- const Char *&ptr, size_t &len) const
-{
- size_t startIndex = i == 0 ? 0 :
- spaceIndex_[i - 1] + 1;
- ptr = text_.string().data() + startIndex;
- len = (i == spaceIndex_.size() ? text_.size() :
- spaceIndex_[i]) - startIndex;
-}
-
-inline
-StringC TokenizedAttributeValue::token(size_t i) const
-{
- const Char *ptr;
- size_t len;
- token(i, ptr, len);
- return (StringC(ptr, len));
-}
-
-
-inline
-Location TokenizedAttributeValue::tokenLocation(size_t i) const
-{
- return (text_.charLocation(i == 0 ? 0 :
- spaceIndex_[i - 1] + 1));
-}
-
-inline
-Boolean TokenizedAttributeValue::tokenLocation(size_t i,
- const ConstPtr < Origin > *&origin, Index &index) const
-{
- return (text_.charLocation(i == 0 ? 0 :
- spaceIndex_[i - 1] + 1, origin, index));
-}
-
-inline
-size_t Attribute::specIndex() const
-{
- return (specIndexPlus_ - 1);
-}
-
-inline
-Boolean Attribute::specified() const
-{
- return (specIndexPlus_ != 0);
-}
-
-inline
-const AttributeValue *Attribute::value() const
-{
- return (value_.pointer());
-}
-
-inline
-const ConstPtr < AttributeValue > &Attribute::valuePointer() const
-{
- return (value_);
-}
-
-inline
-const AttributeSemantics *Attribute::semantics() const
-{
- return (semantics_.pointer());
-}
-
-inline
-void Attribute::setSpec(size_t index)
-{
- specIndexPlus_ = index + 1;
-}
-
-inline
-void Attribute::setValue(const ConstPtr < AttributeValue > &value)
-{
- value_ = value;
-}
-
-inline
-void Attribute::setSemantics(AttributeSemantics *semantics)
-{
- semantics_ = semantics;
-}
-
-inline
-size_t AttributeList::size() const
-{
- return (vec_.size());
-}
-
-inline
-const AttributeDefinition *AttributeList::def(size_t i) const
-{
- return (def_->def(i));
-}
-
-inline
-const ConstPtr < AttributeDefinitionList > &AttributeList::def() const
-{
- return (def_);
-}
-
-inline
-Boolean AttributeList::tokenized(unsigned i) const
-{
- return (def(i)->tokenized());
-}
-
-inline
-Boolean AttributeList::tokenIndex(const StringC &name, unsigned &index) const
-{
- return (!def_.isNull() && def_->tokenIndex(name, index));
-}
-
-inline
-Boolean AttributeList::tokenIndexUnique(const StringC &name,
- unsigned index) const
-{
- return (def_->tokenIndexUnique(name, index));
-}
-
-inline
-Boolean AttributeList::attributeIndex(const StringC &name,
- unsigned &index) const
-{
- return (!def_.isNull() && def_->attributeIndex(name, index));
-}
-
-inline
-const StringC &AttributeList::name(unsigned i) const
-{
- return (def(i)->name());
-}
-
-inline
-const Vector < StringC > *AttributeList::getAllowedTokens(unsigned i)
- const
-{
- return (def(i)->getTokens());
-}
-
-inline
-const AttributeValue *AttributeList::value(unsigned i) const
-{
- return (vec_[i].value());
-}
-
-inline
-const ConstPtr < AttributeValue > &AttributeList::valuePointer(unsigned i)
- const
-{
- return (vec_[i].valuePointer());
-}
-
-inline
-const AttributeSemantics *AttributeList::semantics(unsigned i) const
-{
- return (vec_[i].semantics());
-}
-
-inline
-size_t AttributeList::specIndex(size_t i) const
-{
- return (vec_[i].specIndex());
-}
-
-inline
-size_t AttributeList::nSpec() const
-{
- return (nSpec_);
-}
-
-inline
-Boolean AttributeList::conref() const
-{
- return (conref_);
-}
-
-inline
-size_t AttributeList::defIndex() const
-{
- return (def_.isNull() ? size_t(-1) : def_->index());
-}
-
-inline
-Boolean AttributeList::current(unsigned i) const
-{
- return (def(i)->isCurrent());
-}
-
-inline
-Boolean AttributeList::anyCurrent() const
-{
- return (!def_.isNull() && def_->anyCurrent());
-}
-
-inline
-const AttributeValue *
-DefaultAttributeDefinition::defaultValue(const AttributeValue *)
- const
-{
- return (value_.pointer());
-}
-
-inline
-Boolean AttributeList::idIndex(unsigned &ind) const
-{
- if (def_.isNull() || def_->idIndex() == size_t(-1))
- return (0);
- else {
- ind = def_->idIndex();
- return (1);
- }
-}
-
-inline
-Boolean AttributeList::id(unsigned i) const
-{
- return (def(i)->isId());
-}
-
-inline
-Boolean AttributeList::idref(unsigned i) const
-{
- return (def(i)->isIdref());
-}
-
-inline
-Boolean AttributeList::specified(unsigned i) const
-{
- return (vec_[i].specified());
-}
-
-inline
-Boolean AttributeContext::mayDefaultAttribute() const
-{
- return (mayDefaultAttribute_);
-}
-
-inline
-Boolean AttributeContext::validate() const
-{
- return (validate_);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Attribute_INCLUDED */
-
-#endif /* _ATTRIBUTE_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Attributed.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Attributed.h
deleted file mode 100644
index 6fd0b66f69..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Attributed.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Attributed_INCLUDED
-#define Attributed_INCLUDED 1
-
-#include "Ptr.h"
-#include "Attribute.h"
-
-// This is used for things that have attribute definitions
-// that notations and elements.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Attributed {
-public:
- Attributed() { }
- ConstPtr<AttributeDefinitionList> attributeDef() const;
- const AttributeDefinitionList *attributeDefTemp() const;
- Ptr<AttributeDefinitionList> attributeDef();
- void setAttributeDef(const Ptr<AttributeDefinitionList> &);
-private:
- Ptr<AttributeDefinitionList> attributeDef_;
-
-};
-
-inline
-ConstPtr<AttributeDefinitionList> Attributed::attributeDef() const
-{
- return attributeDef_;
-}
-
-inline
-const AttributeDefinitionList *Attributed::attributeDefTemp() const
-{
- return attributeDef_.pointer();
-}
-
-inline
-Ptr<AttributeDefinitionList> Attributed::attributeDef()
-{
- return attributeDef_;
-}
-
-inline
-void Attributed::setAttributeDef(const Ptr<AttributeDefinitionList> &def)
-{
- attributeDef_ = def;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Attributed_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Big5CodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Big5CodingSystem.h
deleted file mode 100644
index 199b9458f3..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Big5CodingSystem.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Big5CodingSystem_INCLUDED
-#define Big5CodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Big5CodingSystem : public CodingSystem {
-public:
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Big5CodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Boolean.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Boolean.h
deleted file mode 100644
index 2bc8c91a55..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Boolean.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Boolean_INCLUDED
-#define Boolean_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_HAVE_BOOL
-
-typedef bool Boolean;
-#ifdef SP_SIZEOF_BOOL_1
-typedef bool PackedBoolean;
-#else
-typedef char PackedBoolean;
-#endif
-
-#else /* not SP_HAVE_BOOL */
-
-typedef int Boolean;
-typedef char PackedBoolean;
-
-#endif /* not SP_HAVE_BOOL */
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#ifndef SP_HAVE_BOOL
-
-typedef int bool;
-
-const int true = 1;
-const int false = 0;
-
-#endif /* not SP_HAVE_BOOL */
-
-#endif /* not Boolean_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.cxx
deleted file mode 100644
index 0adbb5d8d7..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.cxx
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CharMap_DEF_INCLUDED
-#define CharMap_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_MULTI_BYTE
-
-template<class T>
-CharMap<T>::CharMap()
-{
-}
-
-template<class T>
-CharMap<T>::CharMap(T dflt)
-{
- for (size_t i = 0; i < (1 << level1bits); i++)
- pages_[i].value = dflt;
-}
-
-template<class T>
-void CharMap<T>::setAll(T val)
-{
- for (size_t i = 0; i < (1 << level1bits); i++) {
- pages_[i].value = val;
- delete [] pages_[i].values;
- pages_[i].values = 0;
- }
-}
-
-template<class T>
-void CharMap<T>::swap(CharMap<T> &map)
-{
- for (size_t i = 0; i < (1 << level1bits); i++)
- pages_[i].swap(map.pages_[i]);
-}
-
-template<class T>
-void CharMap<T>::setChar(Char c, T val)
-{
- CharMapPage<T> &pg = pages_[c >> (level2bits + level3bits)];
- if (pg.values) {
- CharMapColumn<T> &column = pg.values[(c >> level3bits) & ((1 << level2bits) - 1)];
- if (column.values)
- column.values[c & ((1 << level3bits) - 1)] = val;
- else if (val != column.value) {
- column.values = new T[1 << level3bits];
- for (size_t i = 0; i < (1 << level3bits); i++)
- column.values[i] = column.value;
- column.values[c & ((1 << level3bits) - 1)] = val;
- }
- }
- else if (val != pg.value) {
- pg.values = new CharMapColumn<T>[1 << level2bits];
- for (size_t i = 0; i < (1 << level2bits); i++)
- pg.values[i].value = pg.value;
- CharMapColumn<T> &column = pg.values[(c >> level3bits) & ((1 << level2bits) - 1)];
- column.values = new T[1 << level3bits];
- for (size_t i = 0; i < (1 << level3bits); i++)
- column.values[i] = column.value;
- column.values[c & ((1 << level3bits) - 1)] = val;
- }
-}
-
-template<class T>
-void CharMap<T>::setRange(Char from, Char to, T val)
-{
- do {
- if ((from & ((1 << level3bits) - 1)) == 0
- && to - from >= (1 << level3bits) - 1) {
- if ((from & ((1 << (level2bits + level3bits)) - 1)) == 0
- && to - from >= (1 << (level2bits + level3bits)) - 1) {
- // Set a complete page.
- CharMapPage<T> &pg = pages_[from >> (level2bits + level3bits)];
- pg.value = val;
- delete pg.values;
- pg.values = 0;
- from += (1 << (level2bits + level3bits)) - 1;
- }
- else {
- // Set a complete column.
- CharMapPage<T> &pg = pages_[from >> (level2bits + level3bits)];
- if (pg.values) {
- CharMapColumn<T> &column = pg.values[(from >> level3bits) & ((1 << level2bits) - 1)];
- column.value = val;
- delete column.values;
- column.values = 0;
- }
- else if (val != pg.value) {
- // split the page
- pg.values = new CharMapColumn<T>[1 << level2bits];
- for (size_t i = 0; i < (1 << level2bits); i++)
- pg.values[i].value = pg.value;
- CharMapColumn<T> &column = pg.values[(from >> level3bits) & ((1 << level2bits) - 1)];
- column.value = val;
- }
- from += (1 << level2bits) - 1;
- }
- }
- else
- setChar(from, val);
- } while (from++ != to);
-}
-
-template<class T>
-CharMapPage<T>::CharMapPage()
-: values(0)
-{
-}
-
-template<class T>
-CharMapPage<T>::CharMapPage(const CharMapPage<T> &pg)
-{
- if (pg.values) {
- values = new CharMapColumn<T>[1 << level2bits];
- for (size_t i = 0; i < (1 << level2bits); i++)
- values[i] = pg.values[i];
- }
- else {
- value = pg.value;
- values = 0;
- }
-}
-
-template<class T>
-void CharMapPage<T>::operator=(const CharMapPage<T> &pg)
-{
- if (pg.values) {
- if (!values)
- values = new CharMapColumn<T>[1 << level2bits];
- for (size_t i = 0; i < (1 << level2bits); i++)
- values[i] = pg.values[i];
- }
- else {
- if (values) {
- delete [] values;
- values = 0;
- }
- value = pg.value;
- }
-}
-
-template<class T>
-CharMapPage<T>::~CharMapPage()
-{
- delete [] values;
-}
-
-template<class T>
-void CharMapPage<T>::swap(CharMapPage<T> &pg)
-{
- {
- CharMapColumn<T> *tem = values;
- values = pg.values;
- pg.values = tem;
- }
- {
- T tem(value);
- value = pg.value;
- pg.value = tem;
- }
-}
-
-template<class T>
-CharMapColumn<T>::CharMapColumn()
-: values(0)
-{
-}
-
-template<class T>
-CharMapColumn<T>::CharMapColumn(const CharMapColumn<T> &col)
-{
- if (col.values) {
- values = new T[1 << level3bits];
- for (size_t i = 0; i < (1 << level3bits); i++)
- values[i] = col.values[i];
- }
- else {
- values = 0;
- value = col.value;
- }
-}
-
-template<class T>
-void CharMapColumn<T>::operator=(const CharMapColumn<T> &col)
-{
- if (col.values) {
- if (!values)
- values = new T[1 << level3bits];
- for (size_t i = 0; i < (1 << level3bits); i++)
- values[i] = col.values[i];
- }
- else {
- if (values) {
- delete [] values;
- values = 0;
- }
- value = col.value;
- }
-}
-
-template<class T>
-CharMapColumn<T>::~CharMapColumn()
-{
- delete [] values;
-}
-
-#else /* not SP_MULTI_BYTE */
-
-template<class T>
-CharMap<T>::CharMap()
-{
-}
-
-template<class T>
-CharMap<T>::CharMap(T dflt)
-{
- for (int i = 0; i < 256; i++)
- values_[i] = dflt;
-}
-
-template<class T>
-void CharMap<T>::setAll(T val)
-{
- for (size_t i = 0; i < 256; i++)
- values_[i] = val;
-}
-
-template<class T>
-void CharMap<T>::setRange(Char from, Char to, T val)
-{
- do {
- values_[from] = val;
- } while (from++ != to);
-}
-
-template<class T>
-void CharMap<T>::swap(CharMap<T> &map)
-{
- for (size_t i = 0; i < 256; i++) {
- T tem(values_[i]);
- values_[i] = map.values_[i];
- map.values_[i] = tem;
- }
-}
-
-#endif /* not SP_MULTI_BYTE */
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CharMap_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.h
deleted file mode 100644
index e66dea9454..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CharMap.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CharMap_INCLUDED
-#define CharMap_INCLUDED 1
-
-#include "types.h"
-#include "Resource.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_MULTI_BYTE
-template<class T>
-class CharMapColumn {
-public:
- enum { level3bits = 4 };
- CharMapColumn();
- CharMapColumn(const CharMapColumn<T> &);
- void operator=(const CharMapColumn<T> &);
- ~CharMapColumn();
- T *values;
- T value;
-};
-
-template<class T>
-class CharMapPage {
-public:
- enum { level2bits = 4 };
- CharMapPage();
- CharMapPage(const CharMapPage<T> &);
- void operator=(const CharMapPage<T> &);
- ~CharMapPage();
- void swap(CharMapPage<T> &);
- CharMapColumn<T> *values;
- T value;
-};
-#endif /* SP_MULTI_BYTE */
-
-template<class T>
-class CharMap {
-public:
- CharMap();
- CharMap(T);
- T operator[](Char) const;
- T getRange(Char from, Char &to) const;
- void swap(CharMap<T> &);
- void setChar(Char, T);
- void setRange(Char from, Char to, T val);
- void setAll(T);
-private:
-#ifdef SP_MULTI_BYTE
- enum { level1bits = 8, level2bits = 4, level3bits = 4 };
- CharMapPage<T> pages_[1 << level1bits];
-#else
- T values_[256];
-#endif
-};
-
-template<class T>
-class CharMapResource : public CharMap<T>, public Resource {
-public:
- CharMapResource() { }
- CharMapResource(T t) : CharMap<T>(t) { }
-};
-
-#ifdef SP_MULTI_BYTE
-
-template<class T>
-inline
-T CharMap<T>::operator[](Char c) const
-{
- const CharMapPage<T> &pg = pages_[c >> (level2bits + level3bits)];
- if (pg.values) {
- const CharMapColumn<T> &column = pg.values[(c >> level3bits) & ((1 << level2bits) - 1)];
- if (column.values)
- return column.values[c & ((1 << level3bits) - 1)];
- else
- return column.value;
- }
- else
- return pg.value;
-}
-
-template<class T>
-inline
-T CharMap<T>::getRange(Char c, Char &max) const
-{
- const CharMapPage<T> &pg = pages_[c >> (level2bits + level3bits)];
- if (pg.values) {
- const CharMapColumn<T> &column = pg.values[(c >> level3bits) & ((1 << level2bits) - 1)];
- if (column.values) {
- max = c;
- return column.values[c & ((1 << level3bits) - 1)];
- }
- else {
- max = (c & ~((1 << level3bits) - 1)) + ((1 << level3bits) - 1);
- return column.value;
- }
- }
- else {
- max = (c & ~((1 << (level2bits + level3bits)) - 1)) + ((1 << (level2bits + level2bits)) - 1);
- return pg.value;
- }
-}
-
-#else
-
-template<class T>
-inline
-T CharMap<T>::operator[](Char c) const
-{
- return values_[c];
-}
-
-template<class T>
-inline
-T CharMap<T>::getRange(Char c, Char &max) const
-{
- max = c;
- return values_[c];
-}
-
-template<class T>
-inline
-void CharMap<T>::setChar(Char c, T val)
-{
- values_[c] = val;
-}
-
-#endif
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CharMap_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "CharMap.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetDecl.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetDecl.h
deleted file mode 100644
index 455af8148f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetDecl.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CharsetDecl_INCLUDED
-#define CharsetDecl_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Vector.h"
-#include "ExternalId.h"
-#include "ISet.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API CharsetDeclRange {
-public:
- enum Type {
- number,
- string,
- unused
- };
- CharsetDeclRange();
- CharsetDeclRange(WideChar, Number, WideChar);
- CharsetDeclRange(WideChar, Number);
- CharsetDeclRange(WideChar, Number, const StringC &);
- void rangeDeclared(WideChar min, Number count,
- ISet<WideChar> &declared) const;
- void usedSet(ISet<Char> &) const;
- Boolean getCharInfo(WideChar fromChar,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str,
- Number &count) const;
- void stringToChar(const StringC &str, ISet<WideChar> &to) const;
- void numberToChar(Number n, ISet<WideChar> &to, Number &count) const;
-private:
- WideChar descMin_;
- Number count_;
- WideChar baseMin_;
- Type type_;
- StringC str_;
-};
-
-class SP_API CharsetDeclSection {
-public:
- CharsetDeclSection();
- void setPublicId(const PublicId &);
- void addRange(const CharsetDeclRange &);
- void rangeDeclared(WideChar min, Number count,
- ISet<WideChar> &declared) const;
- void usedSet(ISet<Char> &) const;
- Boolean getCharInfo(WideChar fromChar,
- const PublicId *&id,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str,
- Number &cout) const;
- void stringToChar(const StringC &str, ISet<WideChar> &to) const;
- void numberToChar(const PublicId *id, Number n,
- ISet<WideChar> &to, Number &count) const;
-private:
- PublicId baseset_;
- Vector<CharsetDeclRange> ranges_;
-};
-
-class SP_API CharsetDecl {
-public:
- CharsetDecl();
- void addSection(const PublicId &);
- void swap(CharsetDecl &);
- void clear();
- void usedSet(ISet<Char> &) const;
- void declaredSet(ISet<WideChar> &set) const;
- Boolean charDeclared(WideChar) const;
- void rangeDeclared(WideChar min, Number count,
- ISet<WideChar> &declared) const;
- void addRange(WideChar, Number, WideChar);
- void addRange(WideChar, Number);
- void addRange(WideChar, Number, const StringC &);
- Boolean getCharInfo(WideChar fromChar,
- const PublicId *&id,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str) const;
- Boolean getCharInfo(WideChar fromChar,
- const PublicId *&id,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str,
- Number &count) const;
- void stringToChar(const StringC &str, ISet<WideChar> &to) const;
- void numberToChar(const PublicId *id, Number n,
- ISet<WideChar> &to, Number &count) const;
- void numberToChar(const PublicId *id, Number n, ISet<WideChar> &to) const;
-private:
- Vector<CharsetDeclSection> sections_;
- ISet<WideChar> declaredSet_;
-};
-
-inline
-Boolean CharsetDecl::getCharInfo(WideChar fromChar,
- const PublicId *&id,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str) const
-{
- Number tem;
- return getCharInfo(fromChar, id, type, n, str, tem);
-}
-
-inline
-void CharsetDecl::numberToChar(const PublicId *id, Number n,
- ISet<WideChar> &to) const
-{
- Number tem;
- numberToChar(id, n, to, tem);
-}
-
-inline
-void CharsetDecl::declaredSet(ISet<WideChar> &set) const
-{
- set = declaredSet_;
-}
-
-inline
-Boolean CharsetDecl::charDeclared(WideChar c) const
-{
- return declaredSet_.contains(c);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CharsetDecl_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetInfo.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetInfo.h
deleted file mode 100644
index 293f4d85ab..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetInfo.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CharsetInfo_INCLUDED
-#define CharsetInfo_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <limits.h>
-#include "UnivCharsetDesc.h"
-#include "Boolean.h"
-#include "types.h"
-#include "StringC.h"
-#include "ISet.h"
-#include "CharMap.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API CharsetInfo {
-public:
- CharsetInfo();
- CharsetInfo(const UnivCharsetDesc &);
- void set(const UnivCharsetDesc &);
- // Use only for characters guaranteed to me in the C basic execution
- // character set and which have been verified to be in this
- // character set.
- Char execToDesc(char) const;
- StringC execToDesc(const char *s) const;
- Boolean descToUniv(WideChar from, UnivChar &to) const;
- Boolean descToUniv(WideChar from, UnivChar &to, WideChar &alsoMax) const;
- // Return 0 for no matches, 1 for 1, 2 for more than 1
- // to gets the first character; toSet gets all the characters
- // if there's more than 1.
- unsigned univToDesc(UnivChar from, WideChar &to, ISet<WideChar> &toSet)
- const;
- unsigned univToDesc(UnivChar from, WideChar &to, ISet<WideChar> &toSet,
- WideChar &count)
- const;
- void getDescSet(ISet<Char> &) const;
- int digitWeight(Char) const;
- int hexDigitWeight(Char) const;
- const UnivCharsetDesc &desc() const;
-private:
- void init();
- UnivCharsetDesc desc_;
- CharMap<Unsigned32> inverse_;
- Char execToDesc_[UCHAR_MAX + 1];
-};
-
-inline
-unsigned CharsetInfo::univToDesc(UnivChar from, WideChar &to,
- ISet<WideChar> &toSet)
- const
-{
- if (from <= Char(-1)) {
- Unsigned32 n = inverse_[from];
- if (n == Unsigned32(-1))
- return 0;
- if (n != Unsigned32(-2)) {
- to = ((n + from) & ((Unsigned32(1) << 31) - 1));
- return 1;
- }
- }
- return desc_.univToDesc(from, to, toSet);
-}
-
-inline
-unsigned CharsetInfo::univToDesc(UnivChar from, WideChar &to,
- ISet<WideChar> &toSet, WideChar &count)
- const
-{
- if (from <= Char(-1)) {
- Char fromMax;
- Unsigned32 n = inverse_.getRange(from, fromMax);
- if (n == Unsigned32(-1)) {
- count = (fromMax - from) + 1;
- return 0;
- }
- if (n != Unsigned32(-2)) {
- to = ((n + from) & ((Unsigned32(1) << 31) - 1));
- count = (fromMax - from) + 1;
- return 1;
- }
- }
- return desc_.univToDesc(from, to, toSet, count);
-}
-
-inline
-Boolean CharsetInfo::descToUniv(UnivChar from, WideChar &to) const
-{
- return desc_.descToUniv(from, to);
-}
-
-inline
-Char CharsetInfo::execToDesc(char c) const
-{
- return execToDesc_[(unsigned char)c];
-}
-
-inline
-Boolean CharsetInfo::descToUniv(WideChar from, UnivChar &to,
- WideChar &alsoMax) const
-{
- return desc_.descToUniv(from, to, alsoMax);
-}
-
-inline
-const UnivCharsetDesc &CharsetInfo::desc() const
-{
- return desc_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CharsetInfo_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetRegistry.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetRegistry.h
deleted file mode 100644
index 909c9186c2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CharsetRegistry.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CharsetRegistry_INCLUDED
-#define CharsetRegistry_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Boolean.h"
-#include "types.h"
-#include "StringC.h"
-#include "CharsetInfo.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API CharsetRegistry {
-public:
- class SP_API Iter {
- public:
- virtual ~Iter();
- virtual Boolean next(WideChar &min, WideChar &max, UnivChar &) = 0;
- };
- enum ISORegistrationNumber {
- UNREGISTERED = 0,
- ISO646_ASCII_G0 = 6,
- ISO646_C0 = 1,
- ISO6429 = 77,
- ISO8859_1 = 100,
- ISO8859_2 = 101,
- ISO8859_3 = 109,
- ISO8859_4 = 110,
- ISO8859_5 = 144,
- ISO8859_6 = 127,
- ISO8859_7 = 126,
- ISO8859_8 = 138,
- ISO8859_9 = 148,
- ISO646_JIS_G0 = 14,
- JIS0201 = 13,
- JIS0208 = 168,
- JIS0212 = 159,
- KSC5601 = 149,
- GB2312 = 58,
- ISO10646_UCS2 = 176,
- ISO10646_UCS4 = 177,
- BIG5 = 65535 // not registered
- };
- static ISORegistrationNumber getRegistrationNumber(const StringC &desig,
- const CharsetInfo &);
- static Iter *makeIter(ISORegistrationNumber);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CharsetRegistry_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CmdLineApp.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CmdLineApp.h
deleted file mode 100644
index 0a24371add..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CmdLineApp.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CmdLineApp_INCLUDED
-#define CmdLineApp_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "MessageReporter.h"
-#include "Vector.h"
-#include "StringOf.h"
-#include "Boolean.h"
-#include "CodingSystem.h"
-#include "OutputByteStream.h"
-#include "OutputCharStream.h"
-#include "CodingSystemKit.h"
-
-#ifdef SP_WIDE_SYSTEM
-// for wchar_t
-#include <stddef.h>
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API CmdLineApp : public MessageReporter {
-public:
-#ifdef SP_WIDE_SYSTEM
- typedef wchar_t AppChar;
-#else
- typedef char AppChar;
-#endif
- CmdLineApp(const char *requiredInternalCode = 0);
- int run(int argc, AppChar **argv);
- virtual int processOptions(int argc, AppChar **argv, int &nextArg);
- virtual void processOption(AppChar opt, const AppChar *arg);
- virtual int processArguments(int argc, AppChar **files) = 0;
- static const MessageType2 &openFileErrorMessage();
- static const MessageType2 &closeFileErrorMessage();
- StringC usageString();
- const CodingSystem *codingSystem();
- const CodingSystem *outputCodingSystem();
- const CharsetInfo &systemCharset();
- ConstPtr<InputCodingSystemKit> inputCodingSystemKit();
- StringC convertInput(const AppChar *s);
- OutputCharStream *makeStdOut();
- OutputCharStream *makeStdErr();
-protected:
- virtual void registerOption(AppChar c, const AppChar *argName = 0);
- virtual int init(int argc, AppChar **argv);
- void resetCodingSystemKit();
- static Boolean stringMatches(const AppChar *s, const char *key);
- const AppChar *errorFile_;
- const CodingSystem *outputCodingSystem_;
- String<AppChar> optstr_;
- Vector<const AppChar *> optArgNames_;
- Boolean internalCharsetIsDocCharset_;
- Ptr<CodingSystemKit> codingSystemKit_;
-private:
- Boolean getMessageText(const MessageFragment &, StringC &);
- void initCodingSystem(const char *requiredInternalCode);
- const CodingSystem *lookupCodingSystem(const AppChar *codingName);
- const CodingSystem *codingSystem_;
-};
-
-#ifdef SP_WIDE_SYSTEM
-#define SP_DEFINE_APP(CLASS) \
- extern "C" \
- wmain(int argc, wchar_t **argv) { CLASS app; return app.run(argc, argv); }
-#else
-#define SP_DEFINE_APP(CLASS) \
- int main(int argc, char **argv) { CLASS app; return app.run(argc, argv); }
-#endif
-
-inline
-const CodingSystem *CmdLineApp::codingSystem()
-{
- return codingSystem_;
-}
-
-inline
-const CodingSystem *CmdLineApp::outputCodingSystem()
-{
- return outputCodingSystem_;
-}
-
-inline
-ConstPtr<InputCodingSystemKit> CmdLineApp::inputCodingSystemKit()
-{
- return codingSystemKit_.pointer();
-}
-
-inline
-const CharsetInfo &CmdLineApp::systemCharset()
-{
- return codingSystemKit_->systemCharset();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CmdLineApp_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystem.h
deleted file mode 100644
index 8e6e454c03..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystem.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CodingSystem_INCLUDED
-#define CodingSystem_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Boolean.h"
-#include "StringC.h"
-#include "OutputByteStream.h"
-
-#include <stddef.h>
-
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Decoder {
-public:
- Decoder(unsigned minBytesPerChar = 1);
- virtual ~Decoder();
- virtual size_t decode(Char *, const char *, size_t, const char **) = 0;
- virtual Boolean convertOffset(unsigned long &offset) const;
- // Decoder assumes that for every decoded Char there must be at least
- // minBytesPerChar bytes
- unsigned minBytesPerChar() const;
-protected:
- unsigned minBytesPerChar_;
-};
-
-
-class SP_API Encoder {
-public:
- class SP_API Handler {
- public:
- virtual void handleUnencodable(Char, OutputByteStream *) = 0;
- };
- Encoder();
- virtual ~Encoder();
- virtual void output(const Char *, size_t, OutputByteStream *) = 0;
- // This outputs a byte order mark with Unicode.
- virtual void startFile(OutputByteStream *);
- virtual void output(Char *, size_t, OutputByteStream *);
- virtual void setUnencodableHandler(Handler *);
- virtual void handleUnencodable(Char, OutputByteStream *);
-};
-
-class SP_API RecoveringEncoder : public Encoder {
-public:
- RecoveringEncoder();
- void setUnencodableHandler(Handler *);
- void handleUnencodable(Char, OutputByteStream *);
-private:
- Handler *unencodableHandler_;
-};
-
-class SP_API InputCodingSystem {
-public:
- virtual ~InputCodingSystem();
- virtual Decoder *makeDecoder() const = 0;
- StringC convertIn(const char *) const;
- virtual Boolean isIdentity() const;
-};
-
-class SP_API OutputCodingSystem {
-public:
- virtual ~OutputCodingSystem();
- virtual Encoder *makeEncoder() const = 0;
- virtual unsigned fixedBytesPerChar() const;
- String<char> convertOut(const StringC &) const;
-};
-
-class SP_API CodingSystem : public InputCodingSystem, public OutputCodingSystem {
-};
-
-inline
-unsigned Decoder::minBytesPerChar() const
-{
- return minBytesPerChar_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystemKit.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystemKit.h
deleted file mode 100644
index 0961b6ffaf..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CodingSystemKit.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CodingSystemKit_INCLUDED
-#define CodingSystemKit_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Boolean.h"
-#include "StringC.h"
-#include "CodingSystem.h"
-#include "Resource.h"
-#include "CharsetInfo.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API InputCodingSystemKit : public Resource {
-public:
- virtual ~InputCodingSystemKit();
- // Returned InputCodingSystem lives at least as long as the Kit.
- virtual const InputCodingSystem *
- identityInputCodingSystem() const = 0;
- virtual const InputCodingSystem *
- makeInputCodingSystem(const StringC &,
- const CharsetInfo &,
- Boolean isBctf,
- const char *&staticName) const = 0;
- virtual Char replacementChar() const = 0;
- const CharsetInfo &systemCharset() const;
-protected:
- CharsetInfo systemCharset_;
-};
-
-class SP_API CodingSystemKit : public InputCodingSystemKit {
-public:
- virtual CodingSystemKit *copy() const = 0;
- virtual const CodingSystem *
- identityCodingSystem() const = 0;
- virtual const CodingSystem *
- makeCodingSystem(const char *, Boolean isBctf) const = 0;
- static CodingSystemKit *make(const char *);
-};
-
-inline
-const CharsetInfo &InputCodingSystemKit::systemCharset() const
-{
- return systemCharset_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CodingSystemKit_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ConsoleOutput.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ConsoleOutput.h
deleted file mode 100644
index d5c73d2a69..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ConsoleOutput.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ConsoleOutput_INCLUDED
-#define ConsoleOutput_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "OutputCharStream.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ConsoleOutput {
-public:
- // Returns null if fd is not a console.
- static OutputCharStream *makeOutputCharStream(int fd);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ConsoleOutput_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ContentState.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ContentState.h
deleted file mode 100644
index 8889187943..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ContentState.h
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ContentState_INCLUDED
-#define ContentState_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include "OpenElement.h"
-#include "IList.h"
-#include "Vector.h"
-#include "Message.h"
-#include "Dtd.h"
-#include "Mode.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ContentState {
-public:
- ContentState();
- void startContent(const Dtd &);
- void pushElement(OpenElement *);
- OpenElement *popSaveElement();
- void popElement();
- OpenElement &currentElement();
- const OpenElement &currentElement() const;
- void getOpenElementInfo(Vector<OpenElementInfo> &,
- const StringC &rniPcdata) const;
- unsigned tagLevel() const;
- Boolean elementIsIncluded(const ElementType *) const;
- Boolean elementIsExcluded(const ElementType *) const;
- Boolean elementIsOpen(const ElementType *) const;
- Boolean afterDocumentElement() const;
- const ElementType *lastEndedElementType() const;
- Mode contentMode() const;
- ElementType *lookupCreateUndefinedElement(const StringC &,
- const Location &,
- Dtd &);
- Boolean checkImplyLoop(unsigned);
- static const ShortReferenceMap theEmptyMap;
-private:
- IList<OpenElement> openElements_;
- Vector<unsigned> openElementCount_;
- Vector<unsigned> includeCount_;
- Vector<unsigned> excludeCount_;
- unsigned totalExcludeCount_;
- unsigned tagLevel_;
- unsigned netEnablingCount_;
- unsigned long nextIndex_;
- const ElementType *lastEndedElementType_;
- ElementType documentElementContainer_;
-};
-
-inline
-OpenElement &ContentState::currentElement()
-{
- return *openElements_.head();
-}
-
-inline
-const OpenElement &ContentState::currentElement() const
-{
- return *openElements_.head();
-}
-
-inline
-Boolean ContentState::elementIsOpen(const ElementType *e) const
-{
- return openElementCount_[e->index()] != 0;
-}
-
-inline
-Boolean ContentState::elementIsIncluded(const ElementType *e) const
-{
- return includeCount_[e->index()] != 0 && excludeCount_[e->index()] == 0;
-}
-
-inline
-Boolean ContentState::elementIsExcluded(const ElementType *e) const
-{
- return excludeCount_[e->index()] != 0;
-}
-
-inline
-const ElementType *ContentState::lastEndedElementType() const
-{
- return lastEndedElementType_;
-}
-
-inline
-unsigned ContentState::tagLevel() const
-{
- return tagLevel_;
-}
-
-inline
-Boolean ContentState::afterDocumentElement() const
-{
- return tagLevel() == 0 && currentElement().isFinished();
-}
-
-inline
-Mode ContentState::contentMode() const
-{
- return openElements_.head()->mode(netEnablingCount_ > 0);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ContentState_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ContentToken.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ContentToken.h
deleted file mode 100644
index c31320e450..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ContentToken.h
+++ /dev/null
@@ -1,631 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ContentToken_INCLUDED
-#define ContentToken_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Owner.h"
-#include "Text.h"
-#include "Vector.h"
-#include "NCVector.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class LeafContentToken;
-
-struct SP_API Transition {
- enum { invalidIndex = -1 };
- // When performing this transition, reset all andState with index >= this.
- unsigned clearAndStateStartIndex;
- // This transition is possible only if all AND groups whose AND depth
- // is >= this (and contains the LeafContentToken that this transition is
- // from) have had all their non-nullable members matched.
- unsigned andDepth;
- // If this is 1, then this transition requires that the AND group
- // whose AND depth is andDepth - 1 have a non-nullable member unmatched,
- // and thus this transition is not ambiguous with a transition whose
- // AND depth is < andDepth.
- PackedBoolean isolated;
- // Index in andState that must be clear for this transition to be
- // allowed.
- unsigned requireClear;
- // Index in andState that is to be set after performing this transition.
- unsigned toSet;
-};
-
-class SP_API FirstSet {
-public:
- FirstSet();
- void init(LeafContentToken *);
- void append(const FirstSet &);
- size_t size() const;
- LeafContentToken *token(size_t i) const;
- size_t requiredIndex() const;
- void setNotRequired();
-private:
- Vector<LeafContentToken *> v_;
- // index of contextually required token or -1 if none
- size_t requiredIndex_;
-};
-
-class SP_API LastSet : public Vector<LeafContentToken *> {
-public:
- LastSet() { }
- LastSet(size_t n) : Vector<LeafContentToken *>(n) { }
- void append(const LastSet &);
-};
-
-class ElementType;
-class AndModelGroup;
-struct GroupInfo;
-
-struct SP_API ContentModelAmbiguity {
- const LeafContentToken *from;
- const LeafContentToken *to1;
- const LeafContentToken *to2;
- unsigned andDepth;
-};
-
-class ModelGroup;
-
-class SP_API ContentToken {
-public:
- enum OccurrenceIndicator { none = 0, opt = 01, plus = 02, rep = 03 };
- ContentToken(OccurrenceIndicator);
- virtual ~ContentToken();
- OccurrenceIndicator occurrenceIndicator() const;
- Boolean inherentlyOptional() const;
- static unsigned andDepth(const AndModelGroup *);
- static unsigned andIndex(const AndModelGroup *);
- void analyze(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &);
- static void addTransitions(const LastSet &from,
- const FirstSet &to,
- Boolean maybeRequired,
- unsigned andClearIndex,
- unsigned andDepth,
- Boolean isolated = 0,
- unsigned requireClear
- = (unsigned)Transition::invalidIndex,
- unsigned toSet
- = (unsigned)Transition::invalidIndex);
- virtual void finish(Vector<unsigned> &minAndDepth,
- Vector<size_t> &elementTransition,
- Vector<ContentModelAmbiguity> &,
- Boolean &pcdataUnreachable) = 0;
- virtual unsigned long grpgtcnt() const;
- virtual void setOrGroupMember();
- unsigned andGroupIndex() const;
- virtual const ModelGroup *asModelGroup() const;
- virtual const LeafContentToken *asLeafContentToken() const;
-protected:
- PackedBoolean inherentlyOptional_;
-private:
- ContentToken(const ContentToken &); // undefined
- void operator=(const ContentToken &); // undefined
- virtual void analyze1(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &) = 0;
- OccurrenceIndicator occurrenceIndicator_;
-};
-
-class SP_API ModelGroup : public ContentToken {
-public:
- enum Connector { andConnector, orConnector, seqConnector };
- ModelGroup(NCVector<Owner<ContentToken> > &, OccurrenceIndicator);
- virtual Connector connector() const = 0;
- unsigned nMembers() const;
- void finish(Vector<unsigned> &minAndDepth,
- Vector<size_t> &elementTransition,
- Vector<ContentModelAmbiguity> &,
- Boolean &pcdataUnreachable);
- ContentToken &member(unsigned i);
- const ContentToken &member(unsigned i) const;
- unsigned long grpgtcnt() const;
- const ModelGroup *asModelGroup() const;
-protected:
- void setOrGroup();
-private:
- ModelGroup(const ModelGroup &); // undefined
- void operator=(const ModelGroup &); // undefined
- NCVector<Owner<ContentToken> > members_;
-};
-
-class AndModelGroup : public ModelGroup {
-public:
- AndModelGroup(NCVector<Owner<ContentToken> > &, OccurrenceIndicator);
- Connector connector() const;
- unsigned andDepth() const;
- unsigned andIndex() const;
- unsigned andGroupIndex() const;
- const AndModelGroup *andAncestor() const;
-private:
- AndModelGroup(const AndModelGroup &); // undefined
- void operator=(const AndModelGroup &); // undefined
- unsigned andDepth_; // number of and groups that contain this
- unsigned andIndex_;
- unsigned andGroupIndex_;
- const AndModelGroup *andAncestor_;
- void analyze1(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &);
-};
-
-class OrModelGroup : public ModelGroup {
-public:
- OrModelGroup(NCVector<Owner<ContentToken> > &, OccurrenceIndicator);
- Connector connector() const;
-private:
- OrModelGroup(const OrModelGroup &); // undefined
- void operator=(const OrModelGroup &); // undefined
- void analyze1(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &);
-};
-
-class SeqModelGroup : public ModelGroup {
-public:
- SeqModelGroup(NCVector<Owner<ContentToken> > &, OccurrenceIndicator);
- Connector connector() const;
-private:
- SeqModelGroup(const SeqModelGroup &); // undefined
- void operator=(const SeqModelGroup &); // undefined
- void analyze1(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &);
-};
-
-class AndState;
-
-class SP_API AndInfo {
-public:
- AndInfo() { }
- const AndModelGroup *andAncestor;
- unsigned andGroupIndex;
- Vector<Transition> follow;
-private:
- AndInfo(const AndInfo &); // undefined
- void operator=(const AndInfo &); // undefined
-};
-
-// A LeafContentToken is not quite the same as a primitive content token.
-// A data tag group is a primitive content token but not a LeafContentToken.
-
-class SP_API LeafContentToken : public ContentToken {
-public:
- LeafContentToken(const ElementType *, OccurrenceIndicator);
- unsigned index() const;
- unsigned typeIndex() const;
- const ElementType *elementType() const;
- virtual Boolean isInitial() const;
- void addTransitions(const FirstSet &to,
- Boolean maybeRequired,
- unsigned andClearIndex,
- unsigned andDepth,
- Boolean isolated,
- unsigned requireClear,
- unsigned toSet);
- void setFinal();
- void finish(Vector<unsigned> &minAndDepth,
- Vector<size_t> &elementTransition,
- Vector<ContentModelAmbiguity> &,
- Boolean &pcdataUnreachable);
- Boolean isFinal() const;
- Boolean tryTransition(const ElementType *, AndState &,
- unsigned &minAndDepth,
- const LeafContentToken *&newpos) const;
- Boolean tryTransitionPcdata(AndState &, unsigned &minAndDepth,
- const LeafContentToken *&newpos) const;
- void possibleTransitions(const AndState &, unsigned minAndDepth, Vector<const ElementType *> &) const;
- const LeafContentToken *impliedStartTag(const AndState &andpos,
- unsigned minAndDepth) const;
- const LeafContentToken *transitionToken(const ElementType *to,
- const AndState &andState,
- unsigned minAndDepth) const;
- void doRequiredTransition(AndState &andState,
- unsigned &minAndDepth,
- const LeafContentToken *&newpos) const;
- unsigned computeMinAndDepth(const AndState&) const;
- Boolean orGroupMember() const;
- void setOrGroupMember();
- const AndModelGroup *andAncestor() const;
- unsigned andDepth() const;
- const LeafContentToken *asLeafContentToken() const;
-protected:
- void analyze1(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &);
- const ElementType *element_;
-private:
- LeafContentToken(const LeafContentToken &); // undefined
- void operator=(const LeafContentToken &); // undefined
- void andFinish(Vector<unsigned> &minAndDepth,
- Vector<size_t> &elementTransition,
- Vector<ContentModelAmbiguity> &,
- Boolean &pcdataUnreachable);
- unsigned computeMinAndDepth1(const AndState&) const;
- unsigned leafIndex_;
- unsigned typeIndex_;
- Vector<LeafContentToken *> follow_;
- PackedBoolean isFinal_;
- PackedBoolean orGroupMember_;
- // 0 none, 1 yes - simple, 2 - compled
- char pcdataTransitionType_;
- const LeafContentToken *simplePcdataTransition_;
- size_t requiredIndex_;
- Owner<AndInfo> andInfo_;
-};
-
-class PcdataToken : public LeafContentToken {
-public:
- PcdataToken();
- void analyze1(GroupInfo &, const AndModelGroup *, unsigned,
- FirstSet &, LastSet &);
-private:
- PcdataToken(const PcdataToken &); // undefined
- void operator=(const PcdataToken &); // undefined
-};
-
-class InitialPseudoToken : public LeafContentToken {
-public:
- InitialPseudoToken();
- Boolean isInitial() const;
-private:
- InitialPseudoToken(const InitialPseudoToken &); // undefined
- void operator=(const InitialPseudoToken &); // undefined
-};
-
-class ElementToken : public LeafContentToken {
-public:
- ElementToken(const ElementType *, OccurrenceIndicator);
-private:
- ElementToken(const ElementToken &); // undefined
- void operator=(const ElementToken &); // undefined
-};
-
-class DataTagGroup : public SeqModelGroup {
-public:
- // first content token is a DataTagElementToken, second is PcdataToken
- DataTagGroup(NCVector<Owner<ContentToken> > &, OccurrenceIndicator);
-private:
- DataTagGroup(const DataTagGroup &); // undefined
- void operator=(const DataTagGroup &); // undefined
-};
-
-class DataTagElementToken : public ElementToken {
-public:
- DataTagElementToken(const ElementType *, Vector<Text> &templates);
- DataTagElementToken(const ElementType *, Vector<Text> &templates,
- Text &paddingTemplate);
-private:
- DataTagElementToken(const DataTagElementToken &); // undefined
- void operator=(const DataTagElementToken &); // undefined
- Vector<Text> templates_;
- Boolean havePaddingTemplate_;
- Text paddingTemplate_;
-};
-
-class SP_API CompiledModelGroup {
-public:
- CompiledModelGroup(Owner<ModelGroup> &);
- void compile(size_t nElementTypeIndex,
- Vector<ContentModelAmbiguity> &,
- Boolean &pcdataUnreachable);
- CompiledModelGroup *copy() const;
- const LeafContentToken *initial() const;
- unsigned andStateSize() const;
- Boolean containsPcdata() const;
- const ModelGroup *modelGroup() const;
-private:
- CompiledModelGroup(const CompiledModelGroup &); // undefined
- void operator=(const CompiledModelGroup &); // undefined
- Owner<ModelGroup> modelGroup_;
- Owner<LeafContentToken> initial_;
- unsigned andStateSize_;
- Boolean containsPcdata_;
-};
-
-class SP_API AndState {
-public:
- AndState(unsigned);
- Boolean isClear(unsigned) const;
- void clearFrom(unsigned);
- void set(unsigned);
- Boolean operator==(const AndState &) const;
- Boolean operator!=(const AndState &) const;
-private:
- void clearFrom1(unsigned);
- unsigned clearFrom_;
- Vector<PackedBoolean> v_;
-};
-
-class SP_API MatchState {
-public:
- MatchState();
- MatchState(const CompiledModelGroup *); // may be 0
- Boolean tryTransition(const ElementType *);
- Boolean tryTransitionPcdata();
- void possibleTransitions(Vector<const ElementType *> &) const;
- Boolean isFinished() const;
- const LeafContentToken *impliedStartTag() const;
- const LeafContentToken *invalidExclusion(const ElementType *) const;
- void doRequiredTransition();
- const LeafContentToken *currentPosition() const;
- Boolean operator==(const MatchState &) const;
- Boolean operator!=(const MatchState &) const;
-private:
- const LeafContentToken *pos_;
- AndState andState_;
- unsigned minAndDepth_;
-};
-
-inline
-ContentToken::OccurrenceIndicator ContentToken::occurrenceIndicator() const
-{
- return occurrenceIndicator_;
-}
-
-inline
-unsigned LeafContentToken::index() const
-{
- return leafIndex_;
-}
-
-inline
-unsigned LeafContentToken::typeIndex() const
-{
- return typeIndex_;
-}
-
-inline
-Boolean ContentToken::inherentlyOptional() const
-{
- return inherentlyOptional_;
-}
-
-inline
-const ElementType *LeafContentToken::elementType() const
-{
- return element_;
-}
-
-inline
-unsigned AndModelGroup::andDepth() const
-{
- return andDepth_;
-}
-
-inline
-unsigned AndModelGroup::andIndex() const
-{
- return andIndex_;
-}
-
-inline
-unsigned ModelGroup::nMembers() const
-{
- return members_.size();
-}
-
-inline
-unsigned ContentToken::andDepth(const AndModelGroup *andAncestor)
-{
- return andAncestor ? andAncestor->andDepth() + 1 : 0;
-}
-
-inline
-unsigned ContentToken::andIndex(const AndModelGroup *andAncestor)
-{
- return (andAncestor
- ? andAncestor->andIndex() + andAncestor->nMembers()
- : 0);
-}
-
-inline
-ContentToken &ModelGroup::member(unsigned i)
-{
- return *members_[i];
-}
-
-inline
-const ContentToken &ModelGroup::member(unsigned i) const
-{
- return *members_[i];
-}
-
-inline
-void LeafContentToken::setFinal()
-{
- isFinal_ = 1;
-}
-
-inline
-Boolean LeafContentToken::isFinal() const
-{
- return isFinal_;
-}
-
-inline
-Boolean LeafContentToken::orGroupMember() const
-{
- return orGroupMember_;
-}
-
-inline
-unsigned CompiledModelGroup::andStateSize() const
-{
- return andStateSize_;
-}
-
-inline
-Boolean CompiledModelGroup::containsPcdata() const
-{
- return containsPcdata_;
-}
-
-inline
-const AndModelGroup *AndModelGroup::andAncestor() const
-{
- return andAncestor_;
-}
-
-inline
-unsigned AndModelGroup::andGroupIndex() const
-{
- return andGroupIndex_;
-}
-
-inline
-const LeafContentToken *CompiledModelGroup::initial() const
-{
- return initial_.pointer();
-}
-
-inline
-const ModelGroup *CompiledModelGroup::modelGroup() const
-{
- return modelGroup_.pointer();
-}
-
-inline
-const AndModelGroup *LeafContentToken::andAncestor() const
-{
- return andInfo_ ? andInfo_->andAncestor : 0;
-}
-
-inline
-unsigned LeafContentToken::andDepth() const
-{
- return andInfo_ ? ContentToken::andDepth(andInfo_->andAncestor) : 0;
-}
-
-inline
-unsigned LeafContentToken::computeMinAndDepth(const AndState &andState) const
-{
- return andInfo_ ? computeMinAndDepth1(andState) : 0;
-}
-
-inline
-Boolean LeafContentToken::tryTransitionPcdata(AndState &andState,
- unsigned &minAndDepth,
- const LeafContentToken *&newpos)
- const
-{
- if (pcdataTransitionType_ == 1) {
- newpos = simplePcdataTransition_;
- return 1;
- }
- else if (pcdataTransitionType_ == 0)
- return 0;
- else
- return tryTransition(0, andState, minAndDepth, newpos);
-}
-
-inline
-Boolean MatchState::tryTransition(const ElementType *to)
-{
- return pos_->tryTransition(to, andState_, minAndDepth_, pos_);
-}
-
-inline
-Boolean MatchState::tryTransitionPcdata()
-{
- return pos_->tryTransitionPcdata(andState_, minAndDepth_, pos_);
-}
-
-inline
-void MatchState::possibleTransitions(Vector<const ElementType *> &v) const
-{
- pos_->possibleTransitions(andState_, minAndDepth_, v);
-}
-
-inline
-Boolean MatchState::isFinished() const
-{
- return pos_->isFinal() && minAndDepth_ == 0;
-}
-
-inline
-const LeafContentToken *
-MatchState::impliedStartTag() const
-{
- return pos_->impliedStartTag(andState_, minAndDepth_);
-}
-
-inline
-void MatchState::doRequiredTransition()
-{
- pos_->doRequiredTransition(andState_, minAndDepth_, pos_);
-}
-
-inline
-const LeafContentToken *MatchState::currentPosition() const
-{
- return pos_;
-}
-
-inline
-Boolean MatchState::operator!=(const MatchState &state) const
-{
- return !(*this == state);
-}
-
-inline
-Boolean AndState::isClear(unsigned i) const
-{
- return v_[i] == 0;
-}
-
-inline
-void AndState::set(unsigned i)
-{
- v_[i] = 1;
- if (i >= clearFrom_)
- clearFrom_ = i + 1;
-}
-
-inline
-void AndState::clearFrom(unsigned i)
-{
- if (i < clearFrom_)
- clearFrom1(i);
-}
-
-inline
-Boolean AndState::operator!=(const AndState &state) const
-{
- return !(*this == state);
-}
-
-
-inline
-size_t FirstSet::size() const
-{
- return v_.size();
-}
-
-inline
-LeafContentToken *FirstSet::token(size_t i) const
-{
- return v_[i];
-}
-
-inline
-size_t FirstSet::requiredIndex() const
-{
- return requiredIndex_;
-}
-
-inline
-void FirstSet::setNotRequired()
-{
- requiredIndex_ = size_t(-1);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ContentToken_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.cxx
deleted file mode 100644
index 961cac31e3..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.cxx
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CopyOwner_DEF_INCLUDED
-#define CopyOwner_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-CopyOwner<T>::CopyOwner(const CopyOwner<T> &o)
-: Owner<T>(o.pointer() ? o.pointer()->copy() : 0)
-{
-}
-
-template<class T>
-void CopyOwner<T>::operator=(const CopyOwner<T> &o)
-{
- Owner<T>::operator=(o.pointer() ? o.pointer()->copy() : 0);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CopyOwner_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.h b/usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.h
deleted file mode 100644
index 9ed9f946d1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CopyOwner_INCLUDED
-#define CopyOwner_INCLUDED 1
-
-#include "Owner.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class CopyOwner : public Owner<T> {
-public:
- CopyOwner() { }
- CopyOwner(T *p) : Owner<T>(p) { }
- CopyOwner(const CopyOwner<T> &);
- void operator=(const CopyOwner<T> &o);
- void operator=(T *p) { Owner<T>::operator=(p); }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CopyOwner_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "CopyOwner.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/DescriptorManager.h b/usr/src/cmd/man/src/util/nsgmls.src/include/DescriptorManager.h
deleted file mode 100644
index a131a609c6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/DescriptorManager.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef DescriptorManager_INCLUDED
-#define DescriptorManager_INCLUDED 1
-
-#include "Boolean.h"
-#include "List.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class DescriptorManager;
-
-class SP_API DescriptorUser {
-public:
- DescriptorUser(DescriptorManager *);
- virtual ~DescriptorUser();
- virtual Boolean suspend();
- void managerDeleted();
- void acquireD();
- void releaseD();
- DescriptorManager *manager() const;
-private:
- DescriptorManager *manager_;
-};
-
-class SP_API DescriptorManager {
-public:
- DescriptorManager(int maxD);
- ~DescriptorManager();
- void acquireD();
- void releaseD();
- void addUser(DescriptorUser *);
- void removeUser(DescriptorUser *);
-private:
- DescriptorManager(const DescriptorManager &); // undefined
- void operator=(const DescriptorManager &); // undefined
-
- int usedD_;
- int maxD_;
- List<DescriptorUser *> users_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not DescriptorManager_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Dtd.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Dtd.h
deleted file mode 100644
index bf6f6a2067..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Dtd.h
+++ /dev/null
@@ -1,468 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Dtd_INCLUDED
-#define Dtd_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "NamedTable.h"
-#include "NamedResourceTable.h"
-#include "ElementType.h"
-#include "Notation.h"
-#include "Entity.h"
-#include "ShortReferenceMap.h"
-#include "Resource.h"
-#include "StringC.h"
-#include "StringResource.h"
-#include "Boolean.h"
-#include "Vector.h"
-#include "HashTable.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Syntax;
-class ParserState;
-
-class SP_API Dtd : public Resource {
-public:
- typedef NamedTableIter<ElementType> ElementTypeIter;
- typedef ConstNamedTableIter<ElementType> ConstElementTypeIter;
- typedef NamedTableIter<ShortReferenceMap> ShortReferenceMapIter;
- typedef ConstNamedResourceTableIter<Notation> ConstNotationIter;
- typedef NamedResourceTableIter<Notation> NotationIter;
- typedef ConstNamedResourceTableIter<Entity> ConstEntityIter;
- typedef NamedResourceTableIter<Entity> EntityIter;
- Dtd(const StringC &name, Boolean isBase);
- ConstPtr<Entity> lookupEntity(Boolean isParameter, const StringC &) const;
- const Entity *lookupEntityTemp(Boolean isParameter, const StringC &) const;
- Ptr<Entity> lookupEntity(Boolean isParameter, const StringC &);
- Ptr<Entity> insertEntity(const Ptr<Entity> &, Boolean replace = 0);
- Ptr<Entity> removeEntity(Boolean isParameter, const StringC &);
- ConstEntityIter generalEntityIter() const;
- EntityIter generalEntityIter();
- ConstEntityIter parameterEntityIter() const;
- EntityIter parameterEntityIter();
-
- ConstPtr<Entity> defaultEntity() const;
- const Entity *defaultEntityTemp() const;
- void setDefaultEntity(const Ptr<Entity> &, ParserState &);
- const ConstPtr<StringResource<Char> > &namePointer() const;
- const StringC &name() const;
-
- const ElementType *lookupElementType(const StringC &) const;
- ElementType *lookupElementType(const StringC &);
- ElementType *removeElementType(const StringC &);
- ElementType *insertElementType(ElementType *);
- ElementType *insertUndefinedElementType(ElementType *);
- size_t nElementTypeIndex() const;
- size_t allocElementTypeIndex();
- ConstElementTypeIter elementTypeIter() const;
- ElementTypeIter elementTypeIter();
-
- const RankStem *lookupRankStem(const StringC &) const;
- RankStem *lookupRankStem(const StringC &);
- RankStem *insertRankStem(RankStem *);
- size_t nRankStem() const;
-
- const ShortReferenceMap *lookupShortReferenceMap(const StringC &) const;
- ShortReferenceMap *lookupShortReferenceMap(const StringC &);
- ShortReferenceMap *insertShortReferenceMap(ShortReferenceMap *);
- ShortReferenceMapIter shortReferenceMapIter();
-
- Boolean shortrefIndex(const StringC &, const Syntax &, size_t &index);
- size_t nShortref() const;
- const StringC &shortref(size_t i) const;
- void addNeededShortref(const StringC &);
-
- ConstPtr<Notation> lookupNotation(const StringC &) const;
- const Notation *lookupNotationTemp(const StringC &) const;
- Ptr<Notation> lookupNotation(const StringC &);
- Ptr<Notation> insertNotation(const Ptr<Notation> &);
- Ptr<Notation> removeNotation(const StringC &);
- ConstNotationIter notationIter() const;
- NotationIter notationIter();
-
- size_t allocCurrentAttributeIndex();
- size_t nCurrentAttribute() const;
- size_t allocElementDefinitionIndex();
- size_t nElementDefinition() const;
- size_t allocAttributeDefinitionListIndex();
- size_t nAttributeDefinitionList() const;
- const ElementType *documentElementType() const;
- Boolean isBase() const;
-
- Ptr<AttributeDefinitionList> &implicitElementAttributeDef();
- void setImplicitElementAttributeDef(const Ptr<AttributeDefinitionList> &);
- Ptr<AttributeDefinitionList> &implicitNotationAttributeDef();
- void setImplicitNotationAttributeDef(const Ptr<AttributeDefinitionList> &);
-private:
- Dtd(const Dtd &); // undefined
- void operator=(const Dtd &); // undefined
- NamedResourceTable<Entity> generalEntityTable_;
- NamedResourceTable<Entity> parameterEntityTable_;
- ConstPtr<Entity> defaultEntity_;
- ConstPtr<StringResource<Char> > name_;
- NamedTable<ElementType> elementTypeTable_;
- NamedTable<ElementType> undefinedElementTypeTable_;
- NamedTable<RankStem> rankStemTable_;
- NamedTable<ShortReferenceMap> shortReferenceMapTable_;
- NamedResourceTable<Notation> notationTable_;
- size_t nCurrentAttribute_;
- size_t nElementDefinition_;
- size_t nAttributeDefinitionList_;
- size_t nElementType_;
- ElementType *documentElementType_;
- Vector<StringC> shortrefs_;
- HashTable<StringC,int> shortrefTable_;
- Boolean isBase_;
- Ptr<AttributeDefinitionList> implicitElementAttributeDef_;
- Ptr<AttributeDefinitionList> implicitNotationAttributeDef_;
-};
-
-inline
-ConstPtr<Entity> Dtd::lookupEntity(Boolean isParameter, const StringC &name)
- const
-{
- return (isParameter
- ? &parameterEntityTable_
- : &generalEntityTable_)->lookupConst(name);
-}
-
-inline
-const Entity *Dtd::lookupEntityTemp(Boolean isParameter, const StringC &name)
- const
-{
- return (isParameter
- ? &parameterEntityTable_
- : &generalEntityTable_)->lookupTemp(name);
-}
-
-inline
-Ptr<Entity> Dtd::lookupEntity(Boolean isParameter, const StringC &name)
-{
- return (isParameter
- ? &parameterEntityTable_
- : &generalEntityTable_)->lookup(name);
-}
-
-inline
-Ptr<Entity>
-Dtd::insertEntity(const Ptr<Entity> &entity, Boolean replace)
-{
- return (entity->declType() == Entity::parameterEntity
- ? &parameterEntityTable_
- : &generalEntityTable_)->insert(entity, replace);
-}
-
-inline
-Ptr<Entity> Dtd::removeEntity(Boolean isParameter, const StringC &name)
-{
- return (isParameter
- ? &parameterEntityTable_
- : &generalEntityTable_)->remove(name);
-}
-
-inline
-Dtd::ConstEntityIter Dtd::generalEntityIter() const
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return ConstNamedResourceTableIter<Entity>(generalEntityTable_);
-}
-
-inline
-Dtd::EntityIter Dtd::generalEntityIter()
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return NamedResourceTableIter<Entity>(generalEntityTable_);
-}
-
-inline
-Dtd::ConstEntityIter Dtd::parameterEntityIter() const
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return ConstNamedResourceTableIter<Entity>(parameterEntityTable_);
-}
-
-inline
-Dtd::EntityIter Dtd::parameterEntityIter()
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return NamedResourceTableIter<Entity>(parameterEntityTable_);
-}
-
-inline
-ConstPtr<Entity> Dtd::defaultEntity() const
-{
- return defaultEntity_;
-}
-
-inline
-const Entity *Dtd::defaultEntityTemp() const
-{
- return defaultEntity_.pointer();
-}
-
-inline
-const ConstPtr<StringResource<Char> > &Dtd::namePointer() const
-{
- return name_;
-}
-
-inline
-const StringC &Dtd::name() const
-{
- return *name_;
-}
-
-inline
-size_t Dtd::allocCurrentAttributeIndex()
-{
- return nCurrentAttribute_++;
-}
-
-inline
-size_t Dtd::nCurrentAttribute() const
-{
- return nCurrentAttribute_;
-}
-
-inline
-size_t Dtd::allocElementDefinitionIndex()
-{
- return nElementDefinition_++;
-}
-
-inline
-size_t Dtd::nElementDefinition() const
-{
- return nElementDefinition_;
-}
-
-inline
-size_t Dtd::allocAttributeDefinitionListIndex()
-{
- return nAttributeDefinitionList_++;
-}
-
-inline
-size_t Dtd::nAttributeDefinitionList() const
-{
- return nAttributeDefinitionList_;
-}
-
-inline
-const ElementType *Dtd::lookupElementType(const StringC &name) const
-{
- const ElementType *e = elementTypeTable_.lookup(name);
- if (e)
- return e;
- else
- return undefinedElementTypeTable_.lookup(name);
-}
-
-inline
-ElementType *Dtd::lookupElementType(const StringC &name)
-{
- ElementType *e = elementTypeTable_.lookup(name);
- if (e)
- return e;
- else
- return undefinedElementTypeTable_.lookup(name);
-}
-
-inline
-ElementType *Dtd::insertElementType(ElementType *e)
-{
- return elementTypeTable_.insert(e);
-}
-
-inline
-ElementType *Dtd::insertUndefinedElementType(ElementType *e)
-{
- return undefinedElementTypeTable_.insert(e);
-}
-
-inline
-Dtd::ElementTypeIter Dtd::elementTypeIter()
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return NamedTableIter<ElementType>(elementTypeTable_);
-}
-
-inline
-Dtd::ConstElementTypeIter Dtd::elementTypeIter() const
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return ConstNamedTableIter<ElementType>(elementTypeTable_);
-}
-
-inline
-ElementType *Dtd::removeElementType(const StringC &name)
-{
- return elementTypeTable_.remove(name);
-}
-
-inline
-size_t Dtd::nElementTypeIndex() const
-{
- // index 0 is reserved for #pcdata
- return 1 + nElementType_;
-}
-
-inline
-size_t Dtd::allocElementTypeIndex()
-{
- return 1 + nElementType_++;
-}
-
-inline
-const RankStem *Dtd::lookupRankStem(const StringC &name) const
-{
- return rankStemTable_.lookup(name);
-}
-
-inline
-RankStem *Dtd::lookupRankStem(const StringC &name)
-{
- return rankStemTable_.lookup(name);
-}
-
-inline
-RankStem *Dtd::insertRankStem(RankStem *e)
-{
- return rankStemTable_.insert(e);
-}
-
-inline
-size_t Dtd::nRankStem() const
-{
- return rankStemTable_.count();
-}
-
-inline
-ConstPtr<Notation> Dtd::lookupNotation(const StringC &name) const
-{
- return notationTable_.lookupConst(name);
-}
-
-inline
-const Notation *Dtd::lookupNotationTemp(const StringC &name) const
-{
- return notationTable_.lookupTemp(name);
-}
-
-inline
-Ptr<Notation> Dtd::lookupNotation(const StringC &name)
-{
- return notationTable_.lookup(name);
-}
-
-inline
-Ptr<Notation> Dtd::insertNotation(const Ptr<Notation> &nt)
-{
- return notationTable_.insert(nt);
-}
-
-inline
-Dtd::ConstNotationIter Dtd::notationIter() const
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return ConstNamedResourceTableIter<Notation>(notationTable_);
-}
-
-inline
-Dtd::NotationIter Dtd::notationIter()
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return NamedResourceTableIter<Notation>(notationTable_);
-}
-
-inline
-Ptr<Notation> Dtd::removeNotation(const StringC &name)
-{
- return notationTable_.remove(name);
-}
-
-inline
-const ElementType *Dtd::documentElementType() const
-{
- return documentElementType_;
-}
-
-inline
-const ShortReferenceMap *Dtd::lookupShortReferenceMap(const StringC &name) const
-{
- return shortReferenceMapTable_.lookup(name);
-}
-
-inline
-ShortReferenceMap *Dtd::lookupShortReferenceMap(const StringC &name)
-{
- return shortReferenceMapTable_.lookup(name);
-}
-
-inline
-ShortReferenceMap *Dtd::insertShortReferenceMap(ShortReferenceMap *map)
-{
- return shortReferenceMapTable_.insert(map);
-}
-
-inline
-Dtd::ShortReferenceMapIter Dtd::shortReferenceMapIter()
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return NamedTableIter<ShortReferenceMap>(shortReferenceMapTable_);
-}
-
-inline
-Boolean Dtd::isBase() const
-{
- return isBase_;
-}
-
-inline
-size_t Dtd::nShortref() const
-{
- return shortrefs_.size();
-}
-
-inline
-const StringC &Dtd::shortref(size_t i) const
-{
- return shortrefs_[i];
-}
-
-inline
-Ptr<AttributeDefinitionList> &Dtd::implicitElementAttributeDef()
-{
- return implicitElementAttributeDef_;
-}
-
-inline
-void Dtd::setImplicitElementAttributeDef(const Ptr<AttributeDefinitionList> &def)
-{
- implicitElementAttributeDef_ = def;
-}
-
-inline
-Ptr<AttributeDefinitionList> &Dtd::implicitNotationAttributeDef()
-{
- return implicitNotationAttributeDef_;
-}
-
-inline
-void Dtd::setImplicitNotationAttributeDef(const Ptr<AttributeDefinitionList> &def)
-{
- implicitNotationAttributeDef_ = def;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Dtd_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/EUCJPCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/EUCJPCodingSystem.h
deleted file mode 100644
index 9e40f245a7..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/EUCJPCodingSystem.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EUCJPCodingSystem_INCLUDED
-#define EUCJPCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API EUCJPCodingSystem : public CodingSystem {
-public:
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EUCJPCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ElementType.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ElementType.h
deleted file mode 100644
index 1d94597e5a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ElementType.h
+++ /dev/null
@@ -1,303 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ElementType_INCLUDED
-#define ElementType_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include "Boolean.h"
-#include "Vector.h"
-#include "Owner.h"
-#include "Location.h"
-#include "Ptr.h"
-#include "Named.h"
-#include "Vector.h"
-#include "Attributed.h"
-#include "Mode.h"
-#include "ContentToken.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ElementType;
-class ShortReferenceMap;
-class RankStem;
-
-class SP_API ElementDefinition : public Resource {
-public:
- enum DeclaredContent { modelGroup, any, cdata, rcdata, empty };
- enum OmitFlags { omitStart = 01, omitEnd = 02, omitSpec = 04 };
- enum { undefinedIndex = -1 };
- ElementDefinition(const Location &location,
- size_t index,
- unsigned char omitFlags,
- DeclaredContent declaredContent);
- ElementDefinition(const Location &location,
- size_t index,
- unsigned char omitFlags,
- DeclaredContent declaredContent,
- Owner<CompiledModelGroup> &modelGroup);
- const CompiledModelGroup *compiledModelGroup() const;
- DeclaredContent declaredContent() const;
- // Was the omitted tag minimization specified?
- Boolean omittedTagSpec() const;
- Boolean canOmitStartTag() const;
- Boolean canOmitEndTag() const;
- size_t nRankStems() const;
- const RankStem *rankStem(size_t i) const;
- const StringC &rankSuffix() const;
- size_t nInclusions() const;
- const ElementType *inclusion(size_t) const;
- size_t nExclusions() const;
- const ElementType *exclusion(size_t) const;
- Boolean undefined() const;
- void setInclusions(Vector<const ElementType *> &inclusions);
- void setExclusions(Vector<const ElementType *> &exclusions);
- void setRank(StringC &suffix, Vector<const RankStem *> &rankStems);
- Mode mode(Boolean netEnabled) const;
- const Location &location() const;
-private:
- ElementDefinition(const ElementDefinition &); // undefined
- void operator=(const ElementDefinition &); // undefined
- void computeMode();
-
- Location location_;
- size_t index_;
- unsigned char omitFlags_;
- DeclaredContent declaredContent_;
- Owner<CompiledModelGroup> modelGroup_;
- Vector<const ElementType *> inclusions_;
- Vector<const ElementType *> exclusions_;
- // rankStems_ contains all the rank stems in the ranked group in this
- // definition.
- Vector<const RankStem *> rankStems_;
- StringC rankSuffix_;
- Mode mode_;
- Mode netMode_;
-};
-
-class SP_API RankStem : public Named {
-public:
- RankStem(const StringC &, size_t);
- size_t index() const;
- void addDefinition(const ConstPtr<ElementDefinition> &);
- size_t nDefinitions() const;
- const ElementDefinition *definition(size_t) const;
-private:
- RankStem(const RankStem &); // undefined
- void operator=(const RankStem &); // undefined
- size_t index_;
- Vector<ConstPtr<ElementDefinition> > def_;
-};
-
-class SP_API ElementType : public Named, public Attributed {
-public:
- ElementType(const StringC &, size_t);
- void setElementDefinition(const ConstPtr<ElementDefinition> &,
- size_t defIndex);
- void setMap(const ShortReferenceMap *);
- void setRankStem(RankStem *);
- Boolean undefined() const;
- const ElementDefinition *definition() const;
- Boolean isRankedElement() const;
- const RankStem *rankedElementRankStem() const;
- size_t index() const;
- const ShortReferenceMap *map() const;
- void swap(ElementType &);
-private:
- ElementType(const ElementType &); // undefined
- void operator=(const ElementType &); // undefined
- size_t index_;
- size_t defIndex_; // index in the group having same definition
- ConstPtr<ElementDefinition> def_;
- const ShortReferenceMap *map_;
-};
-
-inline
-const CompiledModelGroup *ElementDefinition::compiledModelGroup() const
-{
- return modelGroup_.pointer();
-}
-
-inline
-ElementDefinition::DeclaredContent ElementDefinition::declaredContent() const
-{
- return declaredContent_;
-}
-
-inline
-Boolean ElementDefinition::canOmitStartTag() const
-{
- return (omitFlags_ & omitStart) != 0;
-}
-
-inline
-Boolean ElementDefinition::canOmitEndTag() const
-{
- return (omitFlags_ & omitEnd) != 0;
-}
-
-inline
-Boolean ElementDefinition::omittedTagSpec() const
-{
- return (omitFlags_ & omitSpec) != 0;
-}
-
-inline
-size_t ElementDefinition::nRankStems() const
-{
- return rankStems_.size();
-}
-
-inline
-const StringC &ElementDefinition::rankSuffix() const
-{
- return rankSuffix_;
-}
-
-inline
-const RankStem *ElementDefinition::rankStem(size_t i) const
-{
- return rankStems_[i];
-}
-
-inline
-const ElementType *ElementDefinition::inclusion(size_t i) const
-{
- return inclusions_[i];
-}
-
-inline
-size_t ElementDefinition::nInclusions() const
-{
- return inclusions_.size();
-}
-
-inline
-const ElementType *ElementDefinition::exclusion(size_t i) const
-{
- return exclusions_[i];
-}
-
-inline
-size_t ElementDefinition::nExclusions() const
-{
- return exclusions_.size();
-}
-
-inline
-Boolean ElementDefinition::undefined() const
-{
- return index_ == size_t(undefinedIndex);
-}
-
-inline
-const Location &ElementDefinition::location() const
-{
- return location_;
-}
-
-inline
-void ElementDefinition::setInclusions(Vector<const ElementType *> &inclusions)
-{
- inclusions.swap(inclusions_);
-}
-
-inline
-void ElementDefinition::setExclusions(Vector<const ElementType *> &exclusions)
-{
- exclusions.swap(exclusions_);
-}
-
-inline
-void ElementDefinition::setRank(StringC &rankSuffix,
- Vector<const RankStem *> &rankStems)
-{
- rankStems.swap(rankStems_);
- rankSuffix.swap(rankSuffix_);
-}
-
-inline
-Boolean ElementType::undefined() const
-{
- return def_->undefined();
-}
-
-inline
-Boolean ElementType::isRankedElement() const
-{
- return def_->nRankStems() > 0;
-}
-
-inline
-const ElementDefinition *ElementType::definition() const
-{
- return def_.pointer();
-}
-
-inline
-void ElementType::setElementDefinition(const ConstPtr<ElementDefinition> &def,
- size_t defIndex)
-{
- def_ = def;
- defIndex_ = defIndex;
-}
-
-inline
-size_t ElementType::index() const
-{
- return index_;
-}
-
-inline
-const RankStem *ElementType::rankedElementRankStem() const
-{
- return def_->rankStem(defIndex_);
-}
-
-inline
-void ElementType::setMap(const ShortReferenceMap *map)
-{
- map_ = map;
-}
-
-inline
-const ShortReferenceMap *ElementType::map() const
-{
- return map_;
-}
-
-inline
-size_t RankStem::index() const
-{
- return index_;
-}
-
-inline
-size_t RankStem::nDefinitions() const
-{
- return def_.size();
-}
-
-inline
-const ElementDefinition *RankStem::definition(size_t i) const
-{
- return def_[i].pointer();
-}
-
-inline
-Mode ElementDefinition::mode(Boolean netEnabled) const
-{
- return netEnabled ? netMode_ : mode_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ElementType_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Entity.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Entity.h
deleted file mode 100644
index 858443b498..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Entity.h
+++ /dev/null
@@ -1,337 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Entity_INCLUDED
-#define Entity_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "StringC.h"
-#include "NamedResource.h"
-#include "Location.h"
-#include "Owner.h"
-#include "Attribute.h"
-#include "ExternalId.h"
-#include "Text.h"
-#include "SubstTable.h"
-#include "StringResource.h"
-#include "Allocator.h"
-#include "EntityDecl.h"
-#include "Markup.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class InputSource;
-class EntityOrigin;
-class ParserState;
-class ExternalEntity;
-class ExternalDataEntity;
-class SubdocEntity;
-class InternalEntity;
-class Notation;
-
-class Entity : public EntityDecl {
-public:
- Entity(const StringC &name, DeclType declType, DataType dataType,
- const Location &defLocation);
- // reference in a literal
- virtual void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean squeezeSpaces)
- const;
- // reference in a declaration
- virtual void declReference(ParserState &,
- const Ptr<EntityOrigin> &)
- const;
- // reference in a declaration subset
- virtual void dsReference(ParserState &,
- const Ptr<EntityOrigin> &)
- const;
- // reference in content
- virtual void contentReference(ParserState &,
- const Ptr<EntityOrigin> &)
- const;
- // reference in rcdata
- virtual void rcdataReference(ParserState &,
- const Ptr<EntityOrigin> &)
- const;
- // for entity name attribute checking
- virtual Boolean isDataOrSubdoc() const;
- // for determining whether we need to validate as character data
- virtual Boolean isCharacterData() const;
- virtual const ExternalDataEntity *asExternalDataEntity() const;
- virtual const SubdocEntity *asSubdocEntity() const;
- virtual const InternalEntity *asInternalEntity() const;
- virtual const ExternalEntity *asExternalEntity() const;
- // needed for default entity
- virtual Entity *copy() const = 0;
- virtual void generateSystemId(ParserState &);
- void setUsed();
- Boolean used() const;
- void setDefaulted();
- Boolean defaulted() const;
-protected:
- static void checkEntlvl(ParserState &);
- Boolean checkNotOpen(ParserState &) const;
-private:
- virtual void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean generateEvent) const = 0;
- PackedBoolean used_;
- PackedBoolean defaulted_;
-};
-
-class InternalEntity : public Entity {
-public:
- InternalEntity(const StringC &, DeclType declType, DataType dataType,
- const Location &, Text &);
- const StringC &string() const;
- const Text &text() const;
- const InternalEntity *asInternalEntity() const;
-protected:
- Text text_;
-};
-
-class PiEntity : public InternalEntity {
-public:
- PiEntity(const StringC &, DeclType, const Location &, Text &);
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void declReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
- void rcdataReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
- Entity *copy() const;
-};
-
-class InternalDataEntity : public InternalEntity {
-public:
- InternalDataEntity(const StringC &, DataType, const Location &, Text &);
- void declReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
- Boolean isDataOrSubdoc() const;
-};
-
-class InternalCdataEntity : public InternalDataEntity {
-public:
- InternalCdataEntity(const StringC &, const Location &, Text &);
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- Entity *copy() const;
- Boolean isCharacterData() const;
-};
-
-class InternalSdataEntity : public InternalDataEntity {
-public:
- InternalSdataEntity(const StringC &, const Location &, Text &);
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- Entity *copy() const;
- Boolean isCharacterData() const;
-};
-
-class InternalTextEntity : public InternalEntity {
-public:
- enum Bracketed {
- none,
- starttag,
- endtag,
- ms,
- md
- };
- InternalTextEntity(const StringC &, DeclType, const Location &, Text &,
- Bracketed);
- Entity *copy() const;
-private:
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- Bracketed bracketed_;
-};
-
-class ExternalEntity : public Entity {
-public:
- ExternalEntity(const StringC &, DeclType, DataType, const Location &,
- const ExternalId &);
- const ExternalId &externalId() const;
- const ExternalEntity *asExternalEntity() const;
- void generateSystemId(ParserState &);
- const StringC *systemIdPointer() const;
- const StringC *effectiveSystemIdPointer() const;
- const StringC *publicIdPointer() const;
-private:
- ExternalId externalId_;
-};
-
-class ExternalTextEntity : public ExternalEntity {
-public:
- ExternalTextEntity(const StringC &, DeclType, const Location &,
- const ExternalId &);
- Entity *copy() const;
-private:
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
-};
-
-class ExternalNonTextEntity : public ExternalEntity {
-public:
- ExternalNonTextEntity(const StringC &, DataType,
- const Location &, const ExternalId &);
- Boolean isDataOrSubdoc() const;
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- void rcdataReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean) const;
- Boolean isCharacterData() const;
-};
-
-class ExternalDataEntity : public ExternalNonTextEntity {
-public:
- ExternalDataEntity(const StringC &, DataType, const Location &,
- const ExternalId &, const ConstPtr<Notation> &,
- AttributeList &);
- const AttributeList &attributes() const;
- const Notation *notation() const;
- const ExternalDataEntity *asExternalDataEntity() const;
- Entity *copy() const;
- void contentReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
- void setNotation(const ConstPtr<Notation> &, AttributeList &);
-private:
- ConstPtr<Notation> notation_;
- AttributeList attributes_;
-};
-
-class SubdocEntity : public ExternalNonTextEntity {
-public:
- SubdocEntity(const StringC &, const Location &, const ExternalId &);
- const SubdocEntity *asSubdocEntity() const;
- Entity *copy() const;
- void contentReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
-private:
-};
-
-class IgnoredEntity : public Entity {
-public:
- IgnoredEntity(const StringC &, DeclType declType);
- Entity *copy() const;
- void litReference(Text &, ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean squeezeSpaces) const;
- void declReference(ParserState &,
- const Ptr<EntityOrigin> &) const;
-private:
- void normalReference(ParserState &,
- const Ptr<EntityOrigin> &,
- Boolean generateEvent) const;
-};
-
-class SP_API EntityOrigin : public InputSourceOrigin {
-public:
- static EntityOrigin *make(Allocator &, const ConstPtr<Entity> &);
- static EntityOrigin *make(Allocator &,
- const ConstPtr<Entity> &,
- const Location &refLocation);
- static EntityOrigin *make(Allocator &,
- const ConstPtr<Entity> &,
- const Location &refLocation,
- Index refLength,
- Owner<Markup> &markup);
- static EntityOrigin *make(const ConstPtr<Entity> &,
- const Location &refLocation,
- Index refLength,
- Owner<Markup> &markup);
- static EntityOrigin *make(const ConstPtr<Entity> &,
- const Location &refLocation);
- static const size_t allocSize;
-};
-
-inline
-Boolean Entity::used() const
-{
- return used_;
-}
-
-inline
-void Entity::setUsed()
-{
- used_ = 1;
-}
-
-inline
-Boolean Entity::defaulted() const
-{
- return defaulted_;
-}
-
-inline
-void Entity::setDefaulted()
-{
- defaulted_ = 1;
-}
-
-inline
-const StringC &InternalEntity::string() const
-{
- return text_.string();
-}
-
-inline
-const Text &InternalEntity::text() const
-{
- return text_;
-}
-
-inline
-const ExternalId &ExternalEntity::externalId() const
-{
- return externalId_;
-}
-
-inline
-const AttributeList &ExternalDataEntity::attributes() const
-{
- return attributes_;
-}
-
-inline
-const Notation *ExternalDataEntity::notation() const
-{
- return notation_.pointer();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Entity_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityApp.h b/usr/src/cmd/man/src/util/nsgmls.src/include/EntityApp.h
deleted file mode 100644
index ffc33fde0c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityApp.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EntityApp_INCLUDED
-#define EntityApp_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "CmdLineApp.h"
-#include "CharsetInfo.h"
-#include "Boolean.h"
-#include "ExtendEntityManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API EntityApp : public CmdLineApp {
-public:
- EntityApp(const char *requiredInternalCode = 0);
- void processOption(AppChar opt, const AppChar *arg);
- virtual int processSysid(const StringC &) = 0;
- int processArguments(int argc, AppChar **files);
- Boolean makeSystemId(int nFiles, AppChar *const *files, StringC &result);
- Ptr<ExtendEntityManager> &entityManager();
-protected:
- void clearEntityManager();
-private:
- Vector<const AppChar *> searchDirs_;
- Vector<const AppChar *> catalogSysids_;
- Boolean mapCatalogDocument_;
- Ptr<ExtendEntityManager> entityManager_;
-};
-
-inline
-void EntityApp::clearEntityManager()
-{
- resetCodingSystemKit();
- entityManager_.clear();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EntityApp_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityCatalog.h b/usr/src/cmd/man/src/util/nsgmls.src/include/EntityCatalog.h
deleted file mode 100644
index 54522bd415..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityCatalog.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef EntityCatalog_INCLUDED
-#define EntityCatalog_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "StringC.h"
-#include "Resource.h"
-#include "SubstTable.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class CharsetInfo;
-class EntityDecl;
-
-class SP_API EntityCatalog : public Resource {
-public:
- class SP_API Syntax {
- public:
- virtual Boolean namecaseGeneral() const = 0;
- virtual Boolean namecaseEntity() const = 0;
- virtual const SubstTable<Char> &upperSubstTable() const = 0;
- virtual const StringC &peroDelim() const = 0;
- };
- virtual ~EntityCatalog();
- virtual Boolean sgmlDecl(const CharsetInfo &,
- Messenger &,
- StringC &) const;
- virtual Boolean lookup(const EntityDecl &,
- const Syntax &,
- const CharsetInfo &,
- Messenger &,
- StringC &) const;
- virtual Boolean lookupPublic(const StringC &,
- const CharsetInfo &,
- Messenger &,
- StringC &) const;
- // This is for a character described by a minimum literal
- // in the SGML declaration.
- virtual Boolean lookupChar(const StringC &,
- const CharsetInfo &,
- Messenger &,
- UnivChar &) const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EntityCatalog_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityDecl.h b/usr/src/cmd/man/src/util/nsgmls.src/include/EntityDecl.h
deleted file mode 100644
index 40c036a97b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityDecl.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EntityDecl_INCLUDED
-#define EntityDecl_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "NamedResource.h"
-#include "Ptr.h"
-#include "StringResource.h"
-#include "Location.h"
-#include "types.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API EntityDecl : public NamedResource {
-public:
- enum DeclType { generalEntity, parameterEntity, doctype, linktype,
- notation, sgml };
- enum DataType { sgmlText, pi, cdata, sdata, ndata, subdoc };
- EntityDecl(const StringC &, DeclType declType, DataType dataType,
- const Location &defLocation);
- DataType dataType() const;
- DeclType declType() const;
- const Location &defLocation() const;
- Boolean declInDtdIsBase() const;
- Boolean declInActiveLpd() const;
- const StringC *declInDtdNamePointer() const;
- const StringC *declInLpdNamePointer() const;
- void setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
- Boolean dtdIsBase,
- const ConstPtr<StringResource<Char> > &lpdName,
- Boolean lpdIsActive);
- void setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
- Boolean dtdIsBase);
- void setDefLocation(const Location &);
- virtual const StringC *systemIdPointer() const;
- virtual const StringC *publicIdPointer() const;
- virtual const StringC *effectiveSystemIdPointer() const;
-private:
- DeclType declType_;
- DataType dataType_;
- PackedBoolean dtdIsBase_;
- PackedBoolean lpdIsActive_;
- Location defLocation_;
- ConstPtr<StringResource<Char> > dtdName_;
- ConstPtr<StringResource<Char> > lpdName_;
-};
-
-inline
-const Location &EntityDecl::defLocation() const
-{
- return defLocation_;
-}
-
-inline
-EntityDecl::DeclType EntityDecl::declType() const
-{
- return declType_;
-}
-
-inline
-EntityDecl::DataType EntityDecl::dataType() const
-{
- return dataType_;
-}
-
-inline
-const StringC *EntityDecl::declInDtdNamePointer() const
-{
- return dtdName_.pointer();
-}
-
-inline
-const StringC *EntityDecl::declInLpdNamePointer() const
-{
- return lpdName_.pointer();
-}
-
-inline
-Boolean EntityDecl::declInDtdIsBase() const
-{
- return dtdIsBase_;
-}
-
-inline
-Boolean EntityDecl::declInActiveLpd() const
-{
- return lpdIsActive_;
-}
-
-inline
-void EntityDecl::setDefLocation(const Location &loc)
-{
- defLocation_ = loc;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EntityDecl_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityManager.h b/usr/src/cmd/man/src/util/nsgmls.src/include/EntityManager.h
deleted file mode 100644
index c296b1ca85..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/EntityManager.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EntityManager_INCLUDED
-#define EntityManager_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "StringC.h"
-#include "Resource.h"
-#include "EntityCatalog.h"
-#include "Ptr.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class InputSourceOrigin;
-class CharsetInfo;
-class InputSource;
-
-class SP_API EntityManager : public Resource {
-public:
- enum { mayRewind = 01, maySetDocCharset = 02 };
- virtual ~EntityManager();
- virtual Boolean internalCharsetIsDocCharset() const = 0;
- virtual const CharsetInfo &charset() const = 0;
- virtual InputSource *open(const StringC &sysid,
- const CharsetInfo &docCharset,
- InputSourceOrigin *,
- unsigned flags,
- Messenger &) = 0;
- // Make a catalog for a document or subdocument with specified
- // system identifier.
- // The catalog can cause the system identifier to be replaced.
- virtual ConstPtr<EntityCatalog>
- makeCatalog(StringC &systemId, const CharsetInfo &, Messenger &) = 0;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EntityManager_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ErrnoMessageArg.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ErrnoMessageArg.h
deleted file mode 100644
index 5d2c1e25d1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ErrnoMessageArg.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ErrnoMessageArg_INCLUDED
-#define ErrnoMessageArg_INCLUDED 1
-
-#include "MessageArg.h"
-#include "rtti.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ErrnoMessageArg : public OtherMessageArg {
- RTTI_CLASS
-public:
- ErrnoMessageArg(int errnum) : errno_(errnum) { }
- MessageArg *copy() const;
- // errno might be a macro so we must use a different name
- int errnum() const;
-private:
- int errno_;
-};
-
-inline
-int ErrnoMessageArg::errnum() const
-{
- return errno_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ErrnoMessageArg_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ErrorCountEventHandler.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ErrorCountEventHandler.h
deleted file mode 100644
index e179c16418..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ErrorCountEventHandler.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ErrorCountEventHandler_INCLUDED
-#define ErrorCountEventHandler_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <signal.h>
-#include "Event.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ErrorCountEventHandler : public EventHandler {
-public:
- ErrorCountEventHandler(unsigned errorLimit = 0);
- void setErrorLimit(unsigned maxErrors);
- const sig_atomic_t *cancelPtr() const;
- void cancel();
- Boolean cancelled() const;
- unsigned errorCount() const;
- void message(MessageEvent *);
- void noteMessage(const Message &);
-private:
- unsigned maxErrors_;
- unsigned errorCount_;
- sig_atomic_t cancel_;
-};
-
-inline
-unsigned ErrorCountEventHandler::errorCount() const
-{
- return errorCount_;
-}
-
-inline
-const sig_atomic_t *ErrorCountEventHandler::cancelPtr() const
-{
- return &cancel_;
-}
-
-inline
-void ErrorCountEventHandler::cancel()
-{
- cancel_ = 1;
-}
-
-inline
-void ErrorCountEventHandler::setErrorLimit(unsigned maxErrors)
-{
- maxErrors_ = maxErrors;
-}
-
-inline
-Boolean ErrorCountEventHandler::cancelled() const
-{
- return cancel_ != 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ErrorCountEventHandler_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Event.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Event.h
deleted file mode 100644
index d17b8759fe..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Event.h
+++ /dev/null
@@ -1,1357 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Event_INCLUDED
-#define Event_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Link.h"
-#include "Allocator.h"
-#include "Location.h"
-#include "Vector.h"
-#include "Owner.h"
-#include "Boolean.h"
-#include "types.h"
-#include "Ptr.h"
-#include "StringC.h"
-#include "Notation.h"
-#include "Sd.h"
-#include "Syntax.h"
-#include "Dtd.h"
-#include "ElementType.h"
-#include "Text.h"
-#include "Lpd.h"
-#include "Message.h"
-#include "Markup.h"
-#include "ShortReferenceMap.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class EventHandler;
-
-class SP_API Event : public Link {
-public:
- enum Type {
- message,
- characterData,
- startElement,
- endElement,
- pi,
- sdataEntity,
- externalDataEntity,
- subdocEntity,
- nonSgmlChar,
- appinfo,
- startDtd,
- endDtd,
- startLpd,
- endLpd,
- endProlog,
- sgmlDecl,
- uselink,
- usemap,
- commentDecl,
- sSep,
- ignoredRs,
- ignoredRe,
- reOrigin,
- ignoredChars,
- markedSectionStart,
- markedSectionEnd,
- entityStart,
- entityEnd,
- notationDecl,
- entityDecl,
- elementDecl,
- attlistDecl, // not #NOTATION and not in LPD
- attlistNotationDecl,
- linkAttlistDecl,
- linkDecl,
- idLinkDecl,
- shortrefDecl,
- ignoredMarkup,
- entityDefaulted,
- sgmlDeclEntity
- };
- Event(Type);
- virtual void handle(EventHandler &) = 0;
- virtual void copyData();
- void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
- void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
- void operator delete(void *p) { Allocator::free(p); }
- Type type() const;
-private:
- Event(const Event &); // undefined
- void operator=(const Event &); // undefined
- Type type_;
-};
-
-class LocatedEvent : public Event {
-public:
- LocatedEvent(Type type, const Location &);
- const Location &location() const;
-private:
- LocatedEvent(const LocatedEvent &); // undefined
- void operator=(const LocatedEvent &); // undefined
- Location location_;
-};
-
-class MarkupEvent : public LocatedEvent {
-public:
- MarkupEvent(Type type);
- MarkupEvent(Type type, const Location &, Markup *);
- const Markup &markup() const;
-private:
- MarkupEvent(const MarkupEvent &); // undefined
- void operator=(const MarkupEvent &); // undefined
- Markup markup_;
-};
-
-class SP_API MessageEvent : public Event {
-public:
- MessageEvent(Message &);
- MessageEvent(const Message &);
- const Message &message() const;
- void handle(EventHandler &);
-private:
- MessageEvent(const MessageEvent &); // undefined
- void operator=(const MessageEvent &); // undefined
- Message message_;
-};
-
-class AttributeList;
-
-class StartElementEvent : public LocatedEvent {
-public:
- StartElementEvent(const ElementType *,
- const ConstPtr<Dtd> &,
- AttributeList *,
- const Location &,
- Markup *);
- ~StartElementEvent();
- void handle(EventHandler &);
- Boolean mustOmitEnd() const;
- void setIncluded();
- Boolean included() const;
- const StringC &name() const;
- const ElementType *elementType() const;
- const Markup *markupPtr() const;
- const AttributeList &attributes() const;
- void copyData();
-private:
- StartElementEvent(const StartElementEvent &); // undefined
- void operator=(const StartElementEvent &); // undefined
- const ElementType *elementType_;
- ConstPtr<Dtd> dtd_;
- PackedBoolean included_;
- PackedBoolean copied_; // has copyData() been called
- Markup *markup_;
- AttributeList *attributes_;
-};
-
-class EndElementEvent : public LocatedEvent {
-public:
- EndElementEvent(const ElementType *,
- const ConstPtr<Dtd> &,
- const Location &,
- Markup *);
- ~EndElementEvent();
- void handle(EventHandler &);
- void setIncluded();
- Boolean included() const;
- const StringC &name() const;
- const ElementType *elementType() const;
- const Markup *markupPtr() const;
- void copyData();
-private:
- EndElementEvent(const EndElementEvent &); // undefined
- void operator=(const EndElementEvent &); // undefined
- const ElementType *elementType_;
- ConstPtr<Dtd> dtd_;
- PackedBoolean included_;
- PackedBoolean copied_; // has copyData() been called
- Markup *markup_;
-};
-
-class DataEvent : public LocatedEvent {
-public:
- DataEvent(Type, const Char *, size_t, const Location &);
- void handle(EventHandler &);
- const Char *data() const;
- size_t dataLength() const;
- virtual Boolean isRe(unsigned long &serial) const;
- virtual const Entity *entity() const;
-protected:
- const Char *p_;
- size_t length_;
-private:
- DataEvent(const DataEvent &); // undefined
- void operator=(const DataEvent &); // undefined
-};
-
-class ImmediateDataEvent : public DataEvent {
-public:
- ImmediateDataEvent(Type type, const Char *, size_t, const Location &,
- Boolean copy);
- ~ImmediateDataEvent();
- void copyData();
-private:
- ImmediateDataEvent(const ImmediateDataEvent &); // undefined
- void operator=(const ImmediateDataEvent &); // undefined
- Char *alloc_;
-};
-
-class InternalDataEntity;
-
-class DataEntityEvent : public DataEvent {
-public:
- DataEntityEvent(Type type, const InternalEntity *,
- const ConstPtr<Origin> &);
- const Entity *entity() const;
-private:
- DataEntityEvent(const DataEntityEvent &); // undefined
- void operator=(const DataEntityEvent &); // undefined
-};
-
-class InternalCdataEntity;
-
-class CdataEntityEvent : public DataEntityEvent {
-public:
- CdataEntityEvent(const InternalEntity *,
- const ConstPtr<Origin> &);
-private:
- CdataEntityEvent(const CdataEntityEvent &); // undefined
- void operator=(const CdataEntityEvent &); // undefined
-};
-
-class InternalSdataEntity;
-
-class SdataEntityEvent : public DataEntityEvent {
-public:
- SdataEntityEvent(const InternalEntity *,
- const ConstPtr<Origin> &);
- void handle(EventHandler &);
-private:
- SdataEntityEvent(const SdataEntityEvent &); // undefined
- void operator=(const SdataEntityEvent &); // undefined
-};
-
-class PiEntity;
-
-class PiEvent : public LocatedEvent {
-public:
- PiEvent(const Char *, size_t, const Location &);
- const Char *data() const;
- size_t dataLength() const;
- virtual const Entity *entity() const;
- void handle(EventHandler &);
-private:
- PiEvent(const PiEvent &); // undefined
- void operator=(const PiEvent &); // undefined
- const Char *data_;
- size_t dataLength_;
-};
-
-class ImmediatePiEvent : public PiEvent {
-public:
- ImmediatePiEvent(StringC &, const Location &);
-private:
- ImmediatePiEvent(const ImmediatePiEvent &); // undefined
- void operator=(const ImmediatePiEvent &); // undefined
- StringC string_;
-};
-
-class PiEntityEvent : public PiEvent {
-public:
- PiEntityEvent(const PiEntity *entity,
- const ConstPtr<Origin> &origin);
- const Entity *entity() const;
-private:
- PiEntityEvent(const PiEntityEvent &); // undefined
- void operator=(const PiEntityEvent &); // undefined
-};
-
-class ExternalNonTextEntity;
-class ExternalDataEntity;
-class SubdocEntity;
-
-class ExternalEntityEvent : public Event {
-public:
- ExternalEntityEvent(Type type,
- const ConstPtr<EntityOrigin> &);
- const ConstPtr<EntityOrigin> &entityOrigin() const;
- const Location &location() const;
-private:
- ExternalEntityEvent(const ExternalEntityEvent &); // undefined
- void operator=(const ExternalEntityEvent &); // undefined
- ConstPtr<EntityOrigin> origin_;
-};
-
-class ExternalDataEntityEvent : public ExternalEntityEvent {
-public:
- ExternalDataEntityEvent(const ExternalDataEntity *,
- const ConstPtr<EntityOrigin> &);
- void handle(EventHandler &);
- const ExternalDataEntity *entity() const;
-private:
- ExternalDataEntityEvent(const ExternalDataEntityEvent &); // undefined
- void operator=(const ExternalDataEntityEvent &); // undefined
- const ExternalDataEntity *dataEntity_;
-};
-
-class SubdocEntityEvent : public ExternalEntityEvent {
-public:
- SubdocEntityEvent(const SubdocEntity *,
- const ConstPtr<EntityOrigin> &);
- void handle(EventHandler &);
- const SubdocEntity *entity() const;
-private:
- SubdocEntityEvent(const SubdocEntityEvent &); // undefined
- void operator=(const SubdocEntityEvent &); // undefined
- const SubdocEntity *subdocEntity_;
-};
-
-class NonSgmlCharEvent : public LocatedEvent {
-public:
- NonSgmlCharEvent(Char c, const Location &);
- Char character() const;
- void handle(EventHandler &);
-private:
- NonSgmlCharEvent(const NonSgmlCharEvent &); // undefined
- void operator=(const NonSgmlCharEvent &); // undefined
- Char c_;
-};
-
-class AppinfoEvent : public LocatedEvent {
-public:
- AppinfoEvent(const Location &);
- AppinfoEvent(const Text &, const Location &);
- void handle(EventHandler &);
- Boolean literal(const StringC *&) const;
-private:
- AppinfoEvent(const AppinfoEvent &); // undefined
- void operator=(const AppinfoEvent &); // undefined
- Boolean appinfoNone_;
- Text appinfo_;
-};
-
-class UselinkEvent : public MarkupEvent {
-public:
- UselinkEvent(const ConstPtr<Lpd> &,
- const LinkSet *,
- Boolean restore,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const ConstPtr<Lpd> &lpd() const;
- const LinkSet *linkSet() const;
- Boolean restore() const;
-private:
- UselinkEvent(const UselinkEvent &); // undefined
- void operator=(const UselinkEvent &); // undefined
- ConstPtr<Lpd> lpd_;
- const LinkSet *linkSet_;
- Boolean restore_;
-};
-
-class UsemapEvent : public MarkupEvent {
-public:
- UsemapEvent(const ShortReferenceMap *,
- Vector<const ElementType *> &,
- const ConstPtr<Dtd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const ShortReferenceMap *map() const;
- const Vector<const ElementType *> &elements() const;
-private:
- UsemapEvent(const UsemapEvent &); // undefined
- void operator=(const UsemapEvent &); // undefined
- ConstPtr<Dtd> dtd_;
- Vector<const ElementType *> elements_;
- const ShortReferenceMap *map_;
-};
-
-class StartSubsetEvent : public MarkupEvent {
-public:
- StartSubsetEvent(Type,
- const StringC &,
- const ConstPtr<Entity> &entity,
- Boolean hasInternalSubset,
- const Location &,
- Markup *);
- const StringC &name() const;
- const ConstPtr<Entity> &entity() const;
- Boolean hasInternalSubset() const;
-private:
- StartSubsetEvent(const StartSubsetEvent &); // undefined
- void operator=(const StartSubsetEvent &); // undefined
- StringC name_;
- ConstPtr<Entity> entity_;
- Boolean hasInternalSubset_;
-};
-
-class StartDtdEvent : public StartSubsetEvent {
-public:
- StartDtdEvent(const StringC &,
- const ConstPtr<Entity> &entity,
- Boolean hasInternalSubset,
- const Location &,
- Markup *);
- void handle(EventHandler &);
-private:
- StartDtdEvent(const StartDtdEvent &); // undefined
- void operator=(const StartDtdEvent &); // undefined
-};
-
-class StartLpdEvent : public StartSubsetEvent {
-public:
- StartLpdEvent(Boolean active,
- const StringC &,
- const ConstPtr<Entity> &entity,
- Boolean hasInternalSubset,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- Boolean active() const;
-private:
- StartLpdEvent(const StartLpdEvent &); // undefined
- void operator=(const StartLpdEvent &); // undefined
- Boolean active_;
-};
-
-class EndDtdEvent : public MarkupEvent {
-public:
- EndDtdEvent(const ConstPtr<Dtd> &, const Location &,
- Markup *);
- void handle(EventHandler &);
- const Dtd &dtd() const;
- const ConstPtr<Dtd> &dtdPointer() const;
-private:
- EndDtdEvent(const EndDtdEvent &); // undefined
- void operator=(const EndDtdEvent &); // undefined
- ConstPtr<Dtd> dtd_;
-};
-
-class EndLpdEvent : public MarkupEvent {
-public:
- EndLpdEvent(const ConstPtr<Lpd> &, const Location &,
- Markup *);
- void handle(EventHandler &);
- const Lpd &lpd() const;
- const ConstPtr<Lpd> &lpdPointer() const;
-private:
- EndLpdEvent(const EndLpdEvent &); // undefined
- void operator=(const EndLpdEvent &); // undefined
- ConstPtr<Lpd> lpd_;
-};
-
-class EndPrologEvent : public LocatedEvent {
-public:
- EndPrologEvent(const ConstPtr<Dtd> &dtd,
- const ConstPtr<ComplexLpd> &lpd,
- Vector<StringC> &simpleLinkNames,
- Vector<AttributeList> &simpleLinkAttributes,
- const Location &);
- EndPrologEvent(const ConstPtr<Dtd> &dtd,
- const Location &);
- void handle(EventHandler &);
- const Dtd &dtd() const;
- const ConstPtr<Dtd> &dtdPointer() const;
- const ConstPtr<ComplexLpd> &lpdPointer() const;
- const Vector<StringC> &simpleLinkNames() const;
- const Vector<AttributeList> &simpleLinkAttributes() const;
-private:
- EndPrologEvent(const EndPrologEvent &); // undefined
- void operator=(const EndPrologEvent &); // undefined
- ConstPtr<Dtd> dtd_;
- ConstPtr<ComplexLpd> lpd_;
- Vector<StringC> simpleLinkNames_;
- Vector<AttributeList> simpleLinkAttributes_;
-};
-
-class SgmlDeclEvent : public MarkupEvent {
-public:
- // for an implied SGML declaration
- SgmlDeclEvent(const ConstPtr<Sd> &,
- const ConstPtr<Syntax> &syntax);
- // for an explicit SGML declaration
- SgmlDeclEvent(const ConstPtr<Sd> &,
- const ConstPtr<Syntax> &syntax,
- const ConstPtr<Syntax> &instanceSyntax,
- const ConstPtr<Sd> &refSd,
- const ConstPtr<Syntax> &refSyntax,
- Index nextIndex,
- const StringC &implySystemId,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Sd &sd() const;
- const ConstPtr<Sd> &sdPointer() const;
- const Syntax &prologSyntax() const;
- const ConstPtr<Syntax> &prologSyntaxPointer() const;
- const Syntax &instanceSyntax() const;
- const ConstPtr<Syntax> &instanceSyntaxPointer() const;
- const ConstPtr<Sd> &refSdPointer() const;
- const ConstPtr<Syntax> &refSyntaxPointer() const;
- const StringC &implySystemId() const;
-private:
- SgmlDeclEvent(const SgmlDeclEvent &); // undefined
- void operator=(const SgmlDeclEvent &); // undefined
- ConstPtr<Sd> sd_;
- ConstPtr<Syntax> prologSyntax_;
- ConstPtr<Syntax> instanceSyntax_;
- ConstPtr<Sd> refSd_;
- ConstPtr<Syntax> refSyntax_;
- Index nextIndex_;
- StringC implySystemId_;
-};
-
-class CommentDeclEvent : public MarkupEvent {
-public:
- CommentDeclEvent(const Location &, Markup *);
- void handle(EventHandler &);
-private:
- CommentDeclEvent(const CommentDeclEvent &); // undefined
- void operator=(const CommentDeclEvent &); // undefined
-};
-
-class SSepEvent : public ImmediateDataEvent {
-public:
- SSepEvent(const Char *, size_t, const Location &, Boolean copy);
- void handle(EventHandler &);
-private:
- SSepEvent(const SSepEvent &); // undefined
- void operator=(const SSepEvent &); // undefined
-};
-
-class IgnoredRsEvent : public LocatedEvent {
-public:
- IgnoredRsEvent(Char c, const Location &);
- void handle(EventHandler &);
- Char rs() const;
-private:
- IgnoredRsEvent(const IgnoredRsEvent &); // undefined
- void operator=(const IgnoredRsEvent &); // undefined
- Char c_;
-};
-
-class IgnoredReEvent : public LocatedEvent {
-public:
- IgnoredReEvent(Char c, const Location &, unsigned long serial);
- void handle(EventHandler &);
- Char re() const;
- unsigned long serial() const;
-private:
- IgnoredReEvent(const IgnoredReEvent &); // undefined
- void operator=(const IgnoredReEvent &); // undefined
- unsigned long serial_;
- Char c_;
-};
-
-class ReEvent : public ImmediateDataEvent {
-public:
- ReEvent(const Char *, const Location &, unsigned long serial);
- Boolean isRe(unsigned long &serial) const;
-private:
- ReEvent(const ReEvent &); // undefined
- void operator=(const ReEvent &); // undefined
- unsigned long serial_;
-};
-
-class ReOriginEvent : public LocatedEvent {
-public:
- ReOriginEvent(Char c, const Location &, unsigned long serial);
- void handle(EventHandler &);
- Char re() const;
- unsigned long serial() const;
-private:
- ReOriginEvent(const ReOriginEvent &); // undefined
- void operator=(const ReOriginEvent &); // undefined
- unsigned long serial_;
- Char c_;
-};
-
-class IgnoredCharsEvent : public ImmediateDataEvent {
-public:
- IgnoredCharsEvent(const Char *, size_t, const Location &, Boolean copy);
- void handle(EventHandler &);
-private:
- IgnoredCharsEvent(const IgnoredCharsEvent &); // undefined
- void operator=(const IgnoredCharsEvent &); // undefined
-};
-
-class MarkedSectionEvent : public MarkupEvent {
-public:
- enum Status { include, rcdata, cdata, ignore }; // in priority order
- MarkedSectionEvent(Type, Status, const Location &, Markup *);
- Status status() const;
-private:
- MarkedSectionEvent(const MarkedSectionEvent &); // undefined
- void operator=(const MarkedSectionEvent &); // undefined
- Status status_;
-};
-
-class MarkedSectionStartEvent : public MarkedSectionEvent {
-public:
- MarkedSectionStartEvent(Status, const Location &, Markup *);
- void handle(EventHandler &);
-private:
- MarkedSectionStartEvent(const MarkedSectionStartEvent &); // undefined
- void operator=(const MarkedSectionStartEvent &); // undefined
-};
-
-class MarkedSectionEndEvent : public MarkedSectionEvent {
-public:
- MarkedSectionEndEvent(Status, const Location &, Markup *);
- void handle(EventHandler &);
-private:
- MarkedSectionEndEvent(const MarkedSectionEndEvent &); // undefined
- void operator=(const MarkedSectionEndEvent &); // undefined
-};
-
-class EntityStartEvent : public Event {
-public:
- EntityStartEvent(const ConstPtr<EntityOrigin> &origin);
- void handle(EventHandler &);
- const Entity *entity() const;
- const ConstPtr<EntityOrigin> &entityOrigin() const;
-private:
- EntityStartEvent(const EntityStartEvent &); // undefined
- void operator=(const EntityStartEvent &); // undefined
-
- ConstPtr<EntityOrigin> origin_;
-};
-
-class EntityEndEvent : public LocatedEvent {
-public:
- EntityEndEvent(const Location &);
- void handle(EventHandler &);
-private:
- EntityEndEvent(const EntityEndEvent &); // undefined
- void operator=(const EntityEndEvent &); // undefined
-};
-
-class EntityDeclEvent : public MarkupEvent {
-public:
- EntityDeclEvent(const ConstPtr<Entity> &,
- Boolean ignored,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Entity &entity() const;
- const ConstPtr<Entity> &entityPointer() const;
- Boolean ignored() const;
- // The name of the entity will be empty if this is the default entity.
-private:
- Boolean ignored_;
- // This will actually point to an external entity.
- ConstPtr<Entity> entity_;
-};
-
-class NotationDeclEvent : public MarkupEvent {
-public:
- NotationDeclEvent(const ConstPtr<Notation> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Notation &notation() const;
- const ConstPtr<Notation> &notationPointer() const;
-private:
- NotationDeclEvent(const NotationDeclEvent &); // undefined
- void operator=(const NotationDeclEvent &); // undefined
- ConstPtr<Notation> notation_;
-};
-
-class ElementDeclEvent : public MarkupEvent {
-public:
- ElementDeclEvent(Vector<const ElementType *> &elements,
- const ConstPtr<Dtd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Vector<const ElementType *> &elements() const;
-private:
- ElementDeclEvent(const ElementDeclEvent &); // undefined
- void operator=(const ElementDeclEvent &); // undefined
- Vector<const ElementType *> elements_;
- ConstPtr<Dtd> dtd_;
-};
-
-class AttlistDeclEvent : public MarkupEvent {
-public:
- AttlistDeclEvent(Vector<const ElementType *> &elements,
- const ConstPtr<Dtd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Vector<const ElementType *> &elements() const;
-private:
- AttlistDeclEvent(const AttlistDeclEvent &); // undefined
- void operator=(const AttlistDeclEvent &); // undefined
- Vector<const ElementType *> elements_;
- ConstPtr<Dtd> dtd_;
-};
-
-class AttlistNotationDeclEvent : public MarkupEvent {
-public:
- AttlistNotationDeclEvent(Vector<ConstPtr<Notation> > &notations,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Vector<ConstPtr<Notation> > &notations() const;
-private:
- AttlistNotationDeclEvent(const AttlistNotationDeclEvent &); // undefined
- void operator=(const AttlistDeclEvent &); // undefined
- Vector<ConstPtr<Notation> > notations_;
-};
-
-class LinkAttlistDeclEvent : public MarkupEvent {
-public:
- LinkAttlistDeclEvent(Vector<const ElementType *> &elements,
- const ConstPtr<Lpd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const Vector<const ElementType *> &elements() const;
- const Lpd &lpd() const;
-private:
- LinkAttlistDeclEvent(const LinkAttlistDeclEvent &); // undefined
- void operator=(const LinkAttlistDeclEvent &); // undefined
- Vector<const ElementType *> elements_;
- ConstPtr<Lpd> lpd_;
-};
-
-class LinkDeclEvent : public MarkupEvent {
-public:
- LinkDeclEvent(const LinkSet *linkSet,
- const ConstPtr<ComplexLpd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const LinkSet *linkSet() const;
- const ComplexLpd &lpd() const;
-private:
- LinkDeclEvent(const LinkDeclEvent &); // undefined
- void operator=(const LinkDeclEvent &); // undefined
- const LinkSet *linkSet_;
- ConstPtr<ComplexLpd> lpd_;
-};
-
-class IdLinkDeclEvent : public MarkupEvent {
-public:
- IdLinkDeclEvent(const ConstPtr<ComplexLpd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const ComplexLpd &lpd() const;
-private:
- IdLinkDeclEvent(const IdLinkDeclEvent &); // undefined
- void operator=(const IdLinkDeclEvent &); // undefined
- ConstPtr<ComplexLpd> lpd_;
-};
-
-class ShortrefDeclEvent : public MarkupEvent {
-public:
- ShortrefDeclEvent(const ShortReferenceMap *,
- const ConstPtr<Dtd> &,
- const Location &,
- Markup *);
- void handle(EventHandler &);
- const ShortReferenceMap *map() const;
-private:
- ShortrefDeclEvent(const ShortrefDeclEvent &); // undefined
- void operator=(const ShortrefDeclEvent &); // undefined
- const ShortReferenceMap *map_;
- ConstPtr<Dtd> dtd_;
-};
-
-class IgnoredMarkupEvent : public MarkupEvent {
-public:
- IgnoredMarkupEvent(const Location &, Markup *);
- void handle(EventHandler &);
-private:
- IgnoredMarkupEvent(const IgnoredMarkupEvent &); // undefined
- void operator=(const IgnoredMarkupEvent &); // undefined
-};
-
-// This is for an undeclared entity whose first occurrence
-// is in the instance, when there is a default entity:
-// ie it extends the namespace of general entities after
-// the end of the prolog.
-
-class EntityDefaultedEvent : public LocatedEvent {
-public:
- EntityDefaultedEvent(const ConstPtr<Entity> &,
- const Location &);
- void handle(EventHandler &);
- const Entity &entity() const;
- const ConstPtr<Entity> &entityPointer() const;
-private:
- EntityDefaultedEvent(const EntityDefaultedEvent &); // undefined
- void operator=(const EntityDefaultedEvent &); // undefined
- ConstPtr<Entity> entity_;
-};
-
-class SgmlDeclEntityEvent : public LocatedEvent {
-public:
- SgmlDeclEntityEvent(const PublicId &publicId,
- PublicId::TextClass entityType,
- const StringC &effectiveSystemId,
- const Location &);
- void handle(EventHandler &);
- const PublicId &publicId() const;
- PublicId::TextClass entityType() const;
- const StringC &effectiveSystemId() const;
-private:
- SgmlDeclEntityEvent(const SgmlDeclEntityEvent &); // undefined
- void operator=(const SgmlDeclEntityEvent &); // undefined
- PublicId publicId_;
- PublicId::TextClass entityType_;
- StringC effectiveSystemId_;
-};
-
-class SP_API EventHandler {
-public:
- virtual ~EventHandler();
- virtual void message(MessageEvent *) = 0;
- virtual void data(DataEvent *);
- virtual void startElement(StartElementEvent *);
- virtual void endElement(EndElementEvent *);
- virtual void pi(PiEvent *);
- virtual void sdataEntity(SdataEntityEvent *);
- virtual void externalDataEntity(ExternalDataEntityEvent *);
- virtual void subdocEntity(SubdocEntityEvent *);
- virtual void nonSgmlChar(NonSgmlCharEvent *);
- virtual void appinfo(AppinfoEvent *);
- virtual void uselink(UselinkEvent *);
- virtual void usemap(UsemapEvent *);
- virtual void startDtd(StartDtdEvent *);
- virtual void endDtd(EndDtdEvent *);
- virtual void startLpd(StartLpdEvent *);
- virtual void endLpd(EndLpdEvent *);
- virtual void endProlog(EndPrologEvent *);
- virtual void sgmlDecl(SgmlDeclEvent *);
- virtual void commentDecl(CommentDeclEvent *);
- virtual void sSep(SSepEvent *);
- virtual void ignoredRs(IgnoredRsEvent *);
- virtual void ignoredRe(IgnoredReEvent *);
- virtual void reOrigin(ReOriginEvent *);
- virtual void ignoredChars(IgnoredCharsEvent *);
- virtual void markedSectionStart(MarkedSectionStartEvent *);
- virtual void markedSectionEnd(MarkedSectionEndEvent *);
- virtual void entityStart(EntityStartEvent *);
- virtual void entityEnd(EntityEndEvent *);
- virtual void notationDecl(NotationDeclEvent *);
- virtual void entityDecl(EntityDeclEvent *);
- virtual void elementDecl(ElementDeclEvent *);
- virtual void attlistDecl(AttlistDeclEvent *);
- virtual void linkAttlistDecl(LinkAttlistDeclEvent *);
- virtual void attlistNotationDecl(AttlistNotationDeclEvent *);
- virtual void linkDecl(LinkDeclEvent *);
- virtual void idLinkDecl(IdLinkDeclEvent *);
- virtual void shortrefDecl(ShortrefDeclEvent *);
- virtual void ignoredMarkup(IgnoredMarkupEvent *);
- virtual void entityDefaulted(EntityDefaultedEvent *);
- virtual void sgmlDeclEntity(SgmlDeclEntityEvent *);
-};
-
-inline
-Event::Event(Type type)
-: type_(type)
-{
-}
-
-inline
-Event::Type Event::type() const
-{
- return type_;
-}
-
-inline
-const Location &LocatedEvent::location() const
-{
- return location_;
-}
-
-inline
-const Markup &MarkupEvent::markup() const
-{
- return markup_;
-}
-
-inline
-const Message &MessageEvent::message() const
-{
- return message_;
-}
-
-inline
-const ElementType *StartElementEvent::elementType() const
-{
- return elementType_;
-}
-
-inline
-const StringC &StartElementEvent::name() const
-{
- return elementType_->name();
-}
-
-inline
-void StartElementEvent::setIncluded()
-{
- included_ = 1;
-}
-
-inline
-Boolean StartElementEvent::included() const
-{
- return included_;
-}
-
-inline
-const Markup *StartElementEvent::markupPtr() const
-{
- return markup_;
-}
-
-inline
-const AttributeList &StartElementEvent::attributes() const
-{
- return *attributes_;
-}
-
-inline
-Boolean StartElementEvent::mustOmitEnd() const
-{
- return ((elementType()->definition()->declaredContent()
- == ElementDefinition::empty)
- || attributes_->conref());
-}
-
-inline
-const ElementType *EndElementEvent::elementType() const
-{
- return elementType_;
-}
-
-inline
-const StringC &EndElementEvent::name() const
-{
- return elementType_->name();
-}
-
-inline
-void EndElementEvent::setIncluded()
-{
- included_ = 1;
-}
-
-inline
-Boolean EndElementEvent::included() const
-{
- return included_;
-}
-
-inline
-const Markup *EndElementEvent::markupPtr() const
-{
- return markup_;
-}
-
-inline
-const Char *DataEvent::data() const
-{
- return p_;
-}
-
-inline
-size_t DataEvent::dataLength() const
-{
- return length_;
-}
-
-inline
-const Char *PiEvent::data() const
-{
- return data_;
-}
-
-inline
-size_t PiEvent::dataLength() const
-{
- return dataLength_;
-}
-
-inline
-const ConstPtr<EntityOrigin> &
-ExternalEntityEvent::entityOrigin() const
-{
- return origin_;
-}
-
-inline
-const Location &ExternalEntityEvent::location() const
-{
- return origin_->parent();
-}
-
-inline
-const ExternalDataEntity *ExternalDataEntityEvent::entity() const
-{
- return dataEntity_;
-}
-
-inline
-const SubdocEntity *SubdocEntityEvent::entity() const
-{
- return subdocEntity_;
-}
-
-inline
-Char NonSgmlCharEvent::character() const
-{
- return c_;
-}
-
-inline
-Boolean AppinfoEvent::literal(const StringC *&p) const
-{
- if (appinfoNone_)
- return 0;
- p = &appinfo_.string();
- return 1;
-}
-
-inline
-const ConstPtr<Lpd> &UselinkEvent::lpd() const
-{
- return lpd_;
-}
-
-inline
-const LinkSet *UselinkEvent::linkSet() const
-{
- return linkSet_;
-}
-
-inline
-Boolean UselinkEvent::restore() const
-{
- return restore_;
-}
-
-inline
-const ShortReferenceMap *UsemapEvent::map() const
-{
- return map_;
-}
-
-inline
-const StringC &StartSubsetEvent::name() const
-{
- return name_;
-}
-
-inline
-const ConstPtr<Entity> &StartSubsetEvent::entity() const
-{
- return entity_;
-}
-
-inline
-Boolean StartSubsetEvent::hasInternalSubset() const
-{
- return hasInternalSubset_;
-}
-
-inline
-Boolean StartLpdEvent::active() const
-{
- return active_;
-}
-
-inline
-const Dtd &EndDtdEvent::dtd() const
-{
- return *dtd_;
-}
-
-inline
-const ConstPtr<Dtd> &EndDtdEvent::dtdPointer() const
-{
- return dtd_;
-}
-
-inline
-const Lpd &EndLpdEvent::lpd() const
-{
- return *lpd_;
-}
-
-inline
-const ConstPtr<Lpd> &EndLpdEvent::lpdPointer() const
-{
- return lpd_;
-}
-
-inline
-const Dtd &EndPrologEvent::dtd() const
-{
- return *dtd_;
-}
-
-inline
-const ConstPtr<Dtd> &EndPrologEvent::dtdPointer() const
-{
- return dtd_;
-}
-
-inline
-const ConstPtr<ComplexLpd> &EndPrologEvent::lpdPointer() const
-{
- return lpd_;
-}
-
-inline
-const Vector<StringC> &EndPrologEvent::simpleLinkNames() const
-{
- return simpleLinkNames_;
-}
-
-inline
-const Vector<AttributeList> &EndPrologEvent::simpleLinkAttributes() const
-{
- return simpleLinkAttributes_;
-}
-
-inline
-const Sd &SgmlDeclEvent::sd() const
-{
- return *sd_;
-}
-
-inline
-const ConstPtr<Sd> &SgmlDeclEvent::sdPointer() const
-{
- return sd_;
-}
-
-inline
-const ConstPtr<Sd> &SgmlDeclEvent::refSdPointer() const
-{
- return refSd_;
-}
-
-inline
-const Syntax &SgmlDeclEvent::prologSyntax() const
-{
- return *prologSyntax_;
-}
-
-inline
-const ConstPtr<Syntax> &SgmlDeclEvent::prologSyntaxPointer() const
-{
- return prologSyntax_;
-}
-
-inline
-const Syntax &SgmlDeclEvent::instanceSyntax() const
-{
- return *instanceSyntax_;
-}
-
-inline
-const ConstPtr<Syntax> &SgmlDeclEvent::instanceSyntaxPointer() const
-{
- return instanceSyntax_;
-}
-
-inline
-const ConstPtr<Syntax> &SgmlDeclEvent::refSyntaxPointer() const
-{
- return refSyntax_;
-}
-
-inline
-const StringC &SgmlDeclEvent::implySystemId() const
-{
- return implySystemId_;
-}
-
-inline
-Char IgnoredRsEvent::rs() const
-{
- return c_;
-}
-
-inline
-Char IgnoredReEvent::re() const
-{
- return c_;
-}
-
-inline
-unsigned long IgnoredReEvent::serial() const
-{
- return serial_;
-}
-
-inline
-Char ReOriginEvent::re() const
-{
- return c_;
-}
-
-inline
-unsigned long ReOriginEvent::serial() const
-{
- return serial_;
-}
-
-inline
-MarkedSectionEvent::Status MarkedSectionEvent::status() const
-{
- return status_;
-}
-
-inline
-const Entity *EntityStartEvent::entity() const
-{
- return origin_->entity();
-}
-
-inline
-const ConstPtr<EntityOrigin> &
-EntityStartEvent::entityOrigin() const
-{
- return origin_;
-}
-
-inline
-const ConstPtr<Entity> &EntityDeclEvent::entityPointer() const
-{
- return entity_;
-}
-
-inline
-const Entity &EntityDeclEvent::entity() const
-{
- return *entity_;
-}
-
-inline
-Boolean EntityDeclEvent::ignored() const
-{
- return ignored_;
-}
-
-inline
-const Notation &NotationDeclEvent::notation() const
-{
- return *notation_;
-}
-
-inline
-const ConstPtr<Notation> &NotationDeclEvent::notationPointer() const
-{
- return notation_;
-}
-
-inline
-const Vector<const ElementType *> &ElementDeclEvent::elements() const
-{
- return elements_;
-}
-
-inline
-const Vector<const ElementType *> &AttlistDeclEvent::elements() const
-{
- return elements_;
-}
-
-inline
-const Vector<const ElementType *> &LinkAttlistDeclEvent::elements() const
-{
- return elements_;
-}
-
-inline
-const Lpd &LinkAttlistDeclEvent::lpd() const
-{
- return *lpd_;
-}
-
-inline
-const LinkSet *LinkDeclEvent::linkSet() const
-{
- return linkSet_;
-}
-
-inline
-const ComplexLpd &LinkDeclEvent::lpd() const
-{
- return *lpd_;
-}
-
-inline
-const ComplexLpd &IdLinkDeclEvent::lpd() const
-{
- return *lpd_;
-}
-
-inline
-const Vector<ConstPtr<Notation> > &
-AttlistNotationDeclEvent::notations() const
-{
- return notations_;
-}
-
-inline
-const ShortReferenceMap *ShortrefDeclEvent::map() const
-{
- return map_;
-}
-
-inline
-const Entity &EntityDefaultedEvent::entity() const
-{
- return *entity_;
-}
-
-inline
-const ConstPtr<Entity> &EntityDefaultedEvent::entityPointer()
- const
-{
- return entity_;
-}
-
-inline
-const PublicId &SgmlDeclEntityEvent::publicId() const
-{
- return publicId_;
-}
-
-inline
-PublicId::TextClass SgmlDeclEntityEvent::entityType() const
-{
- return entityType_;
-}
-
-inline
-const StringC &SgmlDeclEntityEvent::effectiveSystemId() const
-{
- return effectiveSystemId_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Event_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/EventsWanted.h b/usr/src/cmd/man/src/util/nsgmls.src/include/EventsWanted.h
deleted file mode 100644
index 25f0eb1c02..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/EventsWanted.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EventsWanted_INCLUDED
-#define EventsWanted_INCLUDED 1
-
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API EventsWanted {
-public:
- EventsWanted();
- Boolean wantInstanceMarkup() const;
- Boolean wantCommentDecls() const; // in instance
- Boolean wantMarkedSections() const; // in instance
- Boolean wantPrologMarkup() const;
- void addInstanceMarkup();
- void addCommentDecls();
- void addMarkedSections();
- void addPrologMarkup();
-private:
- PackedBoolean instanceMarkup_;
- PackedBoolean commentDecls_;
- PackedBoolean markedSections_;
- PackedBoolean prologMarkup_;
-};
-
-inline
-EventsWanted::EventsWanted()
-: instanceMarkup_(0), commentDecls_(0), markedSections_(0), prologMarkup_(0)
-{
-}
-
-inline
-Boolean EventsWanted::wantInstanceMarkup() const
-{
- return instanceMarkup_;
-}
-
-inline
-void EventsWanted::addInstanceMarkup()
-{
- instanceMarkup_ = 1;
- commentDecls_ = 1;
- markedSections_ = 1;
-}
-
-inline
-Boolean EventsWanted::wantCommentDecls() const
-{
- return commentDecls_;
-}
-
-inline
-void EventsWanted::addCommentDecls()
-{
- commentDecls_ = 1;
-}
-
-inline
-Boolean EventsWanted::wantMarkedSections() const
-{
- return markedSections_;
-}
-
-inline
-void EventsWanted::addMarkedSections()
-{
- markedSections_ = 1;
-}
-
-inline
-Boolean EventsWanted::wantPrologMarkup() const
-{
- return prologMarkup_;
-}
-
-inline
-void EventsWanted::addPrologMarkup()
-{
- prologMarkup_ = 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EventsWanted_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ExtendEntityManager.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ExtendEntityManager.h
deleted file mode 100644
index 52da637d9a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ExtendEntityManager.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ExtendEntityManager_INCLUDED
-#define ExtendEntityManager_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "EntityManager.h"
-#include "CharsetInfo.h"
-#include "types.h"
-#include "Boolean.h"
-#include "StringC.h"
-#include "types.h"
-#include "Vector.h"
-#include "Location.h"
-#include "CodingSystemKit.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class StorageManager;
-class InputCodingSystem;
-class Messenger;
-
-struct SP_API StorageObjectSpec {
- StorageObjectSpec();
- StorageManager *storageManager;
- const char *codingSystemName;
- const InputCodingSystem *codingSystem;
- StringC specId; // specified id
- StringC baseId; // id that specified id is relative to
- enum Records {
- find,
- cr,
- lf,
- crlf,
- asis
- };
- Records records;
- PackedBoolean notrack;
- PackedBoolean zapEof; // zap a final Ctrl-Z
- PackedBoolean search;
- enum {
- encoding,
- bctf,
- special
- };
- char codingSystemType;
-};
-
-
-struct SP_API ParsedSystemId : public Vector<StorageObjectSpec> {
- ParsedSystemId();
- void unparse(const CharsetInfo &resultCharset, Boolean isNdata, StringC &result) const;
- struct SP_API Map {
- enum Type {
- catalogDocument,
- catalogPublic
- };
- Type type;
- StringC publicId;
- };
- Vector<Map> maps;
-};
-
-struct SP_API StorageObjectLocation {
- const StorageObjectSpec *storageObjectSpec;
- StringC actualStorageId;
- unsigned long lineNumber;
- unsigned long columnNumber;
- unsigned long byteIndex;
- unsigned long storageObjectOffset;
-};
-
-class SP_API ExtendEntityManager : public EntityManager {
-public:
- class SP_API CatalogManager {
- public:
- virtual ~CatalogManager();
- virtual ConstPtr<EntityCatalog>
- makeCatalog(StringC &systemId,
- const CharsetInfo &docCharset,
- ExtendEntityManager *,
- Messenger &) const = 0;
- virtual Boolean mapCatalog(ParsedSystemId &systemId,
- ExtendEntityManager *em,
- Messenger &mgr) const = 0;
- };
- // Additional flags for open.
- enum { mayNotExist = 0100, isNdata = 0200 };
- virtual void registerStorageManager(StorageManager *) = 0;
- virtual void setCatalogManager(CatalogManager *) = 0;
- virtual Boolean expandSystemId(const StringC &,
- const Location &,
- Boolean isNdata,
- const CharsetInfo &,
- const StringC *mapCatalogPublic,
- Messenger &,
- StringC &) = 0;
- virtual Boolean mergeSystemIds(const Vector<StringC> &sysids,
- Boolean mapCatalogDocument,
- const CharsetInfo &,
- Messenger &mgr,
- StringC &) const = 0;
- virtual Boolean parseSystemId(const StringC &str,
- const CharsetInfo &docCharset,
- Boolean isNdata,
- const StorageObjectLocation *defLoc,
- Messenger &mgr,
- ParsedSystemId &parsedSysid) const = 0;
- static const ParsedSystemId *externalInfoParsedSystemId(const ExternalInfo *);
- static Boolean externalize(const ExternalInfo *,
- Offset,
- StorageObjectLocation &);
- static ExtendEntityManager *make(StorageManager *,
- const InputCodingSystem *,
- const ConstPtr<InputCodingSystemKit> &,
- Boolean internalCharsetIsDocCharset);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ExtendEntityManager_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ExternalId.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ExternalId.h
deleted file mode 100644
index ac9243db09..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ExternalId.h
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ExternalId_INCLUDED
-#define ExternalId_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Boolean.h"
-#include "StringC.h"
-#include "Text.h"
-#include "types.h"
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class CharsetInfo;
-
-class SP_API PublicId {
-public:
- enum TextClass {
- CAPACITY,
- CHARSET,
- DOCUMENT,
- DTD,
- ELEMENTS,
- ENTITIES,
- LPD,
- NONSGML,
- NOTATION,
- SD,
- SHORTREF,
- SUBDOC,
- SYNTAX,
- TEXT
- };
- enum OwnerType {
- ISO,
- registered,
- unregistered
- };
- PublicId();
-
- Boolean getOwnerType(OwnerType &) const;
- Boolean getOwner(StringC &) const;
- Boolean getTextClass(TextClass &) const;
- Boolean getUnavailable(Boolean &) const;
- Boolean getDescription(StringC &) const;
- Boolean getLanguage(StringC &) const;
- Boolean getDesignatingSequence(StringC &) const;
- Boolean getDisplayVersion(StringC &) const;
- // If it's not a valid formal public identifier, return 0
- // and set error, otherwise return 1.
- // charset describes the character set to use for parsing the
- // id.
- Boolean init(Text &, const CharsetInfo &, Char space,
- const MessageType1 *&error);
- const StringC &string() const;
- const Text &text() const;
-private:
- static Boolean nextField(Char solidus,
- const Char *&next,
- const Char *lim,
- const Char *&fieldStart,
- size_t &fieldLength);
- static Boolean lookupTextClass(const StringC &, const CharsetInfo &,
- TextClass &);
- static const char *const textClasses[];
-
- PackedBoolean formal_;
- OwnerType ownerType_;
- StringC owner_;
- TextClass textClass_;
- PackedBoolean unavailable_;
- StringC description_;
- StringC languageOrDesignatingSequence_;
- PackedBoolean haveDisplayVersion_;
- StringC displayVersion_;
- Text text_;
-};
-
-class SP_API ExternalId {
-public:
- ExternalId();
- const StringC *systemIdString() const;
- const StringC *publicIdString() const;
- const StringC &effectiveSystemId() const;
- const Text *systemIdText() const;
- const Text *publicIdText() const;
- const PublicId *publicId() const;
- void setSystem(Text &);
- void setEffectiveSystem(StringC &);
- // If it's not a valid formal public identifier, return 0
- // and set error, otherwise return 1.
- // charset describes the character set to use for parsing the
- // id.
- Boolean setPublic(Text &, const CharsetInfo &, Char space,
- const MessageType1 *&error);
- void setLocation(const Location &);
- // location of keyword
- const Location &location() const;
-private:
- PackedBoolean haveSystem_;
- PackedBoolean havePublic_;
- Text system_;
- PublicId public_;
- Location loc_;
- StringC effectiveSystem_;
-};
-
-inline
-const StringC &PublicId::string() const
-{
- return text_.string();
-}
-
-inline
-const Text &PublicId::text() const
-{
- return text_;
-}
-
-inline
-const StringC *ExternalId::systemIdString() const
-{
- return haveSystem_ ? &system_.string() : 0;
-}
-
-inline
-const StringC *ExternalId::publicIdString() const
-{
- return havePublic_ ? &public_.string() : 0;
-}
-
-inline
-const Text *ExternalId::systemIdText() const
-{
- return haveSystem_ ? &system_ : 0;
-}
-
-inline
-const Text *ExternalId::publicIdText() const
-{
- return havePublic_ ? &public_.text() : 0;
-}
-
-inline
-const PublicId *ExternalId::publicId() const
-{
- return havePublic_ ? &public_ : 0;
-}
-
-inline
-const Location &ExternalId::location() const
-{
- return loc_;
-}
-
-inline
-const StringC &ExternalId::effectiveSystemId() const
-{
- return effectiveSystem_;
-}
-
-inline
-void ExternalId::setEffectiveSystem(StringC &str)
-{
- str.swap(effectiveSystem_);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ExternalId_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Fixed2CodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Fixed2CodingSystem.h
deleted file mode 100644
index 8e0a5965c7..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Fixed2CodingSystem.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Fixed2CodingSystem_INCLUDED
-#define Fixed2CodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Fixed2CodingSystem : public CodingSystem {
-public:
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
- unsigned fixedBytesPerChar() const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Fixed2CodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/GenericEventHandler.h b/usr/src/cmd/man/src/util/nsgmls.src/include/GenericEventHandler.h
deleted file mode 100644
index c0fbf188ee..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/GenericEventHandler.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 1995, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef GenericEventHandler_INCLUDED
-#define GenericEventHandler_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-// Must include Boolean.h before SGMLApplication.h.
-
-#include "Boolean.h"
-#include "SGMLApplication.h"
-#include "Event.h"
-#include "MessageReporter.h"
-#include "ErrorCountEventHandler.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API GenericEventHandler : public ErrorCountEventHandler {
-public:
- GenericEventHandler(SGMLApplication &, bool generalEntities);
- ~GenericEventHandler();
- void message(MessageEvent *);
- void appinfo(AppinfoEvent *);
- void startDtd(StartDtdEvent *);
- void endDtd(EndDtdEvent *);
- void endProlog(EndPrologEvent *);
- void entityDefaulted(EntityDefaultedEvent *);
- void startElement(StartElementEvent *);
- void endElement(EndElementEvent *);
- void data(DataEvent *);
- void pi(PiEvent *);
- void sdataEntity(SdataEntityEvent *);
- void externalDataEntity(ExternalDataEntityEvent *);
- void subdocEntity(SubdocEntityEvent *);
- void nonSgmlChar(NonSgmlCharEvent *);
- void commentDecl(CommentDeclEvent *);
- void ignoredChars(IgnoredCharsEvent *);
- void markedSectionStart(MarkedSectionStartEvent *);
- void markedSectionEnd(MarkedSectionEndEvent *);
- void *allocate(size_t);
- void freeAll();
- void freeAll1();
-
- struct Block {
- Block *next;
- char *mem;
- size_t size;
- };
- static void setString(SGMLApplication::CharString &, const StringC &);
- static void clearString(SGMLApplication::CharString &);
- virtual void reportMessage(const Message &msg, StringC &) = 0;
-private:
- GenericEventHandler(const GenericEventHandler &); // undefined
- void operator=(const GenericEventHandler &); // undefined
- void setLocation(SGMLApplication::Position &, const Location &);
- void setLocation1(SGMLApplication::Position &, const Location &);
- void setAttributes(const SGMLApplication::Attribute *&attributes,
- const AttributeList &attributeList);
- void setExternalId(SGMLApplication::ExternalId &to,
- const ExternalId &from);
- void setEntity(SGMLApplication::Entity &to, const Entity &from);
- void setNotation(SGMLApplication::Notation &, const Notation &notation);
- static void clearNotation(SGMLApplication::Notation &);
- static void clearExternalId(SGMLApplication::ExternalId &);
- ConstPtr<Origin> lastOrigin_;
- SGMLApplication::OpenEntityPtr openEntityPtr_;
- size_t firstBlockUsed_;
- size_t firstBlockSpare_;
- Block *freeBlocks_;
- Block *allocBlocks_;
- bool generalEntities_;
- SGMLApplication *app_;
-};
-
-class SP_API MsgGenericEventHandler : public GenericEventHandler {
-public:
- MsgGenericEventHandler(SGMLApplication &,
- bool generalEntities,
- MessageReporter &reporter,
- const bool *messagesInhibitedPtr);
- void reportMessage(const Message &msg, StringC &);
-private:
- MsgGenericEventHandler(const MsgGenericEventHandler &); // undefined
- void operator=(const MsgGenericEventHandler &); // undefined
- struct WrapReporter {
- WrapReporter(MessageReporter *r) : reporter(r), origStream(0) {
- origStream = reporter->releaseMessageStream();
- reporter->setMessageStream(&strStream);
- }
- ~WrapReporter() {
- if (origStream) {
- reporter->releaseMessageStream();
- reporter->setMessageStream(origStream);
- }
- }
- MessageReporter *reporter;
- OutputCharStream *origStream;
- StrOutputCharStream strStream;
- };
- const bool *messagesInhibitedPtr_;
- MessageReporter *reporter_;
-};
-
-inline void
-GenericEventHandler::setString(SGMLApplication::CharString &to,
- const StringC &from)
-{
- to.ptr = from.data();
- to.len = from.size();
-}
-
-inline
-void GenericEventHandler::clearString(SGMLApplication::CharString &to)
-{
- to.len = 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not GenericEventHandler_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Hash.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Hash.h
deleted file mode 100644
index d209bc5165..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Hash.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Hash_INCLUDED
-#define Hash_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Hash {
-public:
- static unsigned long hash(const StringC &);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Hash_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.cxx
deleted file mode 100644
index 13d3cdf943..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.cxx
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef HashTable_DEF_INCLUDED
-#define HashTable_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class K, class V>
-void HashTable<K,V>::insert(const K &key, const V &value, Boolean replace)
-{
- HashTableItem<K, V> *newItem = new HashTableItem<K, V>(key, value);
- HashTableItem<K, V> *tem = (HashTableItem<K, V> *)table_.insert(newItem);
- if (tem) {
- delete newItem;
- if (replace) {
- tem->key = key;
- tem->value = value;
- }
- }
-}
-
-template<class K, class V>
-HashTableItem<K,V>::HashTableItem(const K &k, const V &v)
-: HashTableItemBase<K>(k), value(v)
-{
-}
-
-template<class K, class V>
-HashTableItemBase<K> *HashTableItem<K,V>::copy() const
-{
- return new HashTableItem<K, V>(*this);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not HashTable_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.h
deleted file mode 100644
index c2bd9d1270..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTable.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef HashTable_INCLUDED
-#define HashTable_INCLUDED 1
-
-#include <stddef.h>
-#include "OwnerTable.h"
-#include "Hash.h"
-#include "Boolean.h"
-#include "HashTableItemBase.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class K, class V>
-class HashTableItem : public HashTableItemBase<K> {
-public:
- HashTableItem(const K &k, const V &v);
- HashTableItemBase<K> *copy() const;
- V value;
-};
-
-template<class K, class V> class HashTableIter;
-
-template<class K, class V>
-class HashTable {
-public:
- HashTable() { }
- void insert(const K &key, const V &value, Boolean replace = 1);
- const V *lookup(const K &key) const {
- HashTableItem<K, V> *tem = (HashTableItem<K, V> *)table_.lookup(key);
- return tem ? &tem->value : 0;
- }
- size_t count() const { return table_.count(); }
-private:
- CopyOwnerTable<HashTableItemBase<K>, K, Hash, HashTableKeyFunction<K> > table_;
-friend class HashTableIter<K,V>;
-};
-
-template<class K, class V>
-class HashTableIter {
-public:
- HashTableIter(const HashTable<K, V> &table) : iter_(table.table_) { }
- Boolean next(const K *&key, const V *&value) {
- HashTableItem<K, V> *p = (HashTableItem<K, V> *)iter_.next();
- if (p) {
- key = &p->key;
- value = &p->value;
- return 1;
- }
- else
- return 0;
- }
-private:
- OwnerTableIter<HashTableItemBase<K>, K, Hash, HashTableKeyFunction<K> > iter_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not HashTable_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "HashTable.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.cxx
deleted file mode 100644
index 276ee0d49c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.cxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef HashTableItemBase_DEF_INCLUDED
-#define HashTableItemBase_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class K>
-HashTableItemBase<K>::~HashTableItemBase()
-{
-}
-
-template<class K>
-HashTableItemBase<K>::HashTableItemBase(const K &k) : key(k)
-{
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not HashTableItemBase_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.h b/usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.h
deleted file mode 100644
index 60c2310d25..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/HashTableItemBase.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef HashTableItemBase_INCLUDED
-#define HashTableItemBase_INCLUDED 1
-
-// All hash tables with the same type of key share object code.
-// The cost of this is a virtual dtor in HashTableItemBase.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class K>
-class HashTableItemBase {
-public:
- HashTableItemBase(const K &k);
- virtual ~HashTableItemBase();
- virtual HashTableItemBase<K> *copy() const = 0;
- K key;
-};
-
-template<class K>
-struct HashTableKeyFunction {
- static inline const K &key(const HashTableItemBase<K> &obj) {
- return obj.key;
- }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not HashTableItemBase_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "HashTableItemBase.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IList.h b/usr/src/cmd/man/src/util/nsgmls.src/include/IList.h
deleted file mode 100644
index 8ccdaa5d71..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IList.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IList_INCLUDED
-#define IList_INCLUDED 1
-
-#include "IListBase.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T> class IListIter;
-
-// This owns the objects that are put in it.
-
-template<class T>
-class IList : private IListBase {
-public:
- IList() { }
- IList(T *p) : IListBase(p) { }
- ~IList() { clear(); }
- void append(T *p) { IListBase::append(p); }
- void insert(T *p) { IListBase::insert(p); }
- void remove(T *p) { IListBase::remove(p); }
- void swap(IList<T> &list) { IListBase::swap(list); }
- T *head() const { return (T *)IListBase::head(); }
- T *get() { return (T *)IListBase::get(); }
- IListBase::clear;
- IListBase::empty;
-friend class IListIter<T>;
-private:
- IList(const IList<T> &); // undefined
- IList<T> &operator=(const IList<T> &); // undefined
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IList_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IListBase.h b/usr/src/cmd/man/src/util/nsgmls.src/include/IListBase.h
deleted file mode 100644
index 94419bae46..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IListBase.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IListBase_INCLUDED
-#define IListBase_INCLUDED 1
-
-#include "Link.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API IListBase {
-public:
- IListBase();
- IListBase(Link *);
- void append(Link *);
- void insert(Link *);
- Link *head() const;
- Boolean empty() const;
- Link *get();
- void remove(Link *);
- void swap(IListBase &);
- void clear();
-private:
- Link *head_;
-friend class IListIterBase;
-};
-
-inline
-IListBase::IListBase() : head_(0)
-{
-}
-
-inline
-IListBase::IListBase(Link *head) : head_(head)
-{
-}
-
-inline
-void IListBase::insert(Link *p)
-{
- p->next_ = head_;
- head_ = p;
-}
-
-inline
-Link *IListBase::head() const
-{
- return head_;
-}
-
-inline
-Boolean IListBase::empty() const
-{
- return head_ == 0;
-}
-
-inline
-Link *IListBase::get()
-{
- Link *tem = head_;
- head_ = head_->next_;
- return tem;
-}
-
-inline
-void IListBase::swap(IListBase &list)
-{
- Link *tem = head_;
- head_ = list.head_;
- list.head_ = tem;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IListBase_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IListIter.h b/usr/src/cmd/man/src/util/nsgmls.src/include/IListIter.h
deleted file mode 100644
index b4957fb8b1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IListIter.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IListIter_INCLUDED
-#define IListIter_INCLUDED 1
-
-#include "IListIterBase.h"
-#include "IList.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class IListIter : private IListIterBase {
-public:
- IListIter(const IList<T> &list) : IListIterBase(list) { }
- T *cur() const { return (T *)IListIterBase::cur(); }
-
- IListIterBase::next;
- IListIterBase::done;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IListIter_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IListIterBase.h b/usr/src/cmd/man/src/util/nsgmls.src/include/IListIterBase.h
deleted file mode 100644
index 3ce51bedf9..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IListIterBase.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IListIterBase_INCLUDED
-#define IListIterBase_INCLUDED 1
-
-#include "Link.h"
-#include "IListBase.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API IListIterBase {
-public:
- IListIterBase(const IListBase &);
- int done() const;
- Link *cur() const;
- void next();
-private:
- Link *p_;
-};
-
-inline
-IListIterBase::IListIterBase(const IListBase &list) : p_(list.head_)
-{
-}
-
-inline
-int IListIterBase::done() const
-{
- return p_ == 0;
-}
-
-inline
-Link *IListIterBase::cur() const
-{
- return p_;
-}
-
-inline
-void IListIterBase::next()
-{
- p_ = p_->next_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IListIterBase_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.cxx
deleted file mode 100644
index 186aa03ec9..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.cxx
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IQueue_DEF_INCLUDED
-#define IQueue_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-void IQueue<T>::clear()
-{
- while (!empty())
- delete get();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IQueue_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.h b/usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.h
deleted file mode 100644
index aa6e7a9ec8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IQueue.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IQueue_INCLUDED
-#define IQueue_INCLUDED 1
-
-#include "Boolean.h"
-#include "Link.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class IQueueBase {
-public:
- IQueueBase() : last_(0) { }
- ~IQueueBase() { }
- Boolean empty() const { return last_ == 0; }
- Link *get() {
- Link *tem = last_->next_;
- if (tem == last_)
- last_ = 0;
- else
- last_->next_ = tem->next_;
- return tem;
- }
- void append(Link *p) {
- if (last_) {
- p->next_ = last_->next_;
- last_ = last_->next_ = p;
- }
- else
- last_ = p->next_ = p;
- }
- void swap(IQueueBase &with) {
- Link *tem = last_;
- last_ = with.last_;
- with.last_ = tem;
- }
-private:
- Link *last_;
-
-};
-
-template<class T>
-class IQueue : private IQueueBase {
-public:
- IQueue() { }
- ~IQueue() { clear(); }
- void clear();
- T *get() { return (T *)IQueueBase::get(); }
- void append(T *p) { IQueueBase::append(p); }
- Boolean empty() const { return IQueueBase::empty(); }
- void swap(IQueue<T> &to) { IQueueBase::swap(to); }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IQueue_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "IQueue.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ISO8859InputCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ISO8859InputCodingSystem.h
deleted file mode 100644
index b71e353767..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ISO8859InputCodingSystem.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#pragma ident "@(#)ISO8859InputCodingSystem.h 1.2 97/04/24 SMI"
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ISO8859InputCodingSystem_INCLUDED
-#define ISO8859InputCodingSystem_INCLUDED 1
-
-#include "TranslateInputCodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ISO8859InputCodingSystem : public TranslateInputCodingSystem {
-public:
- // part must be between 2 and 9
- ISO8859InputCodingSystem(int part);
-private:
- const Char *partMap(int);
- static const Char maps[8][256];
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ISO8859InputCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ISet.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/ISet.cxx
deleted file mode 100644
index c897dd81eb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ISet.cxx
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ISet_DEF_INCLUDED
-#define ISet_DEF_INCLUDED 1
-
-#include <stdlib.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-ISet<T>::ISet()
-{
-}
-
-template<class T>
-ISet<T>::~ISet()
-{
-}
-
-template<class T>
-ISet<T>::ISet(const T *v, size_t n)
-{
- for (size_t i = 0; i < n; i++)
- add(v[i]);
-}
-
-template<class T>
-Boolean ISet<T>::contains(T x) const
-{
- for (size_t i = 0; i < r_.size(); i++)
- if (r_[i].max >= x)
- return r_[i].min <= x ? 1 : 0;
- return 0;
-}
-
-template<class T>
-void ISet<T>::addRange(T min, T max)
-{
- size_t i;
- if (min == 0)
- i = 0;
- else {
- for (i = r_.size(); i > 0 && min - 1 <= r_[i - 1].max; i--)
- ;
- }
- // r_[i - 1].max < min - 1 <= r_[i].max
- if (i < r_.size() && (r_[i].min == 0 || max >= r_[i].min - 1)) {
- // we can coelesce
- if (min < r_[i].min)
- r_[i].min = min;
- if (max > r_[i].max) {
- r_[i].max = max;
- size_t j;
- for (j = i + 1; j < r_.size() && r_[i].max >= r_[j].min - 1; j++)
- r_[i].max = r_[j].max;
- // get rid of i + 1 ... j - 1
- if (j > i + 1) {
- for (size_t k = j; k < r_.size(); k++)
- r_[k - (j - i - 1)] = r_[k];
- r_.resize(r_.size() - (j - i - 1));
- }
- }
- }
- else {
- // r_[i - 1].max < min - 1
- // max + 1 < r_[i].min
- r_.resize(r_.size() + 1);
- for (size_t j = r_.size() - 1; j > i; j--)
- r_[j] = r_[j - 1];
- r_[i].max = max;
- r_[i].min = min;
- }
-}
-
-template<class T>
-void ISet<T>::remove(T c)
-{
- for (size_t i = 0; i < r_.size(); i++)
- if (r_[i].max >= c) {
- if (r_[i].min <= c) {
- if (r_[i].min == r_[i].max) {
- while (++i < r_.size())
- r_[i - 1] = r_[i];
- r_.resize(r_.size() - 1);
- }
- else if (c == r_[i].min)
- r_[i].min += 1;
- else if (c == r_[i].max)
- r_[i].max -= 1;
- else {
- r_.resize(r_.size() + 1);
- // split the range
- // subtracting 2 is safe since we know that the length is >= 2
- for (size_t j = r_.size() - 2; j > i; j--)
- r_[j + 1] = r_[j];
- r_[i + 1].max = r_[i].max;
- r_[i + 1].min = c + 1;
- r_[i].max = c - 1;
- }
- }
- break;
- }
-}
-
-template<class T>
-void ISet<T>::check()
-{
- for (size_t i = 0; i < r_.size(); i++) {
- if (r_[i].min > r_[i].max)
- abort();
- // adjacent ranges must be coalesced
- if (i > 0 && r_[i].min - 1 <= r_[i - 1].max)
- abort();
- }
-}
-
-template<class T>
-void ISet<T>::clear()
-{
- r_.resize(0);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ISet_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ISet.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ISet.h
deleted file mode 100644
index 8b08e44c4b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ISet.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ISet_INCLUDED
-#define ISet_INCLUDED
-
-
-#include <stddef.h>
-#include "Vector.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T> class ISetIter;
-
-template<class T>
-struct ISetRange {
- T min;
- T max;
-};
-
-template<class T>
-class ISet {
-public:
- ISet();
- ISet(const T *, size_t);
- ~ISet();
- Boolean contains(T) const;
- void remove(T);
- void add(T x) { addRange(x, x); }
- void addRange(T, T);
-#if 0
- void add(const ISet<T> &);
-#endif
- void check();
- void operator+=(T x) { addRange(x, x); }
- void clear();
- Boolean isSingleton() const {
- return r_.size() == 1 && r_[0].min == r_[0].max;
- }
- Boolean isEmpty() const { return r_.size() == 0; }
- void swap(ISet<T> &x) { r_.swap(x.r_); }
-friend class ISetIter<T>;
-private:
- Vector<ISetRange<T> > r_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ISet_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "ISet.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ISetIter.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ISetIter.h
deleted file mode 100644
index 2820b9fd4a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ISetIter.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ISetIter_INCLUDED
-#define ISetIter_INCLUDED
-
-#include <stddef.h>
-#include "ISet.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class ISetIter {
-public:
- ISetIter(const ISet<T> &s) : p_(&s), i_(0) { }
- // min and max are not changed if 0 is returned.
- int next(T &min, T &max)
- {
- if (i_ < p_->r_.size()) {
- min = p_->r_[i_].min;
- max = p_->r_[i_].max;
- i_++;
- return 1;
- }
- else
- return 0;
- }
-
-private:
- const ISet<T> *p_;
- size_t i_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* ISetIter_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/IdentityCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/IdentityCodingSystem.h
deleted file mode 100644
index 407bc31e65..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/IdentityCodingSystem.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef IdentityCodingSystem_INCLUDED
-#define IdentityCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API IdentityCodingSystem : public CodingSystem {
-public:
- IdentityCodingSystem();
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
- Boolean isIdentity() const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not IdentityCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/InputSource.h b/usr/src/cmd/man/src/util/nsgmls.src/include/InputSource.h
deleted file mode 100644
index 308ca871c2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/InputSource.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef InputSource_INCLUDED
-#define InputSource_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Link.h"
-#include "Ptr.h"
-#include "Location.h"
-#include "XcharMap.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class NamedCharRef;
-class CharsetInfo;
-
-class SP_API InputSource : public Link {
-public:
- enum { eE = -1 }; // end of entity signal
-
- virtual ~InputSource();
- Xchar get(Messenger &);
- virtual void pushCharRef(Char ch, const NamedCharRef &) = 0;
- const Location &currentLocation() const;
- const Char *currentTokenStart() const;
- size_t currentTokenLength() const;
- const Char *currentTokenEnd() const;
- Index nextIndex() const;
- // Discard all but the last character of the current token.
- void discardInitial();
- void startToken();
- void startTokenNoMulticode();
- void endToken(size_t length);
- Xchar tokenChar(Messenger &);
- void ungetToken();
- void setMarkupScanTable(const XcharMap<unsigned char> &);
- Boolean scanSuppress() const;
- void extendToBufferEnd();
- virtual void willNotRewind();
- virtual Boolean rewind(Messenger &) = 0;
- Boolean accessError() const;
- virtual void setDocCharset(const CharsetInfo &docCharset,
- const CharsetInfo &emCharset);
- virtual void willNotSetDocCharset();
-protected:
- InputSource(InputSourceOrigin *origin, const Char *start, const Char *end);
- void reset(const Char *start, const Char *end);
- InputSourceOrigin *inputSourceOrigin();
- void noteCharRef(Index replacementIndex, const NamedCharRef &);
- const Char *cur();
- const Char *start();
- const Char *end();
- Index startIndex();
- void changeBuffer(const Char *newBase, const Char *oldBase);
- void advanceEnd(const Char *newEnd);
- void moveLeft();
- void moveStart(const Char *newStart);
- Char nextChar();
- void setAccessError();
-private:
- InputSource(const InputSource &); // undefined
- void operator=(const InputSource &); // undefined
- virtual Xchar fill(Messenger &) = 0;
- void advanceStart(const Char *to);
- void advanceStartMulticode(const Char *to);
-
- const Char *cur_;
- const Char *start_;
- const Char *end_;
- Location startLocation_;
- Ptr<InputSourceOrigin> origin_;
- Boolean accessError_;
- Boolean scanSuppress_;
- Boolean scanSuppressSingle_;
- Index scanSuppressIndex_;
- Boolean multicode_;
- XcharMap<unsigned char> markupScanTable_;
-};
-
-inline
-void InputSource::advanceStart(const Char *to)
-{
- if (multicode_)
- advanceStartMulticode(to);
- else {
- startLocation_ += to - start_;
- start_ = to;
- }
-}
-
-inline
-Xchar InputSource::get(Messenger &mgr)
-{
- advanceStart(cur_);
- return cur_ < end_ ? *cur_++ : fill(mgr);
-}
-
-inline
-void InputSource::startTokenNoMulticode()
-{
- startLocation_ += cur_ - start_;
- start_ = cur_;
-}
-
-inline
-void InputSource::startToken()
-{
- advanceStart(cur_);
-}
-
-inline
-void InputSource::endToken(size_t length)
-{
- cur_ = start_ + length;
-}
-
-inline
-Xchar InputSource::tokenChar(Messenger &mgr)
-{
- return cur_ < end_ ? *cur_++ : fill(mgr);
-}
-
-inline
-void InputSource::extendToBufferEnd()
-{
- cur_ = end_;
-}
-
-inline
-const Char *InputSource::cur()
-{
- return cur_;
-}
-
-inline
-const Char *InputSource::start()
-{
- return start_;
-}
-
-inline
-const Char *InputSource::end()
-{
- return end_;
-}
-
-inline
-void InputSource::changeBuffer(const Char *newBase, const Char *oldBase)
-{
- cur_ = newBase + (cur_ - oldBase);
- start_ = newBase + (start_ - oldBase);
- end_ = newBase + (end_ - oldBase);
-}
-
-inline
-void InputSource::moveStart(const Char *newStart)
-{
- cur_ = newStart + (cur_ - start_);
- end_ = newStart + (end_ - start_);
- start_ = newStart;
-}
-
-inline
-void InputSource::advanceEnd(const Char *newEnd)
-{
- end_ = newEnd;
-}
-
-inline
-Char InputSource::nextChar()
-{
- return *cur_++;
-}
-
-inline
-Index InputSource::startIndex()
-{
- return startLocation_.index();
-}
-
-inline
-void InputSource::moveLeft()
-{
- start_--;
- cur_--;
-}
-
-inline
-void InputSource::noteCharRef(Index replacementIndex, const NamedCharRef &ref)
-{
- origin_->noteCharRef(replacementIndex, ref);
-}
-
-inline
-const Location &InputSource::currentLocation() const
-{
- return startLocation_;
-}
-
-inline
-const Char *InputSource::currentTokenStart() const
-{
- return start_;
-}
-
-inline
-size_t InputSource::currentTokenLength() const
-{
- return cur_ - start_;
-}
-
-inline
-Index InputSource::nextIndex() const
-{
- return startLocation_.index() + (cur_ - start_);
-}
-
-inline
-const Char *InputSource::currentTokenEnd() const
-{
- return cur_;
-}
-
-inline
-void InputSource::discardInitial()
-{
- advanceStart(cur_ - 1);
-}
-
-inline
-void InputSource::ungetToken()
-{
- cur_ = start_;
-}
-
-inline
-void InputSource::setMarkupScanTable(const XcharMap<unsigned char> &table)
-{
- markupScanTable_ = table;
- multicode_ = 1;
-}
-
-inline
-Boolean InputSource::scanSuppress() const
-{
- return scanSuppress_ && (!scanSuppressSingle_
- || startLocation_.index() == scanSuppressIndex_);
-}
-
-inline
-InputSourceOrigin *InputSource::inputSourceOrigin()
-{
- return origin_.pointer();
-}
-
-inline
-void InputSource::setAccessError()
-{
- accessError_ = 1;
-}
-
-inline
-Boolean InputSource::accessError() const
-{
- return accessError_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not InputSource_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/InternalInputSource.h b/usr/src/cmd/man/src/util/nsgmls.src/include/InternalInputSource.h
deleted file mode 100644
index b8f1aae8cb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/InternalInputSource.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef InternalInputSource_INCLUDED
-#define InternalInputSource_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include "InputSource.h"
-#include "Allocator.h"
-#include "StringC.h"
-#include "types.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class InputSourceOrigin;
-class Messenger;
-class NamedCharRef;
-
-class SP_API InternalInputSource : public InputSource {
-public:
- void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
- void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
- void operator delete(void *p) { Allocator::free(p); }
- InternalInputSource(const StringC &, InputSourceOrigin *);
- Xchar fill(Messenger &);
- void pushCharRef(Char ch, const NamedCharRef &);
- Boolean rewind(Messenger &);
- ~InternalInputSource();
-private:
- InternalInputSource(const InternalInputSource &); // undefined
- void operator=(const InternalInputSource &); // undefined
- Char *buf_;
- const StringC *contents_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not InternalInputSource_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Link.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Link.h
deleted file mode 100644
index 10e7f3461b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Link.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Link_INCLUDED
-#define Link_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Link {
-public:
- Link();
- Link(Link *);
- virtual ~Link();
-private:
- Link *next_;
-
-friend class IListBase;
-friend class IListIterBase;
-friend class IQueueBase;
-};
-
-inline
-Link::Link() : next_(0)
-{
-}
-
-inline
-Link::Link(Link *next) : next_(next)
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Link_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/LinkProcess.h b/usr/src/cmd/man/src/util/nsgmls.src/include/LinkProcess.h
deleted file mode 100644
index e6060178c4..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/LinkProcess.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef LinkProcess_INCLUDED
-#define LinkProcess_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Lpd.h"
-#include "IList.h"
-#include "Link.h"
-#include "Vector.h"
-#include "Vector.h"
-#include "Ptr.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-
-struct SP_API LinkProcessOpenElement : public Link {
- LinkProcessOpenElement(const LinkSet *current, const SourceLinkRule &);
- LinkProcessOpenElement(const LinkSet *current);
- const LinkSet *current;
- const LinkSet *restore;
- const LinkSet *post;
- Boolean postRestore;
-};
-
-class SP_API LinkProcess {
-public:
- LinkProcess();
- void init(const ConstPtr<ComplexLpd> &lpd);
- Boolean startElement(const ElementType *,
- const AttributeList &attributes,
- const Location &location,
- Messenger &,
- const AttributeList *&linkAttributes,
- const ResultElementSpec *&resultElementSpec);
- void endElement();
- void uselink(const LinkSet *linkSet,
- Boolean restore,
- const Lpd *);
- virtual Boolean selectLinkRule(const Vector<const AttributeList *> &,
- const Location &location,
- size_t &selected);
- size_t nImpliedLinkRules() const;
- const ResultElementSpec &impliedLinkRule(size_t) const;
- const StringC &name() const;
- Boolean isExplicit() const;
- void clear();
- void swap(LinkProcess &);
-private:
- LinkProcess(const LinkProcess &); // undefined
- void operator=(const LinkProcess &); // undefined
-
- IList<LinkProcessOpenElement> open_;
- ConstPtr<ComplexLpd> lpd_;
- Vector<ConstPtr<Lpd> > activeLpds_;
- Vector<const AttributeList *> linkAttributes_;
-};
-
-inline
-const StringC &LinkProcess::name() const
-{
- return lpd_->name();
-}
-
-inline
-Boolean LinkProcess::isExplicit() const
-{
- return lpd_->type() == Lpd::explicitLink;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not LinkProcess_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/List.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/List.cxx
deleted file mode 100644
index abef5a6834..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/List.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef List_DEF_INCLUDED
-#define List_DEF_INCLUDED 1
-
-#include "IListIter.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-void List<T>::remove(const T &value)
-{
- for (IListIter<ListItem<T> > iter(list_); !iter.done(); iter.next())
- if (iter.cur()->value == value) {
- list_.remove(iter.cur());
- delete iter.cur();
- break;
- }
-}
-
-template<class T>
-T List<T>::get()
-{
- ListItem<T> *p = list_.get();
- T temp(p->value);
- delete p;
- return temp;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not List_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/List.h b/usr/src/cmd/man/src/util/nsgmls.src/include/List.h
deleted file mode 100644
index 7939a8f4fb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/List.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef List_INCLUDED
-#define List_INCLUDED 1
-
-#include "IList.h"
-#include "Link.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class ListItem : public Link {
-public:
- ListItem(const T &v) : value(v) { }
- T value;
-};
-
-template<class T> class ListIter;
-
-template<class T>
-class List {
-public:
- List() { }
- void append(const T &item) { list_.append(new ListItem<T>(item)); }
- void insert(const T &item) { list_.insert(new ListItem<T>(item)); }
- const T &head() const { return list_.head()->value; }
- void remove(const T &);
- T get();
- int empty() const { return list_.empty(); }
- friend class ListIter<T>;
-private:
- List(const List<T> &); // undefined
- void operator=(const List<T> &); // undefined
-
- IList<ListItem<T> > list_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not List_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "List.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ListIter.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ListIter.h
deleted file mode 100644
index 93f3569cd7..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ListIter.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ListIter_INCLUDED
-#define ListIter_INCLUDED 1
-
-#include "List.h"
-#include "IListIter.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class ListIter {
-public:
- ListIter(const List<T> &list) : iter_(list.list_) { }
- const T &cur() const { return iter_.cur()->value; }
- int done() const { return iter_.done(); }
- void next() { iter_.next(); }
-private:
- IListIter<ListItem<T> > iter_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ListIter_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/LiteralStorage.h b/usr/src/cmd/man/src/util/nsgmls.src/include/LiteralStorage.h
deleted file mode 100644
index cb364c55dc..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/LiteralStorage.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef LiteralStorage_INCLUDED
-#define LiteralStorage_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StorageManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API LiteralStorageManager : public StorageManager {
-public:
- LiteralStorageManager(const char *type);
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &,
- Boolean,
- Boolean mayRewind,
- Messenger &,
- StringC &found);
- const InputCodingSystem *requiredCodingSystem() const;
- Boolean requiresCr() const;
- const char *type() const;
- Boolean inheritable() const;
-private:
- LiteralStorageManager(const LiteralStorageManager &); // undefined
- void operator=(const LiteralStorageManager &); // undefined
-
- const char *type_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not LiteralStorage_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Location.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Location.h
deleted file mode 100644
index 9ac1b128d9..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Location.h
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Location_INCLUDED
-#define Location_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Boolean.h"
-#include "Ptr.h"
-#include "Resource.h"
-#include "Boolean.h"
-#include "Vector.h"
-#include "Owner.h"
-#include "StringC.h"
-#include "rtti.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ExternalInfo;
-class EntityOrigin;
-class InputSourceOrigin;
-class Entity;
-class EntityDecl;
-class Location;
-class Markup;
-class Text;
-class NamedCharRef;
-
-class SP_API Origin : public Resource {
-public:
- virtual ~Origin();
- virtual const EntityOrigin *asEntityOrigin() const;
- virtual const InputSourceOrigin *asInputSourceOrigin() const;
- virtual const Location &parent() const = 0;
- virtual Index refLength() const;
- virtual Boolean origChars(const Char *&) const;
- virtual Boolean inBracketedTextOpenDelim() const;
- virtual Boolean inBracketedTextCloseDelim() const;
- virtual Boolean isNumericCharRef(const Markup *&markup) const;
- virtual Boolean isNamedCharRef(Index ind, NamedCharRef &ref) const;
- virtual const EntityDecl *entityDecl() const;
- virtual Boolean defLocation(Offset off, const Origin *&, Index &) const;
- virtual const Markup *markup() const;
- virtual const Entity *entity() const;
- virtual const ExternalInfo *externalInfo() const;
- virtual Offset startOffset(Index ind) const;
- const StringC *entityName() const;
-};
-
-class SP_API ProxyOrigin : public Origin {
-public:
- ProxyOrigin(const Origin *origin);
- const EntityOrigin *asEntityOrigin() const;
- const InputSourceOrigin *asInputSourceOrigin() const;
- const Location &parent() const;
- Index refLength() const;
- Boolean origChars(const Char *&) const;
- Boolean inBracketedTextOpenDelim() const;
- Boolean inBracketedTextCloseDelim() const;
- Boolean isNumericCharRef(const Markup *&markup) const;
- Boolean isNamedCharRef(Index ind, NamedCharRef &ref) const;
- const EntityDecl *entityDecl() const;
- Boolean defLocation(Offset off, const Origin *&, Index &) const;
- const Markup *markup() const;
- const Entity *entity() const;
- const ExternalInfo *externalInfo() const;
- Offset startOffset(Index ind) const;
-private:
- const Origin *origin_;
-};
-
-class SP_API Location {
-public:
- Location();
- Location(Origin *, Index);
- Location(ConstPtr<Origin>, Index);
- void operator+=(Index i) { index_ += i; }
- void operator-=(Index i) { index_ -= i; }
- Index index() const { return index_; }
- const ConstPtr<Origin> &origin() const { return origin_; }
- void clear() { origin_.clear(); }
- void swap(Location &to) {
- origin_.swap(to.origin_);
- Index tem = to.index_;
- to.index_ = index_;
- index_ = tem;
- }
-private:
- ConstPtr<Origin> origin_;
- Index index_;
-};
-
-class SP_API ExternalInfo {
- RTTI_CLASS
-public:
- virtual ~ExternalInfo();
-};
-
-class SP_API NamedCharRef {
-public:
- enum RefEndType {
- endOmitted,
- endRE,
- endRefc
- };
- NamedCharRef();
- NamedCharRef(Index, RefEndType, const StringC &);
- Index refStartIndex() const;
- RefEndType refEndType() const;
- const StringC &origName() const;
- void set(Index, RefEndType, const Char *, size_t);
-private:
- Index refStartIndex_;
- RefEndType refEndType_;
- StringC origName_;
-};
-
-struct SP_API InputSourceOriginNamedCharRef {
- Index replacementIndex;
- size_t origNameOffset;
- Index refStartIndex;
- NamedCharRef::RefEndType refEndType;
-};
-
-class SP_API InputSourceOrigin : public Origin {
-public:
- virtual void noteCharRef(Index replacementIndex, const NamedCharRef &) = 0;
- virtual void setExternalInfo(ExternalInfo *) = 0;
- virtual InputSourceOrigin *copy() const = 0;
- static InputSourceOrigin *make();
- static InputSourceOrigin *make(const Location &refLocation);
-};
-
-// a delimiter specified in bracketed text
-
-class SP_API BracketOrigin : public Origin {
-public:
- enum Position { open, close };
- BracketOrigin(const Location &, Position);
- const Location &parent() const;
- Boolean inBracketedTextOpenDelim() const;
- Boolean inBracketedTextCloseDelim() const;
-private:
- Position pos_;
- Location loc_;
-};
-
-class SP_API ReplacementOrigin : public Origin {
-public:
- ReplacementOrigin(const Location &, Char origChar);
- const Location &parent() const;
- Boolean origChars(const Char *&) const;
-private:
- Location loc_;
- Char origChar_;
-};
-
-class SP_API MultiReplacementOrigin : public Origin {
-public:
- MultiReplacementOrigin(const Location &, StringC &origChars);
- const Location &parent() const;
- Boolean origChars(const Char *&) const;
-private:
- Location loc_;
- StringC origChars_;
-};
-
-inline
-Index NamedCharRef::refStartIndex() const
-{
- return refStartIndex_;
-}
-
-inline
-NamedCharRef::RefEndType NamedCharRef::refEndType() const
-{
- return refEndType_;
-}
-
-inline
-const StringC &NamedCharRef::origName() const
-{
- return origName_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Location_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Lpd.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Lpd.h
deleted file mode 100644
index 66332f2080..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Lpd.h
+++ /dev/null
@@ -1,447 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Lpd_INCLUDED
-#define Lpd_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Attribute.h"
-#include "StringC.h"
-#include "Ptr.h"
-#include "Resource.h"
-#include "Boolean.h"
-#include "Named.h"
-#include "NamedTable.h"
-#include "Syntax.h"
-#include "Location.h"
-#include "Dtd.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ElementType;
-
-struct SP_API ResultElementSpec {
- ResultElementSpec();
- const ElementType *elementType;
- AttributeList attributeList;
- void swap(ResultElementSpec &);
-};
-
-class SP_API Lpd : public Resource {
-public:
- enum Type { simpleLink, implicitLink, explicitLink };
- Lpd(const StringC &, Type, const Location &,
- const Ptr<Dtd> &sourceDtd);
- virtual ~Lpd();
- Type type() const;
- const Location &location() const;
- const Ptr<Dtd> &sourceDtd();
- ConstPtr<Dtd> sourceDtd() const;
- Boolean active() const;
- void activate();
- const ConstPtr<StringResource<Char> > &namePointer() const;
- const StringC &name() const;
-private:
- Lpd(const Lpd &); // undefined
- void operator=(const Lpd &); // undefined
- Type type_;
- Location location_;
- Boolean active_;
- Ptr<Dtd> sourceDtd_;
- ConstPtr<StringResource<Char> > name_;
-};
-
-class SP_API SimpleLpd : public Lpd, public Attributed {
-public:
- SimpleLpd(const StringC &, const Location &,
- const Ptr<Dtd> &sourceDtd);
-private:
- SimpleLpd(const SimpleLpd &); // undefined
- void operator=(const SimpleLpd &); // undefined
-};
-
-class LinkSet;
-
-// A link rule whose source element specification is not implied.
-
-class SP_API SourceLinkRule {
-public:
- SourceLinkRule();
- void setLinkAttributes(AttributeList &);
- void setResult(const ElementType *, AttributeList &);
- void setUselink(const LinkSet *);
- void setPostlink(const LinkSet *);
- void setPostlinkRestore();
- void swap(SourceLinkRule &);
- const AttributeList &attributes() const;
- const ResultElementSpec &resultElementSpec() const;
- const LinkSet *uselink() const;
- const LinkSet *postlink() const;
- Boolean postlinkRestore() const;
-private:
- const LinkSet *uselink_;
- const LinkSet *postlink_;
- Boolean postlinkRestore_;
- AttributeList linkAttributes_;
- ResultElementSpec resultElementSpec_;
-};
-
-class SP_API SourceLinkRuleResource : public Resource, public SourceLinkRule {
-public:
- SourceLinkRuleResource();
-};
-
-class SP_API LinkSet : public Named {
-public:
- LinkSet(const StringC &, const Dtd *);
- void setDefined();
- Boolean defined() const;
- void addImplied(const ElementType *, AttributeList &);
- size_t nLinkRules(const ElementType *) const;
- const SourceLinkRule &linkRule(const ElementType *, size_t) const;
- void addLinkRule(const ElementType *,
- const ConstPtr<SourceLinkRuleResource> &);
- size_t nImpliedLinkRules() const;
- const ResultElementSpec &impliedLinkRule(size_t) const;
- Boolean impliedResultAttributes(const ElementType *,
- const AttributeList *&);
-private:
- LinkSet(const LinkSet &); // undefined
- void operator=(const LinkSet &); // undefined
- Boolean defined_;
- // indexed by typeIndex of source elements
- Vector<Vector<ConstPtr<SourceLinkRuleResource> > >
- linkRules_;
- Vector<ResultElementSpec> impliedSourceLinkRules_;
-};
-
-class SP_API IdLinkRule : public SourceLinkRule {
-public:
- IdLinkRule();
- Boolean isAssociatedWith(const ElementType *) const;
- void setAssocElementTypes(Vector<const ElementType *> &);
- void swap(IdLinkRule &);
-private:
- Vector<const ElementType *> assocElementTypes_;
-};
-
-// A collection of link rules in a ID link set that are
-// assocated with the same name (unique identifier).
-
-class SP_API IdLinkRuleGroup : public Named {
-public:
- IdLinkRuleGroup(const StringC &);
- size_t nLinkRules() const;
- const IdLinkRule &linkRule(size_t) const;
- void addLinkRule(IdLinkRule &);
-private:
- IdLinkRuleGroup(const IdLinkRuleGroup &); // undefined
- void operator=(const IdLinkRuleGroup &); // undefined
- Vector<IdLinkRule> linkRules_;
-};
-
-// An implicit or explicit LPD.
-
-class SP_API ComplexLpd : public Lpd {
-public:
- typedef ConstNamedTableIter<LinkSet> ConstLinkSetIter;
- ComplexLpd(const StringC &, Type,
- const Location &,
- const Syntax &syntax,
- const Ptr<Dtd> &sourceDtd,
- const Ptr<Dtd> &resultDtd);
- size_t allocAttributeDefinitionListIndex();
- size_t nAttributeDefinitionList() const;
- LinkSet *initialLinkSet();
- const LinkSet *initialLinkSet() const;
- const LinkSet *emptyLinkSet() const;
- const LinkSet *lookupLinkSet(const StringC &) const;
- const IdLinkRuleGroup *lookupIdLink(const StringC &) const;
- IdLinkRuleGroup *lookupCreateIdLink(const StringC &);
- void insertIdLink(IdLinkRuleGroup *);
- ConstLinkSetIter linkSetIter() const;
- Boolean hadIdLinkSet() const;
- void setHadIdLinkSet();
-
- LinkSet *lookupLinkSet(const StringC &);
- LinkSet *insertLinkSet(LinkSet *);
- const Ptr<Dtd> &resultDtd();
- ConstPtr<Dtd> resultDtd() const;
- const ConstPtr<AttributeDefinitionList> &
- attributeDef(const ElementType *) const;
- void setAttributeDef(const ElementType *,
- const ConstPtr<AttributeDefinitionList> &);
-private:
- ComplexLpd(const ComplexLpd &); // undefined
- void operator=(const ComplexLpd &); // undefined
- Ptr<Dtd> resultDtd_;
- Vector<ConstPtr<AttributeDefinitionList> > linkAttributeDefs_;
- NamedTable<LinkSet> linkSetTable_;
- LinkSet initialLinkSet_;
- LinkSet emptyLinkSet_;
- Boolean hadIdLinkSet_;
- NamedTable<IdLinkRuleGroup> idLinkTable_;
- size_t nAttributeDefinitionList_;
-};
-
-inline
-Lpd::Type Lpd::type() const
-{
- return type_;
-}
-
-inline
-const Location &Lpd::location() const
-{
- return location_;
-}
-
-inline
-Boolean Lpd::active() const
-{
- return active_;
-}
-
-inline
-void Lpd::activate()
-{
- active_ = 1;
-}
-
-inline
-ConstPtr<Dtd> Lpd::sourceDtd() const
-{
- return sourceDtd_;
-}
-
-inline
-const Ptr<Dtd> &Lpd::sourceDtd()
-{
- return sourceDtd_;
-}
-
-inline
-const ConstPtr<StringResource<Char> > &Lpd::namePointer() const
-{
- return name_;
-}
-
-inline
-const StringC &Lpd::name() const
-{
- return *name_;
-}
-
-inline
-void SourceLinkRule::setLinkAttributes(AttributeList &attributes)
-{
- attributes.swap(linkAttributes_);
-}
-
-inline
-const AttributeList &SourceLinkRule::attributes() const
-{
- return linkAttributes_;
-}
-
-inline
-void SourceLinkRule::setResult(const ElementType *element,
- AttributeList &attributes)
-{
- resultElementSpec_.elementType = element;
- attributes.swap(resultElementSpec_.attributeList);
-}
-
-inline
-const ResultElementSpec &SourceLinkRule::resultElementSpec() const
-{
- return resultElementSpec_;
-}
-
-inline
-void SourceLinkRule::setUselink(const LinkSet *linkSet)
-{
- uselink_ = linkSet;
-}
-
-inline
-void SourceLinkRule::setPostlink(const LinkSet *linkSet)
-{
- postlink_ = linkSet;
-}
-
-inline
-void SourceLinkRule::setPostlinkRestore()
-{
- postlinkRestore_ = 1;
-}
-
-inline
-const LinkSet *SourceLinkRule::uselink() const
-{
- return uselink_;
-}
-
-inline
-const LinkSet *SourceLinkRule::postlink() const
-{
- return postlink_;
-}
-
-inline
-Boolean SourceLinkRule::postlinkRestore() const
-{
- return postlinkRestore_;
-}
-
-inline
-Boolean LinkSet::defined() const
-{
- return defined_;
-}
-
-inline
-void LinkSet::setDefined()
-{
- defined_ = 1;
-}
-
-inline
-const SourceLinkRule &LinkSet::linkRule(const ElementType *e, size_t i) const
-{
- return *linkRules_[e->index()][i];
-}
-
-inline
-size_t LinkSet::nImpliedLinkRules() const
-{
- return impliedSourceLinkRules_.size();
-}
-
-inline
-const ResultElementSpec &LinkSet::impliedLinkRule(size_t i) const
-{
- return impliedSourceLinkRules_[i];
-}
-
-inline
-const Ptr<Dtd> &ComplexLpd::resultDtd()
-{
- return resultDtd_;
-}
-
-inline
-ConstPtr<Dtd> ComplexLpd::resultDtd() const
-{
- return resultDtd_;
-}
-
-inline
-LinkSet *ComplexLpd::initialLinkSet()
-{
- return &initialLinkSet_;
-}
-
-inline
-const LinkSet *ComplexLpd::initialLinkSet() const
-{
- return &initialLinkSet_;
-}
-
-inline
-const LinkSet *ComplexLpd::emptyLinkSet() const
-{
- return &emptyLinkSet_;
-}
-
-inline
-const LinkSet *ComplexLpd::lookupLinkSet(const StringC &name) const
-{
- return linkSetTable_.lookup(name);
-}
-
-inline
-LinkSet *ComplexLpd::lookupLinkSet(const StringC &name)
-{
- return linkSetTable_.lookup(name);
-}
-
-inline
-LinkSet *ComplexLpd::insertLinkSet(LinkSet *e)
-{
- return linkSetTable_.insert(e);
-}
-
-inline
-size_t ComplexLpd::nAttributeDefinitionList() const
-{
- return nAttributeDefinitionList_;
-}
-
-inline
-size_t ComplexLpd::allocAttributeDefinitionListIndex()
-{
- return nAttributeDefinitionList_++;
-}
-
-inline
-ComplexLpd::ConstLinkSetIter ComplexLpd::linkSetIter() const
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return ConstNamedTableIter<LinkSet>(linkSetTable_);
-}
-
-inline
-const ConstPtr<AttributeDefinitionList> &
-ComplexLpd::attributeDef(const ElementType *e) const
-{
- return linkAttributeDefs_[e->index()];
-}
-
-inline
-void ComplexLpd::setAttributeDef(const ElementType *e,
- const ConstPtr<AttributeDefinitionList> &attdef)
-{
- linkAttributeDefs_[e->index()] = attdef;
-}
-
-inline
-Boolean ComplexLpd::hadIdLinkSet() const
-{
- return hadIdLinkSet_;
-}
-
-inline
-void ComplexLpd::setHadIdLinkSet()
-{
- hadIdLinkSet_ = 1;
-}
-
-inline
-const IdLinkRuleGroup *ComplexLpd::lookupIdLink(const StringC &id) const
-{
- return idLinkTable_.lookup(id);
-}
-
-inline
-size_t IdLinkRuleGroup::nLinkRules() const
-{
- return linkRules_.size();
-}
-
-inline
-const IdLinkRule &IdLinkRuleGroup::linkRule(size_t i) const
-{
- return linkRules_[i];
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Lpd_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Markup.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Markup.h
deleted file mode 100644
index 72a22d950b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Markup.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Markup_INCLUDED
-#define Markup_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StringC.h"
-#include "Syntax.h"
-#include "Sd.h"
-#include "Vector.h"
-#include "Text.h"
-#include "SdText.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class EntityOrigin;
-
-struct SP_API MarkupItem {
- MarkupItem();
- MarkupItem(const MarkupItem &);
- ~MarkupItem();
- void operator=(const MarkupItem &);
- unsigned char type;
- unsigned char index;
- union {
- size_t nChars;
- ConstPtr<Origin> *origin; // type == entityStart
- Text *text; // type == literal
- SdText *sdText; // type == sdLiteral
- };
-};
-
-class InputSource;
-
-class SP_API Markup {
-public:
- enum Type {
- reservedName,
- sdReservedName,
- name,
- nameToken,
- attributeValue,
- number,
- comment,
- s,
- shortref,
- delimiter,
- refEndRe,
- entityStart,
- entityEnd,
- literal,
- sdLiteral
- };
- Markup();
- size_t size() const;
- void clear();
- void resize(size_t);
- void addDelim(Syntax::DelimGeneral);
- void addReservedName(Syntax::ReservedName, const InputSource *);
- void addReservedName(Syntax::ReservedName, const StringC &);
- void addSdReservedName(Sd::ReservedName, const InputSource *);
- void addSdReservedName(Sd::ReservedName, const Char *, size_t);
- void addS(Char);
- void addS(const InputSource *);
- void addRefEndRe();
- void addShortref(const InputSource *);
- void addCommentStart();
- void addCommentChar(Char);
- void addName(const InputSource *);
- void addName(const Char *, size_t);
- void addNameToken(const InputSource *);
- void addNumber(const InputSource *);
- void addAttributeValue(const InputSource *);
- void addEntityStart(const Ptr<EntityOrigin> &);
- void addEntityEnd();
- void addLiteral(const Text &);
- void addSdLiteral(const SdText &);
- void changeToAttributeValue(size_t index);
- void changeToSdReservedName(size_t index, Sd::ReservedName);
- void swap(Markup &);
-private:
- StringC chars_;
- Vector<MarkupItem> items_;
- friend class MarkupIter;
-};
-
-class Location;
-
-class SP_API MarkupIter {
-public:
- MarkupIter(const Markup &);
- Markup::Type type() const;
- Boolean valid() const;
- void advance();
- // This updates a Location.
- void advance(Location &, const ConstPtr<Syntax> &);
- size_t index() const;
- const Char *charsPointer() const;
- size_t charsLength() const;
- const Text &text() const;
- const EntityOrigin *entityOrigin() const; // valid for type == entityStart
- const SdText &sdText() const;
- Syntax::DelimGeneral delimGeneral() const;
- Syntax::ReservedName reservedName() const;
- Sd::ReservedName sdReservedName() const;
-private:
- const Char *chars_;
- Vector<MarkupItem>::const_iterator items_;
- size_t nItems_;
- size_t index_;
- size_t charIndex_;
-};
-
-inline
-void Markup::clear()
-{
- chars_.resize(0);
- items_.resize(0);
-}
-
-inline
-size_t Markup::size() const
-{
- return items_.size();
-}
-
-inline
-Boolean MarkupIter::valid() const
-{
- return index_ < nItems_;
-}
-
-inline
-size_t MarkupIter::index() const
-{
- return index_;
-}
-
-inline
-Markup::Type MarkupIter::type() const
-{
- return Markup::Type(items_[index_].type);
-}
-
-inline
-const EntityOrigin *MarkupIter::entityOrigin() const
-{
- return (*items_[index_].origin)->asEntityOrigin();
-}
-
-inline
-const Char *MarkupIter::charsPointer() const
-{
- return chars_ + charIndex_;
-}
-
-inline
-size_t MarkupIter::charsLength() const
-{
- return items_[index_].nChars;
-}
-
-inline
-const Text &MarkupIter::text() const
-{
- return *items_[index_].text;
-}
-
-inline
-const SdText &MarkupIter::sdText() const
-{
- return *items_[index_].sdText;
-}
-
-inline
-Syntax::DelimGeneral MarkupIter::delimGeneral() const
-{
- return Syntax::DelimGeneral(items_[index_].index);
-}
-
-inline
-Syntax::ReservedName MarkupIter::reservedName() const
-{
- return Syntax::ReservedName(items_[index_].index);
-}
-
-inline
-Sd::ReservedName MarkupIter::sdReservedName() const
-{
- return Sd::ReservedName(items_[index_].index);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Markup_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Message.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Message.h
deleted file mode 100644
index a7a158cc0e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Message.h
+++ /dev/null
@@ -1,260 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Message_INCLUDED
-#define Message_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include "Location.h"
-#include "Vector.h"
-#include "CopyOwner.h"
-#include "Boolean.h"
-#include "StringC.h"
-#include "MessageArg.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API MessageFragment {
-public:
- enum {
- libModule = 0,
- appModule = 1
- };
- MessageFragment(unsigned module, unsigned number, const char *text = 0);
- unsigned module() const;
- unsigned number() const;
- const char *text() const;
-private:
- unsigned short number_;
- unsigned char module_;
-protected:
- unsigned char spare_;
-private:
-#ifndef SP_NO_MESSAGE_TEXT
- const char *text_;
-#endif
-};
-
-class SP_API MessageType : public MessageFragment {
-public:
- enum Severity {
- info,
- warning,
- quantityError,
- idrefError,
- error
- };
- MessageType(Severity, unsigned module, unsigned number,
- const char *text = 0, const char *auxText = 0);
- Severity severity() const;
- MessageFragment auxFragment() const;
- Boolean isError() const;
-private:
-#ifndef SP_NO_MESSAGE_TEXT
- const char *auxText_;
-#endif
-};
-
-
-class SP_API MessageType0 : public MessageType {
-public:
- MessageType0(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType1 : public MessageType {
-public:
- MessageType1(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType2 : public MessageType {
-public:
- MessageType2(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType3 : public MessageType {
-public:
- MessageType3(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType4 : public MessageType {
-public:
- MessageType4(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType5 : public MessageType {
-public:
- MessageType5(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType6 : public MessageType {
-public:
- MessageType6(Severity, unsigned module, unsigned number, const char *text = 0);
-};
-
-class SP_API MessageType0L : public MessageType {
-public:
- MessageType0L(Severity, unsigned module, unsigned number, const char *text = 0,
- const char *auxText = 0);
-};
-
-class SP_API MessageType1L : public MessageType {
-public:
- MessageType1L(Severity, unsigned module, unsigned number, const char *text = 0,
- const char *auxText = 0);
-};
-
-class SP_API OpenElementInfo {
-public:
- OpenElementInfo();
- PackedBoolean included;
- StringC gi;
- StringC matchType;
- unsigned matchIndex;
-};
-
-class SP_API Message {
-public:
- Message();
- Message(int nArgs);
- const MessageType *type;
- Location loc;
- Location auxLoc;
- Vector<CopyOwner<MessageArg> > args;
- Vector<OpenElementInfo> openElementInfo;
- void swap(Message &);
- Boolean isError() const;
-};
-
-class SP_API Messenger {
-public:
- Messenger();
- virtual ~Messenger();
- void message(const MessageType0 &);
- void message(const MessageType1 &, const MessageArg &);
- void message(const MessageType2 &,
- const MessageArg &,
- const MessageArg &);
- void message(const MessageType3 &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &);
- void message(const MessageType4 &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &);
- void message(const MessageType5 &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &);
- void message(const MessageType6 &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &,
- const MessageArg &);
- void message(const MessageType0L &, const Location &);
- void message(const MessageType1L &, const MessageArg &, const Location &);
- void setNextLocation(const Location &);
- virtual void initMessage(Message &);
- virtual void dispatchMessage(const Message &) = 0;
- virtual void dispatchMessage(Message &);
-private:
- void doInitMessage(Message &);
- Boolean haveNextLocation_;
- Location nextLocation_;
-};
-
-class SP_API ForwardingMessenger : public Messenger {
-public:
- ForwardingMessenger(Messenger &);
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &);
- void initMessage(Message &);
-private:
- Messenger *to_;
-};
-
-class SP_API ParentLocationMessenger : public ForwardingMessenger {
-public:
- ParentLocationMessenger(Messenger &);
- void initMessage(Message &);
-};
-
-class SP_API NullMessenger : public Messenger {
-public:
- NullMessenger();
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &tmp_message) {
- dispatchMessage((const Message &)tmp_message);
- };
-};
-
-inline
-unsigned MessageFragment::module() const
-{
- return module_;
-}
-
-inline
-unsigned MessageFragment::number() const
-{
- return number_;
-}
-
-inline
-const char *MessageFragment::text() const
-{
-#ifdef SP_NO_MESSAGE_TEXT
- return 0;
-#else
- return text_;
-#endif
-}
-
-inline
-MessageType::Severity MessageType::severity() const
-{
- return Severity(spare_);
-}
-
-inline
-MessageFragment MessageType::auxFragment() const
-{
- return MessageFragment(module(),
- number() + 1,
-#ifdef SP_NO_MESSAGE_TEXT
- 0
-#else
- auxText_
-#endif
- );
-}
-
-inline
-Boolean MessageType::isError() const
-{
- return severity() != info && severity() != warning;
-}
-
-inline
-Boolean Message::isError() const
-{
- return type->isError();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Message_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageArg.h b/usr/src/cmd/man/src/util/nsgmls.src/include/MessageArg.h
deleted file mode 100644
index 6bcfdcaa4a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageArg.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MessageArg_INCLUDED
-#define MessageArg_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StringC.h"
-#include "rtti.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class MessageBuilder;
-
-class SP_API MessageArg {
-public:
- MessageArg();
- virtual ~MessageArg();
- virtual MessageArg *copy() const = 0;
- virtual void append(MessageBuilder &) const = 0;
-};
-
-class SP_API StringMessageArg : public MessageArg {
-public:
- StringMessageArg(const StringC &);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- StringC s_;
-};
-
-class SP_API NumberMessageArg : public MessageArg {
-public:
- NumberMessageArg(unsigned long);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- unsigned long n_;
-};
-
-class SP_API OrdinalMessageArg : public MessageArg {
-public:
- OrdinalMessageArg(unsigned long);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- unsigned long n_;
-};
-
-class SP_API OtherMessageArg : public MessageArg {
- RTTI_CLASS
-public:
- OtherMessageArg();
- void append(MessageBuilder &) const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MessageArg_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageBuilder.h b/usr/src/cmd/man/src/util/nsgmls.src/include/MessageBuilder.h
deleted file mode 100644
index 9aaee73bc1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageBuilder.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MessageBuilder_INCLUDED
-#define MessageBuilder_INCLUDED 1
-
-#include <stddef.h>
-#include "types.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class OtherMessageArg;
-class MessageFragment;
-
-class SP_API MessageBuilder {
-public:
- virtual void appendNumber(unsigned long) = 0;
- virtual void appendOrdinal(unsigned long) = 0;
- virtual void appendChars(const Char *, size_t) = 0;
- virtual void appendOther(const OtherMessageArg *) = 0;
- virtual void appendFragment(const MessageFragment &) = 0;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MessageBuilder_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageEventHandler.h b/usr/src/cmd/man/src/util/nsgmls.src/include/MessageEventHandler.h
deleted file mode 100644
index f0096a3857..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageEventHandler.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MessageEventHandler_INCLUDED
-#define MessageEventHandler_INCLUDED 1
-
-#include "Event.h"
-#include "ErrorCountEventHandler.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class OutputCharStream;
-class SgmlParser;
-
-class SP_API MessageEventHandler : public ErrorCountEventHandler {
-public:
- // if parser is non-null then subdocs will be parsed automatically
- MessageEventHandler(Messenger *messenger, const SgmlParser *parser = 0);
- void message(MessageEvent *);
- void subdocEntity(SubdocEntityEvent *);
- Messenger *messenger() const;
-private:
- Messenger *messenger_;
- const SgmlParser *parser_;
-};
-
-inline
-Messenger *MessageEventHandler::messenger() const
-{
- return messenger_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MessageEventHandler_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageFormatter.h b/usr/src/cmd/man/src/util/nsgmls.src/include/MessageFormatter.h
deleted file mode 100644
index bee2fbc19a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageFormatter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MessageFormatter_INCLUDED
-#define MessageFormatter_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "MessageBuilder.h"
-#include "Boolean.h"
-#include "Message.h"
-#include "Location.h"
-#include "StringC.h"
-#include "OutputCharStream.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API MessageFormatter {
-public:
- MessageFormatter();
- void formatMessage(const MessageFragment &,
- const Vector<CopyOwner<MessageArg> > &args,
- OutputCharStream &);
- void formatOpenElements(const Vector<OpenElementInfo> &openElementInfo,
- OutputCharStream &os);
- virtual Boolean getMessageText(const MessageFragment &, StringC &) = 0;
- Boolean formatFragment(const MessageFragment &, OutputCharStream &);
-private:
- MessageFormatter(const MessageFormatter &); // undefined
- void operator=(const MessageFormatter &); // undefined
-
- class Builder : public MessageBuilder {
- public:
- Builder(MessageFormatter *formatter, OutputCharStream &os, bool b)
- : formatter_(formatter), os_(&os), argIsCompleteMessage_(b) { }
- void appendNumber(unsigned long);
- void appendOrdinal(unsigned long);
- void appendChars(const Char *, size_t);
- void appendOther(const OtherMessageArg *);
- void appendFragment(const MessageFragment &);
- private:
- OutputCharStream &os() { return *os_; }
- OutputCharStream *os_;
- MessageFormatter *formatter_;
- bool argIsCompleteMessage_;
- };
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MessageFormatter_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageReporter.h b/usr/src/cmd/man/src/util/nsgmls.src/include/MessageReporter.h
deleted file mode 100644
index 0adea18441..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageReporter.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MessageReporter_INCLUDED
-#define MessageReporter_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "MessageFormatter.h"
-#include "Boolean.h"
-#include "OutputCharStream.h"
-#include "Message.h"
-#include "Location.h"
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API MessageReporter : public MessageFormatter, public Messenger {
-public:
- enum Option {
- openElements = 01,
- openEntities = 02,
- messageNumbers = 04
- };
- // The OutputCharStream will be deleted by the MessageReporter
- MessageReporter(OutputCharStream *);
- ~MessageReporter();
- void setMessageStream(OutputCharStream *);
- OutputCharStream *releaseMessageStream();
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &tmp_message) {
- dispatchMessage((const Message &)tmp_message);
- };
- virtual Boolean getMessageText(const MessageFragment &, StringC &);
- void addOption(Option);
- void setProgramName(const StringC &);
-private:
- MessageReporter(const MessageReporter &); // undefined
- void operator=(const MessageReporter &); // undefined
-
- const ExternalInfo *locationHeader(const Location &, Offset &off);
- const ExternalInfo *locationHeader(const Origin *, Index, Offset &off);
- void printLocation(const ExternalInfo *info, Offset off);
- OutputCharStream &os();
-
- OutputCharStream *os_;
- unsigned options_;
- StringC programName_;
-};
-
-inline
-OutputCharStream &MessageReporter::os()
-{
- return *os_;
-}
-
-inline
-void MessageReporter::setProgramName(const StringC &programName)
-{
- programName_ = programName;
-}
-
-inline
-OutputCharStream *MessageReporter::releaseMessageStream()
-{
- OutputCharStream *tem = os_;
- os_ = 0;
- return tem;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MessageReporter_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/MessageTable.h
deleted file mode 100644
index 599715874d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/MessageTable.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MessageTable_INCLUDED
-#define MessageTable_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Message.h"
-#include "Boolean.h"
-#include "StringC.h"
-#include "sptchar.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API MessageTable {
-public:
- static const MessageTable *instance();
- virtual Boolean getText(const MessageFragment &,
- String<SP_TCHAR> &) const = 0;
-private:
- static MessageTable *instance_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MessageTable_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Mode.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Mode.h
deleted file mode 100644
index a2a9ff334d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Mode.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Mode_INCLUDED
-#define Mode_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-enum Mode {
- grpMode, // group
- alitMode, // attribute value literals starting with LIT
- alitaMode, // attribute value literals starting with LITA
- aliteMode, // attribute value literals inside entity
- talitMode, // tokenized attribute value literal
- talitaMode,
- taliteMode,
- mdMode, // markup declaration
- mdMinusMode, // markup declaration, also recognize minus
- mdPeroMode, // markup declaration, also recognize pero
- sdMode,
- comMode, // comment
- sdcomMode, // comment in an SGML declaration
- piMode, // processing instruction
- refMode, // reference
- imsMode, // ignored marked section
- cmsMode, // cdata marked section
- rcmsMode, // rcdata marked section
- // These modes are needed only for the prologue.
- proMode, // prologue
- dsMode, // declaration subset not in marked section
- // nor in entity
- dsiMode, // declaration subset in marked section or
- // in entity
- plitMode, // parameter literal starting with LIT
- plitaMode, // paramater literal starting with LITA
- pliteMode, // parameter literal inside entity
- sdplitMode, // parameter literal starting with LIT
- // in an SGML declaration
- sdplitaMode, // parameter literal starting with LIT
- // in an SGML declaration
- grpsufMode, // group suffix
- mlitMode, // minimum literal starting with LIT
- mlitaMode, // minimum literal starting with LITA
- asMode, // data/link/result attribute specification
- slitMode, // system id literal starting with LIT
- slitaMode, // system id literal starting with LITA
- sdslitMode, // system id literal starting with LIT
- // in an SGML declaration
- sdslitaMode, // system id literal starting with LITA
- // in an SGML declaration
- // These modes are needed only for the instance.
- cconMode, // CDATA content
- rcconMode, // RCDATA content
- cconnetMode, // CDATA content, recognize NET
- rcconnetMode, // RCDATA content, recognize NET
- rcconeMode, // RCDATA content inside entity
- tagMode, // start- or end-tag
- econMode, // element content
- mconMode, // mixed content
- econnetMode, // element content, recognize NET
- mconnetMode // mixed content, recognize NET
- };
-
-const int nModes = mconnetMode + 1;
-
-enum { minShortrefMode = econMode };
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Mode_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.cxx
deleted file mode 100644
index 61e7a4ae7a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.cxx
+++ /dev/null
@@ -1,168 +0,0 @@
-// This file is automatically generated. Do not edit!
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NCVector_DEF_INCLUDED
-#define NCVector_DEF_INCLUDED 1
-
-#include <stddef.h>
-#include <string.h>
-
-#ifdef SP_QUAL_TEMPLATE_DTOR_BROKEN
-#define DTOR(T) ~T
-#else
-#define DTOR(T) T::~T
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-NCVector<T>::~NCVector()
-{
- if (ptr_) {
- erase(ptr_, ptr_ + size_);
- ::operator delete((void *)ptr_);
- }
-}
-
-#if 0
-
-template<class T>
-NCVector<T>::NCVector(const NCVector<T> &v)
-: ptr_(0), size_(0), alloc_(0)
-{
- insert(ptr_ + size_, v.ptr_, v.ptr_ + v.size_);
-}
-
-template<class T>
-NCVector<T>::NCVector(size_t n, const T &t)
-: ptr_(0), size_(0), alloc_(0)
-{
- insert(ptr_ + size_, n, t);
-}
-
-template<class T>
-NCVector<T> &NCVector<T>::operator=(const NCVector<T> &v)
-{
- if (&v != this) {
- size_t n = v.size_;
- if (n > size_) {
- n = size_;
- insert(ptr_ + size_, v.ptr_ + size_, v.ptr_ + v.size_);
- }
- else if (n < size_)
- erase(ptr_ + n, ptr_ + size_);
- while (n-- > 0)
- ptr_[n] = v.ptr_[n];
- }
- return *this;
-}
-
-template<class T>
-void NCVector<T>::assign(size_t n, const T &t)
-{
- size_t sz = n;
- if (n > size_) {
- sz = size_;
- insert(ptr_ + size_, n - size_, t);
- }
- else if (n < size_)
- erase(ptr_ + n, ptr_ + size_);
- while (sz-- > 0)
- ptr_[sz] = t;
-}
-
-template<class T>
-void NCVector<T>::insert(const T *p, size_t n, const T &t)
-{
- size_t i = p - ptr_;
- reserve(size_ + n);
- if (i != size_)
- memmove(ptr_ + i + n, ptr_ + i, (size_ - i)*sizeof(T));
- for (T *pp = ptr_ + i; n-- > 0; pp++) {
- (void)new (pp) T(t);
- size_++;
- }
-}
-
-template<class T>
-void NCVector<T>::insert(const T *p, const T *q1, const T *q2)
-{
- size_t i = p - ptr_;
- size_t n = q2 - q1;
- reserve(size_ + n);
- if (i != size_)
- memmove(ptr_ + i + n, ptr_ + i, (size_ - i)*sizeof(T));
- for (T *pp = ptr_ + i; q1 != q2; q1++, pp++) {
- (void)new (pp) T(*q1);
- size_++;
- }
-}
-
-#endif
-
-template<class T>
-void NCVector<T>::swap(NCVector<T> &v)
-{
- {
- T *tem = ptr_;
- ptr_ = v.ptr_;
- v.ptr_ = tem;
- }
- {
- size_t tem = size_;
- size_ = v.size_;
- v.size_ = tem;
- }
- {
- size_t tem = alloc_;
- alloc_ = v.alloc_;
- v.alloc_ = tem;
- }
-}
-
-template<class T>
-void NCVector<T>::append(size_t n)
-{
- reserve(size_ + n);
- while (n-- > 0)
- (void)new (ptr_ + size_++) T;
-}
-
-template<class T>
-T *NCVector<T>::erase(const T *p1, const T *p2)
-{
- typedef T X;
- for (const T *p = p1; p != p2; p++)
- ((X *)p)->~X();
- if (p2 != ptr_ + size_)
- memmove((T *)p1, p2, ((const T *)(ptr_ + size_) - p2)*sizeof(T));
- size_ -= p2 - p1;
- return (T *)p1;
-}
-
-template<class T>
-void NCVector<T>::reserve1(size_t size)
-{
- // Try to preserve a consistent start in the
- // event of an out of memory exception.
- size_t newAlloc = alloc_*2;
- if (size > newAlloc)
- newAlloc += size;
- void *p = ::operator new(newAlloc * sizeof(T));
- alloc_ = newAlloc;
- if (ptr_) {
- memcpy(p, ptr_, size_*sizeof(T));
- ::operator delete((void *)ptr_);
- }
- ptr_ = (T *)p;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NCVector_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h b/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h
deleted file mode 100644
index ad437850c6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// This file is automatically generated. Do not edit!
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NCVector_INCLUDED
-#define NCVector_INCLUDED 1
-
-#include <stddef.h>
-#include "xnew.h"
-
-// This offers a subset of the interface offered by the standard C++
-// vector class as defined in the Jan 96 WP.
-// Code in SP currently assumes that size_type is size_t.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class NCVector {
-public:
- typedef size_t size_type;
- typedef T *iterator;
- typedef const T *const_iterator;
- NCVector() : ptr_(0), size_(0), alloc_(0) { }
- NCVector(size_t n) : ptr_(0), size_(0), alloc_(0) { append(n); }
- ~NCVector();
- void resize(size_t n) {
- if (n < size_)
- erase(ptr_ + n, ptr_ + size_);
- else if (n > size_)
- append(n - size_);
- }
-#if 0
- NCVector(size_t, const T &);
- NCVector(const NCVector<T> &);
- NCVector<T> &operator=(const NCVector<T> &);
- void assign(size_t, const T &);
- void push_back(const T &t) {
- reserve(size_ + 1);
- (void)new (ptr_ + size_) T(t);
- size_++;
- }
- void insert(const_iterator p, size_t n, const T &t);
- void insert(const_iterator p, const_iterator q1, const_iterator q2);
-#endif
- void swap(NCVector<T> &);
- void clear() { erase(ptr_, ptr_ + size_); }
- size_t size() const { return size_; }
- T &operator[](size_t i) { return ptr_[i]; }
- const T &operator[](size_t i) const { return ptr_[i]; }
- iterator begin() { return ptr_; }
- const_iterator begin() const { return ptr_; }
- T &back() { return ptr_[size_ - 1]; }
- const T &back() const { return ptr_[size_ - 1]; }
- void reserve(size_t n) { if (n > alloc_) reserve1(n); }
- iterator erase(const_iterator, const_iterator);
-private:
-#if 1
- NCVector(const NCVector<T> &);
- void operator=(const NCVector<T> &);
-#endif
- void append(size_t);
- void reserve1(size_t);
-
- size_t size_;
- T *ptr_;
- size_t alloc_; // allocated size
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NCVector_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "NCVector.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h.dist b/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h.dist
deleted file mode 100644
index c0230abdfa..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.h.dist
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef NCVector_INCLUDED
-#define NCVector_INCLUDED 1
-
-#define Vector NCVector
-#define NC
-
-#ifdef SP_DEFINE_TEMPLATES
-
-#undef SP_DEFINE_TEMPLATES
-#ifdef Vector_INCLUDED
-#undef Vector_INCLUDED
-#include "Vector.h"
-#define Vector_INCLUDED 1
-#else
-#include "Vector.h"
-#undef Vector_INCLUDED
-#endif
-#define SP_DEFINE_TEMPLATES 1
-
-#else /* not SP_DEFINE_TEMPLATES */
-
-#ifdef Vector_INCLUDED
-#undef Vector_INCLUDED
-#include "Vector.h"
-#define Vector_INCLUDED 1
-#else
-#include "Vector.h"
-#undef Vector_INCLUDED
-#endif
-
-#endif /* not SP_DEFINE_TEMPLATES */
-
-#undef Vector
-#undef NC
-
-#endif /* not NCVector_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-
-#ifndef NCVector_DEF_INCLUDED
-#define NCVector_DEF_INCLUDED 1
-
-#define Vector NCVector
-#define NC
-
-#ifdef Vector_DEF_INCLUDED
-#undef Vector_DEF_INCLUDED
-#include "Vector.cxx"
-#define Vector_DEF_INCLUDED 1
-#else
-#include "Vector.cxx"
-#undef Vector_DEF_INCLUDED
-#endif
-
-#undef Vector
-#undef NC
-
-#endif /* not NCVector_DEF_INCLUDED */
-
-#endif /* SP_DEFINE_TEMPLATES */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.sed b/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.sed
deleted file mode 100644
index a066e3f0c0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NCVector.sed
+++ /dev/null
@@ -1,5 +0,0 @@
-1i\
-// This file is automatically generated. Do not edit!
-s/Vector/NCVector/g
-s/^#ifdef NC$/#if 1/
-s/^#ifndef NC$/#if 0/
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Named.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Named.h
deleted file mode 100644
index fb52422fb5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Named.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Named_INCLUDED
-#define Named_INCLUDED 1
-
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Named {
-public:
- Named(const StringC &name) : name_(name) { }
- virtual ~Named() { }
- const StringC &name() const { return name_; }
- const StringC *namePointer() const { return &name_; }
- void setName(const StringC &name) { name_ = name; }
- void swap(Named &to) { name_.swap(to.name_); }
-private:
- StringC name_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Named_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NamedResource.h b/usr/src/cmd/man/src/util/nsgmls.src/include/NamedResource.h
deleted file mode 100644
index 4b4cea0a30..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NamedResource.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NamedResource_INCLUDED
-#define NamedResource_INCLUDED 1
-
-#include "Named.h"
-#include "Resource.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API NamedResource : public Named, public Resource {
-public:
- NamedResource(const StringC &str) : Named(str) { }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NamedResource_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NamedResourceTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/NamedResourceTable.h
deleted file mode 100644
index 4cef019074..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NamedResourceTable.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NamedResourceTable_INCLUDED
-#define NamedResourceTable_INCLUDED 1
-
-#include "NamedResource.h"
-#include "PointerTable.h"
-#include "StringC.h"
-#include "Hash.h"
-#include "Ptr.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct NamedResourceKeyFunction {
- static inline
- const StringC &key(const NamedResource &p) {
- return p.name();
- }
-};
-
-template<class T> class NamedResourceTableIter;
-template<class T> class ConstNamedResourceTableIter;
-
-template<class T>
-class NamedResourceTable {
-#ifdef __lucid
- struct X {
- Ptr<T> _X; // work around lcc bug
- };
-#endif
-public:
- NamedResourceTable() { }
- Ptr<T> insert(const Ptr<T> &p, Boolean replace = 0) {
- return (T *)table_.insert((NamedResource *)p.pointer(), replace).pointer();
- }
- Ptr<T> lookup(const StringC &str) const {
- return (T *)table_.lookup(str).pointer();
- }
- ConstPtr<T> lookupConst(const StringC &str) const {
- return (T *)table_.lookup(str).pointer();
- }
- const T *lookupTemp(const StringC &str) const {
- return (const T *)table_.lookup(str).pointer();
- }
- Ptr<T> remove(const StringC &str) {
- return (T *)table_.remove(str).pointer();
- }
- size_t count() const { return table_.count(); }
- void clear() { table_.clear(); }
- void swap(NamedResourceTable<T> &to) { table_.swap(to.table_); }
-private:
- PointerTable<Ptr<NamedResource>, StringC, Hash,
- NamedResourceKeyFunction> table_;
- friend class NamedResourceTableIter<T>;
- friend class ConstNamedResourceTableIter<T>;
-};
-
-template<class T>
-class NamedResourceTableIter {
-public:
- NamedResourceTableIter(const NamedResourceTable<T> &table)
- : iter_(table.table_) { }
- Ptr<T> next() {
- return (T *)iter_.next().pointer();
- }
-private:
- PointerTableIter<Ptr<NamedResource>, StringC, Hash,
- NamedResourceKeyFunction> iter_;
-};
-
-template<class T>
-class ConstNamedResourceTableIter {
-public:
- ConstNamedResourceTableIter(const NamedResourceTable<T> &table)
- : iter_(table.table_) { }
- ConstPtr<T> next() {
- return (T *)iter_.next().pointer();
- }
- const T *nextTemp() {
- return (const T *)iter_.next().pointer();
- }
-private:
- PointerTableIter<Ptr<NamedResource>, StringC, Hash,
- NamedResourceKeyFunction> iter_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NamedResourceTable_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NamedTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/NamedTable.h
deleted file mode 100644
index ff3e0f50f5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NamedTable.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NamedTable_INCLUDED
-#define NamedTable_INCLUDED 1
-
-#include "Hash.h"
-#include "StringC.h"
-#include "Named.h"
-#include "OwnerTable.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class NamedTableKeyFunction {
-public:
- static inline const StringC &key(const Named &obj) { return obj.name(); }
-};
-
-template<class T> class NamedTableIter;
-template<class T> class ConstNamedTableIter;
-
-template<class T>
-class NamedTable {
-public:
- NamedTable() { }
- T *insert(T *p) { return (T *)table_.insert(p); }
- T *lookup(const StringC &str) const { return (T *)table_.lookup(str); }
- T *remove(const StringC &str) { return (T *)table_.remove(str); }
- size_t count() const { return table_.count(); }
- void clear() { table_.clear(); }
- void swap(NamedTable<T> &to) { table_.swap(to.table_); }
-private:
- NamedTable(const NamedTable<T> &); // undefined
- void operator=(const NamedTable<T> &); // undefined
- OwnerTable<Named, StringC, Hash, NamedTableKeyFunction>
- table_;
- friend class NamedTableIter<T>;
- friend class ConstNamedTableIter<T>;
-};
-
-template<class T>
-class NamedTableIter {
-public:
- NamedTableIter(const NamedTable<T> &table) : iter_(table.table_) { }
- T *next() { return (T *)iter_.next(); }
-private:
- OwnerTableIter<Named, StringC, Hash, NamedTableKeyFunction> iter_;
-};
-
-template<class T>
-class ConstNamedTableIter {
-public:
- ConstNamedTableIter(const NamedTable<T> &table) : iter_(table.table_) { }
- const T *next() { return (T *)iter_.next(); }
-private:
- OwnerTableIter<Named, StringC, Hash, NamedTableKeyFunction> iter_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NamedTable_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Notation.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Notation.h
deleted file mode 100644
index 57d92c40e9..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Notation.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Notation_INCLUDED
-#define Notation_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Owner.h"
-#include "StringC.h"
-#include "NamedResource.h"
-#include "types.h"
-#include "Ptr.h"
-#include "ExternalId.h"
-#include "Boolean.h"
-#include "Attributed.h"
-#include "StringResource.h"
-#include "EntityDecl.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ParserState;
-
-class SP_API Notation : public EntityDecl, public Attributed {
-public:
- Notation(const StringC &,
- const ConstPtr<StringResource<Char> > &dtdName,
- Boolean dtdIsBase);
- void setExternalId(const ExternalId &, const Location &);
- const ExternalId &externalId() const;
- Boolean defined() const;
- void generateSystemId(ParserState &);
- const StringC *systemIdPointer() const;
- const StringC *publicIdPointer() const;
-private:
- Notation(const Notation &); // undefined
- void operator=(const Notation &); // undefined
- PackedBoolean defined_;
- ExternalId externalId_;
-};
-
-inline
-const ExternalId &Notation::externalId() const
-{
- return externalId_;
-}
-
-inline
-Boolean Notation::defined() const
-{
- return defined_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Notation_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/NotationStorage.h b/usr/src/cmd/man/src/util/nsgmls.src/include/NotationStorage.h
deleted file mode 100644
index 4af68cf596..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/NotationStorage.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NotationStorage_INCLUDED
-#define NotationStorage_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StorageManager.h"
-#include "CharsetInfo.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API NotationStorageManager : public StorageManager {
-public:
- NotationStorageManager(const char *type);
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &baseId,
- Boolean search,
- Boolean mayRewind,
- Messenger &,
- StringC &foundId);
- const char *type() const;
- Boolean inheritable() const;
-private:
- NotationStorageManager(const NotationStorageManager &); // undefined
- void operator=(const NotationStorageManager &); // undefined
- const char *type_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NotationStorage_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/OpenElement.h b/usr/src/cmd/man/src/util/nsgmls.src/include/OpenElement.h
deleted file mode 100644
index 258502e4d1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/OpenElement.h
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OpenElement_INCLUDED
-#define OpenElement_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Boolean.h"
-#include "ContentToken.h"
-#include "ElementType.h"
-#include "Link.h"
-#include "Mode.h"
-#include "Allocator.h"
-#include "Location.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API OpenElement : public Link {
-public:
- void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
- void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
- void operator delete(void *p) { Allocator::free(p); }
- OpenElement(const ElementType *, Boolean net, Boolean included,
- const ShortReferenceMap *currentMap,
- const Location &startLocation);
- Boolean isFinished() const;
- Boolean tryTransition(const ElementType *);
- const LeafContentToken *invalidExclusion(const ElementType *) const;
- // This doesn't handle declared content of EMPTY.
- // If this situation can arise must use declaredEmpty().
- Boolean tryTransitionPcdata();
- const LeafContentToken *impliedStartTag() const;
- void doRequiredTransition();
- const ElementType *type() const;
- Boolean netEnabling() const;
- Boolean included() const;
- const MatchState &matchState() const;
- void setMatchState(const MatchState &);
- Mode mode(Boolean netEnabled) const;
- const ShortReferenceMap *map() const;
- void setMap(const ShortReferenceMap *);
- Boolean requiresSpecialParse() const;
- const Location &startLocation() const;
- const LeafContentToken *currentPosition() const;
- Boolean declaredEmpty() const;
- void setConref();
- unsigned long index() const;
- void setIndex(unsigned long);
-private:
- OpenElement(const OpenElement &); // undefined
- void operator=(const OpenElement &); // undefined
- const ElementType *elementType_;
- PackedBoolean netEnabling_; // start-tag was net-enabling
- PackedBoolean included_;
- MatchState matchState_;
- ElementDefinition::DeclaredContent declaredContent_;
- const ShortReferenceMap *map_;
- Location startLocation_;
- unsigned long index_;
-};
-
-inline
-const ElementType *OpenElement::type() const
-{
- return elementType_;
-}
-
-inline
-Boolean OpenElement::netEnabling() const
-{
- return netEnabling_;
-}
-
-inline
-Boolean OpenElement::included() const
-{
- return included_;
-}
-
-inline
-const MatchState &OpenElement::matchState() const
-{
- return matchState_;
-}
-
-inline
-void OpenElement::setMatchState(const MatchState &state)
-{
- matchState_ = state;
-}
-
-inline
-Boolean OpenElement::isFinished() const
-{
- return (declaredContent_ != ElementDefinition::modelGroup
- || matchState_.isFinished());
-}
-
-inline
-Boolean OpenElement::tryTransition(const ElementType *e)
-{
- return (declaredContent_ == ElementDefinition::modelGroup
- ? matchState_.tryTransition(e)
- : (declaredContent_ == ElementDefinition::any));
-}
-
-inline
-Boolean OpenElement::tryTransitionPcdata()
-{
- return (declaredContent_ == ElementDefinition::modelGroup
- ? matchState_.tryTransitionPcdata()
- : 1); // CDATA, RCDATA, ANY all ok
-}
-
-inline
-const LeafContentToken *OpenElement::invalidExclusion(const ElementType *e)
- const
-{
- return (declaredContent_ == ElementDefinition::modelGroup
- ? matchState_.invalidExclusion(e)
- : 0);
-}
-
-inline
-void OpenElement::doRequiredTransition()
-{
- matchState_.doRequiredTransition();
-}
-
-inline
-const LeafContentToken *OpenElement::impliedStartTag() const
-{
- return (declaredContent_ == ElementDefinition::modelGroup
- ? matchState_.impliedStartTag()
- : 0);
-}
-
-inline
-const ShortReferenceMap *OpenElement::map() const
-{
- return map_;
-}
-
-inline
-void OpenElement::setMap(const ShortReferenceMap *map)
-{
- map_ = map;
-}
-
-inline
-Boolean OpenElement::requiresSpecialParse() const
-{
- return (declaredContent_ == ElementDefinition::cdata
- || declaredContent_ == ElementDefinition::rcdata);
-}
-
-inline
-Mode OpenElement::mode(Boolean netEnabled) const
-{
- return elementType_->definition()->mode(netEnabled);
-}
-
-inline
-const Location &OpenElement::startLocation() const
-{
- return startLocation_;
-}
-
-inline
-const LeafContentToken *OpenElement::currentPosition() const
-{
- return (declaredContent_ == ElementDefinition::modelGroup
- ? matchState_.currentPosition()
- : 0);
-}
-
-inline
-Boolean OpenElement::declaredEmpty() const
-{
- return declaredContent_ == ElementDefinition::empty;
-}
-
-inline
-void OpenElement::setConref()
-{
- declaredContent_ = ElementDefinition::empty;
-}
-
-inline
-unsigned long OpenElement::index() const
-{
- return index_;
-}
-
-inline
-void OpenElement::setIndex(unsigned long index)
-{
- index_ = index;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OpenElement_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Options.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/Options.cxx
deleted file mode 100644
index 3baf92f3ae..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Options.cxx
+++ /dev/null
@@ -1,123 +0,0 @@
-// Derived from comp.sources.unix/volume3/att_getopt.
-// See
-
-#ifndef Options_DEF_INCLUDED
-#define Options_DEF_INCLUDED 1
-
-#ifndef OPTION_CHAR
-#define OPTION_CHAR T('-')
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-Options<T>::Options(int argc, T *const *argv, const T *opts)
-: argc_(argc), argv_(argv), opts_(opts), ind_(1), sp_(1)
-{
-}
-
-template<class T>
-const T *Options<T>::search(T c) const
-{
- for (const T *s = opts_; *s; s++)
- if (*s == c)
- return s;
- return 0;
-}
-
-template<class T>
-bool Options<T>::get(T &c)
-{
- const T *cp;
- if (sp_ == 1) {
- if (ind_ >= argc_)
- return false;
- if ((
-#ifdef OTHER_OPTION_CHAR
- argv_[ind_][0] != OTHER_OPTION_CHAR &&
-#endif
- argv_[ind_][0] != OPTION_CHAR) || argv_[ind_][1] == 0) {
-#ifdef REORDER_ARGS
- int i;
- for (i = ind_; i < argc_; i++)
- if ((
-#ifdef OTHER_OPTION_CHAR
- argv_[i][0] == OTHER_OPTION_CHAR ||
-#endif
- argv_[i][0] == OPTION_CHAR) && argv_[i][1] != 0)
- break;
- if (i < argc_) {
- c = argv_[i][1];
- if (c != T(':') && c != OPTION_CHAR
- && (cp = search(c)) != 0
- && cp[1] == T(':') && argv_[i][2] == 0 && i < argc_ - 1) {
- int j;
- T *temp1 = argv_[i];
- T *temp2 = argv_[i + 1];
- for (j = i - 1; j >= ind_; j--)
- argv_[j+2] = argv_[j];
- argv_[ind_] = temp1;
- argv_[ind_ + 1] = temp2;
- }
- else {
- int j;
- T *temp = argv_[i];
- for (j = i - 1; j >= ind_; j--)
- argv_[j+1] = argv_[j];
- argv_[ind_] = temp;
- }
- }
- else
-#endif
- return false;
- }
- if ((argv_[ind_][0] == OPTION_CHAR && argv_[ind_][1] == OPTION_CHAR
- && argv_[ind_][2] == 0)
-#ifdef OTHER_OPTION_CHAR
- || (argv_[ind_][0] == OTHER_OPTION_CHAR
- && argv_[ind_][1] == OTHER_OPTION_CHAR
- && argv_[ind_][2] == 0)
-#endif
- ) {
- ind_++;
- return false;
- }
- }
- opt_ = c = argv_[ind_][sp_];
- if (c == T(':') || (cp = search(c)) == 0) {
- if (argv_[ind_][++sp_] == 0) {
- ind_++;
- sp_ = 1;
- }
- c = T('?');
- return true;
- }
- if (*++cp == T(':')) {
- if (argv_[ind_][sp_ + 1] != 0)
- arg_ = &argv_[ind_++][sp_ + 1];
- else if (++ind_ >= argc_) {
- sp_ = 1;
- c = (*opts_ == T(':') ? T(':') : T('?'));
- return true;
- }
- else
- arg_ = argv_[ind_++];
- sp_ = 1;
- }
- else {
- if (argv_[ind_][++sp_] == 0) {
- sp_ = 1;
- ind_++;
- }
- arg_ = 0;
- }
- return true;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Options_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Options.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Options.h
deleted file mode 100644
index c5bd5cb974..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Options.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Options_INCLUDED
-#define Options_INCLUDED 1
-
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-// This is a mildly C++ified version of getopt().
-// It never prints any message.
-
-template<class T>
-class Options {
-public:
- Options(int argc, T *const *, const T *);
- // Returns false if there are no more options.
- bool get(T &);
- T *arg() const { return arg_; } // optarg
- T opt() const { return opt_; } // optopt
- int ind() const { return ind_; } // optind
-private:
- const T *search(T) const;
- const T *opts_;
- T *const *argv_;
- int argc_;
- int ind_;
- T opt_;
- T *arg_;
- int sp_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Options_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "Options.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/OutputByteStream.h b/usr/src/cmd/man/src/util/nsgmls.src/include/OutputByteStream.h
deleted file mode 100644
index 0ce19eebef..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/OutputByteStream.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OutputByteStream_INCLUDED
-#define OutputByteStream_INCLUDED 1
-
-#include "StringOf.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API OutputByteStream {
-public:
- OutputByteStream();
- virtual ~OutputByteStream();
- virtual void flush() = 0;
- void sputc(char c);
- void sputn(const char *, size_t);
- OutputByteStream &operator<<(char);
- OutputByteStream &operator<<(unsigned char);
- OutputByteStream &operator<<(const char *);
- OutputByteStream &operator<<(int);
- OutputByteStream &operator<<(unsigned);
- OutputByteStream &operator<<(long);
- OutputByteStream &operator<<(unsigned long);
- OutputByteStream &operator<<(const String<char> &);
- char *getBufferPtr() const;
- size_t getBufferSize() const;
- void usedBuffer(size_t);
- virtual void flushBuf(char) = 0;
-protected:
- char *ptr_;
- char *end_;
-};
-
-inline
-char *OutputByteStream::getBufferPtr() const
-{
- return ptr_;
-}
-
-inline
-size_t OutputByteStream::getBufferSize() const
-{
- return end_ - ptr_;
-}
-
-inline
-void OutputByteStream::usedBuffer(size_t n)
-{
- ptr_ += n;
-}
-
-inline
-void OutputByteStream::sputc(char c)
-{
- if (ptr_ < end_)
- *ptr_++ = c;
- else
- flushBuf(c);
-}
-
-inline
-OutputByteStream &OutputByteStream::operator<<(char c)
-{
- sputc(c);
- return *this;
-}
-
-inline
-OutputByteStream &OutputByteStream::operator<<(unsigned char c)
-{
- sputc(char(c));
- return *this;
-}
-
-inline
-OutputByteStream &OutputByteStream::operator<<(int n)
-{
- return *this << long(n);
-}
-
-inline
-OutputByteStream &OutputByteStream::operator<<(unsigned n)
-{
- return *this << (unsigned long)n;
-}
-
-inline
-OutputByteStream &OutputByteStream::operator<<(const String<char> &s)
-{
- sputn(s.data(), s.size());
- return *this;
-}
-
-class SP_API StrOutputByteStream : public OutputByteStream {
-public:
- StrOutputByteStream();
- void extractString(String<char> &);
-protected:
- StrOutputByteStream(const StrOutputByteStream &); // undefined
- void operator=(const StrOutputByteStream &); // undefined
- void flush();
- void flushBuf(char);
- String<char> buf_;
-};
-
-class SP_API FileOutputByteStream : public OutputByteStream {
-public:
- FileOutputByteStream();
- FileOutputByteStream(int fd, Boolean closeFd = 1);
- ~FileOutputByteStream();
-#ifdef SP_WIDE_SYSTEM
- Boolean open(const wchar_t *);
-#else
- Boolean open(const char *);
-#endif
- Boolean attach(int fd, Boolean closeFd = 1);
- Boolean close();
-private:
- FileOutputByteStream(const FileOutputByteStream &); // undefined
- void operator=(const FileOutputByteStream &); // undefined
- void flush();
- void flushBuf(char);
- String<char> buf_;
- int fd_;
- Boolean closeFd_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OutputByteStream_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/OutputCharStream.h b/usr/src/cmd/man/src/util/nsgmls.src/include/OutputCharStream.h
deleted file mode 100644
index e0c5fc9bf6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/OutputCharStream.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OutputCharStream_INCLUDED
-#define OutputCharStream_INCLUDED 1
-
-#include "types.h"
-#include <stddef.h>
-#include "StringC.h"
-#include "Owner.h"
-#include "CodingSystem.h"
-#include "OutputByteStream.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API OutputCharStream {
-public:
- enum Newline { newline };
- typedef void (*Escaper)(OutputCharStream &, Char);
- OutputCharStream();
- virtual ~OutputCharStream();
- OutputCharStream &put(Char);
- OutputCharStream &write(const Char *, size_t);
- virtual void flush() = 0;
- virtual void setEscaper(Escaper);
-
- OutputCharStream &operator<<(char);
- OutputCharStream &operator<<(const char *);
- OutputCharStream &operator<<(const StringC &);
- OutputCharStream &operator<<(unsigned long);
- OutputCharStream &operator<<(int);
- OutputCharStream &operator<<(Newline);
-private:
- OutputCharStream(const OutputCharStream &); // undefined
- void operator=(const OutputCharStream &); // undefined
-
- virtual void flushBuf(Char) = 0;
-protected:
- Char *ptr_;
- Char *end_;
-};
-
-class SP_API EncodeOutputCharStream : public OutputCharStream,
- private Encoder::Handler {
-public:
- EncodeOutputCharStream();
- // the OutputByteStream will not be deleted
- EncodeOutputCharStream(OutputByteStream *, const OutputCodingSystem *);
- ~EncodeOutputCharStream();
- void open(OutputByteStream *, const OutputCodingSystem *);
- void flush();
- void setEscaper(Escaper);
-private:
- EncodeOutputCharStream(const EncodeOutputCharStream &); // undefined
- void operator=(const EncodeOutputCharStream &); // undefined
- EncodeOutputCharStream(OutputByteStream *, Encoder *);
- void allocBuf(int bytesPerChar);
- void flushBuf(Char);
- void handleUnencodable(Char c, OutputByteStream *);
- Char *buf_;
- OutputByteStream *byteStream_;
- Encoder *encoder_;
- Owner<Encoder> ownedEncoder_;
- Escaper escaper_;
-};
-
-class SP_API StrOutputCharStream : public OutputCharStream {
-public:
- StrOutputCharStream();
- ~StrOutputCharStream();
- void extractString(StringC &);
- void flush();
-private:
- void flushBuf(Char);
- void sync(size_t);
- StrOutputCharStream(const StrOutputCharStream &); // undefined
- void operator=(const StrOutputCharStream &); // undefined
- Char *buf_;
- size_t bufSize_;
-};
-
-class SP_API RecordOutputCharStream : public OutputCharStream {
-public:
- RecordOutputCharStream(OutputCharStream *);
- ~RecordOutputCharStream();
- void flush();
- void setEscaper(Escaper);
-private:
- RecordOutputCharStream(const RecordOutputCharStream &); // undefined
- void operator=(const RecordOutputCharStream &); // undefined
- void flushBuf(Char);
- void outputBuf();
-
- OutputCharStream *os_;
- enum { bufSize_ = 1024 };
- Char buf_[bufSize_];
-};
-
-inline
-OutputCharStream &OutputCharStream::put(Char c)
-{
- if (ptr_ < end_)
- *ptr_++ = c;
- else
- flushBuf(c);
- return *this;
-}
-
-inline
-OutputCharStream &OutputCharStream::operator<<(char c)
-{
- return put(Char(c));
-}
-
-inline
-OutputCharStream &OutputCharStream::operator<<(Newline)
-{
- put(Char(SP_LINE_TERM1));
-#ifdef SP_LINE_TERM2
- put(Char(SP_LINE_TERM2));
-#endif
- return *this;
-}
-
-inline
-OutputCharStream &OutputCharStream::operator<<(const StringC &str)
-{
- return write(str.data(), str.size());
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OutputCharStream_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Owner.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/Owner.cxx
deleted file mode 100644
index d9fc8b28bb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Owner.cxx
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Owner_DEF_INCLUDED
-#define Owner_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-Owner<T>::~Owner()
-{
- if (p_)
- delete p_;
-}
-
-template<class T>
-void Owner<T>::del()
-{
- delete p_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Owner_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Owner.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Owner.h
deleted file mode 100644
index d81ac07881..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Owner.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Owner_INCLUDED
-#define Owner_INCLUDED 1
-
-// A pointer that owns the object pointed to.
-// T must be of class type.
-// This is coded so that T need not yet have been defined.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class Owner {
-public:
- Owner() : p_(0) { }
- Owner(T *p) : p_(p) { }
- ~Owner();
- void operator=(T *p) {
- if (p_) del();
- p_ = p;
- }
- operator int() const { return p_ != 0; }
- T *pointer() const { return p_; }
- T *operator->() const { return p_; }
- T &operator*() const { return *p_; }
- void swap(Owner<T> &x) {
- T *tem = p_;
- p_ = x.p_;
- x.p_ = tem;
- }
- T *extract() {
- T *tem = p_;
- p_ = 0;
- return tem;
- }
- void clear() {
- if (p_) {
- del();
- p_ = 0;
- }
- }
-private:
- Owner(const Owner<T> &); // undefined
- void operator=(const Owner<T> &o); // undefined
- void del();
- T *p_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Owner_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "Owner.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.cxx
deleted file mode 100644
index b83c67154e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.cxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OwnerTable_DEF_INCLUDED
-#define OwnerTable_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template < class T, class K, class HF, class KF >
-OwnerTable < T, K, HF, KF > ::~OwnerTable()
-{
- for (size_t i = 0; i < this->vec_.size(); i++)
- delete this->vec_[i];
-}
-
-template < class T, class K, class HF, class KF >
-void OwnerTable < T, K, HF, KF > ::clear()
-{
- for (size_t i = 0; i < this->vec_.size(); i++)
- delete this->vec_[i];
- PointerTable < T *, K, HF, KF > ::clear();
-}
-
-template < class T, class K, class HF, class KF >
-void
-CopyOwnerTable < T, K, HF, KF > ::operator = (
- const CopyOwnerTable < T, K, HF, KF > &t)
-{
- this->clear();
- PointerTable < T *, K, HF, KF > ::operator = (t);
- // FIXME This isn't exception safe.
- for (size_t i = 0; i < this->vec_.size(); i++)
- if (this->vec_[i])
- this->vec_[i] = this->vec_[i]->copy();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OwnerTable_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.h
deleted file mode 100644
index 7bb6d5e6d0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/OwnerTable.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OwnerTable_INCLUDED
-#define OwnerTable_INCLUDED 1
-
-#include "PointerTable.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T, class K, class HF, class KF>
-class OwnerTable : public PointerTable<T *, K, HF, KF> {
-public:
- OwnerTable() { }
- ~OwnerTable();
- void clear();
- void swap(OwnerTable<T, K, HF, KF> &x) {
- PointerTable<T *, K, HF, KF>::swap(x);
- }
-private:
- OwnerTable(const OwnerTable<T, K, HF, KF> &);
- void operator=(const OwnerTable<T, K, HF, KF> &);
-};
-
-template<class T, class K, class HF, class KF>
-class OwnerTableIter : public PointerTableIter<T *, K, HF, KF> {
-public:
- OwnerTableIter(const OwnerTable<T, K, HF, KF> &table)
- : PointerTableIter<T *, K, HF, KF>(table) { }
-};
-
-template<class T, class K, class HF, class KF>
-class CopyOwnerTable : public OwnerTable<T, K, HF, KF> {
-public:
- CopyOwnerTable() { }
- CopyOwnerTable(const CopyOwnerTable<T, K, HF, KF> &tab) { *this = tab; }
- void operator=(const CopyOwnerTable<T, K, HF, KF> &tab);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OwnerTable_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "OwnerTable.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ParserApp.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ParserApp.h
deleted file mode 100644
index 1d8954963d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ParserApp.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ParserApp_INCLUDED
-#define ParserApp_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "SgmlParser.h"
-#include "ParserOptions.h"
-#include "EntityApp.h"
-#include "StringC.h"
-#include "ErrorCountEventHandler.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ParserApp : public EntityApp {
-public:
- ParserApp(const char *requiredInternalCode = 0);
- void processOption(AppChar opt, const AppChar *arg);
- int processSysid(const StringC &);
- virtual ErrorCountEventHandler *makeEventHandler() = 0;
- Boolean enableWarning(const AppChar *s);
- void initParser(const StringC &sysid);
- SgmlParser &parser();
- // This calls the ArcEngine if the options have enabled that.
- void parseAll(SgmlParser &, EventHandler &,
- const volatile sig_atomic_t *cancelPtr);
- virtual void allLinkTypesActivated();
-protected:
- virtual int generateEvents(ErrorCountEventHandler *);
- ParserOptions options_;
- SgmlParser parser_;
- unsigned errorLimit_;
- Vector<StringC> arcNames_;
- Vector<const AppChar *> activeLinkTypes_;
-};
-
-inline
-SgmlParser &ParserApp::parser()
-{
- return parser_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ParserApp_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ParserOptions.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ParserOptions.h
deleted file mode 100644
index 1a7065f214..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ParserOptions.h
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ParserOptions_INCLUDED
-#define ParserOptions_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "EventsWanted.h"
-#include "Vector.h"
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct Warnings {
- Warnings();
- PackedBoolean warnSgmlDecl;
- PackedBoolean warnDuplicateEntity;
- PackedBoolean warnShould;
- PackedBoolean warnUndefinedElement;
- PackedBoolean warnDefaultEntityReference;
- PackedBoolean warnMixedContent;
- PackedBoolean warnEmptyTag;
- PackedBoolean warnUnusedMap;
- PackedBoolean warnUnusedParam;
- PackedBoolean warnNotationSystemId;
- PackedBoolean warnInclusion;
- PackedBoolean warnExclusion;
- PackedBoolean warnRcdataContent;
- PackedBoolean warnCdataContent;
- PackedBoolean warnPsComment;
- PackedBoolean warnElementGroupDecl;
- PackedBoolean warnAttlistGroupDecl;
- PackedBoolean warnPiEntity;
- PackedBoolean warnInternalSdataEntity;
- PackedBoolean warnInternalCdataEntity;
- PackedBoolean warnExternalSdataEntity;
- PackedBoolean warnExternalCdataEntity;
- PackedBoolean warnBracketEntity;
- PackedBoolean warnDataAttributes;
- PackedBoolean warnMissingSystemId;
- PackedBoolean warnConref;
- PackedBoolean warnCurrent;
- PackedBoolean warnNutokenDeclaredValue;
- PackedBoolean warnNumberDeclaredValue;
- PackedBoolean warnNameDeclaredValue;
- PackedBoolean warnNamedCharRef;
- PackedBoolean warnRefc;
- PackedBoolean warnTempMarkedSection;
- PackedBoolean warnRcdataMarkedSection;
- PackedBoolean warnInstanceIncludeMarkedSection;
- PackedBoolean warnInstanceIgnoreMarkedSection;
- PackedBoolean warnAndGroup;
- PackedBoolean warnRank;
- PackedBoolean warnEmptyCommentDecl;
- PackedBoolean warnAttributeValueNotLiteral;
- PackedBoolean warnMissingAttributeName;
- PackedBoolean warnCommentDeclS;
- PackedBoolean warnCommentDeclMultiple;
- PackedBoolean warnMissingStatusKeyword;
- PackedBoolean warnMultipleStatusKeyword;
- PackedBoolean warnInstanceParamEntityRef;
- PackedBoolean warnMinimizationParam;
- PackedBoolean warnMixedContentRepOrGroup;
- PackedBoolean warnNameGroupNotOr;
- PackedBoolean warnPiMissingName;
- PackedBoolean warnInstanceStatusKeywordSpecS;
- PackedBoolean warnExternalDataEntityRef;
- PackedBoolean warnAttributeValueExternalEntityRef;
- PackedBoolean warnDataDelim;
- PackedBoolean warnExplicitSgmlDecl;
- PackedBoolean warnInternalSubsetMarkedSection;
- PackedBoolean warnDefaultEntityDecl;
- PackedBoolean warnNonSgmlCharRef;
- PackedBoolean warnInternalSubsetPsParamEntityRef;
- PackedBoolean warnInternalSubsetTsParamEntityRef;
- PackedBoolean warnInternalSubsetLiteralParamEntityRef;
-};
-
-struct SP_API ParserOptions : public Warnings {
- ParserOptions();
- EventsWanted eventsWanted;
- PackedBoolean datatag;
- PackedBoolean omittag;
- PackedBoolean rank;
- PackedBoolean shorttag;
- PackedBoolean emptynrm;
- Number linkSimple;
- PackedBoolean linkImplicit;
- Number linkExplicit;
- Number concur;
- Number subdoc;
- PackedBoolean formal;
- PackedBoolean shortref;
- enum { sgmlDeclTypeValid = -1 };
- short typeValid;
- enum Quantity {
- ATTCNT,
- ATTSPLEN,
- BSEQLEN,
- DTAGLEN,
- DTEMPLEN,
- ENTLVL,
- GRPCNT,
- GRPGTCNT,
- GRPLVL,
- LITLEN,
- NAMELEN,
- NORMSEP,
- PILEN,
- TAGLEN,
- TAGLVL
- };
- enum { nQuantity = TAGLVL + 1 };
- Number quantity[nQuantity];
- PackedBoolean errorIdref;
- PackedBoolean errorSignificant;
- PackedBoolean errorAfdr; // error if AFDR extensions are used
- // These override what was specified in the SGML declaration.
- PackedBoolean noUnclosedTag;
- PackedBoolean noNet;
- Vector<StringC> includes;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ParserOptions_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.cxx
deleted file mode 100644
index 19a5287b40..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef PointerTable_DEF_INCLUDED
-#define PointerTable_DEF_INCLUDED 1
-
-#include <stdlib.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class P, class K, class HF, class KF>
-PointerTable<P, K, HF, KF>::PointerTable()
-: used_(0), usedLimit_(0), null_(0)
-{
-}
-
-template<class P, class K, class HF, class KF>
-void PointerTable<P, K, HF, KF>::clear()
-{
- vec_.clear();
- used_ = 0;
- usedLimit_ = 0;
-}
-
-template<class P, class K, class HF, class KF>
-P PointerTable<P, K, HF, KF>::insert(P p, Boolean replace)
-{
- size_t h;
- if (vec_.size() == 0) {
- vec_.assign(8, P(0));
- usedLimit_ = 4;
- h = startIndex(KF::key(*p));
- }
- else {
- for (h = startIndex(KF::key(*p)); vec_[h] != 0 ; h = nextIndex(h))
- if (KF::key(*vec_[h]) == KF::key(*p)) {
- if (replace) {
- P tem(vec_[h]);
- vec_[h] = p;
- return tem;
- }
- else
- return vec_[h];
- }
- if (used_ >= usedLimit_) {
- if (vec_.size() > size_t(-1)/2) {
- if (usedLimit_ == vec_.size() - 1)
- abort(); // FIXME throw an exception
- else
- usedLimit_ = vec_.size() - 1;
- }
- else {
- // rehash
- Vector<P> oldVec(vec_.size()*2, P(0));
- vec_.swap(oldVec);
- usedLimit_ = vec_.size() / 2;
- for (size_t i = 0; i < oldVec.size(); i++)
- if (oldVec[i] != 0) {
- size_t j;
- for (j = startIndex(KF::key(*oldVec[i]));
- vec_[j] != 0;
- j = nextIndex(j))
- ;
- vec_[j] = oldVec[i];
- }
- for (h = startIndex(KF::key(*p)); vec_[h] != 0; h = nextIndex(h))
- ;
- }
- }
- }
- used_++;
- vec_[h] = p;
- return 0;
-}
-
-template<class P, class K, class HF, class KF>
-const P &PointerTable<P, K, HF, KF>::lookup(const K &k) const
-{
- if (used_ > 0) {
- for (size_t i = startIndex(k); vec_[i] != 0; i = nextIndex(i))
- if (KF::key(*vec_[i]) == k)
- return vec_[i];
- }
- return null_;
-}
-
-template<class P, class K, class HF, class KF>
-P PointerTable<P, K, HF, KF>::remove(const K &k)
-{
- if (used_ > 0) {
- for (size_t i = startIndex(k); vec_[i] != 0; i = nextIndex(i))
- if (KF::key(*vec_[i]) == k) {
- P p = vec_[i];
- do {
- vec_[i] = P(0);
- size_t j = i;
- size_t r;
- do {
- i = nextIndex(i);
- if (vec_[i] == 0)
- break;
- r = startIndex(KF::key(*vec_[i]));
- } while ((i <= r && r < j) || (r < j && j < i) || (j < i && i <= r));
- vec_[j] = vec_[i];
- } while (vec_[i] != 0);
- --used_;
- return p;
- }
- }
- return 0;
-}
-
-template<class P, class K, class HF, class KF>
-void PointerTable<P, K, HF, KF>::swap(PointerTable<P, K, HF, KF> &to)
-{
- vec_.swap(to.vec_);
- size_t tem = to.used_;
- to.used_ = used_;
- used_ = tem;
- tem = to.usedLimit_;
- to.usedLimit_ = usedLimit_;
- usedLimit_ = tem;
-}
-
-template<class P, class K, class HF, class KF>
-PointerTableIter<P, K, HF, KF>::PointerTableIter(const PointerTable<P, K, HF, KF> &table)
-: tablePtr_(&table), i_(0)
-{
-}
-
-template<class P, class K, class HF, class KF>
-const P &PointerTableIter<P, K, HF, KF>::next()
-{
- for (; i_ < tablePtr_->vec_.size(); i_++)
- if (tablePtr_->vec_[i_] != 0)
- return tablePtr_->vec_[i_++];
- return tablePtr_->null_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not PointerTable_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.h
deleted file mode 100644
index f17fe82c07..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/PointerTable.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef PointerTable_INCLUDED
-#define PointerTable_INCLUDED 1
-
-#include "Vector.h"
-#include "Boolean.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class P, class K, class HF, class KF> class PointerTableIter;
-
-template<class P, class K, class HF, class KF>
-class PointerTable {
- void constraints() {
- P p(0);
- const K &key = KF::key(*p);
- unsigned long n = HF::hash(key);
- n = 0; // prevent warning
- }
-public:
- PointerTable();
- P insert(P, Boolean replace = 0);
- // Return a reference so that it is possible to do
- // lookups into a table of smart-pointers from multiple threads.
- const P &lookup(const K &) const;
- P remove(const K &);
- size_t count() const { return used_; }
- void clear();
- void swap(PointerTable<P, K, HF, KF> &);
-protected:
- size_t used_;
- size_t usedLimit_;
- Vector<P> vec_;
- P null_;
-
- size_t startIndex(const K &k) const {
- return size_t(HF::hash(k) & (vec_.size() - 1));
- }
- size_t nextIndex(size_t i) const {
- return i == 0 ? vec_.size() - 1 : i - 1;
- }
- friend class PointerTableIter<P, K, HF, KF>;
-};
-
-template<class P, class K, class HF, class KF>
-class PointerTableIter {
-public:
- PointerTableIter(const PointerTable<P, K, HF, KF> &);
- const P &next();
-private:
- const PointerTable<P, K, HF, KF> *tablePtr_;
- size_t i_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not PointerTable_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "PointerTable.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/PosixStorage.h b/usr/src/cmd/man/src/util/nsgmls.src/include/PosixStorage.h
deleted file mode 100644
index 7d23790971..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/PosixStorage.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef PosixStorage_INCLUDED
-#define PosixStorage_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StorageManager.h"
-#include "DescriptorManager.h"
-#include "Vector.h"
-#include "StringC.h"
-#include "CharsetInfo.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class CharsetInfo;
-class UnivCharsetDesc;
-class Filename;
-class OutputCodingSystem;
-
-class SP_API PosixStorageManager : public IdStorageManager {
-public:
- PosixStorageManager(const char *type,
- const CharsetInfo *filenameCharset,
-#ifndef SP_WIDE_SYSTEM
- const OutputCodingSystem *filenameCodingSystem,
-#endif
- int maxFDs);
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &baseId,
- Boolean search,
- Boolean mayRewind,
- Messenger &,
- StringC &foundId);
- Boolean resolveRelative(const StringC &, StringC &, Boolean syntactic = 0)
- const;
- const char *type() const;
- void addSearchDir(const StringC &);
- Boolean transformNeutral(StringC &, Boolean fold, Messenger &) const;
-private:
- Boolean isAbsolute(const StringC &) const;
- StringC extractDir(const StringC &) const;
- StringC combineDir(const StringC &, const StringC &) const;
- PosixStorageManager(const PosixStorageManager &); // undefined
- void operator=(const PosixStorageManager &); // undefined
- DescriptorManager descriptorManager_;
-#ifndef SP_WIDE_SYSTEM
- const OutputCodingSystem *filenameCodingSystem_;
-#endif
- const char *type_;
- Vector<StringC> searchDirs_;
-};
-
-class SP_API PosixFdStorageManager : public IdStorageManager {
-public:
- PosixFdStorageManager(const char *type,
- const CharsetInfo *filenameCharset);
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &baseId,
- Boolean,
- Boolean mayRewind,
- Messenger &mgr,
- StringC &foundId);
- const char *type() const;
- Boolean inheritable() const;
-private:
- PosixFdStorageManager(const PosixFdStorageManager &); // undefined
- void operator=(const PosixFdStorageManager &); // undefined
- const char *type_;
-
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not PosixStorage_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.cxx
deleted file mode 100644
index c794d97daa..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.cxx
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Ptr_DEF_INCLUDED
-#define Ptr_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-Ptr<T>::Ptr(T *ptr) : ptr_(ptr)
-{
- if (ptr_)
- ptr_->ref();
-}
-
-template<class T>
-Ptr<T>::~Ptr()
-{
- if (ptr_) {
- if (ptr_->unref())
- delete ptr_;
- ptr_ = 0;
- }
-}
-
-template<class T>
-Ptr<T>::Ptr(const Ptr<T> &p)
-: ptr_(p.ptr_)
-{
- if (p.ptr_)
- p.ptr_->ref();
-}
-
-template<class T>
-Ptr<T> &Ptr<T>::operator=(const Ptr<T> &p)
-{
- if (p.ptr_)
- p.ptr_->ref();
- if (ptr_ && ptr_->unref())
- delete ptr_;
- ptr_ = p.ptr_;
- return *this;
-}
-
-template<class T>
-Ptr<T> &Ptr<T>::operator=(T *p)
-{
- if (p)
- p->ref();
- if (ptr_ && ptr_->unref())
- delete ptr_;
- ptr_ = p;
- return *this;
-}
-
-template<class T>
-void Ptr<T>::clear()
-{
- if (ptr_) {
- if (ptr_->unref())
- delete ptr_;
- ptr_ = 0;
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Ptr_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.h
deleted file mode 100644
index f3f5f2237b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Ptr.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Ptr_INCLUDED
-#define Ptr_INCLUDED 1
-
-#include "Boolean.h"
-
-// T must have Resource as a public base class
-// T may be an incomplete type
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class Ptr {
-public:
- Ptr() : ptr_(0) { }
- Ptr(T *ptr);
- ~Ptr();
- Ptr(const Ptr<T> &);
- Ptr<T> &operator=(const Ptr<T> &);
- Ptr<T> &operator=(T *);
- T *pointer() const { return ptr_; }
- T *operator->() const { return ptr_; }
- T &operator*() const { return *ptr_; }
- void swap(Ptr<T> &p) {
- T *tem = p.ptr_;
- p.ptr_ = ptr_;
- ptr_ = tem;
- }
- Boolean isNull() const { return ptr_ == 0; }
- // operator const void *() const { return ptr_; }
- void clear();
- Boolean operator==(const Ptr<T> &p) const {
- return ptr_ == p.ptr_;
- }
- Boolean operator!=(const Ptr<T> &p) const {
- return ptr_ != p.ptr_;
- }
- Boolean operator==(const T *p) const {
- return ptr_ == p;
- }
- Boolean operator!=(const T *p) const {
- return ptr_ != p;
- }
-private:
- T *ptr_;
-};
-
-template<class T>
-class ConstPtr : private Ptr<T> {
-public:
- ConstPtr() { }
- ConstPtr(T *ptr) : Ptr<T>(ptr) { }
- ConstPtr(const Ptr<T> &p) : Ptr<T>(p) { }
- ConstPtr(const ConstPtr<T> &p) : Ptr<T>(p) { }
- ConstPtr<T> &operator=(const Ptr<T> &p) {
- Ptr<T>::operator=(p); return *this;
- }
- ConstPtr<T> &operator=(const ConstPtr<T> &p) {
- Ptr<T>::operator=(p); return *this;
- }
- ConstPtr<T> &operator=(T *p) {
- Ptr<T>::operator=(p); return *this;
- }
- const T *pointer() const { return Ptr<T>::pointer(); }
- const T *operator->() const { return Ptr<T>::pointer(); }
- const T &operator*() const { return *Ptr<T>::pointer(); }
- void swap(ConstPtr<T> &p) { Ptr<T>::swap(p); }
- Ptr<T>::isNull;
- Ptr<T>::clear;
- Boolean operator==(const Ptr<T> &p) const { return Ptr<T>::operator==(p); }
- Boolean operator!=(const Ptr<T> &p) const { return Ptr<T>::operator!=(p); }
- Boolean operator==(const ConstPtr<T> &p) const {
- return Ptr<T>::operator==(p);
- }
- Boolean operator!=(const ConstPtr<T> &p) const {
- return Ptr<T>::operator!=(p);
- }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Ptr_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "Ptr.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.cxx
deleted file mode 100644
index e66d3fc21c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef RangeMap_DEF_INCLUDED
-#define RangeMap_DEF_INCLUDED 1
-
-#include "RangeMap.h"
-#include "ISet.h"
-#include "types.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class From, class To>
-RangeMap<From, To>::RangeMap()
-{
-}
-
-template<class From, class To>
-Boolean RangeMap<From, To>::map(From from, To &to, From &alsoMax) const
-{
- // FIXME use binary search
- for (size_t i = 0; i < ranges_.size(); i++) {
- const RangeMapRange<From,To> &r = ranges_[i];
- if (r.fromMin <= from && from <= r.fromMax) {
- to = r.toMin + (from - r.fromMin);
- alsoMax = r.fromMax;
- return 1;
- }
- if (r.fromMin > from) {
- alsoMax = r.fromMin - 1;
- return 0;
- }
- }
- alsoMax = From(-1);
- return 0;
-}
-
-
-typedef ISet<WideChar> RangeMap_dummy;
-
-template<class From, class To>
-unsigned RangeMap<From, To>::inverseMap(To to, From &from,
- ISet<WideChar> &fromSet,
- WideChar &count) const
-{
- // FIXME use binary search
- unsigned ret = 0;
- count = WideChar(-1);
- for (size_t i = 0; i < ranges_.size(); i++) {
- const RangeMapRange<From,To> &r = ranges_[i];
- if (r.toMin <= to && to <= r.toMin + (r.fromMax - r.fromMin)) {
- From n = r.fromMin + (to - r.toMin);
- WideChar thisCount = r.fromMax - n + 1;
- if (ret > 1) {
- fromSet.add(n);
- if (thisCount < count)
- count = thisCount;
- }
- else if (ret == 1) {
- fromSet.add(from);
- fromSet.add(n);
- ret = 2;
- if (thisCount < count)
- count = thisCount;
- }
- else {
- count = thisCount;
- from = n;
- ret = 1;
- }
- }
- else if (ret == 0 && r.toMin > to && (r.toMin - to < count))
- count = r.toMin - to;
- }
- return ret;
-}
-
-template<class From, class To>
-RangeMapIter<From, To>::RangeMapIter(const RangeMap<From, To> &map)
-: count_(map.ranges_.size()), ptr_(map.ranges_.begin())
-{
-}
-
-// If the new range overlaps an existing one, the new
-// one takes precedence.
-
-template<class From, class To>
-void RangeMap<From, To>::addRange(From fromMin, From fromMax, To toMin)
-{
- // FIXME use binary search
- size_t i;
- for (i = ranges_.size(); i > 0; i--)
- if (fromMin > ranges_[i - 1].fromMax)
- break;
- // fromMin <= ranges[i].fromMax
- Boolean coalesced = 0;
- if (i > 0
- && ranges_[i - 1].fromMax + 1 == fromMin
- && ranges_[i - 1].toMin + (fromMin - ranges_[i - 1].fromMin) == toMin) {
- // coalesce with previous
- ranges_[i - 1].fromMax = fromMax;
- i--;
- coalesced = 1;
- }
- else if (i < ranges_.size() && fromMax >= ranges_[i].fromMin - 1) {
- // overlap
- if (fromMin <= ranges_[i].fromMin) {
- if (toMin + (ranges_[i].fromMin - fromMin) == ranges_[i].toMin) {
- ranges_[i].fromMin = fromMin;
- if (fromMax <= ranges_[i].fromMax)
- return;
- ranges_[i].fromMax = fromMax;
- coalesced = 1;
- }
- }
- else {
- // fromMin > ranges_[i].fromMin
- if (ranges_[i].toMin + (fromMin - ranges_[i].fromMin) == toMin) {
- if (fromMax < ranges_[i].fromMax)
- return;
- ranges_[i].fromMax = fromMax;
- coalesced = 1;
- }
- }
- }
- if (!coalesced) {
- // insert
- ranges_.resize(ranges_.size() + 1);
- for (size_t j = ranges_.size() - 1; j > i; j--)
- ranges_[j] = ranges_[j - 1];
- ranges_[i].fromMin = fromMin;
- ranges_[i].fromMax = fromMax;
- ranges_[i].toMin = toMin;
- }
- // Delete overlapping ranges starting at i + 1.
- size_t j;
- for (j = i + 1; j < ranges_.size(); j++) {
- if (fromMax < ranges_[j].fromMax) {
- if (fromMax >= ranges_[j].fromMin)
- ranges_[j].fromMin = fromMax + 1;
- break;
- }
- }
- if (j > i + 1) {
- // delete i + 1 ... j - 1
- // j -> i + 1
- // j - 1 -> i + 2
- size_t count = ranges_.size() - j;
- for (size_t k = 0; k < count; k++)
- ranges_[i + 1 + count] = ranges_[j + count];
- ranges_.resize(ranges_.size() - (j - (i + 1)));
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not RangeMap_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.h b/usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.h
deleted file mode 100644
index a57ae88334..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/RangeMap.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _RANGEMAP_H
-#define _RANGEMAP_H
-
-#ifndef RangeMap_INCLUDED
-#define RangeMap_INCLUDED 1
-
-#include "Vector.h"
-#include "Boolean.h"
-#include "ISet.h"
-#include "types.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template < class From, class To >
-struct RangeMapRange {
- From fromMin;
- From fromMax;
- To toMin;
-};
-
-template < class From, class To > class RangeMapIter;
-template < class From, class To > class RangeMap;
-
-template < class From, class To >
-class RangeMap {
-public:
- RangeMap();
- Boolean map(From, To &, From &alsoMax) const;
- // Return 0 for no matches, 1 for 1, 2 for more than 1.
- unsigned inverseMap(To, From &, ISet < WideChar > &, \
- WideChar &count) const;
- void addRange(From, From, To);
-private:
- Vector < RangeMapRange < From, To > > ranges_;
- friend class RangeMapIter < From, To >\
-;
-};
-
-template < class From, class To >
-class RangeMapIter {
-public:
- RangeMapIter(const RangeMap < From, To > &map);
- Boolean next(From &fromMin, From &fromMax, To &toMin) {
- if (!count_)
- return (0);
- else {
- fromMin = ptr_->fromMin;
- fromMax = ptr_->fromMax;
- toMin = ptr_->toMin;
- ptr_++;
- count_--;
- return (1);
- }
- }
-private:
- size_t count_;
- typename Vector < RangeMapRange < From, To > >\
-::const_iterator ptr_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not RangeMap_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "RangeMap.cxx"
-#endif
-
-#endif /* _RANGEMAP_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Resource.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Resource.h
deleted file mode 100644
index 5c551ec023..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Resource.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Resource_INCLUDED
-#define Resource_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Resource {
-public:
- Resource();
- Resource(const Resource &);
- int unref(); // return 1 if it should be deleted
- void ref();
- int count() const;
-private:
- int count_;
-};
-
-inline
-Resource::Resource()
-: count_(0)
-{
-}
-
-inline
-Resource::Resource(const Resource &)
-: count_(0)
-{
-}
-
-inline
-int Resource::count() const
-{
- return count_;
-}
-
-inline
-int Resource::unref()
-{
- return --count_ <= 0;
-}
-
-inline
-void Resource::ref()
-{
- ++count_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Resource_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/RewindStorageObject.h b/usr/src/cmd/man/src/util/nsgmls.src/include/RewindStorageObject.h
deleted file mode 100644
index eb6f2ee0d6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/RewindStorageObject.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef RewindStorageObject_INCLUDED
-#define RewindStorageObject_INCLUDED 1
-
-#include "StorageManager.h"
-#include "Boolean.h"
-#include "StringOf.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-
-class SP_API RewindStorageObject : public StorageObject {
-public:
- RewindStorageObject(Boolean mayRewind, Boolean canSeek);
-protected:
- PackedBoolean mayRewind_;
-
- void saveBytes(const char *, size_t);
- Boolean readSaved(char *, size_t, size_t &);
- Boolean rewind(Messenger &);
- void willNotRewind();
- void unread(const char *s, size_t n);
- virtual Boolean seekToStart(Messenger &) = 0;
-private:
- PackedBoolean savingBytes_;
- PackedBoolean readingSaved_;
- PackedBoolean canSeek_;
- String<char> savedBytes_;
- size_t nBytesRead_;
-};
-
-inline
-void RewindStorageObject::saveBytes(const char *s, size_t n)
-{
- if (savingBytes_)
- savedBytes_.append(s, n);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not RewindStorageObject_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SJISCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/SJISCodingSystem.h
deleted file mode 100644
index 7aa312e610..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SJISCodingSystem.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SJISCodingSystem_INCLUDED
-#define SJISCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API SJISCodingSystem : public CodingSystem {
-public:
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SJISCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SOEntityCatalog.h b/usr/src/cmd/man/src/util/nsgmls.src/include/SOEntityCatalog.h
deleted file mode 100644
index 3436f4d238..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SOEntityCatalog.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SOEntityCatalog_INCLUDED
-#define SOEntityCatalog_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ExtendEntityManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API SOCatalogManager : public ExtendEntityManager::CatalogManager {
-public:
- static ExtendEntityManager::CatalogManager *
- make(const Vector<StringC> &sysids,
- size_t nSysidsMustExist,
- const CharsetInfo *sysidCharset,
- const CharsetInfo *catalogCharset,
- Boolean useDocCatalog);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SOEntityCatalog_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Sd.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Sd.h
deleted file mode 100644
index 6d1e254dcc..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Sd.h
+++ /dev/null
@@ -1,583 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Sd_INCLUDED
-#define Sd_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Boolean.h"
-#include "Resource.h"
-#include "CharsetInfo.h"
-#include "ExternalId.h"
-#include "ISet.h"
-#include "Syntax.h"
-#include "CharsetDecl.h"
-#include "HashTable.h"
-#include "EntityManager.h"
-#include "Ptr.h"
-
-// Information about the SGML declaration that is not syntax specific.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Sd : public Resource {
-public:
- // These must be in the same order as in the SGML declaration.
- enum BooleanFeature {
- fDATATAG,
- fOMITTAG,
- fRANK,
- fSTARTTAGEMPTY,
- fSTARTTAGUNCLOSED,
- fENDTAGEMPTY,
- fENDTAGUNCLOSED,
- fATTRIBDEFAULT,
- fATTRIBOMITNAME,
- fATTRIBVALUE,
- fEMPTYNRM,
- fIMPLYDEFATTLIST,
- fIMPLYDEFDOCTYPE,
- fIMPLYDEFELEMENT,
- fIMPLYDEFENTITY,
- fIMPLYDEFNOTATION,
- fIMPLICIT,
- fFORMAL,
- fURN,
- fKEEPRSRE
- };
- enum {
- nBooleanFeature = fKEEPRSRE + 1,
- fSHORTTAG_FIRST = fSTARTTAGEMPTY,
- fSHORTTAG_LAST = fATTRIBVALUE
- };
- // These must be in the same order as in the SGML declaration.
- enum NumberFeature {
- fSIMPLE,
- fEXPLICIT,
- fCONCUR,
- fSUBDOC
- };
- enum { nNumberFeature = fSUBDOC + 1 };
- enum NetEnable {
- netEnableNo,
- netEnableImmednet,
- netEnableAll
- };
- enum EntityRef {
- entityRefAny,
- entityRefInternal,
- entityRefNone
- };
- // These are names used in the SGML declaration.
- enum ReservedName {
- rALL,
- rANY,
- rAPPINFO,
- rATTLIST,
- rATTRIB,
- rBASESET,
- rCAPACITY,
- rCHARSET,
- rCONCUR,
- rCONTROLS,
- rDATATAG,
- rDEFAULT,
- rDELIM,
- rDESCSET,
- rDOCTYPE,
- rDOCUMENT,
- rELEMENT,
- rEMPTY,
- rEMPTYNRM,
- rENDTAG,
- rENTITIES,
- rENTITY,
- rEXPLICIT,
- rFEATURES,
- rFORMAL,
- rFUNCHAR,
- rFUNCTION,
- rGENERAL,
- rIMMEDNET,
- rIMPLICIT,
- rIMPLYDEF,
- rINSTANCE,
- rINTEGRAL,
- rINTERNAL,
- rKEEPRSRE,
- rLCNMCHAR,
- rLCNMSTRT,
- rLINK,
- rMINIMIZE,
- rMSICHAR,
- rMSOCHAR,
- rMSSCHAR,
- rNAMECASE,
- rNAMECHAR,
- rNAMES,
- rNAMESTRT,
- rNAMING,
- rNETENABL,
- rNO,
- rNOASSERT,
- rNONE,
- rNOTATION,
- rOMITNAME,
- rOMITTAG,
- rOTHER,
- rPUBLIC,
- rQUANTITY,
- rRANK,
- rRE,
- rREF,
- rRS,
- rSCOPE,
- rSEEALSO,
- rSEPCHAR,
- rSGML,
- rSGMLREF,
- rSHORTREF,
- rSHORTTAG,
- rSHUNCHAR,
- rSIMPLE,
- rSPACE,
- rSTARTTAG,
- rSUBDOC,
- rSWITCHES,
- rSYNTAX,
- rSYSTEM,
- rTYPE,
- rUCNMCHAR,
- rUCNMSTRT,
- rUNCLOSED,
- rUNUSED,
- rURN,
- rVALIDITY,
- rVALUE,
- rYES
- };
- enum Capacity {
- TOTALCAP,
- ENTCAP,
- ENTCHCAP,
- ELEMCAP,
- GRPCAP,
- EXGRPCAP,
- EXNMCAP,
- ATTCAP,
- ATTCHCAP,
- AVGRPCAP,
- NOTCAP,
- NOTCHCAP,
- IDCAP,
- IDREFCAP,
- MAPCAP,
- LKSETCAP,
- LKNMCAP
- };
- enum { nCapacity = LKNMCAP + 1 };
- Sd(const Ptr<EntityManager> &);
- void setDocCharsetDesc(const UnivCharsetDesc &);
- Boolean matchesReservedName(const StringC &, ReservedName) const;
- int digitWeight(Char) const;
- int hexDigitWeight(Char) const;
- Boolean link() const;
- Number simpleLink() const;
- Boolean implicitLink() const;
- Number explicitLink() const;
- Boolean startTagEmpty() const;
- Boolean startTagUnclosed() const;
- NetEnable startTagNetEnable() const;
- void setStartTagNetEnable(NetEnable);
- Boolean endTagEmpty() const;
- Boolean endTagUnclosed() const;
- Boolean attributeDefault() const;
- Boolean attributeValueNotLiteral() const;
- Boolean attributeOmitName() const;
- Boolean emptyElementNormal() const;
- Boolean implydefAttlist() const;
- Boolean implydefDoctype() const;
- Boolean implydefElement() const;
- Boolean implydefEntity() const;
- Boolean implydefNotation() const;
- Number concur() const;
- Boolean omittag() const;
- Boolean rank() const;
- Boolean datatag() const;
- Boolean formal() const;
- Boolean keeprsre() const;
- Number subdoc() const;
- StringC reservedName(int) const;
- Boolean lookupQuantityName(const StringC &, Syntax::Quantity &) const;
- Boolean lookupGeneralDelimiterName(const StringC &, Syntax::DelimGeneral &)
- const;
- Boolean lookupCapacityName(const StringC &, Sd::Capacity &) const;
- StringC quantityName(Syntax::Quantity) const;
- Boolean internalCharsetIsDocCharset() const;
- const CharsetInfo &internalCharset() const;
- const CharsetInfo &docCharset() const;
- Char execToInternal(char) const;
- StringC execToInternal(const char *) const;
- Number capacity(int) const;
- void setCapacity(int, Number);
- StringC capacityName(int) const;
- Boolean scopeInstance() const;
- void setScopeInstance();
- void setDocCharsetDecl(CharsetDecl &);
- const CharsetDecl &docCharsetDecl() const;
- void setBooleanFeature(BooleanFeature, Boolean);
- void setShorttag(Boolean);
- void setNumberFeature(NumberFeature, Number);
- StringC generalDelimiterName(Syntax::DelimGeneral) const;
- UnivChar nameToUniv(const StringC &);
- Boolean www() const;
- void setWww(Boolean);
- EntityRef entityRef() const;
- void setEntityRef(EntityRef);
- Boolean typeValid() const;
- void setTypeValid(Boolean);
- Boolean integrallyStored() const;
- void setIntegrallyStored(Boolean);
-private:
- PackedBoolean booleanFeature_[nBooleanFeature];
- Number numberFeature_[nNumberFeature];
- Number capacity_[nCapacity];
- PackedBoolean internalCharsetIsDocCharset_;
- // if null, use docCharset_
- const CharsetInfo *internalCharsetPtr_;
- CharsetInfo docCharset_;
- CharsetDecl docCharsetDecl_;
- Boolean scopeInstance_;
- Boolean www_;
- NetEnable netEnable_;
- EntityRef entityRef_;
- Boolean typeValid_;
- Boolean integrallyStored_;
- HashTable<StringC,int> namedCharTable_;
- Ptr<EntityManager> entityManager_;
- static const char *const reservedName_[];
- static const char *const generalDelimiterName_[];
- static const char *const capacityName_[];
- static const char *const quantityName_[];
-};
-
-inline
-Boolean Sd::link() const
-{
- return (numberFeature_[fSIMPLE]
- || booleanFeature_[fIMPLICIT]
- || numberFeature_[fEXPLICIT]);
-}
-
-inline
-Number Sd::explicitLink() const
-{
- return numberFeature_[fEXPLICIT];
-}
-
-inline
-Boolean Sd::implicitLink() const
-{
- return booleanFeature_[fIMPLICIT];
-}
-
-inline
-Number Sd::simpleLink() const
-{
- return numberFeature_[fSIMPLE];
-}
-
-inline
-Boolean Sd::startTagEmpty() const
-{
- return booleanFeature_[fSTARTTAGEMPTY];
-}
-
-inline
-Boolean Sd::startTagUnclosed() const
-{
- return booleanFeature_[fSTARTTAGUNCLOSED];
-}
-
-inline
-Sd::NetEnable Sd::startTagNetEnable() const
-{
- return netEnable_;
-}
-
-inline
-void Sd::setStartTagNetEnable(NetEnable e)
-{
- netEnable_ = e;
-}
-
-inline
-Boolean Sd::endTagEmpty() const
-{
- return booleanFeature_[fENDTAGEMPTY];
-}
-
-inline
-Boolean Sd::endTagUnclosed() const
-{
- return booleanFeature_[fENDTAGUNCLOSED];
-}
-
-inline
-Boolean Sd::attributeDefault() const
-{
- return booleanFeature_[fATTRIBDEFAULT];
-}
-
-inline
-Boolean Sd::attributeValueNotLiteral() const
-{
- return booleanFeature_[fATTRIBVALUE];
-}
-
-inline
-Boolean Sd::attributeOmitName() const
-{
- return booleanFeature_[fATTRIBOMITNAME];
-}
-
-inline
-Boolean Sd::emptyElementNormal() const
-{
- return booleanFeature_[fEMPTYNRM];
-}
-
-inline
-Boolean Sd::implydefAttlist() const
-{
- return booleanFeature_[fIMPLYDEFATTLIST];
-}
-
-inline
-Boolean Sd::implydefDoctype() const
-{
- return booleanFeature_[fIMPLYDEFDOCTYPE];
-}
-
-inline
-Boolean Sd::implydefElement() const
-{
- return booleanFeature_[fIMPLYDEFELEMENT];
-}
-
-inline
-Boolean Sd::implydefEntity() const
-{
- return booleanFeature_[fIMPLYDEFENTITY];
-}
-
-inline
-Boolean Sd::implydefNotation() const
-{
- return booleanFeature_[fIMPLYDEFNOTATION];
-}
-
-inline
-Number Sd::concur() const
-{
- return numberFeature_[fCONCUR];
-}
-
-inline
-Number Sd::subdoc() const
-{
- return numberFeature_[fSUBDOC];
-}
-
-
-inline
-Boolean Sd::omittag() const
-{
- return booleanFeature_[fOMITTAG];
-}
-
-inline
-Boolean Sd::rank() const
-{
- return booleanFeature_[fRANK];
-}
-
-inline
-Boolean Sd::datatag() const
-{
- return booleanFeature_[fDATATAG];
-}
-
-inline
-Boolean Sd::formal() const
-{
- return booleanFeature_[fFORMAL];
-}
-
-inline
-Boolean Sd::keeprsre() const
-{
- return booleanFeature_[fKEEPRSRE];
-}
-
-inline
-const CharsetInfo &Sd::internalCharset() const
-{
- return internalCharsetPtr_ ? *internalCharsetPtr_ : docCharset_;
-}
-
-inline
-Char Sd::execToInternal(char c) const
-{
- return internalCharset().execToDesc(c);
-}
-
-inline
-StringC Sd::execToInternal(const char *s) const
-{
- return internalCharset().execToDesc(s);
-}
-
-inline
-StringC Sd::reservedName(int i) const
-{
- return execToInternal(reservedName_[i]);
-}
-
-inline
-Boolean Sd::internalCharsetIsDocCharset() const
-{
- return internalCharsetIsDocCharset_;
-}
-
-inline
-const CharsetInfo &Sd::docCharset() const
-{
- return docCharset_;
-}
-
-inline
-int Sd::digitWeight(Char c) const
-{
- return internalCharset().digitWeight(c);
-}
-
-inline
-int Sd::hexDigitWeight(Char c) const
-{
- return internalCharset().hexDigitWeight(c);
-}
-
-inline
-Number Sd::capacity(int i) const
-{
- return capacity_[i];
-}
-
-inline
-void Sd::setCapacity(int i, Number n)
-{
- capacity_[i] = n;
-}
-
-inline
-StringC Sd::capacityName(int i) const
-{
- return execToInternal(capacityName_[i]);
-}
-
-inline
-Boolean Sd::scopeInstance() const
-{
- return scopeInstance_;
-}
-
-inline
-void Sd::setScopeInstance()
-{
- scopeInstance_ = 1;
-}
-
-inline
-void Sd::setDocCharsetDecl(CharsetDecl &decl)
-{
- decl.swap(docCharsetDecl_);
-}
-
-inline
-const CharsetDecl &Sd::docCharsetDecl() const
-{
- return docCharsetDecl_;
-}
-
-inline
-void Sd::setBooleanFeature(BooleanFeature i, Boolean b)
-{
- booleanFeature_[i] = b;
-}
-
-inline
-void Sd::setNumberFeature(NumberFeature i, Number n)
-{
- numberFeature_[i] = n;
-}
-
-inline
-Boolean Sd::www() const
-{
- return www_;
-}
-
-inline
-void Sd::setWww(Boolean b)
-{
- www_ = b;
-}
-
-inline
-Sd::EntityRef Sd::entityRef() const
-{
- return entityRef_;
-}
-
-inline
-void Sd::setEntityRef(EntityRef r)
-{
- entityRef_ = r;
-}
-
-inline
-Boolean Sd::typeValid() const
-{
- return typeValid_;
-}
-
-inline
-void Sd::setTypeValid(Boolean b)
-{
- typeValid_ = b;
-}
-
-inline
-Boolean Sd::integrallyStored() const
-{
- return integrallyStored_;
-}
-
-inline
-void Sd::setIntegrallyStored(Boolean b)
-{
- integrallyStored_ = b;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* Sd_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SdText.h b/usr/src/cmd/man/src/util/nsgmls.src/include/SdText.h
deleted file mode 100644
index 5dbb438365..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SdText.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SdText_INCLUDED
-#define SdText_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "StringOf.h"
-#include "Vector.h"
-#include "Location.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct SP_API SdTextItem {
- SdTextItem();
- Location loc;
- size_t index;
-};
-
-class SP_API SdText {
-public:
- SdText();
- SdText(const Location &loc, Boolean lita);
- void swap(SdText &);
- void addChar(SyntaxChar, const Location &);
- const String<SyntaxChar> &string() const;
- Boolean lita() const;
- Location endDelimLocation() const;
-private:
- Boolean lita_;
- String<SyntaxChar> chars_;
- Vector<SdTextItem> items_;
- friend class SdTextIter;
-};
-
-class SP_API SdTextIter {
-public:
- SdTextIter(const SdText &);
- Boolean next(const SyntaxChar *&, size_t &, Location &);
-private:
- const SdText *ptr_;
- size_t itemIndex_;
-};
-
-inline
-Boolean SdText::lita() const
-{
- return lita_;
-}
-
-inline
-const String<SyntaxChar> &SdText::string() const
-{
- return chars_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SdText_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SearchResultMessageArg.h b/usr/src/cmd/man/src/util/nsgmls.src/include/SearchResultMessageArg.h
deleted file mode 100644
index 3ae2ca6227..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SearchResultMessageArg.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SearchResultMessageArg_INCLUDED
-#define SearchResultMessageArg_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "MessageArg.h"
-#include "StringC.h"
-#include "Vector.h"
-#include "Vector.h"
-#include "rtti.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API SearchResultMessageArg : public OtherMessageArg {
- RTTI_CLASS
-public:
- SearchResultMessageArg();
- void add(StringC &, int);
- MessageArg *copy() const;
- size_t nTried() const;
- const StringC &filename(size_t) const;
- int errnum(size_t) const;
-private:
- Vector<StringC> filename_;
- Vector<unsigned int> errno_;
-};
-
-inline
-size_t SearchResultMessageArg::nTried() const
-{
- return filename_.size();
-}
-
-inline
-const StringC &SearchResultMessageArg::filename(size_t i) const
-{
- return filename_[i];
-}
-
-inline
-int SearchResultMessageArg::errnum(size_t i) const
-{
- return errno_[i];
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SearchResultMessageArg_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SgmlParser.h b/usr/src/cmd/man/src/util/nsgmls.src/include/SgmlParser.h
deleted file mode 100644
index 484d8f02c9..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SgmlParser.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SgmlParser_INCLUDED
-#define SgmlParser_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StringC.h"
-#include "Ptr.h"
-#include "Location.h"
-#include "EntityManager.h"
-
-#include <signal.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Event;
-class Parser;
-class UnivCharsetDesc;
-class EventHandler;
-struct ParserOptions;
-template<class T> class Ptr;
-template<class T> class ConstPtr;
-class InputSourceOrigin;
-class Sd;
-class Syntax;
-class Dtd;
-
-class SP_API SgmlParser {
-public:
- struct SP_API Params {
- enum EntityType {
- document,
- subdoc,
- dtd
- };
- Params();
- EntityType entityType; // defaults to document
- StringC sysid; // must be specified
- Ptr<InputSourceOrigin> origin;
- Ptr<EntityManager> entityManager;
- const SgmlParser *parent;
- ConstPtr<Sd> sd;
- ConstPtr<Syntax> prologSyntax;
- ConstPtr<Syntax> instanceSyntax;
- unsigned subdocLevel;
- const ParserOptions *options;
- PackedBoolean subdocInheritActiveLinkTypes;
- // referenced subdocs count against SUBDOC limit in SGML declaration
- PackedBoolean subdocReferenced;
- StringC doctypeName;
- };
- SgmlParser(); // must call init
- SgmlParser(const Params &params);
- void init(const Params &params);
- ~SgmlParser();
- Event *nextEvent();
- void parseAll(EventHandler &, const volatile sig_atomic_t *cancelPtr = 0);
- ConstPtr<Sd> sd() const;
- ConstPtr<Syntax> instanceSyntax() const;
- ConstPtr<Syntax> prologSyntax() const;
- EntityManager &entityManager() const;
- const EntityCatalog &entityCatalog() const;
- const ParserOptions &options() const;
- // Only to be called after the parse has ended.
- Ptr<Dtd> baseDtd();
- void activateLinkType(const StringC &);
- void allLinkTypesActivated();
- void swap(SgmlParser &);
- friend class Parser;
-private:
- SgmlParser(const SgmlParser &);
- void operator=(const SgmlParser &);
- Parser *parser_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SgmlParser_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/ShortReferenceMap.h b/usr/src/cmd/man/src/util/nsgmls.src/include/ShortReferenceMap.h
deleted file mode 100644
index 843e869cff..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/ShortReferenceMap.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ShortReferenceMap_INCLUDED
-#define ShortReferenceMap_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Vector.h"
-#include "Vector.h"
-#include "StringC.h"
-#include "Named.h"
-#include "Boolean.h"
-#include "Entity.h"
-#include "Ptr.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API ShortReferenceMap : public Named {
-public:
- ShortReferenceMap();
- ShortReferenceMap(const StringC &);
- Boolean defined() const;
- void setNameMap(Vector<StringC> &map);
- void setEntityMap(Vector<ConstPtr<Entity> > &map);
- Boolean lookup(int i, const StringC *&) const;
- const StringC *entityName(size_t i) const;
- const ConstPtr<Entity> &entity(size_t i) const;
- Boolean used() const;
- void setUsed();
- const Location &defLocation() const;
- void setDefLocation(const Location &);
-private:
- ShortReferenceMap(const ShortReferenceMap &); // undefined
- void operator=(const ShortReferenceMap &); // undefined
- Vector<StringC> nameMap_;
- Vector<ConstPtr<Entity> > entityMap_;
- ConstPtr<Entity> nullEntity_;
- Boolean used_;
- Location defLocation_;
-};
-
-inline
-Boolean ShortReferenceMap::defined() const
-{
- return nameMap_.size() > 0;
-}
-
-inline
-const StringC *ShortReferenceMap::entityName(size_t i) const
-{
- if (i < nameMap_.size() && nameMap_[i].size() != 0)
- return &nameMap_[i];
- else
- return 0;
-}
-
-inline
-const ConstPtr<Entity> &ShortReferenceMap::entity(size_t i) const
-{
- if (i < entityMap_.size())
- return entityMap_[i];
- else
- return nullEntity_;
-}
-
-inline
-void ShortReferenceMap::setEntityMap(Vector<ConstPtr<Entity> > &map)
-{
- map.swap(entityMap_);
-}
-
-inline
-Boolean ShortReferenceMap::used() const
-{
- return used_;
-}
-
-inline
-void ShortReferenceMap::setUsed()
-{
- used_ = 1;
-}
-
-inline
-void ShortReferenceMap::setDefLocation(const Location &loc)
-{
- defLocation_ = loc;
-}
-
-inline
-const Location &ShortReferenceMap::defLocation() const
-{
- return defLocation_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ShortReferenceMap_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/StdioStorage.h b/usr/src/cmd/man/src/util/nsgmls.src/include/StdioStorage.h
deleted file mode 100644
index 282f0e6a7f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/StdioStorage.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StdioStorage_INCLUDED
-#define StdioStorage_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StorageManager.h"
-#include "DescriptorManager.h"
-#include "StringC.h"
-#include "CharsetInfo.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class CharsetInfo;
-class UnivCharsetDesc;
-class OutputCodingSystem;
-
-class SP_API StdioStorageManager : public IdStorageManager {
-public:
- StdioStorageManager(const char *type,
- const CharsetInfo *filenameCharset,
- const OutputCodingSystem *filenameCodingSystem);
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &baseId,
- Boolean,
- Boolean mayRewind,
- Messenger &,
- StringC &foundId);
- const char *type() const;
-private:
- StdioStorageManager(const StdioStorageManager &); // undefined
- void operator=(const StdioStorageManager &); // undefined
- const OutputCodingSystem *filenameCodingSystem_;
- const char *type_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StdioStorage_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/StorageManager.h b/usr/src/cmd/man/src/util/nsgmls.src/include/StorageManager.h
deleted file mode 100644
index 5eae2d40e6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/StorageManager.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StorageManager_INCLUDED
-#define StorageManager_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StringC.h"
-#include "types.h"
-#include "CharsetInfo.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class StorageManager;
-class CharsetInfo;
-class Messenger;
-class InputCodingSystem;
-
-class SP_API StorageObject {
-public:
- StorageObject();
- virtual ~StorageObject();
- virtual Boolean read(char *buf, size_t bufSize, Messenger &,
- size_t &nread) = 0;
- virtual Boolean rewind(Messenger &) = 0;
- virtual void willNotRewind();
- virtual size_t getBlockSize() const;
-private:
- StorageObject(const StorageObject &); // undefined
- void operator=(const StorageObject &); // undefined
-};
-
-class SP_API StorageManager {
-public:
- StorageManager();
- virtual StorageObject *makeStorageObject(const StringC &specId,
- const StringC &baseId,
- Boolean search,
- Boolean mayRewind,
- Messenger &mgr,
- StringC &actualId) = 0;
- virtual const char *type() const = 0;
- virtual Boolean inheritable() const;
- virtual Boolean transformNeutral(StringC &, Boolean fold, Messenger &) const;
- // Resolve a possibly relative ID by examining the base and specified IDs.
- // Put the resolved ID in specID.
- // Return 0 if it cannot be resolved yet becase the specified ID is relative
- // and physical searching is required to resolve it and search is true;
- // in this case the base will be passed to makeStorageObject.
- // Otherwise return 1; in this case the base will be discarded, and the
- // resolved ID will be passed to makeStorageObject.
- virtual Boolean resolveRelative(const StringC &base,
- StringC &specId,
- Boolean search) const;
- virtual Boolean guessIsId(const StringC &, const CharsetInfo &) const;
- virtual const InputCodingSystem *requiredCodingSystem() const;
- virtual Boolean requiresCr() const;
- virtual ~StorageManager();
- virtual const CharsetInfo *idCharset() const;
- virtual const StringC *reString() const;
-private:
- StorageManager(const StorageManager &); // undefined
- void operator=(const StorageManager &); // undefined
-};
-
-class SP_API IdStorageManager : public StorageManager {
-public:
- IdStorageManager(const CharsetInfo *idCharset);
- const CharsetInfo *idCharset() const;
- const StringC *reString() const;
-protected:
- StringC reString_;
-private:
- IdStorageManager(const IdStorageManager &); // undefined
- void operator=(const IdStorageManager &); // undefined
-
- const CharsetInfo *idCharset_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StorageManager_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/StringC.h b/usr/src/cmd/man/src/util/nsgmls.src/include/StringC.h
deleted file mode 100644
index 66c16d9ca1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/StringC.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StringC_INCLUDED
-#define StringC_INCLUDED 1
-
-#include "types.h"
-#include "StringOf.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-typedef String<Char> StringC;
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StringC_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.cxx
deleted file mode 100644
index e83640e0bf..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.cxx
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StringOf_DEF_INCLUDED
-#define StringOf_DEF_INCLUDED 1
-
-#include <string.h>
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-String<T>::String(const T *ptr, size_t length)
-: length_(length), alloc_(length)
-{
- if (length) {
- ptr_ = new T[length];
- memcpy(ptr_, ptr, length*sizeof(T));
- }
- else
- ptr_ = 0;
-}
-
-template<class T>
-String<T>::String()
-: ptr_(0), length_(0), alloc_(0)
-{
-}
-
-template<class T>
-String<T>::String(const String<T> &s)
-: length_(s.length_), alloc_(s.length_)
-{
- if (length_) {
- ptr_ = new T[length_];
- memcpy(ptr_, s.ptr_, length_*sizeof(T));
- }
- else
- ptr_ = 0;
-}
-
-template<class T>
-String<T> &String<T>::operator=(const String<T> &s)
-{
- if (&s != this) {
- if (s.length_ > alloc_) {
- T *oldPtr = ptr_;
- ptr_ = new T[alloc_ = s.length_];
- if (oldPtr)
- delete [] oldPtr;
- }
- memcpy(ptr_, s.ptr_, s.length_*sizeof(T));
- length_ = s.length_;
- }
- return *this;
-}
-
-template<class T>
-String<T> &String<T>::insert(size_t i, const String<T> &s)
-{
- if (length_ + s.length_ > alloc_)
- grow(s.length_);
- for (size_t n = length_ - i; n > 0; n--)
- ptr_[i + n - 1 + s.length_] = ptr_[i + n - 1];
- length_ += s.length_;
- memcpy(ptr_ + i, s.ptr_, s.length_*sizeof(T));
- return *this;
-}
-
-template<class T>
-String<T> &String<T>::append(const T *p, size_t length)
-{
- if (length_ + length > alloc_)
- grow(length);
- memcpy(ptr_ + length_, p, length*sizeof(T));
- length_ += length;
- return *this;
-}
-
-template<class T>
-void String<T>::grow(size_t n)
-{
- size_t newAlloc = alloc_;
- if (alloc_ < n)
- newAlloc += n + 16;
- else
- newAlloc += alloc_;
- T *s = new T[newAlloc];
- memcpy(s, ptr_, length_*sizeof(T));
- delete [] ptr_;
- ptr_ = s;
- alloc_ = newAlloc;
-}
-
-template<class T>
-void String<T>::swap(String<T> &to)
-{
- {
- T *tem = to.ptr_;
- to.ptr_ = ptr_;
- ptr_ = tem;
- }
- {
- size_t tem = to.length_;
- to.length_ = length_;
- length_ = tem;
- }
- {
- size_t tem = to.alloc_;
- to.alloc_ = alloc_;
- alloc_ = tem;
- }
-}
-
-template<class T>
-String<T> &String<T>::assign(const T *p, size_t n)
-{
- if (alloc_ < n) {
- T *oldPtr = ptr_;
- ptr_ = new T[n];
- alloc_ = n;
- if (oldPtr)
- delete [] oldPtr;
- }
- length_ = n;
- for(T *to = ptr_; n > 0; n--, to++, p++)
- *to = *p;
- return *this;
-}
-
-template<class T>
-void String<T>::resize(size_t n)
-{
- if (alloc_ < n) {
- T *oldPtr = ptr_;
- ptr_ = new T[n];
- alloc_ = n;
- if (length_ > 0) {
- memcpy(ptr_, oldPtr, length_*sizeof(T));
- delete [] oldPtr;
- }
- }
- length_ = n;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StringOf_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.h b/usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.h
deleted file mode 100644
index 902e6b068f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/StringOf.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StringOf_INCLUDED
-#define StringOf_INCLUDED 1
-
-// The file is called StringOf to distinguish it from string.h on
-// case-insensitive file systems.
-
-// This offers a subset of the interface offered by the standard C++
-// basic_string class as defined in the Jan 96 WP.
-// Code in SP currently assumes that size_type is size_t.
-
-#include <stddef.h>
-#include <string.h>
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class String {
-public:
- typedef size_t size_type;
- typedef T *iterator;
- typedef const T *const_iterator;
- String();
- ~String() { if (ptr_) delete [] ptr_; }
- String(const T *, size_t);
- String(const String<T> &);
- String<T> &operator=(const String<T> &);
- size_t size() const { return length_; }
- String<T> &assign(const T *, size_t);
- String<T> &insert(size_t i, const String<T> &s);
- void swap(String<T> &str);
- T operator[](size_t i) const { return ptr_[i]; }
- T &operator[](size_t i) { return ptr_[i]; }
- iterator begin() { return ptr_; }
- const_iterator begin() const { return ptr_; }
- const T *data() const { return ptr_; }
- String<T> &operator+=(T c) {
- if (length_ >= alloc_)
- grow(1);
- ptr_[length_++] = c;
- return *this;
- }
- String<T> &operator+=(const String<T> &s) {
- append(s.ptr_, s.length_);
- return *this;
- }
- String<T> &append(const T *, size_t);
- Boolean operator==(const String<T> &s) const {
- return (length_ == s.length_
- && (length_ == 0
- || (*ptr_ == *s.ptr_
- && (memcmp(ptr_ + 1, s.ptr_ + 1, (length_ - 1)*sizeof(T))
- == 0))));
- }
- Boolean operator!=(const String<T> &str) const {
- return !(*this == str);
- }
- void resize(size_t n);
-private:
- void grow(size_t);
- T *ptr_;
- size_t length_;
- size_t alloc_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StringOf_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "StringOf.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/StringResource.h b/usr/src/cmd/man/src/util/nsgmls.src/include/StringResource.h
deleted file mode 100644
index 114e4070ca..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/StringResource.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StringResource_INCLUDED
-#define StringResource_INCLUDED 1
-
-#include "StringOf.h"
-#include "Resource.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class StringResource : public String<T>, public Resource {
-public:
- StringResource(const String<T> &s) : String<T>(s) { }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StringResource_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.cxx
deleted file mode 100644
index c1790d2369..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.cxx
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SubstTable_DEF_INCLUDED
-#define SubstTable_DEF_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-SubstTable<T>::SubstTable()
-: pairsValid_(1)
-{
-}
-
-template<class T>
-void SubstTable<T>::addSubst(T from, T to)
-{
- if (table_.size() == 0) {
- table_.resize(T(-1) + 1);
-#if _MSC_VER == 1100
- // Workaround for Visual C++ 5.0 bug.
- T n = 0;
- int i = 0;
- while (i < T(-1) + 1)
- table_[i++] = n++;
-#else
- for (int i = 0; i < T(-1) + 1; i++)
- table_[i] = i;
-#endif
- }
- if (table_[from] != to)
- pairsValid_ = 0;
- table_[from] = to;
-}
-
-template<class T>
-String<T> SubstTable<T>::inverse(T ch) const
-{
- if (!pairsValid_) {
- const T *p = table_.data();
- size_t length = table_.size();
- for (size_t i = 0; i < length; i++)
- if (p[i] != i) {
- // FIXME use mutable if available
- ((SubstTable<T> *)this)->pairs_ += T(i);
- ((SubstTable<T> *)this)->pairs_ += p[i];
- }
- ((SubstTable<T> *)this)->pairsValid_ = 1;
- }
- const T *p = pairs_.data();
- if (!p)
- return String<T>(&ch, 1);
- String<T> result;
- if (table_[ch] == ch)
- result += ch;
- for (size_t n = pairs_.size(); n > 0; n -= 2, p += 2)
- if (p[1] == ch)
- result += p[0];
- return result;
-}
-
-template<class T>
-void SubstTable<T>::inverseTable(SubstTable<T> &inv) const
-{
- if (table_.size() == 0) {
- inv.table_.resize(0);
- inv.pairs_.resize(0);
- inv.pairsValid_ = 1;
- }
- else {
- if (inv.table_.size() == 0)
- inv.table_.resize(T(-1) + 1);
- int i;
- for (i = 0; i < T(-1) + 1; i++)
- inv.table_[i] = i;
- inv.pairs_.resize(0);
- inv.pairsValid_ = 0;
- for (i = 0; i < T(-1) + 1; i++)
- if (table_[i] != i)
- inv.table_[table_[i]] = i;
- }
-}
-
-template<class T>
-void SubstTable<T>::subst(String<T> &str) const
-{
- for (size_t i = 0; i < str.size(); i++)
- subst(str[i]);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SubstTable_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.h b/usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.h
deleted file mode 100644
index def621fe09..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/SubstTable.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SubstTable_INCLUDED
-#define SubstTable_INCLUDED
-
-#include <limits.h>
-#include "StringOf.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class SubstTable {
-public:
- SubstTable();
- void addSubst(T from, T to);
- void subst(T &c) const { if (table_.size() > 0) c = table_[c]; }
- void subst(String<T> &) const;
- T operator[](T c) const { return table_.size() > 0 ? table_[c] : c; }
- String<T> inverse(T) const;
- void inverseTable(SubstTable<T> &) const;
-private:
- String<T> table_;
- String<T> pairs_; // mutable
- Boolean pairsValid_; // mutable
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SubstTable_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "SubstTable.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Syntax.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Syntax.h
deleted file mode 100644
index f52b56835a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Syntax.h
+++ /dev/null
@@ -1,528 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Syntax_INCLUDED
-#define Syntax_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Boolean.h"
-#include "ISet.h"
-#include "StringC.h"
-#include "SubstTable.h"
-#include "HashTable.h"
-#include "Vector.h"
-#include "Resource.h"
-#include "XcharMap.h"
-#include "EntityCatalog.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Sd;
-class CharsetInfo;
-
-class SP_API Syntax : public Resource, public EntityCatalog::Syntax {
-public:
- enum ReservedName {
- rALL,
- rANY,
- rATTLIST,
- rCDATA,
- rCONREF,
- rCURRENT,
- rDATA,
- rDEFAULT,
- rDOCTYPE,
- rELEMENT,
- rEMPTY,
- rENDTAG,
- rENTITIES,
- rENTITY,
- rFIXED,
- rID,
- rIDLINK,
- rIDREF,
- rIDREFS,
- rIGNORE,
- rIMPLICIT,
- rIMPLIED,
- rINCLUDE,
- rINITIAL,
- rLINK,
- rLINKTYPE,
- rMD,
- rMS,
- rNAME,
- rNAMES,
- rNDATA,
- rNMTOKEN,
- rNMTOKENS,
- rNOTATION,
- rNUMBER,
- rNUMBERS,
- rNUTOKEN,
- rNUTOKENS,
- rO,
- rPCDATA,
- rPI,
- rPOSTLINK,
- rPUBLIC,
- rRCDATA,
- rRE,
- rREQUIRED,
- rRESTORE,
- rRS,
- rSDATA,
- rSHORTREF,
- rSIMPLE,
- rSPACE,
- rSTARTTAG,
- rSUBDOC,
- rSYSTEM,
- rTEMP,
- rUSELINK,
- rUSEMAP
- };
- enum { nNames = rUSEMAP + 1 };
- enum Quantity {
- qATTCNT,
- qATTSPLEN,
- qBSEQLEN,
- qDTAGLEN,
- qDTEMPLEN,
- qENTLVL,
- qGRPCNT,
- qGRPGTCNT,
- qGRPLVL,
- qLITLEN,
- qNAMELEN,
- qNORMSEP,
- qPILEN,
- qTAGLEN,
- qTAGLVL
- };
- enum { nQuantity = qTAGLVL + 1 };
- enum { unlimited = 100000000 };
- enum DelimGeneral {
- dAND,
- dCOM,
- dCRO,
- dDSC,
- dDSO,
- dDTGC,
- dDTGO,
- dERO,
- dETAGO,
- dGRPC,
- dGRPO,
- dHCRO, // WWW TC addition
- dLIT,
- dLITA,
- dMDC,
- dMDO,
- dMINUS,
- dMSC,
- dNET,
- dNESTC, // WWW TC addition
- dOPT,
- dOR,
- dPERO,
- dPIC,
- dPIO,
- dPLUS,
- dREFC,
- dREP,
- dRNI,
- dSEQ,
- dSTAGO,
- dTAGC,
- dVI
- };
- enum { nDelimGeneral = dVI + 1 };
- enum StandardFunction {
- fRE,
- fRS,
- fSPACE
- };
- enum FunctionClass {
- cFUNCHAR,
- cSEPCHAR,
- cMSOCHAR,
- cMSICHAR,
- cMSSCHAR
- };
- enum Set {
- nameStart,
- digit,
- hexDigit,
- nmchar, // LCNMCHAR or UCNMCHAR
- s,
- blank,
- sepchar,
- minimumData,
- significant,
- functionChar, // function character
- sgmlChar
- };
- enum { nSet = sgmlChar + 1 };
- enum Category {
- otherCategory = 0,
- sCategory = 01,
- nameStartCategory = 02,
- digitCategory = 04,
- otherNameCategory = 010
- };
-
- Syntax(const Sd &);
- Boolean lookupFunctionChar(const StringC &, Char *) const;
- Boolean charFunctionName(Char c, const StringC *&name) const;
- Boolean lookupReservedName(const StringC &, ReservedName *) const;
- const StringC &reservedName(ReservedName) const;
- StringC rniReservedName(ReservedName) const;
- Number quantity(Quantity) const;
- Char standardFunction(int) const;
- Boolean getStandardFunction(int, Char &) const;
- const StringC &delim() const;
- const ISet<Char> *charSet(int i) const;
- const SubstTable<Char> *generalSubstTable() const;
- const SubstTable<Char> *entitySubstTable() const;
- const SubstTable<Char> &upperSubstTable() const;
- Boolean namecaseGeneral() const;
- Boolean namecaseEntity() const;
- const StringC &peroDelim() const;
- const StringC &delimGeneral(int) const;
- const StringC &delimShortrefComplex(size_t) const;
- const ISet<Char> &delimShortrefSimple() const;
- int nDelimShortrefComplex() const;
- Boolean isValidShortref(const StringC &) const;
- Boolean hasShortrefs() const;
- Boolean isNameCharacter(Xchar) const;
- Boolean isNameStartCharacter(Xchar) const;
- Boolean isDigit(Xchar) const;
- Boolean isHexDigit(Xchar) const;
- Boolean isS(Xchar) const;
- Boolean isB(Xchar c) const;
- Category charCategory(Xchar) const;
- Boolean isSgmlChar(Xchar) const;
- size_t attcnt() const;
- size_t attsplen() const;
- size_t namelen() const;
- size_t penamelen() const;
- size_t litlen() const;
- size_t normsep() const;
- size_t dtemplen() const;
- size_t grpcnt() const;
- size_t grpgtcnt() const;
- size_t grplvl() const;
- size_t taglvl() const;
- size_t taglen() const;
- size_t entlvl() const;
- size_t pilen() const;
- Char space() const;
-
- void setStandardFunction(StandardFunction, Char);
- void enterStandardFunctionNames();
- void addFunctionChar(const StringC &, FunctionClass, Char);
- void setNamecaseGeneral(Boolean);
- void setNamecaseEntity(Boolean);
- void setDelimGeneral(int, const StringC &);
- void addDelimShortref(const StringC &, const CharsetInfo &);
- void addDelimShortrefs(const ISet<Char> &shortrefChars,
- const CharsetInfo &charset);
- void addNameCharacters(const ISet<Char> &);
- void addNameStartCharacters(const ISet<Char> &);
- void addSubst(Char lc, Char uc);
- void addShunchar(Char);
- void setShuncharControls();
- void setQuantity(int, Number);
- void setName(int, const StringC &);
- void setSgmlChar(const ISet<Char> &);
- void implySgmlChar(const Sd &);
- // :: is for Watcom 10.0a
- void checkSgmlChar(const Sd &,
- const ::SP_NAMESPACE_SCOPE Syntax *otherSyntax,
- Boolean invalidUseDocumentCharset,
- ISet<WideChar> &invalid)
- const;
- static int referenceQuantity(Quantity);
- const XcharMap<unsigned char> &markupScanTable() const;
- Boolean multicode() const;
- void addEntity(const StringC &, Char);
- size_t nEntities() const;
- const StringC &entityName(size_t) const;
- Char entityChar(size_t) const;
-private:
- void subst(Char, Char);
- void checkUnivControlChar(UnivChar univChar,
- const CharsetInfo &docCharset,
- const ::SP_NAMESPACE_SCOPE Syntax *otherSyntax,
- ISet<WideChar> &invalid) const;
-
- ISet<Char> shunchar_;
- PackedBoolean shuncharControls_;
- ISet<Char> set_[nSet];
- Char standardFunction_[3];
- PackedBoolean standardFunctionValid_[3];
- Boolean namecaseGeneral_;
- Boolean namecaseEntity_;
- StringC delimGeneral_[nDelimGeneral];
- Vector<StringC> delimShortrefComplex_;
- ISet<Char> delimShortrefSimple_;
- StringC names_[nNames];
- Number quantity_[nQuantity];
- HashTable<StringC,int> nameTable_;
- HashTable<StringC,Char> functionTable_;
- SubstTable<Char> upperSubst_;
- SubstTable<Char> identitySubst_;
- const SubstTable<Char> *generalSubst_;
- const SubstTable<Char> *entitySubst_;
- XcharMap<unsigned char> categoryTable_;
- Boolean multicode_;
- XcharMap<unsigned char> markupScanTable_;
- Vector<StringC> entityNames_;
- StringC entityChars_;
- static const int referenceQuantity_[];
-};
-
-inline Number Syntax::quantity(Quantity q) const
-{
- return quantity_[q];
-}
-
-inline void Syntax::setQuantity(int i, Number n)
-{
- quantity_[i] = n;
-}
-
-inline const SubstTable<Char> *Syntax::generalSubstTable() const
-{
- return generalSubst_;
-}
-
-inline const SubstTable<Char> *Syntax::entitySubstTable() const
-{
- return entitySubst_;
-}
-
-inline int Syntax::nDelimShortrefComplex() const
-{
- return int(delimShortrefComplex_.size());
-}
-
-inline const StringC &Syntax::delimGeneral(int i) const
-{
- return delimGeneral_[i];
-}
-
-inline const StringC &Syntax::delimShortrefComplex(size_t i) const
-{
- return delimShortrefComplex_[i];
-}
-
-inline const ISet<Char> &Syntax::delimShortrefSimple() const
-{
- return delimShortrefSimple_;
-}
-
-inline Boolean Syntax::hasShortrefs() const
-{
- return delimShortrefComplex_.size() > 0 || !delimShortrefSimple_.isEmpty();
-}
-
-inline Char Syntax::standardFunction(int i) const
-{
- return standardFunction_[i];
-}
-
-inline Boolean Syntax::getStandardFunction(int i, Char &result) const
-{
- if (standardFunctionValid_[i]) {
- result = standardFunction_[i];
- return 1;
- }
- else
- return 0;
-}
-
-inline const ISet<Char> *Syntax::charSet(int i) const
-{
- return &set_[i];
-}
-
-inline Boolean Syntax::isNameCharacter(Xchar c) const
-{
- return categoryTable_[c] >= nameStartCategory;
-}
-
-inline Boolean Syntax::isNameStartCharacter(Xchar c) const
-{
- return categoryTable_[c] == nameStartCategory;
-}
-
-inline Boolean Syntax::isDigit(Xchar c) const
-{
- return categoryTable_[c] == digitCategory;
-}
-
-inline Boolean Syntax::isS(Xchar c) const
-{
- return categoryTable_[c] == sCategory;
-}
-
-inline Boolean Syntax::isB(Xchar c) const
-{
- return (categoryTable_[c] == sCategory
- && !(standardFunctionValid_[fRE] && c == standardFunction_[fRE])
- && !(standardFunctionValid_[fRS] && c == standardFunction_[fRS]));
-}
-
-inline Syntax::Category Syntax::charCategory(Xchar c) const
-{
- return Category(categoryTable_[c]);
-}
-
-inline Boolean Syntax::isSgmlChar(Xchar c) const
-{
- return c >= 0 && set_[sgmlChar].contains(Char(c));
-}
-
-inline const StringC &Syntax::reservedName(ReservedName i) const
-{
- return names_[i];
-}
-
-inline size_t Syntax::attcnt() const
-{
- return quantity(Syntax::qATTCNT);
-}
-
-inline size_t Syntax::attsplen() const
-{
- return quantity(Syntax::qATTSPLEN);
-}
-
-inline size_t Syntax::namelen() const
-{
- return quantity(Syntax::qNAMELEN);
-}
-
-inline size_t Syntax::penamelen() const
-{
- return quantity(Syntax::qNAMELEN) - delimGeneral(Syntax::dPERO).size();
-}
-
-inline size_t Syntax::litlen() const
-{
- return quantity(Syntax::qLITLEN);
-}
-
-inline size_t Syntax::normsep() const
-{
- return quantity(Syntax::qNORMSEP);
-}
-
-inline size_t Syntax::dtemplen() const
-{
- return quantity(Syntax::qDTEMPLEN);
-}
-
-inline size_t Syntax::grpcnt() const
-{
- return quantity(Syntax::qGRPCNT);
-}
-
-inline size_t Syntax::grpgtcnt() const
-{
- return quantity(Syntax::qGRPGTCNT);
-}
-
-inline size_t Syntax::grplvl() const
-{
- return quantity(Syntax::qGRPLVL);
-}
-
-inline size_t Syntax::taglvl() const
-{
- return quantity(Syntax::qTAGLVL);
-}
-
-inline size_t Syntax::taglen() const
-{
- return quantity(Syntax::qTAGLEN);
-}
-
-inline size_t Syntax::entlvl() const
-{
- return quantity(Syntax::qENTLVL);
-}
-
-inline size_t Syntax::pilen() const
-{
- return quantity(Syntax::qPILEN);
-}
-
-inline Char Syntax::space() const
-{
- return standardFunction(Syntax::fSPACE);
-}
-
-inline void Syntax::setSgmlChar(const ISet<Char> &set)
-{
- set_[sgmlChar] = set;
-}
-
-inline int Syntax::referenceQuantity(Quantity i)
-{
- return referenceQuantity_[i];
-}
-
-inline void Syntax::setShuncharControls()
-{
- shuncharControls_ = 1;
-}
-
-inline const XcharMap<unsigned char> &Syntax::markupScanTable() const
-{
- return markupScanTable_;
-}
-
-inline Boolean Syntax::multicode() const
-{
- return multicode_;
-}
-
-inline Boolean Syntax::namecaseGeneral() const
-{
- return namecaseGeneral_;
-}
-
-inline Boolean Syntax::namecaseEntity() const
-{
- return namecaseEntity_;
-}
-
-inline size_t Syntax::nEntities() const
-{
- return entityNames_.size();
-}
-
-inline const StringC &Syntax::entityName(size_t i) const
-{
- return entityNames_[i];
-}
-
-inline Char Syntax::entityChar(size_t i) const
-{
- return entityChars_[i];
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* Syntax_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Text.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Text.h
deleted file mode 100644
index a6222c7f54..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Text.h
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Text_INCLUDED
-#define Text_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "StringC.h"
-#include "Vector.h"
-#include "Location.h"
-#include "SubstTable.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class InternalEntity;
-
-struct SP_API TextItem {
- TextItem();
- enum Type {
- data,
- cdata,
- sdata,
- nonSgml,
- entityStart,
- entityEnd,
- startDelim,
- endDelim,
- endDelimA,
- ignore
- };
- Type type;
- // char that was ignored
- Char c;
- // location of this item
- // data - location of first char
- // (c/sdata)entityStart - location of first char of entity
- // (c/sdata)entityEnd - location of entity end in entity
- // ignore - location of ignored character
- // startDelim - location of first char of delimiter
- // endDelim(A) - location of first char of delimiter
- Location loc;
- // index of character in chars_ to which this applies
- size_t index;
-};
-
-// This is used to represent literals and attribute values.
-
-class SP_API Text {
-public:
- Text();
- void clear();
- void swap(Text &to);
- void addChar(Char c, const Location &);
- void addChars(const StringC &, const Location &);
- void addChars(const Char *, size_t, const Location &);
- void insertChars(const StringC &, const Location &);
- void ignoreChar(Char, const Location &);
- void ignoreLastChar();
- void addNonSgmlChar(Char c, const Location &);
- void addEntityStart(const Location &);
- void addEntityEnd(const Location &);
- void addCdata(const InternalEntity *, const ConstPtr<Origin> &);
- void addSdata(const InternalEntity *, const ConstPtr<Origin> &);
- void addStartDelim(const Location &loc);
- void addEndDelim(const Location &loc, Boolean lita);
- void subst(const SubstTable<Char> &, Char space);
- void addCharsTokenize(const Char *, size_t, const Location &loc, Char space);
- void addCharsTokenize(const StringC &, const Location &loc, Char space);
- void tokenize(Char space, Text &text) const;
- Location charLocation(size_t i) const;
- Boolean charLocation(size_t, const Origin *&, Index &) const;
- Boolean charLocation(size_t i, const ConstPtr<Origin> *&, Index &) const;
- size_t size() const;
- Char lastChar() const;
- const StringC &string() const;
- size_t normalizedLength(size_t normsep) const;
- Boolean fixedEqual(const Text &) const;
- // Location of first char of start delimiter.
- Boolean startDelimLocation(Location &) const;
- // Location of first char of end delimiter
- Boolean endDelimLocation(Location &) const;
- // Is delimiter a lit or lita?
- Boolean delimType(Boolean &lita) const;
-private:
- void addSimple(TextItem::Type, const Location &);
- StringC chars_;
- Vector<TextItem> items_;
- friend class TextIter;
-};
-
-class SP_API TextIter {
-public:
- TextIter(const Text &);
- void rewind();
- Boolean next(TextItem::Type &, const Char *&, size_t &,
- const Location *&);
- // Alternative interface to next()
- Boolean valid() const;
- void advance();
- TextItem::Type type() const;
- const Location &location() const;
- const Char *chars(size_t &length) const;
-private:
- const TextItem *ptr_;
- const Text *text_;
-};
-
-inline
-size_t Text::size() const
-{
- return chars_.size();
-}
-
-inline
-Char Text::lastChar() const
-{
- return chars_[chars_.size() - 1];
-}
-
-inline
-const StringC &Text::string() const
-{
- return chars_;
-}
-
-inline
-void Text::addEntityStart(const Location &loc)
-{
- addSimple(TextItem::entityStart, loc);
-}
-
-inline
-void Text::addEntityEnd(const Location &loc)
-{
- addSimple(TextItem::entityEnd, loc);
-}
-
-inline
-void Text::addChars(const StringC &s, const Location &loc)
-{
- addChars(s.data(), s.size(), loc);
-}
-
-inline
-void Text::addStartDelim(const Location &loc)
-{
- addSimple(TextItem::startDelim, loc);
-}
-
-inline
-void Text::addEndDelim(const Location &loc, Boolean lita)
-{
- addSimple(lita ? TextItem::endDelimA : TextItem::endDelim,
- loc);
-}
-
-inline
-void Text::addCharsTokenize(const StringC &str, const Location &loc,
- Char space)
-{
- addCharsTokenize(str.data(), str.size(), loc, space);
-}
-
-inline
-Location Text::charLocation(size_t i) const
-{
- const ConstPtr<Origin> *originP;
- Index index;
- if (charLocation(i, originP, index))
- return Location(*originP, index);
- else
- return Location();
-}
-
-inline
-Boolean Text::charLocation(size_t i, const Origin *&origin, Index &index) const
-{
- const ConstPtr<Origin> *originP;
- if (charLocation(i, originP, index)) {
- origin = originP->pointer();
- return 1;
- }
- else
- return 0;
-}
-
-inline
-void TextIter::rewind()
-{
- ptr_ = text_->items_.begin();
-}
-
-inline
-void TextIter::advance()
-{
- ptr_++;
-}
-
-inline
-Boolean TextIter::valid() const
-{
- return ptr_ != (text_->items_.begin() + text_->items_.size());
-}
-
-inline
-const Location &TextIter::location() const
-{
- return ptr_->loc;
-}
-
-inline
-TextItem::Type TextIter::type() const
-{
- return ptr_->type;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Text_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/TranslateCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/TranslateCodingSystem.h
deleted file mode 100644
index b38dc4cf60..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/TranslateCodingSystem.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef TranslateCodingSystem_INCLUDED
-#define TranslateCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-#include "Ptr.h"
-#include "CharMap.h"
-#include "CharsetRegistry.h"
-#include "types.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API TranslateCodingSystem : public CodingSystem {
-public:
- struct Desc {
- CharsetRegistry::ISORegistrationNumber number;
- // How much to add to the values in the base set.
- Char add;
- };
- // codingSystem is the underlying BCTF
- // desc describes the meaning of the bit combinations produced by that BCTF
- // charset is the system character set
- // replacementChar is character in systemCharset that should be used to represent
- // characters that do not exist in the systemCharset.
- // illegalChar is a code that can never be produced by the underlying BCTF.
- TranslateCodingSystem(const CodingSystem *codingSystem,
- const Desc *desc,
- const CharsetInfo *charset,
- Char illegalChar,
- Char replacementChar);
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
- unsigned fixedBytesPerChar() const;
-private:
- ConstPtr<CharMapResource<Char> > decodeMap_;
- ConstPtr<CharMapResource<Char> > encodeMap_;
- const CodingSystem *sub_;
- const Desc *desc_;
- const CharsetInfo *charset_;
- Char illegalChar_;
- Char replacementChar_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not TranslateCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/TranslateInputCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/TranslateInputCodingSystem.h
deleted file mode 100644
index 36b3f2e8ae..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/TranslateInputCodingSystem.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma ident "@(#)TranslateInputCodingSystem.h 1.2 97/04/24 SMI"
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef TranslateInputCodingSystem_INCLUDED
-#define TranslateInputCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API TranslateInputCodingSystem : public InputCodingSystem {
-public:
- TranslateInputCodingSystem(const Char *table);
- Decoder *makeDecoder() const;
-private:
- const Char *table_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not TranslateInputCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/TypeId.h b/usr/src/cmd/man/src/util/nsgmls.src/include/TypeId.h
deleted file mode 100644
index c78e499fc0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/TypeId.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef TypeId_INCLUDED
-#define TypeId_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API TypeId {
-public:
- TypeId(const void *const *bases) : bases_(bases) { }
- // Is this object of type ti?
- int isA(TypeId ti) const;
- // Can an object with this dynamic type be cast from a static type FROM
- // to a static type TO?
- int canCast(TypeId to, TypeId from) const;
- int operator==(TypeId ti) const { return bases_ == ti.bases_; }
- int operator!=(TypeId ti) const { return bases_ != ti.bases_; }
-private:
- const void *const *bases_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not TypeId_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/URLStorage.h b/usr/src/cmd/man/src/util/nsgmls.src/include/URLStorage.h
deleted file mode 100644
index 4162703b11..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/URLStorage.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef URLStorage_INCLUDED
-#define URLStorage_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "StorageManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API URLStorageManager : public IdStorageManager {
-public:
- URLStorageManager(const char *type);
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &baseId,
- Boolean search,
- Boolean mayRewind,
- Messenger &,
- StringC &found);
- const char *type() const;
- Boolean guessIsId(const StringC &, const CharsetInfo &) const;
- Boolean transformNeutral(StringC &, Boolean fold, Messenger &) const;
-private:
- Boolean resolveRelative(const StringC &base, StringC &specId, Boolean) const;
- URLStorageManager(const URLStorageManager &); // undefined
- void operator=(const URLStorageManager &); // undefined
- const char *type_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not URLStorage_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/UTF8CodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/UTF8CodingSystem.h
deleted file mode 100644
index 41513db8b8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/UTF8CodingSystem.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef UTF8CodingSystem_INCLUDED
-#define UTF8CodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API UTF8CodingSystem : public CodingSystem {
-public:
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not UTF8CodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/UnicodeCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/UnicodeCodingSystem.h
deleted file mode 100644
index 04a59fc0c5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/UnicodeCodingSystem.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef UnicodeCodingSystem_INCLUDED
-#define UnicodeCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API UnicodeCodingSystem : public CodingSystem {
-public:
- UnicodeCodingSystem(const InputCodingSystem *sub = 0);
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
- unsigned fixedBytesPerChar() const;
-private:
- const InputCodingSystem *sub_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not UnicodeCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/UnivCharsetDesc.h b/usr/src/cmd/man/src/util/nsgmls.src/include/UnivCharsetDesc.h
deleted file mode 100644
index 02caf7325d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/UnivCharsetDesc.h
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef UnivCharsetDesc_INCLUDED
-#define UnivCharsetDesc_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include "types.h"
-#include "CharMap.h"
-#include "RangeMap.h"
-#include "Boolean.h"
-#include "ISet.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API UnivCharsetDesc {
-public:
- struct SP_API Range {
- WideChar descMin;
- // Note that this is a count, as in the SGML declaration,
- // rather than a maximum.
- unsigned long count;
- UnivChar univMin;
- };
- enum {
- zero = 48,
- A = 65,
- a = 97,
- tab = 9,
- rs = 10,
- re = 13,
- space = 32,
- exclamation = 33,
- lessThan = 60,
- greaterThan = 62
- };
- UnivCharsetDesc();
- UnivCharsetDesc(const Range *, size_t);
- void set(const Range *, size_t);
- Boolean descToUniv(WideChar from, UnivChar &to) const;
- Boolean descToUniv(WideChar from, UnivChar &to, WideChar &alsoMax) const;
- // Return 0 for no matches, 1 for 1, 2 for more than 1
- unsigned univToDesc(UnivChar from, WideChar &to, ISet<WideChar> &toSet)
- const;
- unsigned univToDesc(UnivChar from, WideChar &to, ISet<WideChar> &toSet,
- WideChar &count)
- const;
- void addRange(WideChar descMin, WideChar descMax, UnivChar univMin);
- void addBaseRange(const UnivCharsetDesc &baseSet,
- WideChar descMin,
- WideChar descMax,
- WideChar baseMin,
- ISet<WideChar> &baseMissing);
-private:
- static Boolean noDesc(Unsigned32 n) {
- return (n & (unsigned(1) << 31));
- }
- static UnivChar extractChar(Unsigned32 n, Char ch) {
- return UnivChar((n + ch) & ((unsigned(1) << 31) - 1));
- }
- static Unsigned32 wrapChar(UnivChar univ, Char ch) {
- return Unsigned32((univ - ch) & ((unsigned(1) << 31) - 1));
- }
- // For characters <= charMax.<
- CharMap<Unsigned32> charMap_;
- // For characters > charMax.
- RangeMap<WideChar,UnivChar> rangeMap_;
- friend class UnivCharsetDescIter;
-};
-
-class SP_API UnivCharsetDescIter {
-public:
- UnivCharsetDescIter(const UnivCharsetDesc &);
- Boolean next(WideChar &descMin, WideChar &descMax, UnivChar &univMin);
- void skipTo(WideChar);
-private:
- const CharMap<Unsigned32> *charMap_;
- Char nextChar_;
- Boolean doneCharMap_;
- RangeMapIter<WideChar,UnivChar> rangeMapIter_;
-};
-
-inline
-Boolean UnivCharsetDesc::descToUniv(WideChar from, UnivChar &to) const
-{
- if (from > charMax) {
- WideChar tem;
- return rangeMap_.map(from, to, tem);
- }
- else {
- Unsigned32 tem = charMap_[from];
- if (noDesc(tem))
- return 0;
- else {
- to = extractChar(tem, from);
- return 1;
- }
- }
-}
-
-inline
-Boolean UnivCharsetDesc::descToUniv(WideChar from, UnivChar &to,
- WideChar &alsoMax) const
-{
- if (from > charMax)
- return rangeMap_.map(from, to, alsoMax);
- else {
- Char max;
- Unsigned32 tem = charMap_.getRange(from, max);
- alsoMax = max;
- if (noDesc(tem))
- return 0;
- else {
- to = extractChar(tem, from);
- return 1;
- }
- }
-}
-
-inline
-unsigned UnivCharsetDesc::univToDesc(UnivChar from, WideChar &to,
- ISet<WideChar> &toSet) const
-{
- WideChar tem;
- return univToDesc(from, to, toSet, tem);
-}
-
-inline
-void UnivCharsetDescIter::skipTo(WideChar ch)
-{
- if (ch > charMax)
- doneCharMap_ = 1;
- else
- nextChar_ = ch;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not UnivCharsetDesc_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Vector.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/Vector.cxx
deleted file mode 100644
index 5b14d04ee1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Vector.cxx
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Vector_DEF_INCLUDED
-#define Vector_DEF_INCLUDED 1
-
-#include <stddef.h>
-#include <string.h>
-
-#ifdef SP_QUAL_TEMPLATE_DTOR_BROKEN
-#define DTOR(T) ~T
-#else
-#define DTOR(T) T::~T
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-Vector<T>::~Vector()
-{
- if (ptr_) {
- erase(ptr_, ptr_ + size_);
- ::operator delete((void *)ptr_);
- }
-}
-
-#ifndef NC
-
-template<class T>
-Vector<T>::Vector(const Vector<T> &v)
-: ptr_(0), size_(0), alloc_(0)
-{
- insert(ptr_ + size_, v.ptr_, v.ptr_ + v.size_);
-}
-
-template<class T>
-Vector<T>::Vector(size_t n, const T &t)
-: ptr_(0), size_(0), alloc_(0)
-{
- insert(ptr_ + size_, n, t);
-}
-
-template<class T>
-Vector<T> &Vector<T>::operator=(const Vector<T> &v)
-{
- if (&v != this) {
- size_t n = v.size_;
- if (n > size_) {
- n = size_;
- insert(ptr_ + size_, v.ptr_ + size_, v.ptr_ + v.size_);
- }
- else if (n < size_)
- erase(ptr_ + n, ptr_ + size_);
- while (n-- > 0)
- ptr_[n] = v.ptr_[n];
- }
- return *this;
-}
-
-template<class T>
-void Vector<T>::assign(size_t n, const T &t)
-{
- size_t sz = n;
- if (n > size_) {
- sz = size_;
- insert(ptr_ + size_, n - size_, t);
- }
- else if (n < size_)
- erase(ptr_ + n, ptr_ + size_);
- while (sz-- > 0)
- ptr_[sz] = t;
-}
-
-template<class T>
-void Vector<T>::insert(const T *p, size_t n, const T &t)
-{
- size_t i = p - ptr_;
- reserve(size_ + n);
- if (i != size_)
- memmove(ptr_ + i + n, ptr_ + i, (size_ - i)*sizeof(T));
- for (T *pp = ptr_ + i; n-- > 0; pp++) {
- (void)new (pp) T(t);
- size_++;
- }
-}
-
-template<class T>
-void Vector<T>::insert(const T *p, const T *q1, const T *q2)
-{
- size_t i = p - ptr_;
- size_t n = q2 - q1;
- reserve(size_ + n);
- if (i != size_)
- memmove(ptr_ + i + n, ptr_ + i, (size_ - i)*sizeof(T));
- for (T *pp = ptr_ + i; q1 != q2; q1++, pp++) {
- (void)new (pp) T(*q1);
- size_++;
- }
-}
-
-#endif
-
-template<class T>
-void Vector<T>::swap(Vector<T> &v)
-{
- {
- T *tem = ptr_;
- ptr_ = v.ptr_;
- v.ptr_ = tem;
- }
- {
- size_t tem = size_;
- size_ = v.size_;
- v.size_ = tem;
- }
- {
- size_t tem = alloc_;
- alloc_ = v.alloc_;
- v.alloc_ = tem;
- }
-}
-
-template<class T>
-void Vector<T>::append(size_t n)
-{
- reserve(size_ + n);
- while (n-- > 0)
- (void)new (ptr_ + size_++) T;
-}
-
-template<class T>
-T *Vector<T>::erase(const T *p1, const T *p2)
-{
- typedef T X;
- for (const T *p = p1; p != p2; p++)
- ((X *)p)->~X();
- if (p2 != ptr_ + size_)
- memmove((T *)p1, p2, ((const T *)(ptr_ + size_) - p2)*sizeof(T));
- size_ -= p2 - p1;
- return (T *)p1;
-}
-
-template<class T>
-void Vector<T>::reserve1(size_t size)
-{
- // Try to preserve a consistent start in the
- // event of an out of memory exception.
- size_t newAlloc = alloc_*2;
- if (size > newAlloc)
- newAlloc += size;
- void *p = ::operator new(newAlloc * sizeof(T));
- alloc_ = newAlloc;
- if (ptr_) {
- memcpy(p, ptr_, size_*sizeof(T));
- ::operator delete((void *)ptr_);
- }
- ptr_ = (T *)p;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Vector_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Vector.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Vector.h
deleted file mode 100644
index c0605f44df..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Vector.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Vector_INCLUDED
-#define Vector_INCLUDED 1
-
-#include <stddef.h>
-#include "xnew.h"
-
-// This offers a subset of the interface offered by the standard C++
-// vector class as defined in the Jan 96 WP.
-// Code in SP currently assumes that size_type is size_t.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class Vector {
-public:
- typedef size_t size_type;
- typedef T *iterator;
- typedef const T *const_iterator;
- Vector() : ptr_(0), size_(0), alloc_(0) { }
- Vector(size_t n) : ptr_(0), size_(0), alloc_(0) { append(n); }
- ~Vector();
- void resize(size_t n) {
- if (n < size_)
- erase(ptr_ + n, ptr_ + size_);
- else if (n > size_)
- append(n - size_);
- }
-#ifndef NC
- Vector(size_t, const T &);
- Vector(const Vector<T> &);
- Vector<T> &operator=(const Vector<T> &);
- void assign(size_t, const T &);
- void push_back(const T &t) {
- reserve(size_ + 1);
- (void)new (ptr_ + size_) T(t);
- size_++;
- }
- void insert(const_iterator p, size_t n, const T &t);
- void insert(const_iterator p, const_iterator q1, const_iterator q2);
-#endif
- void swap(Vector<T> &);
- void clear() { erase(ptr_, ptr_ + size_); }
- size_t size() const { return size_; }
- T &operator[](size_t i) { return ptr_[i]; }
- const T &operator[](size_t i) const { return ptr_[i]; }
- iterator begin() { return ptr_; }
- const_iterator begin() const { return ptr_; }
- T &back() { return ptr_[size_ - 1]; }
- const T &back() const { return ptr_[size_ - 1]; }
- void reserve(size_t n) { if (n > alloc_) reserve1(n); }
- iterator erase(const_iterator, const_iterator);
-private:
-#ifdef NC
- Vector(const Vector<T> &);
- void operator=(const Vector<T> &);
-#endif
- void append(size_t);
- void reserve1(size_t);
-
- size_t size_;
- T *ptr_;
- size_t alloc_; // allocated size
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Vector_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "Vector.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/Win32CodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/Win32CodingSystem.h
deleted file mode 100644
index de310b1d55..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/Win32CodingSystem.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Win32CodingSystem_INCLUDED
-#define Win32CodingSystem_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "CodingSystem.h"
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API Win32CodingSystem : public CodingSystem {
-public:
- enum SpecialCodePage {
- codePageOEM,
- codePageAnsi
- };
- Win32CodingSystem(unsigned int codePage, Char defaultChar = 0xfffd);
- Win32CodingSystem(SpecialCodePage, Char defaultChar = 0xfffd);
- Boolean isValid() const;
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
-private:
- unsigned int codePage_;
- Char defaultChar_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Win32CodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/WinApp.h b/usr/src/cmd/man/src/util/nsgmls.src/include/WinApp.h
deleted file mode 100644
index 0c7ffb0915..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/WinApp.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef WinApp_INCLUDED
-#define WinApp_INCLUDED 1
-
-#include "Event.h"
-#include "Vector.h"
-#include "StringC.h"
-#include "CharsetInfo.h"
-#include "ParserOptions.h"
-#include "SgmlParser.h"
-#include "Ptr.h"
-#include "CodingSystemKit.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API WinApp {
-public:
- WinApp();
- ParserOptions options;
- Boolean setEncoding(StringC &tem);
- const StringC &encoding() const;
- Boolean setDefaultEncoding(StringC &tem);
- const StringC &defaultEncoding() const;
- // These are semi-colon delimited lists of system identifiers.
- void setExtraCatalogs(StringC &tem);
- const StringC &extraCatalogs() const;
- void setDefaultCatalogs(StringC &tem);
- const StringC &defaultCatalogs() const;
- void setExtraDirectories(StringC &tem);
- const StringC &extraDirectories() const;
- void setDefaultDirectories(StringC &tem);
- const StringC &defaultDirectories() const;
- void initParser(const StringC &, SgmlParser &);
- void initParser(const StringC &sysid, SgmlParser &, Ptr<EntityManager> &);
-private:
- static void setRegistry(const char *name, const StringC &value);
- static Boolean getRegistry(const char *name, StringC &value);
- const InputCodingSystem *getCodingSystem(const StringC &name);
-
- StringC extraCatalogs_;
- StringC defaultCatalogs_;
- StringC extraDirectories_;
- StringC defaultDirectories_;
- StringC encoding_;
- StringC defaultEncoding_;
- ConstPtr<InputCodingSystemKit> codingSystemKit_;
-};
-
-inline
-const StringC &WinApp::encoding() const
-{
- return encoding_;
-}
-
-inline
-const StringC &WinApp::defaultEncoding() const
-{
- return defaultEncoding_;
-}
-
-inline
-const StringC &WinApp::extraCatalogs() const
-{
- return extraCatalogs_;
-}
-
-inline
-void WinApp::setExtraCatalogs(StringC &str)
-{
- str.swap(extraCatalogs_);
-}
-
-inline
-const StringC &WinApp::defaultCatalogs() const
-{
- return defaultCatalogs_;
-}
-
-inline
-const StringC &WinApp::extraDirectories() const
-{
- return extraDirectories_;
-}
-
-inline
-void WinApp::setExtraDirectories(StringC &str)
-{
- str.swap(extraDirectories_);
-}
-
-inline
-const StringC &WinApp::defaultDirectories() const
-{
- return defaultDirectories_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not WinApp_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/WinInetStorage.h b/usr/src/cmd/man/src/util/nsgmls.src/include/WinInetStorage.h
deleted file mode 100644
index 0710ecac94..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/WinInetStorage.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef WinInetStorage_INCLUDED
-#define WinInetStorage_INCLUDED 1
-
-#include "StorageManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SP_API WinInetStorageManager : public IdStorageManager {
-public:
- WinInetStorageManager(const char *type);
- ~WinInetStorageManager();
- StorageObject *makeStorageObject(const StringC &id,
- const StringC &baseId,
- Boolean search,
- Boolean mayRewind,
- Messenger &,
- StringC &found);
- const char *type() const;
- Boolean guessIsId(const StringC &, const CharsetInfo &) const;
- Boolean transformNeutral(StringC &, Boolean fold, Messenger &) const;
-private:
- Boolean resolveRelative(const StringC &base, StringC &specId, Boolean) const;
- WinInetStorageManager(const WinInetStorageManager &); // undefined
- void operator=(const WinInetStorageManager &); // undefined
- Boolean initSession();
- const char *type_;
- void *session_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not WinInetStorage_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/XMLCodingSystem.h b/usr/src/cmd/man/src/util/nsgmls.src/include/XMLCodingSystem.h
deleted file mode 100644
index 754bdce70e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/XMLCodingSystem.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef XMLCodingSystem_INCLUDED
-#define XMLCodingSystem_INCLUDED 1
-
-#include "CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class InputCodingSystemKit;
-
-class SP_API XMLCodingSystem : public CodingSystem {
-public:
- XMLCodingSystem(const InputCodingSystemKit *);
- Decoder *makeDecoder() const;
- Encoder *makeEncoder() const;
-private:
- const InputCodingSystemKit *kit_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not XMLCodingSystem_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.cxx b/usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.cxx
deleted file mode 100644
index 5f20195c28..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.cxx
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef XcharMap_DEF_INCLUDED
-#define XcharMap_DEF_INCLUDED 1
-
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-SharedXcharMap<T>::SharedXcharMap()
-{
-}
-
-template<class T>
-SharedXcharMap<T>::SharedXcharMap(T defaultValue)
-{
- for (size_t i = 0; i < sizeof(v)/sizeof(v[0]); i++)
- v[i] = defaultValue;
-}
-
-template<class T>
-XcharMap<T>::XcharMap()
-: ptr_(0)
-{
-}
-
-template<class T>
-XcharMap<T>::XcharMap(T defaultValue)
-: sharedMap_(new SharedXcharMap<T>(defaultValue))
-{
- ptr_ = sharedMap_->ptr();
-}
-
-template<class T>
-void XcharMap<T>::setRange(Char min, Char max, T val)
-{
- if (min <= max) {
- do {
- ptr_[min] = val;
- } while (min++ != max);
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not XcharMap_DEF_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.h b/usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.h
deleted file mode 100644
index 96c705de00..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/XcharMap.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef XcharMap_INCLUDED
-#define XcharMap_INCLUDED 1
-
-#include "types.h"
-#include "Resource.h"
-#include "Ptr.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-template<class T>
-class SharedXcharMap : public Resource {
-public:
- SharedXcharMap();
- SharedXcharMap(T defaultValue);
- T *ptr() { return v + 1; }
-private:
- T v[2 + charMax];
-};
-
-template<class T>
-class XcharMap {
-public:
- XcharMap();
- XcharMap(T defaultValue);
- T operator[](Xchar c) const { return ptr_[c]; }
- void setRange(Char min, Char max, T val);
- void setChar(Char c, T val) { ptr_[c] = val; }
- void setEe(T val) { ptr_[-1] = val; }
- void clear() { ptr_ = 0; sharedMap_.clear(); }
-private:
- T *ptr_;
- Ptr<SharedXcharMap<T> > sharedMap_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not XcharMap_INCLUDED */
-
-#ifdef SP_DEFINE_TEMPLATES
-#include "XcharMap.cxx"
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/config.h b/usr/src/cmd/man/src/util/nsgmls.src/include/config.h
deleted file mode 100644
index 37193bcbbf..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/config.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994, 1995, 1996 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _CONFIG_H
-#define _CONFIG_H
-
-#ifndef config_INCLUDED
-#define config_INCLUDED 1
-
-#define SP_INCLUDE_UNISTD_H
-#define SP_POSIX_FILENAMES
-
-#ifdef __GNUG__
-// It's not missing, but it pulls in libg++
-#define SP_NEW_H_MISSING
-#ifndef SP_MANUAL_INST
-#define SP_MANUAL_INST
-#endif
-#ifndef SP_ANSI_CLASS_INST
-#define SP_ANSI_CLASS_INST
-#endif
-#ifndef SP_HAVE_BOOL
-#define SP_HAVE_BOOL
-#endif
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-#define SP_ANSI_FOR_SCOPE
-#endif
-
-#endif /* __GNUG__ */
-
-#if defined(sun) || defined(__sun)
-// struct stat has st_blksize member
-#define SP_STAT_BLKSIZE
-#endif
-
-#ifdef __MACH__
-#define SP_MUTEX_MACH
-#endif
-
-#ifdef __EMX__
-// EMX 0.9a for OS/2
-#undef SP_POSIX_FILENAMES
-#define SP_MSDOS_FILENAMES
-#endif
-
-#ifdef _MSC_VER
-// Microsoft Visual C++ 4.0
-#undef SP_INCLUDE_UNISTD_H
-#define SP_INCLUDE_IO_H
-#ifndef SP_ANSI_CLASS_INST
-#define SP_ANSI_CLASS_INST
-#endif
-#undef SP_POSIX_FILENAMES
-#define SP_MSDOS_FILENAMES
-#define SP_SHORT_HEADERS
-#pragma warning(disable : 4660) // already instantiated
-#pragma warning(disable : 4661) // missing def for decl member
-#pragma warning(disable : 4786) // debug symbol truncated (>255 chars)
-#pragma warning(disable : 4018) // signed/unsigned mismatch
-#pragma warning(disable : 4251) // __declspec(dllexport)
-#pragma warning(disable : 4275)
-#pragma warning(disable : 4237) // future reserved keyword
-#define huge verybig
-#if _MSC_VER == 900
-#define SP_DECLARE_PLACEMENT_OPERATOR_NEW
-#endif
-#define set_new_handler _set_new_handler
-// Function passed to set_new_handler() returns int and takes size_t argument.
-#define SP_FANCY_NEW_HANDLER
-
-#if _MSC_VER >= 1100
-// Visual C++ 5.0
-#define SP_HAVE_BOOL
-#define SP_SIZEOF_BOOL_1
-#pragma warning(disable : 4800) // forcing value to bool 'true' or
- // 'false' (performance warning)
-#endif
-
-#define SP_HAVE_SETMODE
-#define SP_DLLEXPORT __declspec(dllexport)
-#define SP_DLLIMPORT __declspec(dllimport)
-
-#ifdef _DLL
-#define SP_USE_DLL
-#endif
-
-#ifdef SP_USE_DLL
-#ifndef BUILD_LIBSP
-// It's not possible to export templates using __declspec(dllexport),
-// so instead we include the template definitions in the headers,
-// which allows Visual C++ to instantiate any needed templates
-// in the client.
-#define SP_DEFINE_TEMPLATES
-#endif
-#endif /* SP_USE_DLL */
-
-#ifndef SP_MANUAL_INST
-#ifndef SP_DEFINE_TEMPLATES
-#define SP_MANUAL_INST
-#endif
-#endif /* not SP_MANUAL_INST */
-
-#ifdef SP_MULTI_BYTE
-#define SP_WIDE_SYSTEM
-#endif
-
-// wchar_t's base type is an unsigned short
-#define SP_WCHAR_T_USHORT
-
-// Enable precompiled header support.
-#define SP_PCH
-// Don't compile in message text.
-#define SP_NO_MESSAGE_TEXT
-#ifdef _MT
-// Use Win32 critical section facilities
-#define SP_MUTEX_WIN32
-// Use the new Standard C++ library
-#define SP_ANSI_LIB
-#if _MSC_VER < 1100
-// Versions prior to 5.0 don't use the std namespace
-#define SP_NO_STD_NAMESPACE
-#endif
-#endif /* _MT */
-#endif /* _MSC_VER */
-
-#ifdef __WATCOMC__
-// Watcom C++ 10.0a
-#define SP_MANUAL_INST
-#undef SP_POSIX_FILENAMES
-#define SP_MSDOS_FILENAMES
-#undef SP_INCLUDE_UNISTD_H
-#define SP_INCLUDE_IO_H
-#pragma warning 004 9
-#undef huge
-// Cannot handle T::~T in template.
-#define SP_QUAL_TEMPLATE_DTOR_BROKEN
-#define SP_HAVE_SETMODE
-#define _setmode setmode
-#if __WATCOMC__ < 1050
-#define _O_BINARY O_BINARY
-#endif
-#define SP_WCHAR_T_USHORT
-#if __WATCOMC__ >= 1100
-#define SP_HAVE_BOOL
-// #define SP_SIZEOF_BOOL_1
-#endif
-#endif /* __WATCOMC__ */
-
-#ifdef __BORLANDC__
-// Borland C++ 5.0
-#define SP_ANSI_FOR_SCOPE
-#define SP_HAVE_RTTI
-#define SP_HAVE_SETMODE
-#undef SP_INCLUDE_UNISTD_H
-#define SP_INCLUDE_IO_H
-#undef SP_POSIX_FILENAMES
-#define SP_MSDOS_FILENAMES
-#define SP_HAVE_BOOL
-#define SP_SHORT_HEADERS
-#define _O_BINARY O_BINARY
-#define _setmode setmode
-#define SP_ANSI_CLASS_INST
-#define SP_MANUAL_INST
-// Building as a DLL doesn't work with Borland C++ yet.
-#define SP_DLLEXPORT __declspec(dllexport)
-#define SP_DLLIMPORT __declspec(dllimport)
-#ifdef SP_USE_DLL
-#ifndef BUILD_LIBSP
-#define SP_DEFINE_TEMPLATES
-#endif
-#endif /* SP_USE_DLL */
-#define SP_WCHAR_T_USHORT
-#endif /* __BORLANDC__ */
-
-#ifdef __IBMCPP__
-// IBM CSet++ 2.1 from Horst Szillat <szillat@berlin.snafu.de>.
-#undef SP_POSIX_FILENAMES
-#define SP_MANUAL_INST
-#define SP_SHORT_HEADERS
-#define SP_MSDOS_FILENAMES
-#undef SP_INCLUDE_UNISTD_H
-#define SP_INCLUDE_IO_H
-#define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
-#endif
-
-#ifdef __xlC__
-// IBM CSet++ 3.1 on AIX 4.1.
-// Use CXX=xlC and CC=xlC in the Makefile.
-// Note that -g creates massive executables and that -O
-// takes ages to compile and creates core dumping executables!
-// I havn't tried the socket stuff.
-// <Chris_Paulson-Ellis@3mail.3com.com>
-#define SP_MANUAL_INST
-#define SP_HAVE_LOCALE
-#define SP_STAT_BLKSIZE
-#endif /* __xlC__ */
-
-#ifdef macintosh
-// Apple MacOS. Tested only with Metrowerks CW10.
-// From Ashley Colin Yakeley <AshleyB@halcyon.com>
-#undef SP_POSIX_FILENAMES
-#define SP_MAC_FILENAMES
-#define SP_LINE_TERM1 '\r'
-
-#ifdef __MWERKS__
-// Metrowerks for some platform (MacOS in this case)
-
-#pragma mpwc_newline off
-#define SP_DEFINE_TEMPLATES
-// #define SP_USE_DLL -- __declspec doesn't work with classes (yet)
-#ifdef SP_USE_DLL
-#define SP_DLLEXPORT __declspec(export)
-#define SP_DLLIMPORT __declspec(import)
-#endif // SP_USE_DLL
-
-#if __MWERKS__ >= 0x1000
-// bool option only defined for CW10 and later (note __MWERKS__ is BCD)
-#if __option(bool)
-#define SP_HAVE_BOOL
-#endif // __option(bool)
-#endif // __MWERKS__ >= 0x1000
-#endif // __MWERKS__
-
-#if ('\n' != 10) || ('\r' != 13)
-#error "newlines incorrect"
-#endif
-
-#endif /* macintosh */
-
-#ifdef SP_HAVE_SETMODE
-#ifndef SP_LINE_TERM1
-#define SP_LINE_TERM1 '\r'
-#define SP_LINE_TERM2 '\n'
-#endif
-#endif /* not SP_HAVE_SETMODE */
-
-#ifndef SP_LINE_TERM1
-#define SP_LINE_TERM1 '\n'
-#endif
-
-#ifndef SP_ANSI_FOR_SCOPE
-// This simulates the new ANSI "for" scope rules
-#define for if (0); else for
-#endif
-
-#ifndef SP_DLLEXPORT
-#define SP_DLLEXPORT /* as nothing */
-#endif
-
-#ifndef SP_DLLIMPORT
-#define SP_DLLIMPORT /* as nothing */
-#endif
-
-#ifdef SP_USE_DLL
-
-#ifdef BUILD_LIBSP
-#define SP_API SP_DLLEXPORT
-#else
-#define SP_API SP_DLLIMPORT
-#endif
-
-#else /* not SP_USE_DLL */
-
-#define SP_API /* as nothing */
-
-#endif /* not SP_USE_DLL */
-
-// SP_WIDE_SYSTEM says that your OS provides wide character interfaces
-// SP_WIDE_SYSTEM currently works only with Visual C++ and Windows NT/95
-// SP_WIDE_SYSTEM implies SP_MULTI_BYTE
-#ifdef SP_WIDE_SYSTEM
-#ifndef SP_MULTI_BYTE
-#define SP_MULTI_BYTE
-#endif
-#endif
-
-#ifdef SP_NAMESPACE
-#define SP_NAMESPACE_SCOPE SP_NAMESPACE::
-#else
-#define SP_NAMESPACE_SCOPE
-#endif
-#ifdef __GNUC__
-using namespace std;
-#endif
-
-
-#endif /* not config_INCLUDED */
-
-#endif /* _CONFIG_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/constant.h b/usr/src/cmd/man/src/util/nsgmls.src/include/constant.h
deleted file mode 100644
index 65b3e233b1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/constant.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef constant_INCLUDED
-#define constant_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const Char charMax = Char(-1);
-const WideChar wideCharMax = WideChar(-1);
-const UnivChar univCharMax = UnivChar(-1);
-const SyntaxChar syntaxCharMax = SyntaxChar(-1);
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not constant_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/macros.h b/usr/src/cmd/man/src/util/nsgmls.src/include/macros.h
deleted file mode 100644
index 5b02aa043c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/macros.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef macros_INCLUDED
-#define macros_INCLUDED 1
-
-#ifndef __GNUG__
-#define __attribute__(args) /* as nothing */
-#endif
-
-#ifdef NDEBUG
-
-#include <stdlib.h>
-#define ASSERT(expr) ((void)0)
-#define CANNOT_HAPPEN() ((void)abort())
-
-#else /* not NDEBUG */
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-extern SP_API void assertionFailed(const char *, const char *, int)
- __attribute__((noreturn));
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#define ASSERT(expr) \
- ((void)((expr) || \
- (::SP_NAMESPACE_SCOPE assertionFailed(# expr, __FILE__, __LINE__), 0)))
-#define CANNOT_HAPPEN() ASSERT(0)
-
-#endif /* not NDEBUG */
-
-#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
-
-#endif /* not macros_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/rtti.h b/usr/src/cmd/man/src/util/nsgmls.src/include/rtti.h
deleted file mode 100644
index 38d7f4cbca..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/rtti.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef rtti_INCLUDED
-#define rtti_INCLUDED 1
-
-#ifdef SP_HAVE_RTTI
-
-#define DYNAMIC_CAST_PTR(T, p) dynamic_cast<T *>(p)
-#define DYNAMIC_CAST_CONST_PTR(T, p) dynamic_cast<const T *>(p)
-
-#define RTTI_CLASS
-
-#define RTTI_DEF0(T)
-#define RTTI_DEF1(T, B1)
-#define RTTI_DEF2(T, B1, B2)
-#define RTTI_DEF3(T, B1, B2, B3)
-
-#else /* not SP_HAVE_RTTI */
-
-#include "TypeId.h"
-
-#define RTTI_CLASS \
-public: \
- virtual TypeId dynamicType() const; \
- static inline TypeId staticType() { return TypeId(RTTI_bases_); } \
-protected: \
- static const void *RTTI_bases_[]; \
-private:
-
-#define RTTI_DEF0(T) \
- const void *T::RTTI_bases_[] = { 0 }; \
- TypeId T::dynamicType() const { return staticType(); }
-
-#define RTTI_DEF1(T, B1) \
- const void *T::RTTI_bases_[] = { B1::RTTI_bases_, 0 }; \
- TypeId T::dynamicType() const { return staticType(); }
-
-#define RTTI_DEF2(T, B1, B2) \
- const void *T::RTTI_bases_[] = { B1::RTTI_bases_, B2::RTTI_bases_, 0 }; \
- TypeId T::dynamicType() const { return staticType(); }
-
-#define RTTI_DEF3(T, B1, B2, B3) \
- const void *T::RTTI_bases_[] = { \
- B1::RTTI_bases_, B2::RTTI_bases_, B3::RTTI_bases_, 0 }; \
- TypeId T::dynamicType() const { return staticType(); }
-
-#define DYNAMIC_CAST_PTR(T, p) \
-((p) && (p)->dynamicType().canCast(T::staticType(), (p)->staticType()) \
- ? (T *)(p) \
- : 0)
-#define DYNAMIC_CAST_CONST_PTR(T, p) \
-((p) && (p)->dynamicType().canCast(T::staticType(), (p)->staticType()) \
- ? (const T *)p \
- : 0)
-
-#endif /* not SP_HAVE_RTTI */
-
-#endif /* not rtti_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/sptchar.h b/usr/src/cmd/man/src/util/nsgmls.src/include/sptchar.h
deleted file mode 100644
index 24bc4dc47e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/sptchar.h
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef sptchar_INCLUDED
-#define sptchar_INCLUDED 1
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_WIDE_SYSTEM
-
-typedef wchar_t SP_TCHAR;
-typedef wchar_t SP_TUCHAR;
-
-#define SP_T(x) L ## x
-
-inline
-wchar_t *tgetenv(const wchar_t *s)
-{
- return _wgetenv(s);
-}
-
-inline
-int tcscmp(const wchar_t *s1, const wchar_t *s2)
-{
- return wcscmp(s1, s2);
-}
-
-inline
-int tcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
-{
- return wcsncmp(s1, s2, n);
-}
-
-inline
-unsigned long tcstoul(const wchar_t *s, const wchar_t **sp, int base)
-{
- return wcstoul((wchar_t *)s, (wchar_t **)sp, base);
-}
-
-inline
-unsigned long tcstoul(wchar_t *s, wchar_t **sp, int base)
-{
- return wcstoul(s, sp, base);
-}
-
-inline
-const wchar_t *tcschr(const wchar_t *s, wint_t c)
-{
- return wcschr(s, c);
-}
-
-inline
-wchar_t *tcschr(wchar_t *s, wint_t c)
-{
- return wcschr(s, c);
-}
-
-inline
-size_t tcslen(const wchar_t *s)
-{
- return wcslen(s);
-}
-
-inline
-int fputts(const wchar_t *s, FILE *fp)
-{
- return fputws(s, fp);
-}
-
-inline
-int totupper(wint_t c)
-{
- return towupper(c);
-}
-
-#else /* not SP_WIDE_SYSTEM */
-
-typedef char SP_TCHAR;
-typedef unsigned char SP_TUCHAR;
-
-#define SP_T(x) x
-
-inline
-char *tgetenv(const char *s)
-{
- return getenv(s);
-}
-
-inline
-int tcscmp(const char *s1, const char *s2)
-{
- return strcmp(s1, s2);
-}
-
-inline
-int tcsncmp(const char *s1, const char *s2, size_t n)
-{
- return strncmp(s1, s2, n);
-}
-
-inline
-unsigned long tcstoul(const char *s, const char **sp, int base)
-{
- return strtoul((char *)s, (char **)sp, base);
-}
-
-inline
-unsigned long tcstoul(char *s, char **sp, int base)
-{
- return strtoul(s, sp, base);
-}
-
-inline
-const char *tcschr(const char *s, int c)
-{
- return strchr(s, c);
-}
-
-inline
-char *tcschr(char *s, int c)
-{
- return strchr(s, c);
-}
-
-inline
-size_t tcslen(const char *s)
-{
- return strlen(s);
-}
-
-inline
-int fputts(const char *s, FILE *fp)
-{
- return fputs(s, fp);
-}
-
-inline
-int totupper(int c)
-{
- return toupper(c);
-}
-
-#endif /* not SP_WIDE_SYSTEM */
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not sptchar_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/types.h b/usr/src/cmd/man/src/util/nsgmls.src/include/types.h
deleted file mode 100644
index 4f245f9ee2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/types.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef types_INCLUDED
-#define types_INCLUDED 1
-
-#include <limits.h>
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
-typedef unsigned int Unsigned32;
-#else
-typedef unsigned long Unsigned32;
-#endif
-
-// Number holds values between 0 and 99999999 (eight nines).
-typedef Unsigned32 Number;
-typedef Unsigned32 Offset;
-typedef Unsigned32 Index;
-
-#ifdef SP_MULTI_BYTE
-
-#ifdef SP_WCHAR_T_USHORT
-typedef wchar_t Char;
-#else
-typedef unsigned short Char;
-#endif
-
-#if INT_MAX > 65535L
-typedef int Xchar;
-#else /* INT_MAX <= 65535L */
-typedef long Xchar;
-#endif /* INT_MAX <= 65535L */
-
-#else /* not SP_MULTI_BYTE */
-
-typedef unsigned char Char;
-// This holds any value of type Char plus InputSource:eE (= -1).
-typedef int Xchar;
-
-#endif /* not SP_MULTI_BYTE */
-
-typedef Unsigned32 UnivChar;
-typedef Unsigned32 WideChar;
-
-// A character in a syntax reference character set.
-// We might want to compile with wide syntax reference characters
-// (since they're cheap) but not with wide document characters.
-typedef Unsigned32 SyntaxChar;
-
-typedef unsigned short CharClassIndex;
-
-typedef unsigned Token;
-
-#ifdef SP_MULTI_BYTE
-typedef unsigned short EquivCode;
-#else
-typedef unsigned char EquivCode;
-#endif
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not types_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/include/xnew.h b/usr/src/cmd/man/src/util/nsgmls.src/include/xnew.h
deleted file mode 100644
index 4654f2c720..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/include/xnew.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _XNEW_H
-#define _XNEW_H
-
-#ifndef xnew_INCLUDED
-#define xnew_INCLUDED 1
-
-#ifdef SP_NEW_H_MISSING
-
-typedef void (*VFP)();
-
-#ifdef SP_SET_NEW_HANDLER_EXTERN_C
-extern "C"
-#endif
-
-namespace std {
- void set_new_handler(VFP);
-}
-
-#ifndef SP_DECLARE_PLACEMENT_OPERATOR_NEW
-#define SP_DECLARE_PLACEMENT_OPERATOR_NEW
-#endif
-
-#else /* not SP_NEW_H_MISSING */
-
-#ifdef SP_ANSI_LIB
-#include <new>
-#else
-#include <new.h>
-#endif
-
-#endif /* not SP_NEW_H_MISSING */
-
-#ifdef SP_DECLARE_PLACEMENT_OPERATOR_NEW
-
-inline
-void
-*operator new(size_t, void *p)
-{
- return (p);
-}
-
-#endif /* SP_DECLARE_PLACEMENT_OPERATOR_NEW */
-
-#endif /* not xnew_INCLUDED */
-
-#endif /* _XNEW_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Allocator.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Allocator.cxx
deleted file mode 100644
index 0da0632b5c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Allocator.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Allocator.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Allocator::Allocator(size_t maxSize, unsigned blocksPerSegment)
-: objectSize_(maxSize),
- blocksPerSegment_(blocksPerSegment),
- freeList_(0),
- segments_(0)
-{
-}
-
-Allocator::~Allocator()
-{
- SegmentHeader *p = segments_;
- while (p) {
- SegmentHeader *tem = p->next;
- if (p->liveCount == 0)
- ::operator delete(p);
- else
- p->freeList = 0;
- p = tem;
- }
-}
-
-void *Allocator::alloc(size_t sz)
-{
- if (sz > objectSize_)
- tooBig(sz);
- Block *tem = freeList_;
- if (tem) {
- tem->header.seg->liveCount += 1;
- freeList_ = tem->next;
- return &(tem->next);
- }
- else
- return alloc1();
-}
-
-void *Allocator::allocSimple(size_t sz)
-{
- BlockHeader *p = (BlockHeader *)::operator new(sz + sizeof(BlockHeader));
- p->seg = 0;
- return p + 1;
-}
-
-void Allocator::free(void *p)
-{
- BlockHeader *b = ((BlockHeader *)p) - 1;
- SegmentHeader *seg = b->seg;
- if (seg == 0)
- ::operator delete(b);
- else {
- Block **freeList = seg->freeList;
- if (freeList == 0) {
- seg->liveCount -= 1;
- if (seg->liveCount == 0)
- ::operator delete(seg);
- }
- else {
- ((Block *)b)->next = *freeList;
- *freeList = (Block *)b;
- seg->liveCount -= 1;
- }
- }
-}
-
-void *Allocator::alloc1()
-{
- SegmentHeader *seg
- = (SegmentHeader *)::operator new(sizeof(SegmentHeader)
- + ((objectSize_ + sizeof(BlockHeader))
- * blocksPerSegment_));
- seg->next = segments_;
- segments_ = seg;
- seg->liveCount = 1;
- seg->freeList = &freeList_;
- char *p = (char *)(seg + 1);
- Block *head = 0;
- for (size_t n = blocksPerSegment_; n > 0; n--) {
- ((Block *)p)->next = head;
- ((Block *)p)->header.seg = seg;
- head = (Block *)p;
- p += sizeof(BlockHeader) + objectSize_;
- }
- freeList_ = head->next;
- return &(head->next);
-}
-
-void Allocator::tooBig(size_t sz)
-{
- ASSERT(sz <= objectSize_);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngine.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngine.cxx
deleted file mode 100644
index 0efd9bd3d8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngine.cxx
+++ /dev/null
@@ -1,1758 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ArcEngine.h"
-#include "ArcProcessor.h"
-#include "Vector.h"
-#include "NCVector.h"
-#include "IQueue.h"
-#include "ArcEngineMessages.h"
-#include "MessageArg.h"
-#include "ParserOptions.h"
-#include "SgmlParser.h"
-#include "Allocator.h"
-#include "LinkProcess.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static const size_t sizes[] = {
- sizeof(StartElementEvent),
- sizeof(EndElementEvent),
- sizeof(ImmediateDataEvent),
- sizeof(SdataEntityEvent),
- sizeof(EndPrologEvent),
- sizeof(CdataEntityEvent),
- sizeof(SdataEntityEvent),
- sizeof(ExternalDataEntityEvent),
- sizeof(OpenElement)
-};
-
-static
-size_t maxSize(const size_t *v, size_t n)
-{
- size_t max = 0;
- for (size_t i = 0; i < n; i++) {
- if (v[i] > max)
- max = v[i];
- }
- return max;
-}
-
-const unsigned invalidAtt = unsigned(-1);
-const unsigned contentPseudoAtt = unsigned(-2);
-
-class DelegateEventHandler : public EventHandler {
-public:
-#define EVENT(C, f) void f(C *ev) { delegateTo_->f(ev); }
-#include "events.h"
-#undef EVENT
-protected:
- EventHandler *delegateTo_;
-};
-
-class QueueEventHandler : public EventHandler, public IQueue<Event> {
-public:
-#define EVENT(C, f) void f(C *ev) { ev->copyData(); append(ev); }
-#include "events.h"
-#undef EVENT
-};
-
-// This just passes through messages.
-
-class NullEventHandler : public EventHandler {
-public:
- NullEventHandler(Messenger &mgr) : mgr_(&mgr) { }
- void message(MessageEvent *event) {
- mgr_->dispatchMessage(event->message());
- }
-private:
- Messenger *mgr_;
-};
-
-class ArcEngineImpl : public DelegateEventHandler, private Messenger {
-public:
- ArcEngineImpl(Messenger &mgr,
- const SgmlParser *parser,
- ArcDirector &director,
- const volatile sig_atomic_t *cancelPtr,
- const Notation *,
- const Vector<StringC> &name,
- const SubstTable<Char> *table);
- ~ArcEngineImpl();
- void sgmlDecl(SgmlDeclEvent *);
- void appinfo(AppinfoEvent *);
- void startElement(StartElementEvent *);
- void endElement(EndElementEvent *);
- void data(DataEvent *);
- void sdataEntity(SdataEntityEvent *);
- void externalDataEntity(ExternalDataEntityEvent *);
- void pi(PiEvent *);
- void endProlog(EndPrologEvent *);
- void startDtd(StartDtdEvent *);
- void endDtd(EndDtdEvent *);
- void startLpd(StartLpdEvent *);
- void endLpd(EndLpdEvent *);
- void uselink(UselinkEvent *);
- size_t nBases() const { return arcProcessors_.size(); }
- EventHandler *delegateHandler() { return eventHandler_; }
-private:
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &);
- void initMessage(Message &);
-
- EventHandler *eventHandler_;
- NCVector<ArcProcessor> arcProcessors_;
- ConstPtr<Sd> sd_;
- ConstPtr<Syntax> syntax_;
- StringC arcBase_;
- StringC is10744_;
- int stage_;
- QueueEventHandler eventQueue_;
- NullEventHandler nullHandler_;
- const SgmlParser *parser_;
- Location currentLocation_;
- unsigned gatheringContent_;
- Text content_;
- unsigned startAgain_;
- Allocator alloc_;
- StringC appinfo_;
- const AttributeList *linkAttributes_;
- LinkProcess linkProcess_;
- Boolean haveLinkProcess_;
- Vector<StringC> docName_;
- ArcDirector *director_;
- Messenger *mgr_;
- const volatile sig_atomic_t *cancelPtr_;
-};
-
-
-void ArcEngine::parseAll(SgmlParser &parser,
- Messenger &mgr,
- ArcDirector &director,
- const volatile sig_atomic_t *cancelPtr)
-{
- ArcEngineImpl wrap(mgr, &parser, director, cancelPtr,
- 0, Vector<StringC>(), 0);
- parser.parseAll(wrap, cancelPtr);
-}
-
-EventHandler *
-SelectOneArcDirector::arcEventHandler(const Notation *,
- const Vector<StringC> &name,
- const SubstTable<Char> *table)
-{
- if (name.size() != select_.size())
- return 0;
- for (size_t i = 0; i < name.size(); i++) {
- StringC tem(select_[i]);
- table->subst(tem);
- if (name[i] != tem)
- return 0;
- }
- return eh_;
-}
-
-void SelectOneArcDirector::dispatchMessage(const Message &msg)
-{
- eh_->message(new MessageEvent(msg));
-}
-
-void SelectOneArcDirector::dispatchMessage(Message &msg)
-{
- eh_->message(new MessageEvent(msg));
-}
-
-ArcEngineImpl::ArcEngineImpl(Messenger &mgr,
- const SgmlParser *parser,
- ArcDirector &director,
- const volatile sig_atomic_t *cancelPtr,
- const Notation *notation,
- const Vector<StringC> &docName,
- const SubstTable<Char> *table)
-
-: director_(&director), mgr_(&mgr), cancelPtr_(cancelPtr),
- parser_(parser), stage_(0),
- gatheringContent_(0), startAgain_(0), haveLinkProcess_(0),
- alloc_(maxSize(sizes, SIZEOF(sizes)), 50),
- nullHandler_(mgr), docName_(docName)
-{
- eventHandler_ = director.arcEventHandler(notation, docName, table);
- if (!eventHandler_)
- eventHandler_ = &nullHandler_;
- delegateTo_ = eventHandler_;
-}
-
-ArcEngineImpl::~ArcEngineImpl()
-{
- for (size_t i = 0; i < arcProcessors_.size(); i++)
- if (arcProcessors_[i].valid())
- arcProcessors_[i].checkIdrefs();
-}
-
-void ArcEngineImpl::appinfo(AppinfoEvent *event)
-{
- const StringC *str;
- if (event->literal(str))
- appinfo_ = *str;
- DelegateEventHandler::appinfo(event);
-}
-
-void ArcEngineImpl::pi(PiEvent *event)
-{
- currentLocation_ = event->location();
- if (stage_ == 1
- && arcBase_.size()
- && event->dataLength() > is10744_.size() + 1) {
- Boolean match = 1;
- size_t i = 0;
- for (size_t j = 0; j < is10744_.size() && match; i++, j++)
- if ((*syntax_->generalSubstTable())[event->data()[i]] != is10744_[j])
- match = 0;
- if (!syntax_->isS(event->data()[i]))
- match = 0;
- do {
- i++;
- } while (i < event->dataLength() && syntax_->isS(event->data()[i]));
- for (size_t j = 0; j < arcBase_.size() && match; i++, j++)
- if (i >= event->dataLength()
- || (*syntax_->generalSubstTable())[event->data()[i]] != arcBase_[j])
- match = 0;
- if (i >= event->dataLength() || !syntax_->isS(event->data()[i]))
- match = 0;
- if (match) {
- size_t dataLength = event->dataLength();
- const Char *data = event->data();
- for (;;) {
- while (i < dataLength && syntax_->isS(data[i]))
- i++;
- if (i >= dataLength)
- break;
- size_t start = i++;
- while (i < dataLength && !syntax_->isS(data[i]))
- i++;
- StringC name(data + start, i - start);
- syntax_->generalSubstTable()->subst(name);
- arcProcessors_.resize(arcProcessors_.size() + 1);
- arcProcessors_.back().setName(name);
- }
- }
- }
- DelegateEventHandler::pi(event);
-}
-
-void ArcEngineImpl::endProlog(EndPrologEvent *event)
-{
- currentLocation_ = event->location();
- for (size_t i = 0; i < arcProcessors_.size(); i++)
- arcProcessors_[i].init(*event,
- sd_,
- syntax_,
- parser_,
- this,
- docName_,
- *director_,
- cancelPtr_);
- if (!event->lpdPointer().isNull()) {
- haveLinkProcess_ = 1;
- linkProcess_.init(event->lpdPointer());
- }
- DelegateEventHandler::endProlog(event);
-}
-
-void ArcEngineImpl::startDtd(StartDtdEvent *event)
-{
- stage_++;
- DelegateEventHandler::startDtd(event);
-}
-
-void ArcEngineImpl::endDtd(EndDtdEvent *event)
-{
- stage_++;
- DelegateEventHandler::endDtd(event);
-}
-
-void ArcEngineImpl::startLpd(StartLpdEvent *event)
-{
- if (event->active())
- stage_ = 1;
- DelegateEventHandler::startLpd(event);
-}
-
-void ArcEngineImpl::endLpd(EndLpdEvent *event)
-{
- stage_++;
- DelegateEventHandler::endLpd(event);
-}
-
-void ArcEngineImpl::sgmlDecl(SgmlDeclEvent *event)
-{
- currentLocation_ = event->location();
- sd_ = event->sdPointer();
- syntax_ = event->instanceSyntaxPointer();
- arcBase_ = sd_->execToInternal("ArcBase");
- syntax_->generalSubstTable()->subst(arcBase_);
- is10744_ = sd_->execToInternal("IS10744");
- Boolean atStart = 1;
- for (size_t i = 0; i < appinfo_.size(); i++)
- if (syntax_->isS(appinfo_[i]))
- atStart = 1;
- else if (atStart) {
- if (i + 7 > appinfo_.size())
- break;
- StringC tem(appinfo_.data() + i, 7);
- syntax_->generalSubstTable()->subst(tem);
- if (tem == arcBase_) {
- if (i + 7 == appinfo_.size() || syntax_->isS(appinfo_[i + 7]))
- break;
- if (appinfo_[i + 7] == sd_->execToInternal('=')) {
- arcBase_.resize(0);
- for (size_t j = i + 7; j < appinfo_.size(); j++) {
- if (syntax_->isS(appinfo_[j]))
- break;
- arcBase_ += appinfo_[j];
- }
- // Allow quotes around replacement name.
- if (arcBase_.size() > 2
- && (arcBase_[0] == sd_->execToInternal('"')
- || arcBase_[0] == sd_->execToInternal('\''))
- && arcBase_[arcBase_.size() - 1] == arcBase_[0]) {
- for (size_t j = 0; j < arcBase_.size() - 2; j++)
- arcBase_[j] = arcBase_[j + 1];
- arcBase_.resize(arcBase_.size() - 2);
- }
- syntax_->generalSubstTable()->subst(arcBase_);
- break;
- }
- }
- atStart = 0;
- }
- DelegateEventHandler::sgmlDecl(event);
-}
-
-void ArcEngineImpl::startElement(StartElementEvent *event)
-{
- if (gatheringContent_) {
- gatheringContent_++;
- DelegateEventHandler::startElement(event);
- return;
- }
- currentLocation_ = event->location();
- const Text *contentP;
- size_t start;
- if (startAgain_) {
- start = startAgain_ - 1;
- contentP = &content_;
- startAgain_ = 0;
- }
- else {
- contentP = 0;
- start = 0;
- if (haveLinkProcess_) {
- const ResultElementSpec *resultElementSpec;
- linkProcess_.startElement(event->elementType(),
- event->attributes(),
- event->location(),
- *this, // Messenger &
- linkAttributes_,
- resultElementSpec);
- }
- else
- linkAttributes_ = 0;
- }
- for (size_t i = start; i < arcProcessors_.size(); i++) {
- if (arcProcessors_[i].valid()) {
- if (!arcProcessors_[i].processStartElement(*event,
- linkAttributes_,
- contentP,
- alloc_)) {
- ASSERT(contentP == 0);
- startAgain_ = i + 1;
- gatheringContent_ = 1;
- delegateTo_ = &eventQueue_;
- DelegateEventHandler::startElement(event);
- return;
- }
- }
- }
-
- content_.clear();
- DelegateEventHandler::startElement(event);
-}
-
-void ArcEngineImpl::data(DataEvent *event)
-{
- const Entity *entity = event->entity();
- if (gatheringContent_) {
- if (entity)
- content_.addCdata(entity->asInternalEntity(),
- event->location().origin());
- else {
- // Do attribute value literal interpretation.
- Location loc(event->location());
- for (size_t i = 0; i < event->dataLength(); i++, loc += 1) {
- Char ch = event->data()[i];
- if (syntax_->isS(ch) && ch != syntax_->space()) {
- if (ch == syntax_->standardFunction(Syntax::fRS))
- content_.ignoreChar(ch, loc);
- else
- content_.addChar(syntax_->space(),
- Location(new ReplacementOrigin(loc, ch), 0));
- }
- else
- content_.addChar(ch, loc);
- }
- }
- }
- else {
- currentLocation_ = event->location();
- for (size_t i = 0; i < arcProcessors_.size(); i++) {
- if (arcProcessors_[i].valid() && arcProcessors_[i].processData()) {
- if (entity)
- arcProcessors_[i].docHandler()
- .data(new (alloc_) CdataEntityEvent(entity->asInternalEntity(),
- event->location().origin()));
- else
- arcProcessors_[i].docHandler()
- .data(new (alloc_) ImmediateDataEvent(event->type(),
- event->data(),
- event->dataLength(),
- event->location(),
- 0));
- }
- }
- }
- DelegateEventHandler::data(event);
-}
-
-void ArcEngineImpl::sdataEntity(SdataEntityEvent *event)
-{
- if (gatheringContent_) {
- content_.addSdata(event->entity()->asInternalEntity(),
- event->location().origin());
- return;
- }
- else {
- currentLocation_ = event->location();
- for (size_t i = 0; i < arcProcessors_.size(); i++) {
- if (arcProcessors_[i].valid() && arcProcessors_[i].processData()) {
- const Entity *entity = event->entity();
- arcProcessors_[i].docHandler()
- .sdataEntity(new (alloc_)
- SdataEntityEvent(entity->asInternalEntity(),
- event->location().origin()));
- }
- }
- }
- DelegateEventHandler::sdataEntity(event);
-}
-
-void ArcEngineImpl::externalDataEntity(ExternalDataEntityEvent *event)
-{
- if (!gatheringContent_) {
- currentLocation_ = event->location();
- for (size_t i = 0; i < arcProcessors_.size(); i++) {
- if (arcProcessors_[i].valid()
- && arcProcessors_[i].processData()) {
- ConstPtr<Entity> entity
- = arcProcessors_[i].dtdPointer()
- ->lookupEntity(0, event->entity()->name());
- if (!entity.isNull()) {
- ConstPtr<EntityOrigin> oldOrigin = event->entityOrigin();
- Owner<Markup> markup;
- if (oldOrigin->markup())
- markup = new Markup(*oldOrigin->markup());
- ConstPtr<EntityOrigin> newOrigin
- = EntityOrigin::make(entity,
- oldOrigin->parent(),
- oldOrigin->refLength(),
- markup);
- arcProcessors_[i].docHandler()
- .externalDataEntity(new (alloc_)
- ExternalDataEntityEvent(entity->asExternalDataEntity(),
- newOrigin));
- }
- // otherwise entity is not architectural
- }
- }
- }
- DelegateEventHandler::externalDataEntity(event);
-}
-
-void ArcEngineImpl::endElement(EndElementEvent *event)
-{
- while (gatheringContent_) {
- if (--gatheringContent_ > 0) {
- DelegateEventHandler::endElement(event);
- return;
- }
- delegateTo_ = delegateHandler();
- // Clear out eventQueue_ in case handling the events
- // causes events to be queued again.
- IQueue<Event> tem;
- tem.swap(eventQueue_);
- while (!tem.empty())
- tem.get()->handle(*this);
- }
- currentLocation_ = event->location();
- for (size_t i = 0; i < arcProcessors_.size(); i++)
- if (arcProcessors_[i].valid())
- arcProcessors_[i].processEndElement(*event, alloc_);
- DelegateEventHandler::endElement(event);
- if (haveLinkProcess_)
- linkProcess_.endElement();
-}
-
-void ArcEngineImpl::uselink(UselinkEvent *event)
-{
- if (!gatheringContent_)
- linkProcess_.uselink(event->linkSet(),
- event->restore(),
- event->lpd().pointer());
- DelegateEventHandler::uselink(event);
-}
-
-void ArcEngineImpl::dispatchMessage(const Message &msg)
-{
- mgr_->dispatchMessage(msg);
-}
-
-void ArcEngineImpl::dispatchMessage(Message &msg)
-{
- mgr_->dispatchMessage(msg);
-}
-
-void ArcEngineImpl::initMessage(Message &msg)
-{
- mgr_->initMessage(msg);
- msg.loc = currentLocation_;
-}
-
-ArcProcessor::ArcProcessor()
-: errorIdref_(1), docHandler_(0), arcAuto_(1),
- arcDtdIsParam_(0)
-{
-}
-
-void ArcProcessor::setName(const StringC &name)
-{
- name_ = name;
-}
-
-const Syntax &ArcProcessor::attributeSyntax() const
-{
- return *docSyntax_;
-}
-
-ConstPtr<Notation> ArcProcessor::getAttributeNotation(const StringC &name,
- const Location &)
-{
- if (!metaDtd_.isNull())
- return metaDtd_->lookupNotation(name);
- return 0;
-}
-
-ConstPtr<Entity> ArcProcessor::getAttributeEntity(const StringC &name,
- const Location &)
-{
- // FIXME What about default entity
- if (!metaDtd_.isNull())
- return metaDtd_->lookupEntity(0, name);
- return 0;
-}
-
-void ArcProcessor::noteCurrentAttribute(size_t i, AttributeValue *value)
-{
- if (valid_)
- currentAttributes_[i] = value;
-}
-
-ConstPtr<AttributeValue> ArcProcessor::getCurrentAttribute(size_t i) const
-{
- return currentAttributes_[i];
-}
-
-// This code is the same as in the main parser.
-// Once handling of ID/IDREF in architectures has been clarified.
-// Maybe factor out into AttributeContext.
-
-Boolean ArcProcessor::defineId(const StringC &str, const Location &loc,
- Location &prevLoc)
-{
- if (!valid_)
- return 1;
- Id *id = lookupCreateId(str);
- if (id->defined()) {
- prevLoc = id->defLocation();
- return 0;
- }
- id->define(loc);
- return 1;
-}
-
-void ArcProcessor::noteIdref(const StringC &str, const Location &loc)
-{
- if (!valid_ || !errorIdref_)
- return;
- Id *id = lookupCreateId(str);
- if (!id->defined())
- id->addPendingRef(loc);
-}
-
-Id *ArcProcessor::lookupCreateId(const StringC &name)
-{
- Id *id = idTable_.lookup(name);
- if (!id) {
- id = new Id(name);
- idTable_.insert(id);
- }
- return id;
-}
-
-void ArcProcessor::checkIdrefs()
-{
- NamedTableIter<Id> iter(idTable_);
- Id *id;
- while ((id = iter.next()) != 0) {
- for (size_t i = 0; i < id->pendingRefs().size(); i++) {
- Messenger::setNextLocation(id->pendingRefs()[i]);
- message(ArcEngineMessages::missingId, StringMessageArg(id->name()));
- }
- }
-}
-
-void ArcProcessor::init(const EndPrologEvent &event,
- const ConstPtr<Sd> &sd,
- const ConstPtr<Syntax> &syntax,
- const SgmlParser *parentParser,
- Messenger *mgr,
- const Vector<StringC> &superName,
- ArcDirector &director,
- const volatile sig_atomic_t *cancelPtr)
-{
- director_ = &director;
- mgr_ = mgr;
- docSyntax_ = syntax;
- docSd_ = sd;
- mgr_ = mgr;
- valid_ = 0;
- docDtd_ = event.dtdPointer();
- metaSyntax_ = docSyntax_;
- mayDefaultAttribute_ = 1;
- docSyntax_->generalSubstTable()->subst(name_);
- Vector<StringC> docName(superName);
- docName.push_back(name_);
- ConstPtr<Notation> notation;
- notation = docDtd_->lookupNotation(name_);
- if (!notation.isNull()) {
- ConstPtr<AttributeDefinitionList> notAttDef = notation->attributeDef();
- attributeList_.init(notAttDef);
- attributeList_.finish(*this);
- supportAttributes(attributeList_);
- }
- else
- message(ArcEngineMessages::noArcNotation, StringMessageArg(name_));
- ArcEngineImpl *engine
- = new ArcEngineImpl(*mgr, parentParser, director, cancelPtr,
- notation.pointer(),
- docName,
- docSyntax_->generalSubstTable());
- docHandler_ = engine;
- ownEventHandler_ = engine;
- if (supportAtts_[rArcDocF].size() == 0)
- supportAtts_[rArcDocF] = name_;
- if (supportAtts_[rArcFormA].size() == 0)
- supportAtts_[rArcFormA] = name_;
- rniContent_ = docSyntax_->delimGeneral(Syntax::dRNI);
- rniContent_ += sd->execToInternal("CONTENT");
- rniDefault_ = docSyntax_->delimGeneral(Syntax::dRNI);
- rniDefault_ += docSyntax_->reservedName(Syntax::rDEFAULT);
- rniArcCont_ = metaSyntax_->delimGeneral(Syntax::dRNI);
- rniArcCont_ += sd->execToInternal("ARCCONT");
- ConstPtr<Entity> dtdent = makeDtdEntity(notation.pointer());
- if (dtdent.isNull())
- return;
- StringC sysid = dtdent->asExternalEntity()->externalId().effectiveSystemId();
- if (sysid.size() == 0
- && !parentParser->entityCatalog().lookup(*dtdent,
- *docSyntax_,
- sd->internalCharset(),
- *mgr_,
- sysid)) {
- message(ArcEngineMessages::arcGenerateSystemId,
- StringMessageArg(name_));
- return;
- }
- docHandler_->sgmlDecl(new SgmlDeclEvent(sd, syntax));
- docHandler_->startDtd(new StartDtdEvent(dtdent->name(),
- dtdent,
- 0,
- event.location(),
- 0));
- SgmlParser::Params params;
- params.entityType = SgmlParser::Params::dtd;
- params.sysid = sysid;
- params.parent = parentParser;
- ParserOptions options = parentParser->options();
- errorIdref_ = options.errorIdref;
- options.errorAfdr = 0;
- options.includes = arcOpts_;
- params.options = &options;
- params.sd = docSd_;
- if (metaSyntax_->reservedName(Syntax::rALL).size() == 0) {
- Ptr<Syntax> tem(new Syntax(*metaSyntax_));
- tem->setName(Syntax::rALL, docSd_->execToInternal("ALL"));
- metaSyntax_ = tem;
- }
- params.prologSyntax = metaSyntax_;
- params.instanceSyntax = metaSyntax_;
- params.doctypeName = dtdent->name();
- SgmlParser parser(params);
- parser.parseAll(*docHandler_, cancelPtr);
- Ptr<Dtd> baseDtd = parser.baseDtd();
- if (baseDtd.isNull()
- || baseDtd->documentElementType()->definition()->undefined())
- return;
- metaDtd_ = baseDtd;
- metaMapCache_.resize(docDtd_->nElementTypeIndex());
- mungeMetaDtd(*baseDtd, *docDtd_);
- docHandler_->endDtd(new EndDtdEvent(metaDtd_, event.location(), 0));
- startContent(*metaDtd_);
- currentAttributes_.resize(metaDtd_->nCurrentAttribute());
- valid_ = 1;
- docHandler_->endProlog(new EndPrologEvent(metaDtd_, event.location()));
- if (engine->nBases() == 0)
- docHandler_ = engine->delegateHandler();
-}
-
-void ArcProcessor::mungeMetaDtd(Dtd &metaDtd, const Dtd &docDtd)
-{
- if (supportAtts_[rArcDataF].size() > 0
- && metaDtd.lookupNotation(supportAtts_[rArcDataF]).isNull()) {
- Messenger::message(ArcEngineMessages::noArcDataF,
- StringMessageArg(supportAtts_[rArcDataF]));
- metaDtd.insertNotation(new Notation(supportAtts_[rArcDataF],
- metaDtd.namePointer(),
- metaDtd.isBase()));
- }
- // FIXME check for ArcAutoF
- Dtd::ConstEntityIter iter(docDtd.generalEntityIter());
- for (;;) {
- ConstPtr<Entity> ent = iter.next();
- if (ent.isNull())
- break;
- Ptr<Entity> copy(ent->copy());
- if (!copy->asExternalDataEntity()
- || mungeDataEntity(*(ExternalDataEntity *)copy.pointer()))
- metaDtd.insertEntity(copy, 1);
- }
-}
-
-Boolean ArcProcessor::mungeDataEntity(ExternalDataEntity &entity)
-{
- const MetaMap &map = buildMetaMap(0,
- entity.notation(),
- entity.attributes(),
- 0,
- 0);
- if (!map.attributed)
- return 0;
- AttributeList atts;
- const Notation *notation = (const Notation *)map.attributed;
- ConstPtr<AttributeValue> arcContent;
- if (mapAttributes(entity.attributes(), 0, 0, atts, arcContent, map)) {
- // FIXME check arcContent
- entity.setNotation((Notation *)notation, atts);
- return 1;
- }
- // FIXME error tried to use #CONTENT
- return 0;
-}
-
-ConstPtr<Entity> ArcProcessor::makeDtdEntity(const Notation *)
-{
- if (!supportAtts_[rArcDTD].size()) {
- mgr_->message(ArcEngineMessages::noArcDTDAtt);
- return 0;
- }
- ConstPtr<Entity> entity = docDtd_->lookupEntity(arcDtdIsParam_,
- supportAtts_[rArcDTD]);
- if (entity.isNull()) {
- mgr_->message(arcDtdIsParam_
- ? ArcEngineMessages::arcDtdNotDeclaredParameter
- : ArcEngineMessages::arcDtdNotDeclaredParameter,
- StringMessageArg(supportAtts_[rArcDTD]));
- return 0;
- }
- if (!entity->asExternalEntity()) {
- mgr_->message(ArcEngineMessages::arcDtdNotExternal,
- StringMessageArg(supportAtts_[rArcDTD]));
- return 0;
- }
- ExternalId externalId(entity->asExternalEntity()->externalId());
-#if 0
- // Use the public identifier of the notation to find the meta-DTD.
- if (externalId.effectiveSystemId().size() == 0 && notation) {
- if (notation->externalId().effectiveSystemId().size()) {
- StringC tem(notation->externalId().effectiveSystemId());
- externalId.setEffectiveSystem(tem);
- }
- else if (!externalId.publicId()) {
- const PublicId *pubid = notation->externalId().publicId();
- PublicId::OwnerType ownerType;
- if (pubid && pubid->getOwnerType(ownerType)) {
- Text pubidText;
- unsigned textClassPos = 2;
- if (ownerType != PublicId::ISO)
- textClassPos += 3;
- StringC owner;
- pubid->getOwner(owner);
- textClassPos += owner.size();
- pubidText.addChars(pubid->string().data(),
- textClassPos,
- pubid->text().charLocation(0));
- pubidText.addChars(docSd_->execToInternal("DTD"),
- pubid->text().charLocation(textClassPos));
- for (; textClassPos < pubid->string().size(); textClassPos++)
- if (pubid->string()[textClassPos] == docSyntax_->space())
- break;
- pubidText.addChars(pubid->string().data() + textClassPos,
- pubid->string().size() - textClassPos,
- pubid->text().charLocation(textClassPos));
- const MessageType1 *msg;
- externalId.setPublic(pubidText, docSd_->internalCharset(),
- docSyntax_->space(), msg);
- }
- }
- }
-#endif
- return new ExternalTextEntity(supportAtts_[rArcDocF],
- Entity::doctype,
- entity->defLocation(),
- externalId);
-}
-
-void ArcProcessor::supportAttributes(const AttributeList &atts)
-{
- static const char *const s[] = {
- "ArcFormA",
- "ArcNamrA",
- "ArcSuprA",
- "ArcIgnDA",
- "ArcDocF",
- "ArcSuprF",
- "ArcBridF",
- "ArcDataF",
- "ArcAuto",
- "ArcIndr",
- "ArcDTD",
- "ArcQuant",
- };
- for (size_t i = 0; i < SIZEOF(s); i++) {
- StringC attName(docSd_->execToInternal(s[i]));
- docSyntax_->generalSubstTable()->subst(attName);
- unsigned ind;
- if (atts.attributeIndex(attName, ind)) {
- const AttributeValue *value = atts.value(ind);
- if (value) {
- const Text *textP = value->text();
- // FIXME check for empty value
- if (textP) {
- supportAtts_[i] = textP->string();
- switch (i) {
- case rArcQuant:
- processArcQuant(*textP);
- break;
- case rArcAuto:
- docSyntax_->generalSubstTable()->subst(supportAtts_[i]);
- if (supportAtts_[i] == docSd_->execToInternal("ARCAUTO"))
- arcAuto_ = 1;
- else if (supportAtts_[i] == docSd_->execToInternal("NARCAUTO"))
- arcAuto_ = 0;
- else
- Messenger::message(ArcEngineMessages::invalidArcAuto,
- StringMessageArg(supportAtts_[i]));
- break;
- case rArcIndr:
- docSyntax_->generalSubstTable()->subst(supportAtts_[i]);
- if (supportAtts_[i] == docSd_->execToInternal("ARCINDR")) {
- Messenger::setNextLocation(textP->charLocation(0));
- Messenger::message(ArcEngineMessages::arcIndrNotSupported);
- }
- else if (supportAtts_[i] != docSd_->execToInternal("NARCINDR")) {
- Messenger::setNextLocation(textP->charLocation(0));
- Messenger::message(ArcEngineMessages::invalidArcIndr,
- StringMessageArg(supportAtts_[i]));
- }
- break;
- case rArcFormA:
- case rArcNamrA:
- case rArcSuprA:
- case rArcIgnDA:
- docSyntax_->generalSubstTable()->subst(supportAtts_[i]);
- break;
- case rArcDocF:
- case rArcSuprF:
- case rArcBridF:
- case rArcDataF:
- metaSyntax_->generalSubstTable()->subst(supportAtts_[i]);
- break;
- case rArcDTD:
- {
- const StringC &pero = docSyntax_->delimGeneral(Syntax::dPERO);
- if (supportAtts_[i].size() >= pero.size()) {
- StringC tem(supportAtts_[i].data(), pero.size());
- docSyntax_->generalSubstTable()->subst(tem);
- if (tem == pero) {
- arcDtdIsParam_ = 1;
- tem.assign(supportAtts_[i].data() + pero.size(),
- supportAtts_[i].size() - pero.size());
- tem.swap(supportAtts_[i]);
- }
- }
- docSyntax_->entitySubstTable()->subst(supportAtts_[i]);
- }
- break;
- }
- }
- }
- }
- }
- processArcOpts(atts);
-}
-
-void ArcProcessor::processArcOpts(const AttributeList &atts)
-{
- StringC attName(docSd_->execToInternal("ArcOptSA"));
- docSyntax_->generalSubstTable()->subst(attName);
- unsigned ind;
- Vector<StringC> arcOptA;
- Vector<size_t> arcOptAPos;
- const Text *arcOptAText = 0;
- if (atts.attributeIndex(attName, ind)) {
- const AttributeValue *value = atts.value(ind);
- if (value) {
- arcOptAText = value->text();
- if (arcOptAText)
- split(*arcOptAText, docSyntax_->space(), arcOptA, arcOptAPos);
- }
- }
- if (!arcOptAText)
- arcOptA.push_back(docSd_->execToInternal("ArcOpt"));
- for (size_t i = 0; i < arcOptA.size(); i++) {
- docSyntax_->generalSubstTable()->subst(arcOptA[i]);
- if (atts.attributeIndex(arcOptA[i], ind)) {
- const AttributeValue *value = atts.value(ind);
- if (value) {
- const Text *textP = value->text();
- if (textP) {
- Vector<StringC> opts;
- Vector<size_t> optsPos;
- split(*textP, docSyntax_->space(), opts, optsPos);
- arcOpts_.insert(arcOpts_.begin(),
- opts.begin(), opts.begin() + opts.size());
- }
- }
- }
- }
-}
-
-void ArcProcessor::processArcQuant(const Text &text)
-{
- Ptr<Syntax> newMetaSyntax;
- Vector<StringC> tokens;
- Vector<size_t> tokensPos;
- split(text, docSyntax_->space(), tokens, tokensPos);
- for (size_t i = 0; i < tokens.size(); i++) {
- docSyntax_->generalSubstTable()->subst(tokens[i]);
- Syntax::Quantity quantityName;
- if (!docSd_->lookupQuantityName(tokens[i], quantityName)) {
- setNextLocation(text.charLocation(tokensPos[i]));
- Messenger::message(ArcEngineMessages::invalidQuantity,
- StringMessageArg(tokens[i]));
- }
- else if (i + 1 >= tokens.size()) {
- setNextLocation(text.charLocation(tokensPos[i]));
- Messenger::message(ArcEngineMessages::missingQuantityValue,
- StringMessageArg(tokens[i]));
- }
- else {
- i++;
- unsigned long val = 0;
- if (tokens[i].size() > 8) {
- setNextLocation(text.charLocation(tokensPos[i] + 8));
- Messenger::message(ArcEngineMessages::quantityValueTooLong,
- StringMessageArg(tokens[i]));
- tokens[i].resize(8);
- }
- for (size_t j = 0; j < tokens[i].size(); j++) {
- int weight = docSd_->digitWeight(tokens[i][j]);
- if (weight < 0) {
- setNextLocation(text.charLocation(tokensPos[i] + j));
- Char c = tokens[i][j];
- Messenger::message(ArcEngineMessages::invalidDigit,
- StringMessageArg(StringC(&c, 1)));
- val = 0;
- break;
- }
- else {
- val *= 10;
- val += weight;
- }
- }
- if (val > docSyntax_->quantity(quantityName)) {
- if (newMetaSyntax.isNull())
- newMetaSyntax = new Syntax(*docSyntax_);
- newMetaSyntax->setQuantity(quantityName, val);
- }
- }
- }
- if (!newMetaSyntax.isNull())
- metaSyntax_ = newMetaSyntax;
-}
-
-Boolean ArcProcessor::processStartElement(const StartElementEvent &event,
- const AttributeList *linkAttributes,
- const Text *content,
- Allocator &alloc)
-{
- unsigned suppressFlags = (openElementFlags_.size() > 0
- ? (openElementFlags_.back() & ~isArc)
- : (unsigned)condIgnoreData);
- if ((suppressFlags & suppressForm)
- && (suppressFlags & suppressSupr)) {
- // Make this case efficient.
- openElementFlags_.push_back(suppressFlags);
- return 1;
- }
- const AttributeList &atts = event.attributes();
- const MetaMap &map = buildMetaMap(event.elementType(),
- 0,
- atts,
- linkAttributes,
- suppressFlags);
- const ElementType *metaType;
- ConstPtr<AttributeValue> arcContent;
- if (map.attributed == 0) {
- if (!(tagLevel() == 0
- && !currentElement().isFinished())) {
- if (!arcContent.isNull()
- && (currentElement().declaredEmpty()
- || !currentElement().tryTransitionPcdata()))
- Messenger::message(ArcEngineMessages::invalidArcContent);
- openElementFlags_.push_back(map.suppressFlags);
- return 1;
- }
- metaType = metaDtd_->documentElementType();
- mgr_->message(ArcEngineMessages::documentElementNotArc,
- StringMessageArg(metaType->name()));
- attributeList_.init(metaType->attributeDef());
- attributeList_.finish(*this);
- }
- else {
- if (!mapAttributes(atts, linkAttributes, content, attributeList_,
- arcContent, map))
- return 0;
- metaType = (const ElementType *)map.attributed;
- suppressFlags = map.suppressFlags;
- }
- StartElementEvent *genEvent
- = new (alloc) StartElementEvent(metaType,
- metaDtd_,
- &attributeList_,
- event.location(),
- 0);
- if (metaType->definition()->undefined())
- Messenger::message(ArcEngineMessages::undefinedElement,
- StringMessageArg(metaType->name()));
- else if (elementIsExcluded(metaType))
- Messenger::message(ArcEngineMessages::elementExcluded,
- StringMessageArg(metaType->name()));
- else if (elementIsIncluded(metaType))
- genEvent->setIncluded();
- else if (!currentElement().tryTransition(metaType))
- Messenger::message(ArcEngineMessages::invalidElement,
- StringMessageArg(metaType->name()));
-
- pushElement(new (alloc) OpenElement(metaType,
- 0,
- genEvent->included(),
- 0,
- event.location()));
- docHandler_->startElement(genEvent);
- if (attributeList_.conref())
- currentElement().setConref();
- if (!arcContent.isNull() && arcContent->text() != 0) {
- if (currentElement().declaredEmpty()
- || !currentElement().tryTransitionPcdata())
- Messenger::message(ArcEngineMessages::invalidArcContent);
- else
- emitArcContent(*arcContent->text(), docHandler(), alloc);
- suppressFlags |= (suppressForm|suppressSupr|ignoreData);
- }
- suppressFlags &= ~recoverData;
- openElementFlags_.push_back(suppressFlags | isArc);
- return 1;
-}
-
-void ArcProcessor::emitArcContent(const Text &text,
- EventHandler &handler,
- Allocator &alloc)
-{
- TextIter iter(text);
- TextItem::Type type;
- const Char *s;
- size_t n;
- const Location *loc;
- while (iter.next(type, s, n, loc))
- switch (type) {
- case TextItem::data:
- case TextItem::cdata:
- // +1 because first dataEvent is the non-architectural data.
- if (type == TextItem::data)
- handler.data(new (alloc) ImmediateDataEvent(Event::characterData,
- s,
- n,
- *loc,
- 0));
- else
-
- handler.data(new (alloc)
- CdataEntityEvent(loc->origin()->asEntityOrigin()
- ->entity()->asInternalEntity(),
- loc->origin()));
- break;
- case TextItem::sdata:
-
- handler.sdataEntity(new (alloc)
- SdataEntityEvent(loc->origin()->asEntityOrigin()
- ->entity()->asInternalEntity(),
- loc->origin()));
- break;
- default:
- break;
- }
-}
-
-Boolean ArcProcessor::processData()
-{
- if (openElementFlags_.size() > 0
- && (openElementFlags_.back() & ignoreData))
- return 0;
- if (!currentElement().declaredEmpty()
- && currentElement().tryTransitionPcdata())
- return 1;
- else if (openElementFlags_.size() > 0
- && (openElementFlags_.back() & condIgnoreData))
- return 0;
- else {
- // Only give this error once per element
- if (openElementFlags_.size() > 0) {
- if (openElementFlags_.back() & recoverData)
- return 1;
- openElementFlags_.back() |= recoverData;
- }
- Messenger::message(ArcEngineMessages::invalidData);
- return 1;
- }
-}
-
-Boolean ArcProcessor::mapAttributes(const AttributeList &from,
- const AttributeList *fromLink,
- const Text *content,
- AttributeList &to,
- ConstPtr<AttributeValue> &arcContent,
- const MetaMap &map)
-{
- if (map.attributed)
- to.init(map.attributed->attributeDef());
- for (size_t i = 0; i < map.attMapFrom.size(); i++) {
- unsigned fromIndex = map.attMapFrom[i];
- const AttributeList *fromList = &from;
- if (fromIndex != contentPseudoAtt && fromIndex >= fromList->size()) {
- fromList = fromLink;
- fromIndex -= from.size();
- }
- if (map.attMapTo[i] == contentPseudoAtt) {
- if (fromIndex != contentPseudoAtt)
- arcContent = fromList->valuePointer(fromIndex);
- }
- else {
- const Text *fromText = 0;
- Boolean fromTextTokenized = 0;
- if (map.attMapFrom[i] == contentPseudoAtt) {
- if (!content)
- return 0;
- fromText = content;
- }
- else {
- const AttributeValue *value = fromList->value(fromIndex);
- if (value) {
- fromText = value->text();
- fromTextTokenized = fromList->tokenized(fromIndex);
- if (fromText
- && fromList == &from
- && !from.specified(fromIndex)
- && (map.attributed->attributeDef()->def(map.attMapTo[i])
- ->missingValueWouldMatch(*fromText, *this)))
- fromText = 0;
- }
- }
- if (fromText) {
- unsigned specLength = 0;
- Text tem;
- if (!fromTextTokenized && to.tokenized(map.attMapTo[i]))
- fromText->tokenize(docSyntax_->space(), tem);
- else
- tem = *fromText;
- to.setSpec(map.attMapTo[i], *this);
- to.setValue(map.attMapTo[i], tem, *this, specLength);
- }
- }
- }
- if (map.attributed)
- to.finish(*this);
- return 1;
-}
-
-const ArcProcessor::MetaMap &
-ArcProcessor::buildMetaMap(const ElementType *docElementType,
- const Notation *notation,
- const AttributeList &atts,
- const AttributeList *linkAtts,
- unsigned suppressFlags)
-{
- Boolean isNotation;
- const Attributed *attributed = docElementType;
- const StringC *nameP;
- if (!attributed) {
- attributed = notation;
- isNotation = 1;
- nameP = &notation->name();
- }
- else {
- isNotation = 0;
- nameP = &docElementType->name();
- }
- // Try to use cached entry.
- Boolean inhibitCache = 0;
- size_t cacheIndex;
- if (isNotation || docElementType->definition()->undefined()) {
- inhibitCache = 1;
- cacheIndex = (unsigned)-1;
- }
- else {
- cacheIndex = docElementType->index();
- const MetaMapCache *cache = metaMapCache_[cacheIndex].pointer();
- if (cache
- && cache->suppressFlags == suppressFlags
- && cache->linkAtts == linkAtts) {
- for (int i = 0;; i++) {
- if (i == MetaMapCache::nNoSpec)
- return cache->map;
- unsigned attIndex = cache->noSpec[i];
- if (attIndex != invalidAtt && atts.specified(attIndex))
- break;
- }
- }
- }
- // no valid cached MetaMap
- // Handle suppression.
- unsigned oldSuppressFlags = suppressFlags;
- unsigned newSuppressFlags = suppressFlags;
- unsigned arcSuprIndex;
- if (!isNotation)
- considerSupr(atts, linkAtts, suppressFlags, newSuppressFlags, inhibitCache,
- arcSuprIndex);
- else
- arcSuprIndex = invalidAtt;
- // Handle ArcIgnD
- unsigned arcIgnDIndex;
- if (!isNotation)
- considerIgnD(atts, linkAtts, suppressFlags, newSuppressFlags, inhibitCache,
- arcIgnDIndex);
- else
- arcIgnDIndex = invalidAtt;
- // Handle ArcForm.
- unsigned arcFormIndex;
- const Attributed *metaAttributed
- = considerForm(atts, linkAtts, *nameP, isNotation,
- suppressFlags, newSuppressFlags,
- inhibitCache, arcFormIndex);
- // See if there's a renamer that will inhibit cacheing.
-#pragma "%Z%%M% %I% %E% SMI"
- unsigned arcNamerIndex;
- const Text *namerText;
- if (metaAttributed)
- namerText = considerNamer(atts, inhibitCache, arcNamerIndex);
- else {
- arcNamerIndex = invalidAtt;
- namerText = 0;
- }
- MetaMap *mapP;
- if (inhibitCache) {
- noCacheMetaMap_.clear();
- mapP = &noCacheMetaMap_;
- }
- else {
- MetaMapCache *cache = metaMapCache_[cacheIndex].pointer();
- if (cache)
- cache->clear();
- else {
- cache = new MetaMapCache;
- metaMapCache_[cacheIndex] = cache;
- }
- cache->noSpec[0] = arcFormIndex;
- cache->noSpec[1] = arcNamerIndex;
- cache->noSpec[2] = arcSuprIndex;
- cache->noSpec[3] = arcIgnDIndex;
- cache->suppressFlags = oldSuppressFlags;
- cache->linkAtts = linkAtts;
- mapP = &cache->map;
- }
- mapP->attributed = metaAttributed;
- mapP->suppressFlags = newSuppressFlags;
- // Build the attribute map.
- if (metaAttributed) {
- Vector<PackedBoolean> renamed;
- ConstPtr<AttributeDefinitionList> metaAttDef
- = metaAttributed->attributeDef();
- if (!metaAttDef.isNull())
- renamed.assign(metaAttDef->size(), PackedBoolean(0));
- if (linkAtts) {
- Boolean specified;
- unsigned index;
- const Text *linkNamerText = considerNamer(*linkAtts, specified, index);
- if (linkNamerText)
- buildAttributeMapRename(*mapP, *linkNamerText, atts, linkAtts, renamed);
- }
- if (namerText)
- buildAttributeMapRename(*mapP, *namerText, atts, 0, renamed);
- buildAttributeMapRest(*mapP, atts, linkAtts, renamed);
- }
- return *mapP;
-}
-
-void ArcProcessor::considerSupr(const AttributeList &atts,
- const AttributeList *linkAtts,
- unsigned &thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &arcSuprIndex)
-{
- arcSuprIndex = invalidAtt;
- if (thisSuppressFlags & suppressSupr)
- return;
- if (!supportAtts_[rArcSuprA].size())
- return;
- const AttributeValue *val;
- unsigned tem;
- if (linkAtts && linkAtts->attributeIndex(supportAtts_[rArcSuprA], tem))
- val = linkAtts->value(tem);
- else if (atts.attributeIndex(supportAtts_[rArcSuprA], arcSuprIndex)) {
- if (atts.current(arcSuprIndex) || atts.specified(arcSuprIndex))
- inhibitCache = 1;
- val = atts.value(arcSuprIndex);
- }
- else
- return;
- if (!val)
- return;
- const Text *textP = val->text();
- if (!textP)
- return;
- StringC token = textP->string();
- // FIXME trim spaces
- docSyntax_->generalSubstTable()->subst(token);
- // sArcForm suppress processing for all elements except
- // those that have a non-implied ArcSupr attribute.
- thisSuppressFlags &= ~suppressForm;
- newSuppressFlags &= ~(suppressForm|suppressSupr);
- if (matchName(token, "sArcForm"))
- newSuppressFlags |= suppressForm;
-#if 0
- // I don't think this is useful
- else if (matchName(token, "sArcSupr"))
- newSuppressFlags |= suppressSupr;
-#endif
- else if (matchName(token, "sArcAll"))
- newSuppressFlags |= (suppressSupr|suppressForm);
- else if (!matchName(token, "sArcNone")) {
- Messenger::setNextLocation(textP->charLocation(0));
- Messenger::message(ArcEngineMessages::invalidSuppress,
- StringMessageArg(token));
- }
-}
-
-void ArcProcessor::considerIgnD(const AttributeList &atts,
- const AttributeList *linkAtts,
- unsigned thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &arcIgnDIndex)
-{
- arcIgnDIndex = invalidAtt;
- if (thisSuppressFlags & suppressSupr)
- return;
- if (!supportAtts_[rArcIgnDA].size())
- return;
- const AttributeValue *val;
- unsigned tem;
- if (linkAtts && linkAtts->attributeIndex(supportAtts_[rArcIgnDA], tem))
- val = linkAtts->value(tem);
- else if (atts.attributeIndex(supportAtts_[rArcIgnDA], arcIgnDIndex)) {
- if (atts.current(arcIgnDIndex) || atts.specified(arcIgnDIndex))
- inhibitCache = 1;
- val = atts.value(arcIgnDIndex);
- }
- else
- return;
- if (!val)
- return;
- const Text *textP = val->text();
- if (!textP)
- return;
- StringC token = textP->string();
- // FIXME trim spaces
- docSyntax_->generalSubstTable()->subst(token);
- newSuppressFlags &= ~(ignoreData|condIgnoreData);
- if (matchName(token, "ArcIgnD"))
- newSuppressFlags |= ignoreData;
- else if (matchName(token, "cArcIgnD"))
- newSuppressFlags |= condIgnoreData;
- else if (!matchName(token, "nArcIgnD")) {
- Messenger::setNextLocation(textP->charLocation(0));
- Messenger::message(ArcEngineMessages::invalidIgnD,
- StringMessageArg(token));
- }
-}
-
-const Attributed *
-ArcProcessor::considerForm(const AttributeList &atts,
- const AttributeList *linkAtts,
- const StringC &name,
- Boolean isNotation,
- unsigned thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &arcFormIndex)
-{
- arcFormIndex = invalidAtt;
- if ((thisSuppressFlags & suppressForm)
- && (supportAtts_[rArcSuprF].size() == 0
- || (thisSuppressFlags & suppressSupr)
- || isNotation))
- return 0;
- unsigned tem;
- const AttributeValue *val;
- if (linkAtts && linkAtts->attributeIndex(supportAtts_[rArcFormA], tem))
- val = linkAtts->value(tem);
- else if (atts.attributeIndex(supportAtts_[rArcFormA], arcFormIndex)) {
- if (atts.current(arcFormIndex) || atts.specified(arcFormIndex))
- inhibitCache = 1;
- val = atts.value(arcFormIndex);
- }
- else
- return autoForm(atts, name, isNotation,
- thisSuppressFlags, newSuppressFlags,
- inhibitCache, arcFormIndex);
-
- if (!val)
- return 0;
- const Text *textP = val->text();
- if (!textP)
- return 0;
- StringC metaName;
- metaName = textP->string();
- // FIXME should trim leading and trailing spaces
- metaSyntax_->generalSubstTable()->subst(metaName);
- if (!isNotation) {
- const Attributed *metaAttributed = metaDtd_->lookupElementType(metaName);
- if (!metaAttributed) // CONSTDTD
- metaAttributed = lookupCreateUndefinedElement(metaName, Location(), *metaDtd_);
- if (metaName == supportAtts_[rArcSuprF]) {
- newSuppressFlags |= suppressForm;
- return metaAttributed;
- }
- if (thisSuppressFlags & suppressForm)
- return 0;
- return metaAttributed;
- }
- else
- return metaDtd_->lookupNotation(metaName).pointer();
-}
-
-const Attributed *
-ArcProcessor::autoForm(const AttributeList &atts,
- const StringC &name,
- Boolean isNotation,
- unsigned thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &idIndex)
-{
- if (!isNotation) {
- const Attributed *metaAttributed;
- if (openElementFlags_.size() == 0) {
- metaAttributed = metaDtd_->documentElementType();
- inhibitCache = 1;
- }
- else {
- metaAttributed = 0;
- if (arcAuto_)
- metaAttributed = metaDtd_->lookupElementType(name);
- if (!metaAttributed
- && supportAtts_[rArcBridF].size() > 0
- && atts.idIndex(idIndex)
- && atts.specified(idIndex)) {
- inhibitCache = 1;
- metaAttributed
- = metaDtd_->lookupElementType(supportAtts_[rArcBridF]);
- }
- }
- if (metaAttributed
- && name == supportAtts_[rArcSuprF]) {
- newSuppressFlags = suppressForm|ignoreData;
- }
- else if (thisSuppressFlags & suppressForm)
- return 0;
- return metaAttributed;
- }
- else if (thisSuppressFlags & suppressForm)
- return 0;
- else {
- const Attributed *metaAttributed = 0;
- if (arcAuto_)
- metaAttributed = metaDtd_->lookupNotation(name).pointer();
- if (!metaAttributed && supportAtts_[rArcDataF].size() > 0)
- metaAttributed
- = metaDtd_->lookupNotation(supportAtts_[rArcDataF]).pointer();
- return metaAttributed;
- }
-}
-
-
-const Text *
-ArcProcessor::considerNamer(const AttributeList &atts,
- Boolean &inhibitCache,
- unsigned &arcNamerIndex)
-{
- arcNamerIndex = invalidAtt;
- if (supportAtts_[rArcNamrA].size() == 0
- || !atts.attributeIndex(supportAtts_[rArcNamrA], arcNamerIndex))
- return 0;
- if (atts.current(arcNamerIndex) || atts.specified(arcNamerIndex))
- inhibitCache = 1;
- const AttributeValue *val = atts.value(arcNamerIndex);
- if (!val)
- return 0;
- return val->text();
-}
-
-void ArcProcessor::buildAttributeMapRename(MetaMap &map,
- const Text &rename,
- const AttributeList &atts,
- const AttributeList *linkAtts,
- Vector<PackedBoolean> &attRenamed)
-{
- Vector<StringC> tokens;
- Vector<size_t> tokensPos;
- split(rename, docSyntax_->space(), tokens, tokensPos);
- ConstPtr<AttributeDefinitionList> metaAttDef;
- if (map.attributed)
- metaAttDef = map.attributed->attributeDef();
- // FIXME Should check that ARCCONT doesn't appear more than once.
- for (size_t i = 0; i < tokens.size(); i += 2) {
- unsigned fromIndex = invalidAtt;
- unsigned toIndex = invalidAtt;
- metaSyntax_->generalSubstTable()->subst(tokens[i]);
- if (tokens[i] == rniArcCont_)
- toIndex = contentPseudoAtt;
- else if (metaAttDef.isNull()
- || !metaAttDef->attributeIndex(tokens[i], toIndex)) {
- setNextLocation(rename.charLocation(tokensPos[i]));
- Messenger::message(ArcEngineMessages::renameToInvalid,
- StringMessageArg(tokens[i]));
- }
- else if (attRenamed[toIndex]) {
- toIndex = invalidAtt;
- setNextLocation(rename.charLocation(tokensPos[i]));
- Messenger::message(ArcEngineMessages::renameToDuplicate,
- StringMessageArg(tokens[i]));
- }
- if (i + 1 >= tokens.size()) {
- setNextLocation(rename.charLocation(tokensPos[i]));
- Messenger::message(ArcEngineMessages::renameMissingAttName);
- }
- else {
- docSyntax_->generalSubstTable()->subst(tokens[i + 1]);
- if (tokens[i + 1] == rniContent_) {
- fromIndex = contentPseudoAtt;
- }
- else if (tokens[i + 1] == rniDefault_) {
- if (toIndex != contentPseudoAtt)
- attRenamed[toIndex] = 1;
- }
- else if (linkAtts
- && linkAtts->attributeIndex(tokens[i + 1], fromIndex))
- fromIndex += atts.size();
- else if (!atts.attributeIndex(tokens[i + 1], fromIndex)) {
- setNextLocation(rename.charLocation(tokensPos[i + 1]));
- Messenger::message(ArcEngineMessages::renameFromInvalid,
- StringMessageArg(tokens[i + 1]));
- }
- }
- if (fromIndex != invalidAtt && toIndex != invalidAtt) {
- map.attMapFrom.push_back(fromIndex);
- map.attMapTo.push_back(toIndex);
- if (toIndex != contentPseudoAtt) {
- attRenamed[toIndex] = 1;
- if (metaAttDef->def(toIndex)->isId()
- && (fromIndex >= atts.size() || !atts.id(fromIndex)))
- Messenger::message(ArcEngineMessages::idMismatch,
- StringMessageArg(metaAttDef->def(toIndex)
- ->name()));
- }
- }
- }
-}
-
-void ArcProcessor::buildAttributeMapRest(MetaMap &map,
- const AttributeList &atts,
- const AttributeList *linkAtts,
- const Vector<PackedBoolean> &attRenamed)
-{
- ConstPtr<AttributeDefinitionList> metaAttDef
- = map.attributed->attributeDef();
- if (metaAttDef.isNull())
- return;
- for (unsigned i = 0; i < metaAttDef->size(); i++)
- if (!attRenamed[i]) {
- unsigned fromIndex;
- if (metaAttDef->def(i)->isId()) {
- for (unsigned j = 0; j < atts.size(); j++)
- if (atts.id(j)) {
- map.attMapFrom.push_back(j);
- map.attMapTo.push_back(i);
- break;
- }
- }
- else if (linkAtts && linkAtts->attributeIndex(metaAttDef->def(i)->name(),
- fromIndex)) {
- map.attMapFrom.push_back(fromIndex + atts.size());
- map.attMapTo.push_back(i);
- }
- else if (atts.attributeIndex(metaAttDef->def(i)->name(), fromIndex)) {
- map.attMapFrom.push_back(fromIndex);
- map.attMapTo.push_back(i);
- }
- }
-}
-
-Boolean ArcProcessor::matchName(const StringC &name, const char *key)
-{
- if (name.size() != strlen(key))
- return 0;
- StringC tem(docSd_->execToInternal(key));
- docSyntax_->generalSubstTable()->subst(tem);
- return name == tem;
-}
-
-void ArcProcessor::split(const Text &text,
- Char space,
- Vector<StringC> &tokens,
- Vector<size_t> &tokensPos)
-{
- const StringC &str = text.string();
- for (size_t i = 0;;) {
- for (; i < str.size() && str[i] == space; i++)
- ;
- if (i >= str.size())
- break;
- size_t start = i;
- for (; i < str.size() && str[i] != space; i++)
- ;
- tokens.push_back(StringC(str.data() + start, i - start));
- tokensPos.push_back(start);
- }
-}
-
-void ArcProcessor::processEndElement(const EndElementEvent &event,
- Allocator &alloc)
-{
- Boolean wasArc = (openElementFlags_.back() & isArc);
- openElementFlags_.resize(openElementFlags_.size() - 1);
- if (wasArc) {
- EndElementEvent *genEvent
- = new (alloc) EndElementEvent(currentElement().type(),
- metaDtd_,
- event.location(),
- 0);
- if (currentElement().included())
- genEvent->setIncluded();
- docHandler_->endElement(genEvent);
- if (!currentElement().isFinished())
- Messenger::message(ArcEngineMessages::unfinishedElement,
- StringMessageArg(currentElement().type()->name()));
- popElement();
- }
-}
-
-void ArcProcessor::dispatchMessage(Message &msg)
-{
- mgr_->dispatchMessage(msg);
-}
-
-void ArcProcessor::dispatchMessage(const Message &msg)
-{
- mgr_->dispatchMessage(msg);
-}
-
-void ArcProcessor::initMessage(Message &msg)
-{
- mgr_->initMessage(msg);
- if (valid_) {
- StringC rniPcdata = metaSyntax_->delimGeneral(Syntax::dRNI);
- rniPcdata += metaSyntax_->reservedName(Syntax::rPCDATA);
- getOpenElementInfo(msg.openElementInfo, rniPcdata);
- }
-}
-
-ArcProcessor::MetaMapCache::MetaMapCache()
-{
- for (int i = 0; i < nNoSpec; i++)
- noSpec[i] = invalidAtt;
- linkAtts = 0;
-}
-
-void ArcProcessor::MetaMapCache::clear()
-{
- for (int i = 0; i < nNoSpec; i++)
- noSpec[i] = invalidAtt;
- linkAtts = 0;
- map.clear();
-}
-
-ArcProcessor::MetaMap::MetaMap()
-: attributed(0)
-{
-}
-
-void ArcProcessor::MetaMap::clear()
-{
- attMapFrom.clear();
- attMapTo.clear();
- attributed = 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngineMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngineMessages.h
deleted file mode 100644
index 7888580b6f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcEngineMessages.h
+++ /dev/null
@@ -1,418 +0,0 @@
-// This file was automatically generated from lib\ArcEngineMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct ArcEngineMessages {
- // 3000
- static const MessageType1 arcGenerateSystemId;
- // 3001
- static const MessageType1 undefinedElement;
- // 3002
- static const MessageType1 elementExcluded;
- // 3003
- static const MessageType1 invalidElement;
- // 3004
- static const MessageType1 documentElementNotArc;
- // 3005
- static const MessageType1 unfinishedElement;
- // 3006
- static const MessageType0 renameMissingAttName;
- // 3007
- static const MessageType1 renameToInvalid;
- // 3008
- static const MessageType1 renameToDuplicate;
- // 3009
- static const MessageType1 renameFromInvalid;
- // 3010
- static const MessageType1 missingId;
- // 3011
- static const MessageType0 invalidArcContent;
- // 3012
- static const MessageType1 invalidSuppress;
- // 3013
- static const MessageType1 arcDtdNotDeclaredParameter;
- // 3014
- static const MessageType1 arcDtdNotDeclaredGeneral;
- // 3015
- static const MessageType1 arcDtdNotExternal;
- // 3016
- static const MessageType0 noArcDTDAtt;
- // 3017
- static const MessageType1 noArcDataF;
- // 3018
- static const MessageType1 idMismatch;
- // 3019
- static const MessageType1 invalidArcAuto;
- // 3020
- static const MessageType1 noArcNotation;
- // 3021
- static const MessageType0 invalidData;
- // 3022
- static const MessageType1 invalidIgnD;
- // 3023
- static const MessageType1 invalidArcIndr;
- // 3024
- static const MessageType1 invalidQuantity;
- // 3025
- static const MessageType1 missingQuantityValue;
- // 3026
- static const MessageType1 quantityValueTooLong;
- // 3027
- static const MessageType1 invalidDigit;
- // 3028
- static const MessageType0 arcIndrNotSupported;
-};
-const MessageType1 ArcEngineMessages::arcGenerateSystemId(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3000
-#ifndef SP_NO_MESSAGE_TEXT
-,"no system identifier could be generated for meta-DTD for architecture %1"
-#endif
-);
-const MessageType1 ArcEngineMessages::undefinedElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3001
-#ifndef SP_NO_MESSAGE_TEXT
-,"element type %1 not defined in meta-DTD"
-#endif
-);
-const MessageType1 ArcEngineMessages::elementExcluded(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3002
-#ifndef SP_NO_MESSAGE_TEXT
-,"element %1 invalid in meta-DTD because excluded"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3003
-#ifndef SP_NO_MESSAGE_TEXT
-,"meta-DTD does not allow element %1 at this point"
-#endif
-);
-const MessageType1 ArcEngineMessages::documentElementNotArc(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3004
-#ifndef SP_NO_MESSAGE_TEXT
-,"document element must be instance of %1 element type form"
-#endif
-);
-const MessageType1 ArcEngineMessages::unfinishedElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3005
-#ifndef SP_NO_MESSAGE_TEXT
-,"element %1 unfinished in meta-DTD"
-#endif
-);
-const MessageType0 ArcEngineMessages::renameMissingAttName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3006
-#ifndef SP_NO_MESSAGE_TEXT
-,"missing substitute name"
-#endif
-);
-const MessageType1 ArcEngineMessages::renameToInvalid(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3007
-#ifndef SP_NO_MESSAGE_TEXT
-,"substitute for non-existent architecture attribute %1"
-#endif
-);
-const MessageType1 ArcEngineMessages::renameToDuplicate(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3008
-#ifndef SP_NO_MESSAGE_TEXT
-,"substitute name for %1 already defined"
-#endif
-);
-const MessageType1 ArcEngineMessages::renameFromInvalid(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3009
-#ifndef SP_NO_MESSAGE_TEXT
-,"substitute name %1 is not the name of an attribute"
-#endif
-);
-const MessageType1 ArcEngineMessages::missingId(
-MessageType::idrefError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3010
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference in architecture to non-existent ID %1"
-#endif
-);
-const MessageType0 ArcEngineMessages::invalidArcContent(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3011
-#ifndef SP_NO_MESSAGE_TEXT
-,"architectural content specified with #ARCCONT not allowed by meta-DTD"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidSuppress(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3012
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid value %1 for ArcSupr attribute"
-#endif
-);
-const MessageType1 ArcEngineMessages::arcDtdNotDeclaredParameter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3013
-#ifndef SP_NO_MESSAGE_TEXT
-,"no declaration for meta-DTD parameter entity %1"
-#endif
-);
-const MessageType1 ArcEngineMessages::arcDtdNotDeclaredGeneral(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3014
-#ifndef SP_NO_MESSAGE_TEXT
-,"no declaration for meta-DTD general entity %1"
-#endif
-);
-const MessageType1 ArcEngineMessages::arcDtdNotExternal(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3015
-#ifndef SP_NO_MESSAGE_TEXT
-,"meta-DTD entity %1 must be external"
-#endif
-);
-const MessageType0 ArcEngineMessages::noArcDTDAtt(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3016
-#ifndef SP_NO_MESSAGE_TEXT
-,"no ArcDTD architecture support attribute specified"
-#endif
-);
-const MessageType1 ArcEngineMessages::noArcDataF(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3017
-#ifndef SP_NO_MESSAGE_TEXT
-,"ArcDataF notation %1 not defined in meta-DTD"
-#endif
-);
-const MessageType1 ArcEngineMessages::idMismatch(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3018
-#ifndef SP_NO_MESSAGE_TEXT
-,"ID attribute %1 in meta-DTD not declared as ID in DTD"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidArcAuto(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3019
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid value %1 for ArcAuto architectural support attribute"
-#endif
-);
-const MessageType1 ArcEngineMessages::noArcNotation(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3020
-#ifndef SP_NO_MESSAGE_TEXT
-,"no notation declaration for architecture %1"
-#endif
-);
-const MessageType0 ArcEngineMessages::invalidData(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3021
-#ifndef SP_NO_MESSAGE_TEXT
-,"meta-DTD does not allow data at this point"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidIgnD(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3022
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid value %1 for ArcIgnD attribute"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidArcIndr(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3023
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid value %1 for ArcIndr architectural support attribute"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidQuantity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3024
-#ifndef SP_NO_MESSAGE_TEXT
-,"unrecognized quantity name %1"
-#endif
-);
-const MessageType1 ArcEngineMessages::missingQuantityValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3025
-#ifndef SP_NO_MESSAGE_TEXT
-,"no value specified for quantity %1"
-#endif
-);
-const MessageType1 ArcEngineMessages::quantityValueTooLong(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3026
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of value %1 for quantity is too long"
-#endif
-);
-const MessageType1 ArcEngineMessages::invalidDigit(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3027
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid digit %1"
-#endif
-);
-const MessageType0 ArcEngineMessages::arcIndrNotSupported(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3028
-#ifndef SP_NO_MESSAGE_TEXT
-,"only value of nArcIndr for ArcIndr attribute supported"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcProcessor.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcProcessor.h
deleted file mode 100644
index 12ef6d0257..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ArcProcessor.h
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ArcProcessor_INCLUDED
-#define ArcProcessor_INCLUDED 1
-
-#include "Event.h"
-#include "ContentState.h"
-#include "Id.h"
-#include "NamedTable.h"
-#include "Vector.h"
-#include "ArcEngine.h"
-#include "SgmlParser.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Allocator;
-
-// Processor for a single architecture
-
-class ArcProcessor : private ContentState, private AttributeContext {
-public:
- struct MetaMap {
- MetaMap();
- void clear();
- const Attributed *attributed;
- unsigned suppressFlags;
- // #ARCCONT and #CONTENT are handled with a special index
- // list of indexes into element's attlist of architectural attributes
- Vector<unsigned> attMapFrom;
- // corresponding list of indexes in form's attlist
- Vector<unsigned> attMapTo;
- };
- struct MetaMapCache {
- MetaMapCache();
- void clear();
- MetaMap map;
- enum { nNoSpec = 4 };
- // Prerequisites for this cached entry to be valid.
- // The cache is only valid if for each member of noSpec != -1
- // the attribute with that index was not specified (or current)
- unsigned noSpec[nNoSpec];
- unsigned suppressFlags;
- const AttributeList *linkAtts;
- };
- ArcProcessor();
- void setName(const StringC &);
- void init(const EndPrologEvent &,
- const ConstPtr<Sd> &,
- const ConstPtr<Syntax> &,
- const SgmlParser *parser,
- Messenger *,
- const Vector<StringC> &superName,
- ArcDirector &director,
- const volatile sig_atomic_t *cancelPtr);
- // Return 0 if the content is needed, but wasn't supplied
- Boolean processStartElement(const StartElementEvent &,
- const AttributeList *linkAttributes,
- const Text *content,
- Allocator &);
- void processEndElement(const EndElementEvent &,
- Allocator &);
- // Return true if its architectural.
- Boolean processData();
- ConstPtr<Dtd> dtdPointer() const { return metaDtd_; }
- Boolean valid() const { return valid_; }
- void checkIdrefs();
- const StringC &name() const { return name_; }
- EventHandler &docHandler() const { return *docHandler_; }
-private:
- ArcProcessor(const ArcProcessor &); // undefined
- void operator=(const ArcProcessor &); // undefined
- const Syntax &attributeSyntax() const;
- ConstPtr<Notation> getAttributeNotation(const StringC &,
- const Location &);
- ConstPtr<Entity> getAttributeEntity(const StringC &,
- const Location &);
- void noteCurrentAttribute(size_t, AttributeValue *);
- ConstPtr<AttributeValue> getCurrentAttribute(size_t) const;
- Boolean defineId(const StringC &, const Location &, Location &);
- void noteIdref(const StringC &, const Location &);
- Id *lookupCreateId(const StringC &);
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &);
- void initMessage(Message &);
- const MetaMap &buildMetaMap(const ElementType *,
- const Notation *,
- const AttributeList &,
- const AttributeList *linkAtts,
- unsigned suppressFlags);
- void considerSupr(const AttributeList &atts,
- const AttributeList *linkAtts,
- unsigned &thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &arcSuprIndex);
- void considerIgnD(const AttributeList &atts,
- const AttributeList *linkAtts,
- unsigned thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &arcSuprIndex);
- const Attributed *considerForm(const AttributeList &atts,
- const AttributeList *linkAtts,
- const StringC &name,
- Boolean isNotation,
- unsigned thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &arcFormIndex);
- const Attributed *autoForm(const AttributeList &atts,
- const StringC &name,
- Boolean isNotation,
- unsigned thisSuppressFlags,
- unsigned &newSuppressFlags,
- Boolean &inhibitCache,
- unsigned &idIndex);
- const Text *considerNamer(const AttributeList &atts,
- Boolean &inhibitCache,
- unsigned &arcNamerIndex);
- void buildAttributeMapRename(MetaMap &map,
- const Text &rename,
- const AttributeList &atts,
- const AttributeList *linkAtts,
- Vector<PackedBoolean> &attRenamed);
- void buildAttributeMapRest(MetaMap &map,
- const AttributeList &atts,
- const AttributeList *linkAtts,
- const Vector<PackedBoolean> &attRenamed);
- Boolean matchName(const StringC &name, const char *key);
- void split(const Text &text,
- Char space,
- Vector<StringC> &tokens,
- Vector<size_t> &tokenPos);
- Boolean mapAttributes(const AttributeList &from,
- const AttributeList *fromLink,
- const Text *content,
- AttributeList &to,
- ConstPtr<AttributeValue> &arcContent,
- const MetaMap &map);
- void supportAttributes(const AttributeList &);
- void processArcOpts(const AttributeList &atts);
- void processArcQuant(const Text &);
- ConstPtr<Entity> makeDtdEntity(const Notation *);
- void mungeMetaDtd(Dtd &metaDtd, const Dtd &docDtd);
- Boolean mungeDataEntity(ExternalDataEntity &entity);
- void emitArcContent(const Text &text,
- EventHandler &handler,
- Allocator &allocator);
-
- Boolean valid_;
- StringC name_;
- Messenger *mgr_;
- ConstPtr<Dtd> docDtd_;
- Ptr<Dtd> metaDtd_;
- ConstPtr<Syntax> docSyntax_;
- ConstPtr<Syntax> metaSyntax_;
- ConstPtr<Sd> docSd_;
- enum ReservedName {
- rArcFormA,
- rArcNamrA,
- rArcSuprA,
- rArcIgnDA,
- rArcDocF,
- rArcSuprF,
- rArcBridF,
- rArcDataF,
- rArcAuto,
- rArcIndr,
- rArcDTD,
- rArcQuant
- };
- enum { nReserve = rArcQuant + 1 };
- StringC supportAtts_[nReserve];
- Boolean arcDtdIsParam_;
- Boolean arcAuto_;
- Vector<StringC> arcOpts_;
- StringC rniContent_;
- StringC rniArcCont_;
- StringC rniDefault_;
- enum {
- isArc = 01,
- suppressForm = 02,
- suppressSupr = 04,
- ignoreData = 010,
- condIgnoreData = 020,
- // recovering from invalid data
- recoverData = 040
- };
- Vector<unsigned> openElementFlags_;
- AttributeList attributeList_;
- NCVector<Owner<MetaMapCache> > metaMapCache_;
- MetaMap noCacheMetaMap_;
- NamedTable<Id> idTable_;
- Vector<ConstPtr<AttributeValue> > currentAttributes_;
- ConstPtr<Notation> defaultNotation_;
- Boolean errorIdref_;
- ArcDirector *director_;
- EventHandler *docHandler_;
- Owner<EventHandler> ownEventHandler_;
- size_t docIndex_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ArcProcessor_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Attribute.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Attribute.cxx
deleted file mode 100644
index 6e386db699..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Attribute.cxx
+++ /dev/null
@@ -1,1366 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Attribute.h"
-#include "MessageArg.h"
-#include "macros.h"
-#include "ParserMessages.h"
-#include "StringVectorMessageArg.h"
-#include "Syntax.h"
-#include "Entity.h"
-#include "Notation.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-DeclaredValue::DeclaredValue()
-{
-}
-
-DeclaredValue::~DeclaredValue()
-{
-}
-
-AttributeValue *DeclaredValue::makeValueFromToken(Text &text,
- AttributeContext &context,
- const StringC &name,
- unsigned &specLength) const
-{
- return makeValue(text, context, name, specLength);
-}
-
-AttributeSemantics *DeclaredValue::makeSemantics(const TokenizedAttributeValue &,
- AttributeContext &,
- const StringC &,
- unsigned &,
- unsigned &) const
-{
- return 0;
-}
-
-Boolean DeclaredValue::containsToken(const StringC &) const
-{
- return 0;
-}
-
-Boolean DeclaredValue::isNotation() const
-{
- return 0;
-}
-
-Boolean DeclaredValue::isEntity() const
-{
- return 0;
-}
-
-Boolean DeclaredValue::isId() const
-{
- return 0;
-}
-
-Boolean DeclaredValue::isIdref() const
-{
- return 0;
-}
-
-const Vector<StringC> *DeclaredValue::getTokens() const
-{
- return 0;
-}
-
-
-CdataDeclaredValue::CdataDeclaredValue()
-{
-}
-
-Boolean CdataDeclaredValue::tokenized() const
-{
- return 0;
-}
-
-AttributeValue *CdataDeclaredValue::makeValue(Text &text, AttributeContext &context,
- const StringC &,
- unsigned &specLength) const
-{
- const Syntax &syntax = context.attributeSyntax();
- size_t normsep = syntax.normsep();
- size_t normalizedLength = text.normalizedLength(normsep);
- specLength += normalizedLength;
- size_t litlen = syntax.litlen();
- // A length error will already have been given if
- // length > litlen - normsep.
- if (litlen >= normsep && text.size() <= litlen - normsep
- && normalizedLength > litlen)
- context.message(ParserMessages::normalizedAttributeValueLength,
- NumberMessageArg(litlen),
- NumberMessageArg(normalizedLength));
- return new CdataAttributeValue(text);
-}
-
-void CdataDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.declaredValue = AttributeDefinitionDesc::cdata;
-}
-
-DeclaredValue *CdataDeclaredValue::copy() const
-{
- return new CdataDeclaredValue(*this);
-}
-
-TokenizedDeclaredValue::TokenizedDeclaredValue(TokenType type,
- Boolean isList)
-: type_(type), isList_(isList)
-{
- switch (type) {
- case name:
- case entityName:
- initialCategories_ = Syntax::nameStartCategory;
- subsequentCategories_ = (Syntax::nameStartCategory|Syntax::digitCategory
- | Syntax::otherNameCategory);
- break;
- case number:
- initialCategories_ = Syntax::digitCategory;
- subsequentCategories_ = Syntax::digitCategory;
- break;
- case nameToken:
- initialCategories_ = (Syntax::nameStartCategory|Syntax::digitCategory
- | Syntax::otherNameCategory);
- subsequentCategories_ = initialCategories_;
- break;
- case numberToken:
- initialCategories_ = Syntax::digitCategory;
- subsequentCategories_ = (Syntax::nameStartCategory|Syntax::digitCategory
- | Syntax::otherNameCategory);
- break;
- }
-}
-
-Boolean TokenizedDeclaredValue::tokenized() const
-{
- return 1;
-}
-
-AttributeValue *TokenizedDeclaredValue::makeValue(Text &text,
- AttributeContext &context,
- const StringC &str,
- unsigned &specLength) const
-{
- return makeTokenizedValue(text, context, str, specLength);
-}
-
-TokenizedAttributeValue *
-TokenizedDeclaredValue::makeTokenizedValue(Text &text,
- AttributeContext &context,
- const StringC &LOCALname,
- unsigned &specLength) const
-{
- Vector<size_t> spaceIndex;
- const Syntax &syntax = context.attributeSyntax();
- Char space = syntax.space();
- text.subst(*(type_ == entityName
- ? syntax.entitySubstTable()
- : syntax.generalSubstTable()),
- space);
- const StringC &value = text.string();
- size_t i = 0;
- size_t length = value.size();
-
- for (;;) {
- if (i >= length) {
- // ends with a space (which would have to have been entered
- // via a numeric character reference)
- if (context.validate())
- context.message(ParserMessages::attributeValueSyntax);
- break;
- }
- size_t startIndex = i;
- if (context.validate()) {
- if (!(syntax.charCategory(value[i]) & initialCategories_)) {
- context.Messenger::setNextLocation(text.charLocation(i));
- Char c = value[i];
- if (!(syntax.charCategory(value[i]) & subsequentCategories_))
- context.message(ParserMessages::attributeValueChar,
- StringMessageArg(StringC(&c, 1)),
- StringMessageArg(LOCALname));
- else if (initialCategories_ == Syntax::digitCategory)
- context.message(ParserMessages::attributeValueNumberToken,
- StringMessageArg(StringC(&c, 1)),
- StringMessageArg(LOCALname));
- else
- context.message(ParserMessages::attributeValueName,
- StringMessageArg(StringC(&c, 1)),
- StringMessageArg(LOCALname));
- }
- else {
- for (++i;
- i < length
- && (syntax.charCategory(value[i]) & subsequentCategories_);
- i++)
- ;
- if (i < length && value[i] != space) {
- Char c = value[i];
- // character value[i] is not allowed anywhere in the value
- context.Messenger::setNextLocation(text.charLocation(i));
- context.message(ParserMessages::attributeValueChar,
- StringMessageArg(StringC(&c, 1)),
- StringMessageArg(LOCALname));
- }
- }
- }
- while (i < length && value[i] != space)
- i++;
- if (i - startIndex > syntax.namelen()) {
- context.Messenger::setNextLocation(text.charLocation(i));
- context.message(ParserMessages::nameTokenLength,
- NumberMessageArg(syntax.namelen()));
- }
- if (i == length)
- break;
- if (!isList_ && context.validate() && spaceIndex.size() == 0) {
- context.Messenger::setNextLocation(text.charLocation(i));
- context.message(ParserMessages::attributeValueMultiple,
- StringMessageArg(LOCALname));
- }
- spaceIndex.push_back(i);
- i++;
- }
- size_t normsep = syntax.normsep();
- size_t litlen = syntax.litlen();
- size_t normalizedLength = normsep + length;
- // should we count CDATA and SDATA entities here?
- if (isList_) {
- normalizedLength += 1;
- // length is now the number of characters in each token in the list
- // + 1 for each token in the list; so add normsep - 1 for each
- // token in the list.
- if (normsep > 0)
- normalizedLength += (normsep - 1)*(spaceIndex.size() + 1);
- else
- normalizedLength -= spaceIndex.size() + 1;
- }
- specLength += normalizedLength;
- // A length error will already have been given if
- // length > litlen - normsep.
- if (litlen >= normsep && length <= litlen - normsep
- && normalizedLength > litlen)
- context.message(ParserMessages::normalizedAttributeValueLength,
- NumberMessageArg(litlen),
- NumberMessageArg(normalizedLength));
- return new TokenizedAttributeValue(text, spaceIndex);
-}
-
-Boolean TokenizedAttributeValue::recoverUnquoted(const StringC &str,
- const Location &strLoc,
- AttributeContext &context,
- const StringC &name)
-{
- TextIter iter(text_);
- TextItem::Type type;
- const Char *s;
- size_t len;
- const Location *loc;
- if (iter.next(type, s, len, loc)
- && type == TextItem::data
- && len == text_.size()
- && loc->origin().pointer() == strLoc.origin().pointer()
- && loc->index() + len == strLoc.index()
- && !iter.next(type, s, len, loc)) {
- context.Messenger::setNextLocation(strLoc);
- context.message(ParserMessages::attributeValueChar,
- StringMessageArg(StringC(str.data(), 1)),
- StringMessageArg(name));
- return 1;
- }
- return 0;
-}
-
-void TokenizedDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.declaredValue = AttributeDefinitionDesc::DeclaredValue(
- type_ - name + (isList_
- ? AttributeDefinitionDesc::names
- : AttributeDefinitionDesc::name));
-}
-
-DeclaredValue *TokenizedDeclaredValue::copy() const
-{
- return new TokenizedDeclaredValue(*this);
-}
-
-GroupDeclaredValue::GroupDeclaredValue(TokenType type,
- Vector<StringC> &vec)
-: TokenizedDeclaredValue(type, 0)
-{
- vec.swap(allowedValues_);
-}
-
-void GroupDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.allowedValues = allowedValues_;
-}
-
-DeclaredValue *GroupDeclaredValue::copy() const
-{
- return new GroupDeclaredValue(*this);
-}
-
-AttributeValue *GroupDeclaredValue::makeValue(Text &text,
- AttributeContext &context,
- const StringC &LOCALname,
- unsigned &specLength) const
-{
- TokenizedAttributeValue *val = makeTokenizedValue(text, context, LOCALname,
- specLength);
- if (!val || !context.validate())
- return val;
- for (size_t i = 0; i < allowedValues_.size(); i++)
- if (val->string() == allowedValues_[i])
- return val;
- context.message(ParserMessages::attributeValueNotInGroup,
- StringMessageArg(val->string()),
- StringMessageArg(LOCALname),
- StringVectorMessageArg(allowedValues_));
- return val;
-}
-
-AttributeValue *GroupDeclaredValue::makeValueFromToken(Text &text,
- AttributeContext &context,
- const StringC &,
- unsigned &specLength)
- const
-{
- const Syntax &syntax = context.attributeSyntax();
- size_t litlen = syntax.litlen();
- size_t normsep = syntax.normsep();
- if (normsep > litlen || text.size() > litlen - normsep)
- context.message(ParserMessages::normalizedAttributeValueLength,
- NumberMessageArg(litlen),
- NumberMessageArg(text.size() + normsep));
- specLength += text.size() + normsep;
- return new TokenizedAttributeValue(text, Vector<size_t>());
-}
-
-Boolean GroupDeclaredValue::containsToken(const StringC &token) const
-{
- for (size_t i = 0; i < allowedValues_.size(); i++)
- if (allowedValues_[i] == token)
- return 1;
- return 0;
-}
-
-const Vector<StringC> *GroupDeclaredValue::getTokens() const
-{
- return &allowedValues_;
-}
-
-NameTokenGroupDeclaredValue::NameTokenGroupDeclaredValue(Vector<StringC> &vec)
-: GroupDeclaredValue(nameToken, vec)
-{
-}
-
-void NameTokenGroupDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- GroupDeclaredValue::buildDesc(desc);
- desc.declaredValue = AttributeDefinitionDesc::nameTokenGroup;
-}
-
-DeclaredValue *NameTokenGroupDeclaredValue::copy() const
-{
- return new NameTokenGroupDeclaredValue(*this);
-}
-
-NotationDeclaredValue::NotationDeclaredValue(Vector<StringC> &vec)
-: GroupDeclaredValue(name, vec)
-{
-}
-
-Boolean NotationDeclaredValue::isNotation() const
-{
- return 1;
-}
-
-AttributeSemantics *
-NotationDeclaredValue::makeSemantics(const TokenizedAttributeValue &value,
- AttributeContext &context,
- const StringC &,
- unsigned &,
- unsigned &) const
-{
- ConstPtr<Notation> notation
- = context.getAttributeNotation(value.string(),
- value.tokenLocation(0));
- if (notation.isNull()) {
- if (context.validate()) {
- context.setNextLocation(value.tokenLocation(0));
- context.message(ParserMessages::invalidNotationAttribute,
- StringMessageArg(value.string()));
- }
- return 0;
- }
- return new NotationAttributeSemantics(notation);
-}
-
-void NotationDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- GroupDeclaredValue::buildDesc(desc);
- desc.declaredValue = AttributeDefinitionDesc::notation;
-}
-
-DeclaredValue *NotationDeclaredValue::copy() const
-{
- return new NotationDeclaredValue(*this);
-}
-
-EntityDeclaredValue::EntityDeclaredValue(Boolean isList)
-: TokenizedDeclaredValue(entityName, isList)
-{
-}
-
-Boolean EntityDeclaredValue::isEntity() const
-{
- return 1;
-}
-
-AttributeSemantics *
-EntityDeclaredValue::makeSemantics(const TokenizedAttributeValue &value,
- AttributeContext &context,
- const StringC &,
- unsigned &,
- unsigned &nEntityNames) const
-{
- Boolean valid = 1;
- size_t nTokens = value.nTokens();
- nEntityNames += nTokens;
- Vector<ConstPtr<Entity> > entities(nTokens);
- for (size_t i = 0; i < nTokens; i++) {
- entities[i] = context.getAttributeEntity(value.token(i),
- value.tokenLocation(i));
- if (entities[i].isNull()) {
- if (context.validate()) {
- context.setNextLocation(value.tokenLocation(i));
- context.message(ParserMessages::invalidEntityAttribute,
- StringMessageArg(value.token(i)));
- }
- valid = 0;
- }
- else if (!entities[i]->isDataOrSubdoc()) {
- if (context.validate()) {
- context.Messenger::setNextLocation(value.tokenLocation(i));
- context.message(ParserMessages::notDataOrSubdocEntity,
- StringMessageArg(value.token(i)));
- }
- valid = 0;
- }
- }
- if (valid)
- return new EntityAttributeSemantics(entities);
- else
- return 0;
-}
-
-DeclaredValue *EntityDeclaredValue::copy() const
-{
- return new EntityDeclaredValue(*this);
-}
-
-IdDeclaredValue::IdDeclaredValue()
-: TokenizedDeclaredValue(name, 0)
-{
-}
-
-Boolean IdDeclaredValue::isId() const
-{
- return 1;
-}
-
-AttributeSemantics *
-IdDeclaredValue::makeSemantics(const TokenizedAttributeValue &value,
- AttributeContext &context,
- const StringC &,
- unsigned &,
- unsigned &) const
-{
- Location prevLoc;
- if (!context.defineId(value.string(), value.tokenLocation(0), prevLoc)) {
- context.setNextLocation(value.tokenLocation(0));
- context.message(ParserMessages::duplicateId,
- StringMessageArg(value.string()),
- prevLoc);
- }
- return 0;
-}
-
-void IdDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.declaredValue = AttributeDefinitionDesc::id;
-}
-
-DeclaredValue *IdDeclaredValue::copy() const
-{
- return new IdDeclaredValue(*this);
-}
-
-IdrefDeclaredValue::IdrefDeclaredValue(Boolean isList)
-: TokenizedDeclaredValue(name, isList)
-{
-}
-
-AttributeSemantics *
-IdrefDeclaredValue::makeSemantics(const TokenizedAttributeValue &value,
- AttributeContext &context,
- const StringC &,
- unsigned &nIdrefs,
- unsigned &) const
-{
- size_t nTokens = value.nTokens();
- nIdrefs += nTokens;
- for (size_t i = 0; i < nTokens; i++)
- context.noteIdref(value.token(i), value.tokenLocation(i));
- return 0;
-}
-
-Boolean IdrefDeclaredValue::isIdref() const
-{
- return 1;
-}
-
-void IdrefDeclaredValue::buildDesc(AttributeDefinitionDesc &desc) const
-{
- TokenizedDeclaredValue::buildDesc(desc);
- if (desc.declaredValue == AttributeDefinitionDesc::name)
- desc.declaredValue = AttributeDefinitionDesc::idref;
- else
- desc.declaredValue = AttributeDefinitionDesc::idrefs;
-}
-
-DeclaredValue *IdrefDeclaredValue::copy() const
-{
- return new IdrefDeclaredValue(*this);
-}
-
-
-AttributeDefinition::AttributeDefinition(const StringC &name,
- DeclaredValue *value)
-: name_(name), declaredValue_(value)
-{
-}
-
-AttributeDefinition::~AttributeDefinition()
-{
-}
-
-AttributeValue *AttributeDefinition::checkValue(AttributeValue *p,
- AttributeContext &) const
-{
- return p;
-}
-
-Boolean AttributeDefinition::missingValueWouldMatch(const Text &,
- const AttributeContext &) const
-{
- return 0;
-}
-
-const AttributeValue *
-AttributeDefinition::defaultValue(const AttributeValue *) const
-{
- return 0;
-}
-
-void AttributeDefinition::getDesc(AttributeDefinitionDesc &desc) const
-{
- desc.allowedValues.clear();
- desc.defaultValue.clear();
- desc.currentIndex = 0;
- buildDesc(desc);
- declaredValue_->buildDesc(desc);
-}
-
-Boolean AttributeDefinition::isConref() const
-{
- return 0;
-}
-
-Boolean AttributeDefinition::isCurrent() const
-{
- return 0;
-}
-
-Boolean AttributeDefinition::isFixed() const
-{
- return 0;
-}
-
-RequiredAttributeDefinition::RequiredAttributeDefinition(const StringC &name,
- DeclaredValue *value)
-: AttributeDefinition(name, value)
-{
-}
-
-ConstPtr<AttributeValue>
-RequiredAttributeDefinition::makeMissingValue(AttributeContext &context) const
-{
- if (context.validate())
- context.message(ParserMessages::requiredAttributeMissing,
- StringMessageArg(name()));
- return 0;
-}
-
-void RequiredAttributeDefinition::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.defaultValueType = AttributeDefinitionDesc::required;
-}
-
-AttributeDefinition *RequiredAttributeDefinition::copy() const
-{
- return new RequiredAttributeDefinition(*this);
-}
-
-CurrentAttributeDefinition::CurrentAttributeDefinition(const StringC &name, DeclaredValue *value, size_t index)
-: AttributeDefinition(name, value), currentIndex_(index)
-{
-}
-
-ConstPtr<AttributeValue>
-CurrentAttributeDefinition::makeMissingValue(AttributeContext &context) const
-{
- if (context.mayDefaultAttribute()) {
- ConstPtr<AttributeValue> currentValue
- = context.getCurrentAttribute(currentIndex_);
- if (currentValue.isNull() && context.validate())
- context.message(ParserMessages::currentAttributeMissing,
- StringMessageArg(name()));
- return currentValue;
- }
- if (context.validate())
- context.message(ParserMessages::attributeMissing,
- StringMessageArg(name()));
- return 0;
-}
-
-Boolean CurrentAttributeDefinition::missingValueWouldMatch(const Text &text,
- const AttributeContext &context) const
-{
- if (!context.mayDefaultAttribute())
- return 0;
- ConstPtr<AttributeValue> currentValue
- = context.getCurrentAttribute(currentIndex_);
- if (currentValue.isNull())
- return 0;
- return text.fixedEqual(*currentValue->text());
-}
-
-AttributeValue *
-CurrentAttributeDefinition::checkValue(AttributeValue *value,
- AttributeContext &context) const
-{
- context.noteCurrentAttribute(currentIndex_, value);
- return value;
-}
-
-void CurrentAttributeDefinition::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.defaultValueType = AttributeDefinitionDesc::current;
- desc.currentIndex = currentIndex_;
-}
-
-AttributeDefinition *CurrentAttributeDefinition::copy() const
-{
- return new CurrentAttributeDefinition(*this);
-}
-
-Boolean CurrentAttributeDefinition::isCurrent() const
-{
- return 1;
-}
-
-ImpliedAttributeDefinition::ImpliedAttributeDefinition(const StringC &name,
- DeclaredValue *value)
-: AttributeDefinition(name, value)
-{
-}
-
-ConstPtr<AttributeValue>
-ImpliedAttributeDefinition::makeMissingValue(AttributeContext &context) const
-{
- return context.makeImpliedAttributeValue();
-}
-
-void ImpliedAttributeDefinition::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.defaultValueType = AttributeDefinitionDesc::implied;
-}
-
-AttributeDefinition *ImpliedAttributeDefinition::copy() const
-{
- return new ImpliedAttributeDefinition(*this);
-}
-
-const AttributeValue *
-ImpliedAttributeDefinition::defaultValue(const AttributeValue *impliedValue)
- const
-{
- return impliedValue;
-}
-
-ConrefAttributeDefinition::ConrefAttributeDefinition(const StringC &name,
- DeclaredValue *value)
-: ImpliedAttributeDefinition(name, value)
-{
-}
-
-Boolean ConrefAttributeDefinition::isConref() const
-{
- return 1;
-}
-
-void ConrefAttributeDefinition::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.defaultValueType = AttributeDefinitionDesc::conref;
-}
-
-AttributeDefinition *ConrefAttributeDefinition::copy() const
-{
- return new ConrefAttributeDefinition(*this);
-}
-
-DefaultAttributeDefinition::DefaultAttributeDefinition(const StringC &name,
- DeclaredValue *declaredValue,
- AttributeValue *defaultValue)
-: AttributeDefinition(name, declaredValue),
- value_(defaultValue)
-{
-}
-
-ConstPtr<AttributeValue>
-DefaultAttributeDefinition::makeMissingValue(AttributeContext &context) const
-{
- if (context.mayDefaultAttribute())
- return value_;
- if (context.validate())
- context.message(ParserMessages::attributeMissing,
- StringMessageArg(name()));
- return 0;
-}
-
-Boolean DefaultAttributeDefinition::missingValueWouldMatch(const Text &text,
- const AttributeContext &context) const
-{
- return context.mayDefaultAttribute() && text.fixedEqual(*value_->text());
-}
-
-void DefaultAttributeDefinition::buildDesc(AttributeDefinitionDesc &desc) const
-{
- desc.defaultValueType = AttributeDefinitionDesc::defaulted;
- desc.defaultValue = value_;
-}
-
-AttributeDefinition *DefaultAttributeDefinition::copy() const
-{
- return new DefaultAttributeDefinition(*this);
-}
-
-FixedAttributeDefinition:: FixedAttributeDefinition(const StringC &name,
- DeclaredValue *declaredValue,
- AttributeValue *defaultValue)
-: DefaultAttributeDefinition(name, declaredValue, defaultValue)
-{
-}
-
-Boolean FixedAttributeDefinition::isFixed() const
-{
- return 1;
-}
-
-AttributeValue *FixedAttributeDefinition::checkValue(AttributeValue *value,
- AttributeContext &context)
- const
-{
- const AttributeValue *fixedValue
- = DefaultAttributeDefinition::defaultValue(0);
- if (value && fixedValue && context.validate()) {
- const Text *text;
- const StringC *str;
- const Text *fixedText;
- const StringC *fixedStr;
- switch (value->info(text, str)) {
- case AttributeValue::implied:
- CANNOT_HAPPEN();
- case AttributeValue::cdata:
- if (fixedValue->info(fixedText, fixedStr) == AttributeValue::cdata) {
- if (!text->fixedEqual(*fixedText))
- context.message(ParserMessages::notFixedValue, StringMessageArg(name()));
- }
- break;
- case AttributeValue::tokenized:
- if (fixedValue->info(fixedText, fixedStr) == AttributeValue::tokenized) {
- if (*str != *fixedStr)
- context.message(ParserMessages::notFixedValue, StringMessageArg(name()));
- }
- break;
- }
- }
- return value;
-}
-
-void FixedAttributeDefinition::buildDesc(AttributeDefinitionDesc &desc) const
-{
- // get the fixed value
- DefaultAttributeDefinition::buildDesc(desc);
- desc.defaultValueType = AttributeDefinitionDesc::fixed;
-}
-
-AttributeDefinition *FixedAttributeDefinition::copy() const
-{
- return new FixedAttributeDefinition(*this);
-}
-
-AttributeDefinitionList
-::AttributeDefinitionList(Vector<CopyOwner<AttributeDefinition> > &vec,
- size_t index,
- Boolean anyCurrent,
- size_t idIndex,
- size_t notationIndex)
-: index_(index), anyCurrent_(anyCurrent), idIndex_(idIndex),
- notationIndex_(notationIndex)
-{
- defs_.swap(vec);
-}
-
-AttributeDefinitionList:: AttributeDefinitionList(const ConstPtr<AttributeDefinitionList> &def)
-: prev_(def), index_(size_t(-1))
-{
- if (def.isNull()) {
- anyCurrent_ = 0;
- notationIndex_ = size_t(-1);
- idIndex_ = size_t(-1);
- }
- else {
- anyCurrent_ = def->anyCurrent_;
- notationIndex_ = def->notationIndex_;
- idIndex_ = def->idIndex_;
- defs_ = def->defs_;
- }
-}
-
-Boolean AttributeDefinitionList::tokenIndex(const StringC &token, unsigned &index) const
-{
- for (size_t i = 0; i < defs_.size(); i++)
- if (defs_[i]->containsToken(token)) {
- index = i;
- return 1;
- }
- return 0;
-}
-
-Boolean AttributeDefinitionList::tokenIndexUnique(const StringC &token, unsigned i) const
-{
- for (++i; i < defs_.size(); i++)
- if (defs_[i]->containsToken(token))
- return 0;
- return 1;
-}
-
-
-Boolean AttributeDefinitionList::attributeIndex(const StringC &name,
- unsigned &index) const
-{
- for (size_t i = 0; i < defs_.size(); i++)
- if (defs_[i]->name() == name) {
- index = i;
- return 1;
- }
- return 0;
-}
-
-void AttributeDefinitionList::append(AttributeDefinition *def)
-{
- if (def->isId() && idIndex_ == size_t(-1))
- idIndex_ = defs_.size();
- if (def->isNotation() && notationIndex_ == size_t(-1))
- notationIndex_ = defs_.size();
- if (def->isCurrent())
- anyCurrent_ = 1;
- defs_.resize(defs_.size() + 1);
- defs_.back() = def;
-}
-
-AttributeSemantics::AttributeSemantics()
-{
-}
-
-AttributeSemantics::~AttributeSemantics()
-{
-}
-
-size_t AttributeSemantics::nEntities() const
-{
- return 0;
-}
-
-ConstPtr<Entity> AttributeSemantics::entity(size_t) const
-{
- return 0;
-}
-
-ConstPtr<Notation> AttributeSemantics::notation() const
-{
- return 0;
-}
-
-
-NotationAttributeSemantics::NotationAttributeSemantics(const ConstPtr<Notation> &notation)
-: notation_(notation)
-{
-}
-
-ConstPtr<Notation> NotationAttributeSemantics::notation() const
-{
- return notation_;
-}
-
-AttributeSemantics *NotationAttributeSemantics::copy() const
-{
- return new NotationAttributeSemantics(*this);
-}
-
-EntityAttributeSemantics::EntityAttributeSemantics(Vector<ConstPtr<Entity> > &entity)
-{
- entity.swap(entity_);
-}
-
-size_t EntityAttributeSemantics::nEntities() const
-{
- return entity_.size();
-}
-
-ConstPtr<Entity> EntityAttributeSemantics::entity(size_t i) const
-{
- return entity_[i];
-}
-
-AttributeSemantics *EntityAttributeSemantics::copy() const
-{
- return new EntityAttributeSemantics(*this);
-}
-
-AttributeValue::AttributeValue()
-{
-}
-
-AttributeValue::~AttributeValue()
-{
-}
-
-AttributeSemantics *AttributeValue::makeSemantics(const DeclaredValue *,
- AttributeContext &,
- const StringC &,
- unsigned &,
- unsigned &) const
-{
- return 0;
-}
-
-const Text *AttributeValue::text() const
-{
- return 0;
-}
-
-Boolean AttributeValue::recoverUnquoted(const StringC &, const Location &,
- AttributeContext &, const StringC &)
-{
- return 0;
-}
-
-ImpliedAttributeValue::ImpliedAttributeValue()
-{
-}
-
-AttributeValue::Type ImpliedAttributeValue::info(const Text *&,
- const StringC *&) const
-{
- return implied;
-}
-
-TokenizedAttributeValue::TokenizedAttributeValue(Text &text,
- const Vector<size_t> &spaceIndex)
-: spaceIndex_(spaceIndex)
-{
- text.swap(text_);
-}
-
-AttributeValue::Type TokenizedAttributeValue::info(const Text *&,
- const StringC *&string) const
-{
- string = &text_.string();
- return tokenized;
-}
-
-const Text *TokenizedAttributeValue::text() const
-{
- return &text_;
-}
-
-AttributeSemantics *
-TokenizedAttributeValue::makeSemantics(const DeclaredValue *value,
- AttributeContext &context,
- const StringC &name,
- unsigned &nIdrefs,
- unsigned &nEntityNames) const
-{
- if (text_.size() == 0)
- return 0;
- return value->makeSemantics(*this, context, name, nIdrefs, nEntityNames);
-}
-
-CdataAttributeValue::CdataAttributeValue(Text &text)
-{
- text.swap(text_);
-}
-
-AttributeValue::Type CdataAttributeValue::info(const Text *&text,
- const StringC *&) const
-{
- text = &text_;
- return cdata;
-}
-
-const Text *CdataAttributeValue::text() const
-{
- return &text_;
-}
-
-Boolean CdataAttributeValue::recoverUnquoted(const StringC &str,
- const Location &strLoc,
- AttributeContext &context,
- const StringC &)
-{
- TextIter iter(text_);
- TextItem::Type type;
- const Char *s;
- size_t len;
- const Location *loc;
- if (iter.next(type, s, len, loc)
- && type == TextItem::data
- && len == text_.size()
- && loc->origin().pointer() == strLoc.origin().pointer()
- && loc->index() + len == strLoc.index()
- && !iter.next(type, s, len, loc)) {
- text_.addChars(str, strLoc);
- context.Messenger::setNextLocation(strLoc);
- context.message(ParserMessages::unquotedAttributeValue);
- return 1;
- }
- return 0;
-}
-
-Attribute::Attribute()
-: specIndexPlus_(0)
-{
-}
-
-void Attribute::clear()
-{
- specIndexPlus_ = 0;
- value_.clear();
- semantics_.clear();
-}
-
-AttributeList::AttributeList(const ConstPtr<AttributeDefinitionList> &def)
-: def_(def), vec_(def.isNull() ? 0 : def->size()), nSpec_(0), conref_(0),
- nIdrefs_(0), nEntityNames_(0)
-{
-}
-
-AttributeList::AttributeList()
-: nSpec_(0), conref_(0)
-{
-}
-
-void AttributeList::init(const ConstPtr<AttributeDefinitionList> &def)
-{
- def_ = def;
- nSpec_ = 0;
- conref_ = 0;
- nIdrefs_ = 0;
- nEntityNames_ = 0;
- if (def_.isNull())
- vec_.resize(0);
- else {
- size_t newLength = def_->size();
- size_t clearLim = vec_.size();
- if (clearLim > newLength)
- clearLim = newLength;
- vec_.resize(newLength);
- for (size_t i = 0; i < clearLim; i++)
- vec_[i].clear();
- }
-}
-
-void AttributeList::changeDef(const ConstPtr<AttributeDefinitionList> &def)
-{
- vec_.resize(def.isNull() ? 0 : def->size());
- def_ = def;
-}
-
-void AttributeList::swap(AttributeList &to)
-{
- vec_.swap(to.vec_);
- def_.swap(to.def_);
- {
- unsigned tem = to.nIdrefs_;
- to.nIdrefs_ = nIdrefs_;
- nIdrefs_ = tem;
- }
- {
- unsigned tem = to.nEntityNames_;
- to.nEntityNames_ = nEntityNames_;
- nEntityNames_ = tem;
- }
- {
- size_t tem = to.nSpec_;
- to.nSpec_ = nSpec_;
- nSpec_ = tem;
- }
- {
- PackedBoolean tem = to.conref_;
- to.conref_ = conref_;
- conref_ = tem;
- }
-}
-
-void AttributeList::finish(AttributeContext &context)
-{
- for (size_t i = 0; i < vec_.size(); i++)
- if (!vec_[i].specified()) {
- ConstPtr<AttributeValue> value
- = def(i)->makeMissingValue(context);
- vec_[i].setValue(value);
- if (!value.isNull())
- vec_[i].setSemantics(def(i)->makeSemantics(value.pointer(),
- context,
- nIdrefs_,
- nEntityNames_));
- }
- const Syntax &syntax = context.attributeSyntax();
- if (nIdrefs_ > syntax.grpcnt())
- context.message(ParserMessages::idrefGrpcnt,
- NumberMessageArg(syntax.grpcnt()));
- if (nEntityNames_ > syntax.grpcnt())
- context.message(ParserMessages::entityNameGrpcnt,
- NumberMessageArg(syntax.grpcnt()));
- if (context.validate()
- && conref_
- && def_->notationIndex() != size_t(-1)
- && specified(def_->notationIndex()))
- context.message(ParserMessages::conrefNotation);
-}
-
-void AttributeList::setSpec(unsigned i, AttributeContext &context)
-{
- if (vec_[i].specified())
- context.message(ParserMessages::duplicateAttributeSpec,
- StringMessageArg(def(i)->name()));
- else
- vec_[i].setSpec(nSpec_++);
-}
-
-void AttributeList::noteInvalidSpec()
-{
- // This is needed for error recovery.
- // We don't want nSpec_ to be > 0, if there is no attribute definition.
- if (nSpec_)
- nSpec_++;
-}
-
-Boolean AttributeList::setValue(unsigned i, Text &text,
- AttributeContext &context,
- unsigned &specLength)
-{
- AttributeValue *value = def(i)->makeValue(text, context, specLength);
- if (def(i)->isConref())
- conref_ = 1;
- vec_[i].setValue(value);
- if (value)
- vec_[i].setSemantics(def(i)->makeSemantics(value, context,
- nIdrefs_, nEntityNames_));
- else if (AttributeValue::handleAsUnterminated(text, context))
- return 0;
- return 1;
-}
-
-void AttributeList::setValueToken(unsigned i, Text &text,
- AttributeContext &context,
- unsigned &specLength)
-{
- AttributeValue *value = def(i)->makeValueFromToken(text, context,
- specLength);
- if (def(i)->isConref())
- conref_ = 1;
- vec_[i].setValue(value);
- if (value)
- vec_[i].setSemantics(def(i)->makeSemantics(value, context,
- nIdrefs_, nEntityNames_));
-}
-
-const StringC *AttributeList::getId() const
-{
- // Check for no attributes
- if (def_.isNull())
- return 0;
- // Check for no ID declared
- size_t i = def_->idIndex();
- if (i == size_t(-1))
- return 0;
- // Check for invalid value
- const AttributeValue *v = value(i);
- if (!v)
- return 0;
- // Check for implied value
- const Text *t = v->text();
- if (!t)
- return 0;
- return &t->string();
-}
-
-Boolean AttributeList::recoverUnquoted(const StringC &str,
- const Location &strLoc,
- AttributeContext &context)
-{
- if (nSpec_ > 0) {
- for (size_t i = 0; i < vec_.size(); i++)
- if (vec_[i].specified() && vec_[i].specIndex() == nSpec_ - 1) {
- const AttributeValue *val = vec_[i].value();
- if (val)
- // I wish I could avoid casting away const here.
- return ((AttributeValue *)val)->recoverUnquoted(str, strLoc, context,
- name(i));
- break;
- }
- return 1;
- }
- return 0;
-}
-
-Boolean AttributeList::handleAsUnterminated(AttributeContext &context)
-{
- if (nSpec_ > 0) {
- for (size_t i = 0; i < vec_.size(); i++) {
- if (vec_[i].specified() && vec_[i].specIndex() == nSpec_ - 1) {
- const AttributeValue *val = vec_[i].value();
- const Text *ptr;
- if (val && (ptr = val->text()) != 0
- && AttributeValue::handleAsUnterminated(*ptr, context))
- return 1;
- break;
- }
- }
- }
- return 0;
-}
-
-// This tries to guess this attribute value looks like if it had
-// a missing ending quote.
-
-Boolean AttributeValue::handleAsUnterminated(const Text &text,
- AttributeContext &context)
-{
- TextIter iter(text);
- const Char *lastStr = 0;
- size_t lastLen;
- Location startLoc;
- const Location *loc;
- TextItem::Type type;
- const Char *str;
- size_t len;
- while (iter.next(type, str, len, loc)) {
- if (startLoc.origin().isNull() && !loc->origin().isNull())
- startLoc = *loc;
- switch (type) {
- case TextItem::data:
- if (len != 1 || *str != context.attributeSyntax().space()) {
- lastStr = str;
- lastLen = len;
- }
- break;
- case TextItem::endDelim:
- case TextItem::endDelimA:
- case TextItem::ignore:
- break;
- default:
- lastStr = 0;
- break;
- }
- }
- if (lastStr) {
- while (lastLen > 0
- && lastStr[lastLen - 1] == context.attributeSyntax().space())
- lastLen--;
- const StringC &vi = context.attributeSyntax().delimGeneral(Syntax::dVI);
- if (lastLen >= vi.size()
- && (vi
- == StringC(lastStr + (lastLen - vi.size()), vi.size()))) {
- context.Messenger::setNextLocation(startLoc);
- context.message(ParserMessages::literalClosingDelimiter);
- return 1;
- }
- }
- return 0;
-}
-
-AttributeContext::AttributeContext()
-: mayDefaultAttribute_(0), validate_(1)
-{
-}
-
-AttributeContext::~AttributeContext()
-{
-}
-
-Boolean AttributeContext::defineId(const StringC &, const Location &,
- Location &)
-{
- return 1;
-}
-
-void AttributeContext::noteIdref(const StringC &, const Location &)
-{
-}
-
-void AttributeContext::noteCurrentAttribute(size_t, AttributeValue *)
-{
-}
-
-ConstPtr<AttributeValue> AttributeContext::getCurrentAttribute(size_t) const
-{
- return 0;
-}
-
-ConstPtr<Entity> AttributeContext::getAttributeEntity(const StringC &,
- const Location &)
-{
- return 0;
-}
-
-ConstPtr<Notation> AttributeContext::getAttributeNotation(const StringC &,
- const Location &)
-{
- return 0;
-}
-
-ConstPtr<AttributeValue> AttributeContext::makeImpliedAttributeValue()
-{
- if (impliedAttributeValue_.isNull())
- impliedAttributeValue_ = new ImpliedAttributeValue;
- return impliedAttributeValue_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Big5CodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Big5CodingSystem.cxx
deleted file mode 100644
index c6006b4354..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Big5CodingSystem.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "Big5CodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Big5Decoder : public Decoder {
-public:
- Big5Decoder() { }
- size_t decode(Char *, const char *, size_t, const char **);
-private:
-};
-
-class Big5Encoder : public Encoder {
-public:
- Big5Encoder() { }
- void output(const Char *, size_t, OutputByteStream *);
- void output(Char *tmp_char, size_t tmp_size_t, OutputByteStream *tmp_obs) {
- output((const Char *)tmp_char, (size_t) tmp_size_t, (OutputByteStream *)tmp_obs);
- }
-
-};
-
-Decoder *Big5CodingSystem::makeDecoder() const
-{
- return new Big5Decoder;
-}
-
-Encoder *Big5CodingSystem::makeEncoder() const
-{
- return new Big5Encoder;
-}
-
-size_t Big5Decoder::decode(Char *to, const char *s,
- size_t slen, const char **rest)
-{
- Char *start = to;
- const unsigned char *us = (const unsigned char *)s;
- while (slen > 0) {
- if (!(*us & 0x80)) {
- *to++ = *us++;
- slen--;
- }
- else {
- if (slen < 2)
- break;
- slen -= 2;
- unsigned short n = *us++ << 8;
- n |= *us++;
- *to++ = n;
- }
- }
- *rest = (const char *)us;
- return to - start;
-}
-
-void Big5Encoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- for (; n > 0; s++, n--) {
- Char c = *s;
- if (c < 0x80)
- sb->sputc((unsigned char)c);
- else if (c & 0x8000) {
- sb->sputc((unsigned char)(c >> 8));
- sb->sputc((unsigned char)(c & 0xff));
- }
- else
- handleUnencodable(c, sb);
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogEntry.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogEntry.h
deleted file mode 100644
index a23796b584..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogEntry.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef CatalogEntry_INCLUDED
-#define CatalogEntry_INCLUDED 1
-
-#include "Location.h"
-#include "StringC.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct CatalogEntry {
- StringC to;
- Location loc;
- size_t catalogNumber;
- size_t baseNumber;
- size_t serial;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not CatalogEntry_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogMessages.h
deleted file mode 100644
index 06616b0bac..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CatalogMessages.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// This file was automatically generated from lib\CatalogMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct CatalogMessages {
- // 2100
- static const MessageType0 nameExpected;
- // 2101
- static const MessageType0 literalExpected;
- // 2102
- static const MessageType0 nameOrLiteralExpected;
- // 2103
- static const MessageType0 nulChar;
- // 2104
- static const MessageType0 minimumData;
- // 2105
- static const MessageType0 eofInComment;
- // 2106
- static const MessageType0 eofInLiteral;
- // 2107
- static const MessageType0 overrideYesOrNo;
- // 2108
- static const MessageType0 inLoop;
- // 2109
- static const MessageType0 systemShouldQuote;
- // 2110
- static const MessageType1 noDocumentEntry;
- // 2111
- static const MessageType2 noPublicEntry;
- // 2112
- static const MessageType0 dtddeclNotSupported;
-};
-const MessageType0 CatalogMessages::nameExpected(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2100
-#ifndef SP_NO_MESSAGE_TEXT
-,"name expected"
-#endif
-);
-const MessageType0 CatalogMessages::literalExpected(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2101
-#ifndef SP_NO_MESSAGE_TEXT
-,"literal expected"
-#endif
-);
-const MessageType0 CatalogMessages::nameOrLiteralExpected(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2102
-#ifndef SP_NO_MESSAGE_TEXT
-,"name or literal expected"
-#endif
-);
-const MessageType0 CatalogMessages::nulChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2103
-#ifndef SP_NO_MESSAGE_TEXT
-,"nul character"
-#endif
-);
-const MessageType0 CatalogMessages::minimumData(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2104
-#ifndef SP_NO_MESSAGE_TEXT
-,"not a minimum data character"
-#endif
-);
-const MessageType0 CatalogMessages::eofInComment(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2105
-#ifndef SP_NO_MESSAGE_TEXT
-,"end of entity in comment"
-#endif
-);
-const MessageType0 CatalogMessages::eofInLiteral(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2106
-#ifndef SP_NO_MESSAGE_TEXT
-,"end of entity in literal"
-#endif
-);
-const MessageType0 CatalogMessages::overrideYesOrNo(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2107
-#ifndef SP_NO_MESSAGE_TEXT
-,"OVERRIDE requires argument of YES or NO"
-#endif
-);
-const MessageType0 CatalogMessages::inLoop(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2108
-#ifndef SP_NO_MESSAGE_TEXT
-,"CATALOG entries cause loop"
-#endif
-);
-const MessageType0 CatalogMessages::systemShouldQuote(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2109
-#ifndef SP_NO_MESSAGE_TEXT
-,"second argument for SYSTEM entry should be quoted to avoid ambiguity"
-#endif
-);
-const MessageType1 CatalogMessages::noDocumentEntry(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2110
-#ifndef SP_NO_MESSAGE_TEXT
-,"no DOCUMENT entry in catalog %1"
-#endif
-);
-const MessageType2 CatalogMessages::noPublicEntry(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2111
-#ifndef SP_NO_MESSAGE_TEXT
-,"no entry for public identifier %1 in catalog %2"
-#endif
-);
-const MessageType0 CatalogMessages::dtddeclNotSupported(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2112
-#ifndef SP_NO_MESSAGE_TEXT
-,"DTDDECL catalog entries are not supported"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetDecl.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetDecl.cxx
deleted file mode 100644
index d8c0e08697..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetDecl.cxx
+++ /dev/null
@@ -1,266 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "CharsetDecl.h"
-#include "macros.h"
-#include "ISet.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-CharsetDeclRange::CharsetDeclRange()
-{
-}
-
-CharsetDeclRange::CharsetDeclRange(WideChar descMin, Number count,
- WideChar baseMin)
-: descMin_(descMin),
- count_(count),
- type_(number),
- baseMin_(baseMin)
-{
-}
-
-CharsetDeclRange::CharsetDeclRange(WideChar descMin, Number count)
-: descMin_(descMin),
- count_(count),
- type_(unused)
-
-{
-}
-
-CharsetDeclRange::CharsetDeclRange(WideChar descMin, Number count,
- const StringC &str)
-: descMin_(descMin),
- count_(count),
- type_(string),
- str_(str)
-{
-}
-
-void CharsetDeclRange::rangeDeclared(WideChar min, Number count,
- ISet<WideChar> &declared) const
-{
- if (count > 0 && min + count > descMin_ && min < descMin_ + count_) {
- WideChar commMin = (descMin_ > min) ? descMin_ : min;
- WideChar commMax = min + ((min + count < descMin_ + count_
- ? count
- : descMin_ + count_ - min) - 1);
- ASSERT(commMin <= commMax);
- declared.addRange(commMin, commMax);
- }
-}
-
-void CharsetDeclRange::usedSet(ISet<Char> &set) const
-{
- if (type_ != unused && count_ > 0 && descMin_ <= charMax) {
- Char max;
- if (charMax - descMin_ < count_ - 1)
- max = charMax;
- else
- max = Char(descMin_ + (count_ - 1));
- set.addRange(Char(descMin_), max);
- }
-}
-
-void CharsetDeclRange::stringToChar(const StringC &str, ISet<WideChar> &to)
- const
-{
- if (type_ == string && str_ == str && count_ > 0)
- to.addRange(descMin_, descMin_ + (count_ - 1));
-}
-
-void CharsetDeclRange::numberToChar(Number n, ISet<WideChar> &to,
- Number &count)
- const
-{
- if (type_ == number && n >= baseMin_ && n - baseMin_ < count_) {
- Number thisCount = count_ - (n - baseMin_);
- if (to.isEmpty() || thisCount < count)
- count = thisCount;
- to.add(descMin_ + (n - baseMin_));
- }
-}
-
-Boolean CharsetDeclRange::getCharInfo(WideChar fromChar,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str,
- Number &count) const
-{
- if (fromChar >= descMin_ && fromChar - descMin_ < count_) {
- type = type_;
- if (type == number)
- n = baseMin_ + (fromChar - descMin_);
- else if (type == string)
- str = str_;
- count = count_ - (fromChar - descMin_);
- return 1;
- }
- else
- return 0;
-}
-
-CharsetDeclSection::CharsetDeclSection()
-{
-}
-
-void CharsetDeclSection::setPublicId(const PublicId &id)
-{
- baseset_ = id;
-}
-
-void CharsetDeclSection::addRange(const CharsetDeclRange &range)
-{
- ranges_.push_back(range);
-}
-
-void CharsetDeclSection::rangeDeclared(WideChar min, Number count,
- ISet<WideChar> &declared) const
-{
- for (size_t i = 0; i < ranges_.size(); i++)
- ranges_[i].rangeDeclared(min, count, declared);
-}
-
-void CharsetDeclSection::usedSet(ISet<Char> &set) const
-{
- for (size_t i = 0; i < ranges_.size(); i++)
- ranges_[i].usedSet(set);
-}
-
-void CharsetDeclSection::stringToChar(const StringC &str, ISet<WideChar> &to)
- const
-{
- for (size_t i = 0; i < ranges_.size(); i++)
- ranges_[i].stringToChar(str, to);
-}
-
-void CharsetDeclSection::numberToChar(const PublicId *id, Number n,
- ISet<WideChar> &to, Number &count) const
-{
- PublicId::OwnerType ownerType;
- StringC seq1, seq2;
- if (id->string() == baseset_.string()
- // Assume that 2 ISO character sets are the same if
- // their designating sequences are the same.
- || (id->getOwnerType(ownerType)
- && ownerType == PublicId::ISO
- && baseset_.getOwnerType(ownerType)
- && ownerType == PublicId::ISO
- && id->getDesignatingSequence(seq1)
- && baseset_.getDesignatingSequence(seq2)
- && seq1 == seq2)) {
- for (size_t i = 0; i < ranges_.size(); i++)
- ranges_[i].numberToChar(n, to, count);
- }
-}
-
-Boolean CharsetDeclSection::getCharInfo(WideChar fromChar,
- const PublicId *&id,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str,
- Number &count) const
-{
- for (size_t i = 0; i < ranges_.size(); i++)
- if (ranges_[i].getCharInfo(fromChar, type, n, str, count)) {
- id = &baseset_;
- return 1;
- }
- return 0;
-}
-
-CharsetDecl::CharsetDecl()
-{
-}
-
-void CharsetDecl::addSection(const PublicId &id)
-{
- sections_.resize(sections_.size() + 1);
- sections_.back().setPublicId(id);
-}
-
-void CharsetDecl::swap(CharsetDecl &to)
-{
- sections_.swap(to.sections_);
- declaredSet_.swap(to.declaredSet_);
-}
-
-void CharsetDecl::clear()
-{
- sections_.clear();
-}
-
-void CharsetDecl::addRange(WideChar min, Number count, WideChar baseMin)
-{
- if (count > 0)
- declaredSet_.addRange(min, min + (count - 1));
- CharsetDeclRange range(min, count, baseMin);
- sections_.back().addRange(range);
-}
-
-void CharsetDecl::addRange(WideChar min, Number count)
-{
- if (count > 0)
- declaredSet_.addRange(min, min + (count - 1));
- CharsetDeclRange range(min, count);
- sections_.back().addRange(range);
-}
-
-void CharsetDecl::addRange(WideChar min, Number count, const StringC &str)
-{
- if (count > 0)
- declaredSet_.addRange(min, min + (count - 1));
- CharsetDeclRange range(min, count, str);
- sections_.back().addRange(range);
-}
-
-void CharsetDecl::rangeDeclared(WideChar min, Number count,
- ISet<WideChar> &declared) const
-{
- for (size_t i = 0; i < sections_.size(); i++)
- sections_[i].rangeDeclared(min, count, declared);
-}
-
-void CharsetDecl::usedSet(ISet<Char> &set) const
-{
- for (size_t i = 0; i < sections_.size(); i++)
- sections_[i].usedSet(set);
-}
-
-Boolean CharsetDecl::getCharInfo(WideChar fromChar,
- const PublicId *&id,
- CharsetDeclRange::Type &type,
- Number &n,
- StringC &str,
- Number &count) const
-{
- for (size_t i = 0; i < sections_.size(); i++)
- if (sections_[i].getCharInfo(fromChar, id, type, n, str, count))
- return 1;
- return 0;
-}
-
-void CharsetDecl::stringToChar(const StringC &str, ISet<WideChar> &to) const
-{
- for (size_t i = 0; i < sections_.size(); i++)
- sections_[i].stringToChar(str, to);
-}
-
-void CharsetDecl::numberToChar(const PublicId *id, Number n,
- ISet<WideChar> &to, Number &count) const
-{
- for (size_t i = 0; i < sections_.size(); i++)
- sections_[i].numberToChar(id, n, to, count);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetInfo.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetInfo.cxx
deleted file mode 100644
index 837c1213e6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetInfo.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "CharsetInfo.h"
-#include "ISet.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-CharsetInfo::CharsetInfo(const UnivCharsetDesc &desc)
-: desc_(desc)
-{
- // FIXME remove mappings from desc for characters greater charMax
- init();
-}
-
-CharsetInfo::CharsetInfo()
-{
- inverse_.setAll(unsigned(-1));
-}
-
-void CharsetInfo::set(const UnivCharsetDesc &desc)
-{
- desc_ = desc;
- init();
-}
-
-void CharsetInfo::init()
-{
- inverse_.setAll(Unsigned32(-1));
-
- UnivCharsetDescIter iter(desc_);
-
- WideChar descMin, descMax;
- UnivChar univMin;
- while (iter.next(descMin, descMax, univMin)) {
- if (univMin <= charMax) {
- Char univMax;
- if (charMax - univMin < descMax - descMin)
- univMax = charMax;
- else
- univMax = univMin + (descMax - descMin);
- Unsigned32 diff
- = ((descMin - univMin) & ((Unsigned32(1) << 31) - 1));
- for (;;) {
- Char max;
- Unsigned32 n = inverse_.getRange(univMin, max);
- if (max > univMax)
- max = univMax;
- if (n == Unsigned32(-1))
- inverse_.setRange(univMin, max, diff);
- else if (n != Unsigned32(-2))
- inverse_.setRange(univMin, max, Unsigned32(-2));
- if (max == univMax)
- break;
- univMin = max + 1;
- }
- }
- }
- // These are the characters that the ANSI C
- // standard guarantees will be in the basic execution
- // character set.
- static char execChars[] =
- "\t\n\r "
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789"
- "!\"#%&'()*+,-./:"
- ";<=>?[\\]^_{|}~";
- // These are the corresponding ISO 646 codes.
- static char univCodes[] = {
- 9, 10, 13, 32,
- 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,
- 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,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 58,
- 59, 60, 61, 62, 63, 91, 92, 93, 94, 95, 123, 124, 125, 126,
- };
- for (size_t i = 0; execChars[i] != '\0'; i++) {
- WideChar c;
- ISet<WideChar> set;
- if (univToDesc(univCodes[i], c, set) > 0 && c <= Char(-1))
- execToDesc_[(unsigned char)execChars[i]] = Char(c);
- }
-}
-
-void CharsetInfo::getDescSet(ISet<Char> &set) const
-{
- UnivCharsetDescIter iter(desc_);
- WideChar descMin, descMax;
- UnivChar univMin;
- while (iter.next(descMin, descMax, univMin)) {
- if (descMin > charMax)
- break;
- if (descMax > charMax)
- descMax = charMax;
- set.addRange(Char(descMin), Char(descMax));
- }
-}
-
-int CharsetInfo::digitWeight(Char c) const
-{
- for (int i = 0; i < 10; i++)
- if (c == execToDesc('0' + i))
- return i;
- return -1;
-}
-
-int CharsetInfo::hexDigitWeight(Char c) const
-{
- for (int i = 0; i < 10; i++)
- if (c == execToDesc('0' + i))
- return i;
- for (int i = 0; i < 6; i++)
- if (c == execToDesc('a' + i) || c == execToDesc('A' + i))
- return i + 10;
- return -1;
-}
-
-StringC CharsetInfo::execToDesc(const char *s) const
-{
- StringC result;
- while (*s != '\0')
- result += execToDesc(*s++);
- return result;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetRegistry.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetRegistry.cxx
deleted file mode 100644
index ae4b88651a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CharsetRegistry.cxx
+++ /dev/null
@@ -1,286 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "CharsetRegistry.h"
-#include "ExternalId.h"
-#include "CharsetInfo.h"
-#include "StringC.h"
-#include "types.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-CharsetRegistry::Iter::~Iter()
-{
-}
-
-class CharsetRegistryRangeIter : public CharsetRegistry::Iter {
-public:
- CharsetRegistryRangeIter(const UnivCharsetDesc::Range *p, size_t n)
- : p_(p), n_(n) { }
- Boolean next(WideChar &min, WideChar &max, UnivChar &univ) {
- if (n_) {
- min = p_->descMin;
- max = p_->descMin + (p_->count - 1);
- univ = p_->univMin;
- p_++;
- n_--;
- return 1;
- }
- else
- return 0;
- }
-private:
- const UnivCharsetDesc::Range *p_;
- size_t n_;
-};
-
-class CharsetRegistryDescIter : public CharsetRegistry::Iter {
-public:
- CharsetRegistryDescIter(const unsigned short *p)
- : p_(p + 2), n_(p[0]), c_(p[1]) { }
- Boolean next(WideChar &min, WideChar &max, UnivChar &univ) {
- if (n_ == 0) {
- n_ = *p_;
- if (n_ == 0)
- return 0;
- p_++;
- c_ = *p_++;
- }
- int i = 1;
- for (; i < n_; i++)
- if (p_[i] != p_[i - 1] + 1)
- break;
- min = c_;
- max = min + (i - 1);
- univ = p_[0];
- p_ += i;
- c_ += i;
- n_ -= i;
- return 1;
- }
-private:
- const unsigned short *p_;
- size_t n_;
- WideChar c_;
-};
-
-static struct {
- const char *esc;
- CharsetRegistry::ISORegistrationNumber number;
-} escTable[] = {
- { "\x1B\x25\x40", CharsetRegistry::ISO646_ASCII_G0 },
- { "\x1B\x28\x40", CharsetRegistry::ISO646_ASCII_G0 },
- { "\x1B\x28\x42", CharsetRegistry::ISO646_ASCII_G0 }, // ASCII
- { "\x1B\x21\x40", CharsetRegistry::ISO646_C0 },
- { "\x1B\x2D\x41", CharsetRegistry::ISO8859_1 },
- { "\x1B\x2D\x42", CharsetRegistry::ISO8859_2 },
- { "\x1B\x2D\x43", CharsetRegistry::ISO8859_3 },
- { "\x1B\x2D\x44", CharsetRegistry::ISO8859_4 },
- { "\x1B\x2D\x4C", CharsetRegistry::ISO8859_5 },
- { "\x1B\x2D\x47", CharsetRegistry::ISO8859_6 },
- { "\x1B\x2D\x46", CharsetRegistry::ISO8859_7 },
- { "\x1B\x2D\x48", CharsetRegistry::ISO8859_8 },
- { "\x1B\x2D\x4D", CharsetRegistry::ISO8859_9 },
- { "\x1B\x28\x4A", CharsetRegistry::ISO646_JIS_G0 },
- { "\x1B\x28\x49", CharsetRegistry::JIS0201 },
- { "\x1B\x24\x42", CharsetRegistry::JIS0208 },
- { "\x1B\x26\x40\x1B\x24\x42", CharsetRegistry::JIS0208 },
- { "\x1B\x24\x28\x44", CharsetRegistry::JIS0212 },
- { "\x1B\x24\x41", CharsetRegistry::GB2312 },
- { "\x1B\x24\x28\x43", CharsetRegistry::KSC5601 },
- { "\x1B\x25\x2F\x40", CharsetRegistry::ISO10646_UCS2 },
- { "\x1B\x25\x2F\x41", CharsetRegistry::ISO10646_UCS4 },
- { "\x1B\x25\x2F\x43", CharsetRegistry::ISO10646_UCS2 },
- { "\x1B\x25\x2F\x44", CharsetRegistry::ISO10646_UCS4 },
- { "\x1B\x25\x2F\x45", CharsetRegistry::ISO10646_UCS2 },
- { "\x1B\x25\x2F\x46", CharsetRegistry::ISO10646_UCS4 },
-};
-
-static const UnivCharsetDesc::Range iso646_ascii[] = {
- { 0, 128, 0 },
-};
-
-static const UnivCharsetDesc::Range iso646_C0[] = {
- { 0, 32, 0 },
- { 127, 1, 127 },
-};
-
-static const UnivCharsetDesc::Range iso6429[] = {
- { 0, 32, 128 },
-};
-
-static const UnivCharsetDesc::Range iso8859_1[] = {
- { 32, 96, 160 },
-};
-
-static const UnivCharsetDesc::Range iso10646_ucs2[] = {
- { 0, 65536, 0 },
-};
-
-static const UnivCharsetDesc::Range iso10646_ucs4[] = {
- { 0, 0x80000000, 0 },
-};
-
-static struct {
- CharsetRegistry::ISORegistrationNumber number;
- const UnivCharsetDesc::Range *ranges;
- size_t nRanges;
-} rangeTable[] = {
- { CharsetRegistry::ISO646_ASCII_G0, iso646_ascii, SIZEOF(iso646_ascii) },
- { CharsetRegistry::ISO646_C0, iso646_C0, SIZEOF(iso646_C0) },
- { CharsetRegistry::ISO6429, iso6429, SIZEOF(iso6429) },
- { CharsetRegistry::ISO8859_1, iso8859_1, SIZEOF(iso8859_1) },
- { CharsetRegistry::ISO10646_UCS2, iso10646_ucs2, SIZEOF(iso10646_ucs2) },
- { CharsetRegistry::ISO10646_UCS4, iso10646_ucs4, SIZEOF(iso10646_ucs4) },
-};
-
-static const unsigned short iso8859_2[] = {
-#include "iso8859-2.h"
-};
-static const unsigned short iso8859_3[] = {
-#include "iso8859-3.h"
-};
-static const unsigned short iso8859_4[] = {
-#include "iso8859-4.h"
-};
-static const unsigned short iso8859_5[] = {
-#include "iso8859-5.h"
-};
-static const unsigned short iso8859_6[] = {
-#include "iso8859-6.h"
-};
-static const unsigned short iso8859_7[] = {
-#include "iso8859-7.h"
-};
-static const unsigned short iso8859_8[] = {
-#include "iso8859-8.h"
-};
-static const unsigned short iso8859_9[] = {
-#include "iso8859-9.h"
-};
-static const unsigned short iso646_jis_G0[] = {
-#include "iso646-jis.h"
-};
-static const unsigned short jis0201[] = {
-#include "jis0201.h"
-};
-
-#ifdef SP_MULTI_BYTE
-
-static const unsigned short jis0208[] = {
-#include "jis0208.h"
-};
-static const unsigned short jis0212[] = {
-#include "jis0212.h"
-};
-static const unsigned short gb2312[] = {
-#include "gb2312.h"
-};
-static const unsigned short ksc5601[] = {
-#include "ksc5601.h"
-};
-static const unsigned short big5[] = {
-#include "big5.h"
-};
-
-#endif /* SP_MULTI_BYTE */
-
-static const struct {
- CharsetRegistry::ISORegistrationNumber number;
- const unsigned short *desc;
-} descTable[] = {
- { CharsetRegistry::ISO8859_2, iso8859_2 },
- { CharsetRegistry::ISO8859_3, iso8859_3 },
- { CharsetRegistry::ISO8859_4, iso8859_4 },
- { CharsetRegistry::ISO8859_5, iso8859_5 },
- { CharsetRegistry::ISO8859_6, iso8859_6 },
- { CharsetRegistry::ISO8859_7, iso8859_7 },
- { CharsetRegistry::ISO8859_8, iso8859_8 },
- { CharsetRegistry::ISO8859_9, iso8859_9 },
- { CharsetRegistry::ISO646_JIS_G0, iso646_jis_G0 },
- { CharsetRegistry::JIS0201, jis0201 },
-#ifdef SP_MULTI_BYTE
- { CharsetRegistry::JIS0208, jis0208 },
- { CharsetRegistry::JIS0212, jis0212 },
- { CharsetRegistry::GB2312, gb2312 },
- { CharsetRegistry::KSC5601, ksc5601 },
- { CharsetRegistry::BIG5, big5 },
-#endif
-};
-
-
-CharsetRegistry::ISORegistrationNumber
-CharsetRegistry::getRegistrationNumber(const StringC &sequence,
- const CharsetInfo &charset)
-{
- // Canonicalize the escape sequence by mapping esc -> ESC,
- // removing leading zeros from escape sequences, and removing
- // initial spaces.
- StringC s;
- for (size_t i = 0; i < sequence.size(); i++) {
- Char c = sequence[i];
- if (c == charset.execToDesc('e'))
- s += charset.execToDesc('E');
- else if (c == charset.execToDesc('s'))
- s += charset.execToDesc('S');
- else if (c == charset.execToDesc('c'))
- s += charset.execToDesc('C');
- else if (charset.digitWeight(c) >= 0
- && s.size() > 0
- && s[s.size() - 1] == charset.execToDesc('0')
- && (s.size() == 1
- || charset.digitWeight(s[s.size() - 2]) >= 0))
- s[s.size() - 1] = c;
- else if (c != charset.execToDesc(' ') || s.size() > 0)
- s += c;
- }
- for (size_t i = 0; i < SIZEOF(escTable); i++) {
- StringC esc;
- for (const char *p = escTable[i].esc; *p; p++) {
- if (*p == 0x1B)
- esc += charset.execToDesc("ESC");
- else {
- static const char digits[] = "0123456789";
- int c = (unsigned char)*p >> 4;
- if (c >= 10)
- esc += charset.execToDesc('1');
- esc += charset.execToDesc(digits[c % 10]);
- esc += charset.execToDesc('/');
- c = (*p & 0xf);
- if (c >= 10)
- esc += charset.execToDesc('1');
- esc += charset.execToDesc(digits[c % 10]);
- }
- if (p[1])
- esc += charset.execToDesc(' ');
- }
- if (s == esc)
- return escTable[i].number;
- }
- return UNREGISTERED;
-}
-
-CharsetRegistry::Iter *CharsetRegistry::makeIter(ISORegistrationNumber number)
-{
- for (size_t i = 0; i < SIZEOF(rangeTable); i++) {
- if (number == rangeTable[i].number)
- return new CharsetRegistryRangeIter(rangeTable[i].ranges, rangeTable[i].nRanges);
- }
- for (size_t i = 0; i < SIZEOF(descTable); i++) {
- if (number == descTable[i].number)
- return new CharsetRegistryDescIter(descTable[i].desc);
- }
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineApp.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineApp.cxx
deleted file mode 100644
index 0753a08873..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineApp.cxx
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1996 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-// Need option registration method that allows derived class to change
-// option names.
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "CmdLineApp.h"
-#include "CmdLineAppMessages.h"
-#include "MessageArg.h"
-#include "ErrnoMessageArg.h"
-#include "Options.h"
-#include "version.h"
-#include "xnew.h"
-#include "macros.h"
-#include "sptchar.h"
-#include "MessageTable.h"
-#include "CodingSystemKit.h"
-
-#include "ConsoleOutput.h"
-
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef SP_HAVE_LOCALE
-#include <locale.h>
-#endif
-#ifdef SP_HAVE_SETMODE
-#include <fcntl.h>
-#include <io.h>
-#endif
-
-#include <sys/types.h>
-#ifdef SP_INCLUDE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef SP_INCLUDE_IO_H
-#include <io.h>
-#endif
-
-#ifdef _MSC_VER
-#include <crtdbg.h>
-#endif
-
-#ifndef SP_DEFAULT_ENCODING
-#ifdef WIN32
-#define SP_DEFAULT_ENCODING SP_T("WINDOWS")
-#else
-#define SP_DEFAULT_ENCODING SP_T("IS8859-1")
-#endif
-#endif /* not SP_DEFAULT_ENCODING */
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static const SP_TCHAR *progName = 0;
-
-static const SP_TCHAR versionString[] = SP_VERSION;
-
-static FileOutputByteStream standardOutput(1, 0);
-static FileOutputByteStream standardError(2, 0);
-
-CmdLineApp::CmdLineApp(const char *requiredInternalCode)
-: errorFile_(0),
- outputCodingSystem_(0),
- // Colon at beginning is Posix.2ism that says to
- // return : rather than ? for missing option argument.
- optstr_(SP_T(":"), 1),
- MessageReporter(0),
- internalCharsetIsDocCharset_(1),
- codingSystem_(0)
-{
- initCodingSystem(requiredInternalCode);
- setMessageStream(makeStdErr());
- registerOption('b', internalCharsetIsDocCharset_ ?
- SP_T("bctf") : SP_T("encoding"));
- registerOption('f', SP_T("error_file"));
- registerOption('v');
-}
-
-void CmdLineApp::resetCodingSystemKit()
-{
- codingSystemKit_ = codingSystemKit_->copy();
-}
-
-void CmdLineApp::registerOption(AppChar c, const AppChar *argName)
-{
- optstr_ += c;
- if (argName) {
- optstr_ += SP_T(':');
- optArgNames_.push_back(argName);
- }
-}
-
-StringC CmdLineApp::usageString()
-{
- String < AppChar > result;
- if (progName)
- result.assign(progName, tcslen(progName));
- PackedBoolean hadOption[128];
- for (int i = 0; i < 128; i++)
- hadOption[i] = 0;
- Boolean hadNoArgOption = 0;
- for (size_t i = 1; i < optstr_.size(); i++) {
- if (optstr_[i] == 0)
- break;
- if (i + 1 < optstr_.size() && optstr_[i + 1] == ':')
- i++;
- else
- if (!hadOption[optstr_[i]]) {
- hadOption[optstr_[i]] = 1;
- if (!hadNoArgOption) {
- hadNoArgOption = 1;
- result.append(SP_T(" [-"), 3);
- }
- result += optstr_[i];
- }
- }
- if (hadNoArgOption)
- result += SP_T(']');
- size_t j = 0;
- for (size_t i = 1; i < optstr_.size(); i++) {
- if (i + 1 < optstr_.size() && optstr_[i + 1] == ':') {
- if (!hadOption[optstr_[i]]) {
- hadOption[optstr_[i]] = 1;
- result += SP_T(' ');
- result += SP_T('[');
- result += SP_T('-');
- result += optstr_[i];
- result += SP_T(' ');
- result.append(optArgNames_[j],
- tcslen(optArgNames_[j]));
- result += SP_T(']');
- }
- i++;
- j++;
- }
- }
- result.append(SP_T(" sysid..."), tcslen(SP_T(" sysid...")));
- result += 0;
- return (convertInput(result.data()));
-}
-
-static void
- ewrite(const char *s)
-{
- int n = (int)strlen(s);
- while (n > 0) {
- int nw = write(2, s, n);
- if (nw < 0)
- break;
- n -= nw;
- s += nw;
- }
-}
-
-static
-#ifdef SP_FANCY_NEW_HANDLER
-int
- outOfMemory(size_t)
-#else
-void
- outOfMemory()
-#endif
-{
- ewrite("SP library: out of memory\n");
- exit(1);
-#ifdef SP_FANCY_NEW_HANDLER
- return (0);
-#endif
-}
-
-int CmdLineApp::init(int, AppChar **argv)
-{
-#ifndef SP_ANSI_LIB
-#ifdef __GNUC__
- std::set_new_handler(outOfMemory);
-#else
- set_new_handler(outOfMemory);
-#endif
-#endif
-#ifdef SP_HAVE_LOCALE
- setlocale(LC_ALL, "");
-#endif
-#ifdef SP_HAVE_SETMODE
- _setmode(1, _O_BINARY);
- _setmode(2, _O_BINARY);
-#endif
- progName = argv[0];
- if (progName)
- setProgramName(convertInput(progName));
- return (0);
-}
-
-int CmdLineApp::run(int argc, AppChar **argv)
-{
-#ifdef _MSC_VER
- _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
-#endif
-#ifdef SP_ANSI_LIB
- try {
-#endif
- int ret = init(argc, argv);
- if (ret)
- return (ret);
- int firstArg;
- ret = processOptions(argc, argv, firstArg);
- if (ret)
- return (ret);
- ret = processArguments(argc - firstArg, argv + firstArg);
- progName = 0;
- return (ret);
-#ifdef SP_ANSI_LIB
- }
-catch(
-#ifndef SP_NO_STD_NAMESPACE
- std::
-#endif
- bad_alloc) {
-#ifdef SP_FANCY_NEW_HANDLER
- outOfMemory(0);
-#else
- outOfMemory();
-#endif
- }
- return (1);
-#endif /* SP_ANSI_LIB */
-}
-
-int CmdLineApp::processOptions(int argc, AppChar **argv, int &nextArg)
-{
- AppChar ostr[2];
- optstr_ += SP_T('\0');
- Options < AppChar > options(argc, argv, optstr_.data());
- AppChar opt;
- while (options.get(opt)) {
- switch (opt) {
- case ':':
- ostr[0] = options.opt();
- ostr[1] = SP_T('\0');
- message(CmdLineAppMessages::
- missingOptionArgError,
- StringMessageArg(convertInput(ostr)));
- message(CmdLineAppMessages::usage,
- StringMessageArg(usageString()));
- return (1);
- case '?':
- ostr[0] = options.opt();
- ostr[1] = SP_T('\0');
- message(CmdLineAppMessages::invalidOptionError,
- StringMessageArg(convertInput(ostr)));
- message(CmdLineAppMessages::usage,
- StringMessageArg(usageString()));
- return (1);
- default:
- processOption(opt, options.arg());
- break;
- }
- }
- nextArg = options.ind();
- if (errorFile_) {
- static FileOutputByteStream file;
- if (!file.open(errorFile_)) {
- message(CmdLineAppMessages::openFileError,
- StringMessageArg(convertInput(errorFile_)),
- ErrnoMessageArg(errno));
- return (1);
- }
- setMessageStream(new EncodeOutputCharStream(&file,
- codingSystem()));
- }
- if (!outputCodingSystem_)
- outputCodingSystem_ = codingSystem();
- return (0);
-}
-
-void CmdLineApp::processOption(AppChar opt, const AppChar *arg)
-{
- switch (opt) {
- case 'b':
- outputCodingSystem_ = lookupCodingSystem(arg);
- if (!outputCodingSystem_)
- message(internalCharsetIsDocCharset_
- ? CmdLineAppMessages::unknownBctf
- : CmdLineAppMessages::unknownEncoding,
- StringMessageArg(convertInput(arg)));
- break;
- case 'f':
- errorFile_ = arg;
- break;
- case 'v':
- // print the version number
- message(CmdLineAppMessages::versionInfo,
- StringMessageArg(convertInput(versionString)));
- break;
- default:
- CANNOT_HAPPEN();
- }
-}
-
-Boolean CmdLineApp::getMessageText(const MessageFragment &frag,
- StringC &text)
-{
- String < SP_TCHAR > str;
- if (!MessageTable::instance()->getText(frag, str))
- return (0);
-#ifdef SP_WIDE_SYSTEM
- text.assign((const Char *)str.data(), str.size());
-#else
- str += 0;
- text = codingSystem()->convertIn(str.data());
-#endif
- return (1);
-}
-
-Boolean CmdLineApp::stringMatches(const SP_TCHAR *s, const char *key)
-{
- for (; *key != '\0'; s++, key++) {
- if (*s != tolower(*key) && *s != toupper(*key))
- return (0);
- }
- return (*s == '\0');
-}
-
-void CmdLineApp::initCodingSystem(const char *requiredInternalCode)
-{
- const char *name = requiredInternalCode;
-#ifdef SP_MULTI_BYTE
- char buf[256];
- if (!name) {
- const SP_TCHAR *internalCode =
- tgetenv(SP_T("SP_SYSTEM_CHARSET"));
- if (internalCode) {
- buf[255] = '\0';
- for (size_t i = 0; i < 255; i++) {
- buf[i] = internalCode[i];
- if (buf[i] == '\0')
- break;
- }
- name = buf;
- }
- }
- if (requiredInternalCode)
- internalCharsetIsDocCharset_ = 0;
- else {
- const SP_TCHAR *useInternal = tgetenv(SP_T("SP_CHARSET_FIXED"));
- if (useInternal &&
- (stringMatches(useInternal, "YES") ||
- stringMatches(useInternal, "1")))
- internalCharsetIsDocCharset_ = 0;
- }
-#endif /* SP_MULTI_BYTE */
- codingSystemKit_ = CodingSystemKit::make(name);
- const SP_TCHAR *codingName = tgetenv(internalCharsetIsDocCharset_
- ? SP_T("SP_BCTF")
- : SP_T("SP_ENCODING"));
- if (codingName)
- codingSystem_ = lookupCodingSystem(codingName);
-#ifdef SP_MULTI_BYTE
- if (!codingSystem_ && !internalCharsetIsDocCharset_)
- codingSystem_ = lookupCodingSystem(SP_DEFAULT_ENCODING);
-#endif
- if (!codingSystem_ ||
-#ifndef SP_WIDE_SYSTEM
- codingSystem_->fixedBytesPerChar() > 1
-#endif
-)
- codingSystem_ = codingSystemKit_->identityCodingSystem();
-}
-
-const CodingSystem *
-CmdLineApp::lookupCodingSystem(const AppChar *codingName)
-{
-#define MAX_CS_NAME 50
- if (tcslen(codingName) < MAX_CS_NAME) {
- char buf[MAX_CS_NAME];
- int i;
- for (i = 0; codingName[i] != SP_T('\0'); i++) {
- SP_TUCHAR c = codingName[i];
-#ifdef SP_WIDE_SYSTEM
- if (c > (unsigned char)-1)
- return (0);
-#endif
- buf[i] = char(c);
- }
- buf[i] = '\0';
- return (codingSystemKit_->makeCodingSystem(buf,
- internalCharsetIsDocCharset_));
- }
- return (0);
-}
-
-StringC CmdLineApp::convertInput(const SP_TCHAR *s)
-{
-#ifdef SP_WIDE_SYSTEM
- StringC str(s, wcslen(s));
-#else
- StringC str(codingSystem()->convertIn(s));
-#endif
- for (size_t i = 0; i < str.size(); i++)
- if (str[i] == '\n')
- str[i] = '\r';
- return (str);
-}
-
-OutputCharStream *CmdLineApp::makeStdErr()
-{
- OutputCharStream *os = ConsoleOutput::makeOutputCharStream(2);
- if (os)
- return (os);
- return (new EncodeOutputCharStream(
- &standardError, codingSystem()));
-}
-
-OutputCharStream *CmdLineApp::makeStdOut()
-{
- OutputCharStream *os = ConsoleOutput::makeOutputCharStream(1);
- if (os)
- return (os);
- return (new EncodeOutputCharStream(&standardOutput,
- outputCodingSystem_));
-}
-
-const MessageType2 &CmdLineApp::openFileErrorMessage()
-{
- return (CmdLineAppMessages::openFileError);
-}
-
-const MessageType2 &CmdLineApp::closeFileErrorMessage()
-{
- return (CmdLineAppMessages::closeFileError);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineAppMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineAppMessages.h
deleted file mode 100644
index 6255a98928..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CmdLineAppMessages.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// This file was automatically generated from lib\CmdLineAppMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct CmdLineAppMessages {
- // 4000
- static const MessageType1 invalidOptionError;
- // 4001
- static const MessageType1 missingOptionArgError;
- // 4002
- static const MessageType1 usage;
- // 4003
- static const MessageType1 versionInfo;
- // 4004
- static const MessageType1 unknownBctf;
- // 4005
- static const MessageType1 unknownEncoding;
- // 4006
- static const MessageType2 openFileError;
- // 4007
- static const MessageType2 closeFileError;
-};
-const MessageType1 CmdLineAppMessages::invalidOptionError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4000
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid option %1"
-#endif
-);
-const MessageType1 CmdLineAppMessages::missingOptionArgError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4001
-#ifndef SP_NO_MESSAGE_TEXT
-,"missing argument for option %1"
-#endif
-);
-const MessageType1 CmdLineAppMessages::usage(
-MessageType::info,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4002
-#ifndef SP_NO_MESSAGE_TEXT
-,"usage is %1"
-#endif
-);
-const MessageType1 CmdLineAppMessages::versionInfo(
-MessageType::info,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4003
-#ifndef SP_NO_MESSAGE_TEXT
-,"SP version %1"
-#endif
-);
-const MessageType1 CmdLineAppMessages::unknownBctf(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4004
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown BCTF %1"
-#endif
-);
-const MessageType1 CmdLineAppMessages::unknownEncoding(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4005
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown encoding %1"
-#endif
-);
-const MessageType2 CmdLineAppMessages::openFileError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4006
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot open output file %1 (%2)"
-#endif
-);
-const MessageType2 CmdLineAppMessages::closeFileError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4007
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot close output file %1 (%2)"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystem.cxx
deleted file mode 100644
index 22c0844029..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystem.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "CodingSystem.h"
-
-#include <string.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-InputCodingSystem::~InputCodingSystem()
-{
-}
-
-StringC InputCodingSystem::convertIn(const char *s) const
-{
- Decoder *decoder = makeDecoder();
- StringC str;
- str.resize(strlen(s));
- str.resize(decoder->decode(&str[0], s, strlen(s), &s));
- delete decoder;
- return str;
-}
-
-Boolean InputCodingSystem::isIdentity() const
-{
- return 0;
-}
-
-OutputCodingSystem::~OutputCodingSystem()
-{
-}
-
-unsigned OutputCodingSystem::fixedBytesPerChar() const
-{
- return 0;
-}
-
-String<char> OutputCodingSystem::convertOut(const StringC &str) const
-{
- Encoder *encoder = makeEncoder();
- StrOutputByteStream stream;
- encoder->output(str.data(), str.size(), &stream);
- delete encoder;
- String<char> result;
- stream.extractString(result);
- result += '\0';
- return result;
-}
-
-Decoder::Decoder(unsigned minBytesPerChar)
-: minBytesPerChar_(minBytesPerChar)
-{
-}
-
-Decoder::~Decoder()
-{
-}
-
-Boolean Decoder::convertOffset(unsigned long &) const
-{
- return false;
-}
-
-Encoder::Encoder()
-{
-}
-
-Encoder::~Encoder()
-{
-}
-
-void Encoder::output(Char *s, size_t n, OutputByteStream *sp)
-{
- output((const Char *)s, n, sp);
-}
-
-void Encoder::startFile(OutputByteStream *)
-{
-}
-
-void Encoder::handleUnencodable(Char, OutputByteStream *)
-{
-}
-
-void Encoder::setUnencodableHandler(Handler *)
-{
-}
-
-RecoveringEncoder::RecoveringEncoder()
-: unencodableHandler_(0)
-{
-}
-
-void RecoveringEncoder::handleUnencodable(Char c, OutputByteStream *sbufp)
-{
- if (unencodableHandler_)
- unencodableHandler_->handleUnencodable(c, sbufp);
-}
-
-void RecoveringEncoder::setUnencodableHandler(Handler *handler)
-{
- unencodableHandler_ = handler;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystemKit.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystemKit.cxx
deleted file mode 100644
index a6e794b213..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/CodingSystemKit.cxx
+++ /dev/null
@@ -1,531 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "CodingSystemKit.h"
-#include "TranslateCodingSystem.h"
-#ifdef SP_MULTI_BYTE
-#include "UTF8CodingSystem.h"
-#include "Fixed2CodingSystem.h"
-#include "UnicodeCodingSystem.h"
-#include "XMLCodingSystem.h"
-#include "EUCJPCodingSystem.h"
-#include "SJISCodingSystem.h"
-#include "Big5CodingSystem.h"
-#ifdef WIN32
-#include "Win32CodingSystem.h"
-#endif
-#endif /* SP_MULTI_BYTE */
-#include "IdentityCodingSystem.h"
-#include "Owner.h"
-
-#include <ctype.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_MULTI_BYTE
-const Char unicodeReplaceChar = 0xfffd;
-#endif
-
-class CodingSystemKitImpl : public CodingSystemKit {
-public:
- CodingSystemKitImpl(const TranslateCodingSystem::Desc *);
- CodingSystemKit *copy() const;
- Char replacementChar() const;
- const CodingSystem *
- identityCodingSystem() const;
- const InputCodingSystem *
- identityInputCodingSystem() const;
- const InputCodingSystem *
- makeInputCodingSystem(const StringC &,
- const CharsetInfo &,
- Boolean isBctf,
- const char *&) const;
- const CodingSystem *
- makeCodingSystem(const char *, Boolean isBctf) const;
- enum CodingSystemId {
- identity,
- fixed2,
- utf8,
- unicode,
- eucjp,
- euccn,
- euckr,
- sjisBctf,
- eucBctf,
- sjis,
- big5,
- big5Bctf,
- ansi,
- oem,
- maybeUnicode,
- xml,
- iso8859_1,
- iso8859_2,
- iso8859_3,
- iso8859_4,
- iso8859_5,
- iso8859_6,
- iso8859_7,
- iso8859_8,
- iso8859_9
- };
- struct Entry {
- const char *name;
- CodingSystemId id;
- };
- static Boolean match(const StringC &s,
- const CharsetInfo &charset,
- const char *key);
- static Boolean match(const char *s,
- const char *key);
-private:
- const CodingSystem *
- makeCodingSystem(CodingSystemId) const;
- const Entry *firstEntry(Boolean isBctf) const;
-#ifdef SP_MULTI_BYTE
- UTF8CodingSystem utf8CodingSystem_;
- Fixed2CodingSystem fixed2CodingSystem_;
- UnicodeCodingSystem unicodeCodingSystem_;
- XMLCodingSystem xmlCodingSystem_;
- EUCJPCodingSystem eucBctf_;
- SJISCodingSystem sjisBctf_;
- Big5CodingSystem big5Bctf_;
- TranslateCodingSystem eucjpCodingSystem_;
- TranslateCodingSystem euccnCodingSystem_;
- TranslateCodingSystem euckrCodingSystem_;
- TranslateCodingSystem sjisCodingSystem_;
- TranslateCodingSystem big5CodingSystem_;
- TranslateCodingSystem iso8859_1CodingSystem_;
- TranslateCodingSystem iso8859_2CodingSystem_;
- TranslateCodingSystem iso8859_3CodingSystem_;
- TranslateCodingSystem iso8859_4CodingSystem_;
- TranslateCodingSystem iso8859_5CodingSystem_;
- TranslateCodingSystem iso8859_6CodingSystem_;
- TranslateCodingSystem iso8859_7CodingSystem_;
- TranslateCodingSystem iso8859_8CodingSystem_;
- TranslateCodingSystem iso8859_9CodingSystem_;
-#ifdef WIN32
- Win32CodingSystem ansiCodingSystem_;
- Win32CodingSystem oemCodingSystem_;
- UnicodeCodingSystem maybeUnicodeCodingSystem_;
-#endif
-#endif /* SP_MULTI_BYTE */
- IdentityCodingSystem identityCodingSystem_;
- const TranslateCodingSystem::Desc *systemCharsetDesc_;
- static const Entry bctfTable_[];
- enum { nEncodingsRequireUnicode = 8 };
- static const Entry encodingTable_[];
-};
-
-
-static const TranslateCodingSystem::Desc iso10646Desc[] = {
- { CharsetRegistry::ISO10646_UCS2, 0x0 },
- { CharsetRegistry::UNREGISTERED, 0x0 },
-};
-
-#ifdef SP_MULTI_BYTE
-
-static const TranslateCodingSystem::Desc jisDesc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_JIS_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::JIS0201, 0x80 },
- { CharsetRegistry::JIS0208, 0x8080 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc jis2Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_JIS_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::JIS0201, 0x80 },
- { CharsetRegistry::JIS0208, 0x8080 },
- { CharsetRegistry::JIS0212, 0x8000 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc gbDesc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::GB2312, 0x8080 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc big5Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::BIG5, 0x0 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc kscDesc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::KSC5601, 0x8080 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_1Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_1, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_2Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_2, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_3Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_3, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_4Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_4, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_5Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_5, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_6Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_6, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_7Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_7, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_8Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_8, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-static const TranslateCodingSystem::Desc iso8859_9Desc[] = {
- { CharsetRegistry::ISO646_C0, 0x0 },
- { CharsetRegistry::ISO646_ASCII_G0, 0x0 },
- { CharsetRegistry::ISO6429, 0x80 },
- { CharsetRegistry::ISO8859_9, 0x80 },
- { CharsetRegistry::UNREGISTERED, 0x0 }
-};
-
-#endif /* SP_MULTI_BYTE */
-
-const CodingSystemKitImpl::Entry CodingSystemKitImpl::bctfTable_[] = {
- { "IDENTITY", identity },
-#ifdef SP_MULTI_BYTE
- { "FIXED-2", fixed2 },
- { "UTF-8", utf8 },
- { "EUC", eucBctf },
- { "SJIS", sjisBctf },
- { "BIG5", big5Bctf },
-#endif /* SP_MULTI_BYTE */
- { 0, identity },
-};
-
-const CodingSystemKitImpl::Entry CodingSystemKitImpl::encodingTable_[] = {
-#ifdef SP_MULTI_BYTE
- { "UTF-8", utf8 },
- { "UCS-2", fixed2 },
- { "ISO-10646-UCS-2", fixed2 },
- { "UNICODE", unicode },
- // We don't really support UTF-16, but treating it
- // as Unicode should work for the most part.
- { "UTF-16", unicode },
- { "WINDOWS", ansi },
- { "MS-DOS", oem },
- { "WUNICODE", maybeUnicode },
- { "XML", xml },
- // nEncodingsRequireUnicode = 8
- { "IS8859-1", iso8859_1 },
- { "ISO-8859-1", iso8859_1 },
- { "IS8859-2", iso8859_2 },
- { "ISO-8859-2", iso8859_2 },
- { "IS8859-3", iso8859_3 },
- { "ISO-8859-3", iso8859_3 },
- { "IS8859-4", iso8859_4 },
- { "ISO-8859-4", iso8859_4 },
- { "IS8859-5", iso8859_5 },
- { "ISO-8859-5", iso8859_5 },
- { "IS8859-6", iso8859_6 },
- { "ISO-8859-6", iso8859_6 },
- { "IS8859-7", iso8859_7 },
- { "ISO-8859-7", iso8859_7 },
- { "IS8859-8", iso8859_8 },
- { "ISO-8859-8", iso8859_8 },
- { "IS8859-9", iso8859_9 },
- { "ISO-8859-9", iso8859_9 },
- { "EUC-JP", eucjp },
- { "EUC-CN", euccn },
- { "GB2312", euccn },
- { "CN-GB", euccn }, // RFC 1922
- { "EUC-KR", euckr },
- { "SJIS", sjis },
- { "SHIFT_JIS", sjis },
- { "BIG5", big5 },
- { "CN-BIG5", big5 }, // RFC 1922
-#endif /* SP_MULTI_BYTE */
- { 0, identity },
-};
-
-CodingSystemKitImpl::CodingSystemKitImpl(const TranslateCodingSystem::Desc *systemCharsetDesc)
-: systemCharsetDesc_(systemCharsetDesc)
-#ifdef SP_MULTI_BYTE
- ,
-#ifdef WIN32
- ansiCodingSystem_(Win32CodingSystem::codePageAnsi),
- oemCodingSystem_(Win32CodingSystem::codePageOEM),
- maybeUnicodeCodingSystem_(&ansiCodingSystem_),
-#endif
- xmlCodingSystem_(this),
- iso8859_1CodingSystem_(&identityCodingSystem_, iso8859_1Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_2CodingSystem_(&identityCodingSystem_, iso8859_2Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_3CodingSystem_(&identityCodingSystem_, iso8859_3Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_4CodingSystem_(&identityCodingSystem_, iso8859_4Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_5CodingSystem_(&identityCodingSystem_, iso8859_5Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_6CodingSystem_(&identityCodingSystem_, iso8859_6Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_7CodingSystem_(&identityCodingSystem_, iso8859_7Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_8CodingSystem_(&identityCodingSystem_, iso8859_8Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- iso8859_9CodingSystem_(&identityCodingSystem_, iso8859_9Desc, &systemCharset_, 0x100, unicodeReplaceChar),
- eucjpCodingSystem_(&eucBctf_, jis2Desc, &systemCharset_, 0x8000, unicodeReplaceChar),
- euccnCodingSystem_(&eucBctf_, gbDesc, &systemCharset_, 0x8000, unicodeReplaceChar),
- euckrCodingSystem_(&eucBctf_, kscDesc, &systemCharset_, 0x8000, unicodeReplaceChar),
- sjisCodingSystem_(&sjisBctf_, jisDesc, &systemCharset_, 0x8000, unicodeReplaceChar),
- big5CodingSystem_(&big5Bctf_, big5Desc, &systemCharset_, 0x0080, unicodeReplaceChar)
-#endif /* SP_MULTI_BYTE */
-{
- UnivCharsetDesc desc;
- for (const TranslateCodingSystem::Desc *p = systemCharsetDesc_;
- p->number != CharsetRegistry::UNREGISTERED;
- p++) {
- Owner<CharsetRegistry::Iter> iter(CharsetRegistry::makeIter(p->number));
- if (iter) {
- WideChar min;
- WideChar max;
- UnivChar univ;
- while (iter->next(min, max, univ)) {
- min += p->add;
- max += p->add;
- if (min <= charMax) {
- if (max > charMax)
- max = charMax;
- desc.addRange(min, max, univ);
- }
- }
- }
- }
- systemCharset_.set(desc);
-}
-
-CodingSystemKit *CodingSystemKitImpl::copy() const
-{
- return new CodingSystemKitImpl(systemCharsetDesc_);
-}
-
-const CodingSystemKitImpl::Entry *CodingSystemKitImpl::firstEntry(Boolean isBctf) const
-{
- if (isBctf)
- return bctfTable_;
-#ifdef SP_MULTI_BYTE
- else if (systemCharsetDesc_ != iso10646Desc)
- return encodingTable_ + nEncodingsRequireUnicode;
-#endif
- else
- return encodingTable_;
-}
-
-const InputCodingSystem *
-CodingSystemKitImpl::makeInputCodingSystem(const StringC &s,
- const CharsetInfo &charset,
- Boolean isBctf,
- const char *&key) const
-{
- for (const Entry *p = firstEntry(isBctf); p->name; p++)
- if (match(s, charset, p->name)) {
- key = p->name;
- return makeCodingSystem(p->id);
- }
- return 0;
-}
-
-Boolean
-CodingSystemKitImpl::match(const StringC &s,
- const CharsetInfo &charset,
- const char *key)
-{
- for (size_t i = 0; i < s.size(); i++) {
- if (key[i] == '\0')
- return 0;
- if (charset.execToDesc(toupper(key[i])) != s[i]
- && charset.execToDesc(tolower(key[i])) != s[i])
- return 0;
- }
- return key[s.size()] == '\0';
-}
-
-const CodingSystem *
-CodingSystemKitImpl::makeCodingSystem(const char *s,
- Boolean isBctf)
- const
-{
- for (const Entry *p = firstEntry(isBctf); p->name; p++)
- if (match(s, p->name))
- return makeCodingSystem(p->id);
- return 0;
-}
-
-Boolean
-CodingSystemKitImpl::match(const char *s,
- const char *key)
-{
- for (; toupper(*key) == *s || tolower(*key) == *s; s++, key++) {
- if (*s == '\0')
- return 1;
- }
- return 0;
-}
-
-const CodingSystem *
-CodingSystemKitImpl::makeCodingSystem(CodingSystemId id) const
-{
- switch (id) {
- case identity:
- return &identityCodingSystem_;
-#ifdef SP_MULTI_BYTE
- case fixed2:
- return &fixed2CodingSystem_;
- case utf8:
- return &utf8CodingSystem_;
- case unicode:
- return &unicodeCodingSystem_;
- case eucBctf:
- return &eucBctf_;
- case sjisBctf:
- return &sjisBctf_;
- case big5Bctf:
- return &big5Bctf_;
- case eucjp:
- return &eucjpCodingSystem_;
- case euccn:
- return &euccnCodingSystem_;
- case euckr:
- return &euckrCodingSystem_;
- case sjis:
- return &sjisCodingSystem_;
- case big5:
- return &big5CodingSystem_;
- case iso8859_1:
- if (systemCharsetDesc_ == iso10646Desc)
- return &identityCodingSystem_;
- else
- return &iso8859_1CodingSystem_;
- case iso8859_2:
- return &iso8859_2CodingSystem_;
- case iso8859_3:
- return &iso8859_3CodingSystem_;
- case iso8859_4:
- return &iso8859_4CodingSystem_;
- case iso8859_5:
- return &iso8859_5CodingSystem_;
- case iso8859_6:
- return &iso8859_6CodingSystem_;
- case iso8859_7:
- return &iso8859_7CodingSystem_;
- case iso8859_8:
- return &iso8859_8CodingSystem_;
- case iso8859_9:
- return &iso8859_9CodingSystem_;
- case xml:
- return &xmlCodingSystem_;
-#ifdef WIN32
- case ansi:
- return &ansiCodingSystem_;
- case oem:
- return &oemCodingSystem_;
- case maybeUnicode:
- return &maybeUnicodeCodingSystem_;
-#endif /* WIN32 */
-#endif /* SP_MULTI_BYTE */
- default:
- break;
- }
- return 0;
-}
-
-const InputCodingSystem *
-CodingSystemKitImpl::identityInputCodingSystem() const
-{
- return &identityCodingSystem_;
-}
-
-const CodingSystem *
-CodingSystemKitImpl::identityCodingSystem() const
-{
- return &identityCodingSystem_;
-}
-
-Char CodingSystemKitImpl::replacementChar() const
-{
- // FIXME should vary with systemCharset
-#ifdef SP_MULTI_BYTE
- return unicodeReplaceChar;
-#else
- return 0;
-#endif
-}
-
-CodingSystemKit *
-CodingSystemKit::make(const char *systemCharsetName)
-{
-#ifdef SP_MULTI_BYTE
- if (systemCharsetName && CodingSystemKitImpl::match(systemCharsetName, "JIS"))
- return new CodingSystemKitImpl(jis2Desc);
-#endif
- return new CodingSystemKitImpl(iso10646Desc);
-}
-
-InputCodingSystemKit::~InputCodingSystemKit()
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ConsoleOutput.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ConsoleOutput.cxx
deleted file mode 100644
index 70d5a019bc..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ConsoleOutput.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ConsoleOutput.h"
-
-#ifdef SP_WIDE_SYSTEM
-#include <windows.h>
-#include <io.h>
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_WIDE_SYSTEM
-
-class ConsoleOutputCharStream : public OutputCharStream {
-public:
- ConsoleOutputCharStream(HANDLE h);
- void flush();
- void flushBuf(Char);
-private:
- HANDLE h_;
-};
-
-OutputCharStream *ConsoleOutput::makeOutputCharStream(int fd)
-{
- HANDLE h = (HANDLE)_get_osfhandle(fd);
- DWORD flags;
- if (GetConsoleMode(h, &flags))
- return new ConsoleOutputCharStream(h);
- else
- return 0;
-}
-
-ConsoleOutputCharStream::ConsoleOutputCharStream(HANDLE h)
-: h_(h)
-{
-}
-
-void ConsoleOutputCharStream::flush()
-{
-}
-
-void ConsoleOutputCharStream::flushBuf(Char c)
-{
- DWORD nWritten;
- unsigned short ch = c;
- if (WriteConsoleW(h_, &ch, 1, &nWritten, 0))
- return;
- char buf[2];
- int nBytes = WideCharToMultiByte(CP_OEMCP, 0, &ch, 1, buf, 2, 0, 0);
- if (nBytes)
- WriteConsoleA(h_, buf, nBytes, &nWritten, 0);
-}
-
-#else /* not SP_WIDE_SYSTEM */
-
-OutputCharStream *ConsoleOutput::makeOutputCharStream(int)
-{
- return 0;
-}
-
-#endif /* not SP_WIDE_SYSTEM */
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ContentState.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ContentState.cxx
deleted file mode 100644
index 57ae694652..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ContentState.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) 1994, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ContentState.h"
-#include "IListIter.h"
-#include "NCVector.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const ShortReferenceMap ContentState::theEmptyMap;
-
-#ifdef __GNUG__
-typedef IListIter<OpenElement> Dummy_IListIter_OpenElement;
-#endif
-
-ContentState::ContentState()
-: documentElementContainer_(StringC(), size_t(-1))
-{
-}
-
-void ContentState::startContent(const Dtd &dtd)
-{
- NCVector<Owner<ContentToken> > tokens(1);
- tokens[0] = new ElementToken(dtd.documentElementType(),
- ContentToken::none);
- Owner<ModelGroup> model(new SeqModelGroup(tokens, ContentToken::none));
- Owner<CompiledModelGroup> compiledModel(new CompiledModelGroup(model));
- Vector<ContentModelAmbiguity> ambiguities;
- Boolean pcdataUnreachable;
- compiledModel->compile(dtd.nElementTypeIndex(), ambiguities,
- pcdataUnreachable);
- ASSERT(ambiguities.size() == 0);
- ConstPtr<ElementDefinition> def
- = new ElementDefinition(Location(),
- 0,
- 0,
- ElementDefinition::modelGroup,
- compiledModel);
- documentElementContainer_.setElementDefinition(def, 0);
- tagLevel_ = 0;
- while (!openElements_.empty())
- delete openElements_.get();
- openElements_.insert(new OpenElement(&documentElementContainer_,
- 0,
- 0,
- &theEmptyMap,
- Location()));
- includeCount_.assign(dtd.nElementTypeIndex(), 0);
- excludeCount_.assign(dtd.nElementTypeIndex(), 0);
- openElementCount_.assign(dtd.nElementTypeIndex(), 0);
- netEnablingCount_ = 0;
- totalExcludeCount_ = 0;
- lastEndedElementType_ = 0;
- nextIndex_ = 0;
-}
-
-void ContentState::pushElement(OpenElement *e)
-{
- tagLevel_++;
- openElementCount_[e->type()->index()]++;
- const ElementDefinition *def = e->type()->definition();
- if (def) {
- size_t i;
- for (i = 0; i < def->nInclusions(); i++)
- includeCount_[def->inclusion(i)->index()]++;
- for (i = 0; i < def->nExclusions(); i++) {
- excludeCount_[def->exclusion(i)->index()]++;
- totalExcludeCount_++;
- }
- }
- if (e->netEnabling())
- netEnablingCount_++;
- e->setIndex(nextIndex_++);
- openElements_.insert(e);
-}
-
-OpenElement *ContentState::popSaveElement()
-{
- ASSERT(tagLevel_ > 0);
- OpenElement *e = openElements_.get();
- tagLevel_--;
- openElementCount_[e->type()->index()]--;
- const ElementDefinition *def = e->type()->definition();
- if (def) {
- size_t i;
- for (i = 0; i < def->nInclusions(); i++)
- includeCount_[def->inclusion(i)->index()]--;
- for (i = 0; i < def->nExclusions(); i++) {
- excludeCount_[def->exclusion(i)->index()]--;
- totalExcludeCount_--;
- }
- }
- if (e->netEnabling())
- netEnablingCount_--;
- lastEndedElementType_ = e->type();
- return e;
-}
-
-void ContentState::popElement()
-{
- delete popSaveElement();
-}
-
-Boolean ContentState::checkImplyLoop(unsigned count)
-{
- for (IListIter<OpenElement> iter(openElements_);
- count > 0;
- iter.next(), count--)
- if (iter.cur()->type() == openElements_.head()->type()
- // I'm not sure whether this is necessary.
- && iter.cur()->matchState() == openElements_.head()->matchState())
- return 0;
- return 1;
-}
-
-void ContentState::getOpenElementInfo(Vector<OpenElementInfo> &v,
- const StringC &rniPcdata) const
-{
- v.clear();
- v.resize(tagLevel_);
- unsigned i = tagLevel_;
- for (IListIter<OpenElement> iter(openElements_);
- !iter.done() && i > 0;
- iter.next()) {
- OpenElementInfo &e = v[--i];
- e.gi = iter.cur()->type()->name();
- const LeafContentToken *token = iter.cur()->currentPosition();
- if (token && !token->isInitial()) {
- e.matchIndex = token->typeIndex() + 1;
- const ElementType *type = token->elementType();
- e.matchType = type ? type->name() : rniPcdata;
- }
- e.included = iter.cur()->included();
- }
-}
-
-ElementType *
-ContentState::lookupCreateUndefinedElement(const StringC &name,
- const Location &loc,
- Dtd &dtd)
-{
- ElementType *p = new ElementType(name,
- dtd.allocElementTypeIndex());
- dtd.insertUndefinedElementType(p);
- p->setElementDefinition(new ElementDefinition(loc,
- size_t(ElementDefinition::undefinedIndex),
- 0,
- ElementDefinition::any),
- 0);
- p->setAttributeDef(dtd.implicitElementAttributeDef());
-
- includeCount_.push_back(0);
- excludeCount_.push_back(0);
- openElementCount_.push_back(0);
- return p;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ContentToken.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ContentToken.cxx
deleted file mode 100644
index 444cc7fc8c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ContentToken.cxx
+++ /dev/null
@@ -1,790 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include <stdlib.h>
-#include "ContentToken.h"
-#include "macros.h"
-#include "ElementType.h"
-#include "Vector.h"
-#include "Dtd.h"
-#include "MessageArg.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-AndModelGroup::AndModelGroup(NCVector<Owner<ContentToken> > &v,
- ContentToken::OccurrenceIndicator oi)
-: ModelGroup(v, oi)
-{
-}
-
-ModelGroup::Connector AndModelGroup::connector() const
-{
- return andConnector;
-}
-
-OrModelGroup::OrModelGroup(NCVector<Owner<ContentToken> > &v,
- ContentToken::OccurrenceIndicator oi)
-: ModelGroup(v, oi)
-{
- setOrGroup();
-}
-
-ModelGroup::Connector OrModelGroup::connector() const
-{
- return orConnector;
-}
-
-
-SeqModelGroup::SeqModelGroup(NCVector<Owner<ContentToken> > &v,
- ContentToken::OccurrenceIndicator oi)
-: ModelGroup(v, oi)
-{
-}
-
-ModelGroup::Connector SeqModelGroup::connector() const
-{
- return seqConnector;
-}
-
-
-ModelGroup::ModelGroup(NCVector<Owner<ContentToken> > &v,
- OccurrenceIndicator oi)
-: ContentToken(oi)
-{
- members_.swap(v);
-}
-
-unsigned long ModelGroup::grpgtcnt() const
-{
- unsigned long cnt = 1;
- for (size_t i = 0; i < members_.size(); i++)
- cnt += members_[i]->grpgtcnt();
- return cnt;
-}
-
-void ModelGroup::setOrGroup()
-{
- for (size_t i = 0; i < members_.size(); i++)
- members_[i]->setOrGroupMember();
-}
-
-const ModelGroup *ModelGroup::asModelGroup() const
-{
- return this;
-}
-
-ElementToken::ElementToken(const ElementType *element, OccurrenceIndicator oi)
-: LeafContentToken(element, oi)
-{
-}
-
-ContentToken::ContentToken(OccurrenceIndicator oi)
-: occurrenceIndicator_(oi)
-{
-}
-
-unsigned long ContentToken::grpgtcnt() const
-{
- return 1;
-}
-
-void ContentToken::setOrGroupMember()
-{
-}
-
-const ModelGroup *ContentToken::asModelGroup() const
-{
- return 0;
-}
-
-const LeafContentToken *ContentToken::asLeafContentToken() const
-{
- return 0;
-}
-
-LeafContentToken::LeafContentToken(const ElementType *element,
- OccurrenceIndicator oi)
-: element_(element), ContentToken(oi), isFinal_(0), orGroupMember_(0),
- requiredIndex_(size_t(-1))
-{
-}
-
-Boolean LeafContentToken::isInitial() const
-{
- return 0;
-}
-
-void LeafContentToken::setOrGroupMember()
-{
- orGroupMember_ = 1;
-}
-
-const LeafContentToken *LeafContentToken::asLeafContentToken() const
-{
- return this;
-}
-
-PcdataToken::PcdataToken()
-: LeafContentToken(0, rep)
-{
-}
-
-InitialPseudoToken::InitialPseudoToken()
-: LeafContentToken(0, none)
-{
-}
-
-Boolean InitialPseudoToken::isInitial() const
-{
- return 1;
-}
-
-DataTagGroup::DataTagGroup(NCVector<Owner<ContentToken> > &vec,
- OccurrenceIndicator oi)
-: SeqModelGroup(vec, oi)
-{
-}
-
-DataTagElementToken::DataTagElementToken(const ElementType *element,
- Vector<Text> &templates,
- Text &paddingTemplate)
-: ElementToken(element, ContentToken::none),
- havePaddingTemplate_(1)
-{
- templates.swap(templates_);
- paddingTemplate.swap(paddingTemplate_);
-}
-
-DataTagElementToken::DataTagElementToken(const ElementType *element,
- Vector<Text> &templates)
-: ElementToken(element, ContentToken::none),
- havePaddingTemplate_(0)
-{
- templates.swap(templates_);
-}
-
-ContentToken::~ContentToken()
-{
-}
-
-struct GroupInfo {
- unsigned nextLeafIndex;
- PackedBoolean containsPcdata;
- unsigned andStateSize;
- Vector<unsigned> nextTypeIndex;
- GroupInfo(size_t);
-};
-
-
-GroupInfo::GroupInfo(size_t nType)
-: nextTypeIndex(nType, 0), nextLeafIndex(0), containsPcdata(0), andStateSize(0)
-{
-}
-
-CompiledModelGroup::CompiledModelGroup(Owner<ModelGroup> &modelGroup)
-: modelGroup_(modelGroup.extract())
-{
-}
-
-void CompiledModelGroup::compile(size_t nElementTypeIndex,
- Vector<ContentModelAmbiguity> &ambiguities,
- Boolean &pcdataUnreachable)
-{
- FirstSet first;
- LastSet last;
- GroupInfo info(nElementTypeIndex);
- modelGroup_->analyze(info, 0, 0, first, last);
- for (unsigned i = 0; i < last.size(); i++)
- last[i]->setFinal();
- andStateSize_ = info.andStateSize;
- containsPcdata_ = info.containsPcdata;
- initial_ = new InitialPseudoToken;
- LastSet initialSet(1);
- initialSet[0] = initial_.pointer();
- ContentToken::addTransitions(initialSet, first, 1, 0, 0);
- if (modelGroup_->inherentlyOptional())
- initial_->setFinal();
- pcdataUnreachable = 0;
- Vector<unsigned> minAndDepth(info.nextLeafIndex);
- Vector<size_t> elementTransition(nElementTypeIndex);
- initial_->finish(minAndDepth, elementTransition, ambiguities,
- pcdataUnreachable);
- modelGroup_->finish(minAndDepth, elementTransition, ambiguities,
- pcdataUnreachable);
- if (!containsPcdata_)
- pcdataUnreachable = 0;
-}
-
-void ModelGroup::finish(Vector<unsigned> &minAndDepth,
- Vector<size_t> &elementTransition,
- Vector<ContentModelAmbiguity> &ambiguities,
- Boolean &pcdataUnreachable)
-{
- for (unsigned i = 0; i < nMembers(); i++)
- member(i).finish(minAndDepth, elementTransition, ambiguities,
- pcdataUnreachable);
-}
-
-void LeafContentToken::finish(Vector<unsigned> &minAndDepthVec,
- Vector<size_t> &elementTransitionVec,
- Vector<ContentModelAmbiguity> &ambiguities,
- Boolean &pcdataUnreachable)
-{
- if (andInfo_) {
- andFinish(minAndDepthVec, elementTransitionVec, ambiguities,
- pcdataUnreachable);
- return;
- }
- Vector<size_t>::iterator elementTransition = elementTransitionVec.begin();
- Vector<unsigned>::iterator minAndDepth = minAndDepthVec.begin();
- minAndDepthVec.assign(minAndDepthVec.size(), unsigned(-1));
- elementTransitionVec.assign(elementTransitionVec.size(), size_t(-1));
- pcdataTransitionType_ = 0;
- simplePcdataTransition_ = 0;
- // follow_ is in decreasing order of andDepth because of how it's
- // constructed.
- size_t n = follow_.size();
- Vector<LeafContentToken *>::iterator follow = follow_.begin();
- size_t j = 0;
- for (size_t i = 0; i < n; i++) {
- unsigned &minDepth = minAndDepth[follow[i]->index()];
- if (minDepth) {
- minDepth = 0;
- if (j != i)
- follow[j] = follow[i];
- if (i == requiredIndex_)
- requiredIndex_ = j;
- const ElementType *e = follow[i]->elementType();
- unsigned ei;
- if (e == 0) {
- if (follow[i]->andInfo_ == 0) {
- simplePcdataTransition_ = follow[i];
- pcdataTransitionType_ = 1;
- }
- else
- pcdataTransitionType_ = 2;
- ei = 0;
- }
- else
- ei = e->index();
- if (elementTransition[ei] != size_t(-1)) {
- const LeafContentToken *prev = follow[elementTransition[ei]];
- // This might not be true: consider (a & b?)*; after the
- // a there are two different ways to get to the same b,
- // with the same and depth.
- if (follow[i] != prev) {
- ambiguities.resize(ambiguities.size() + 1);
- ContentModelAmbiguity &a = ambiguities.back();
- a.from = this;
- a.to1 = prev;
- a.to2 = follow[i];
- a.andDepth = 0;
- }
- }
- elementTransition[ei] = j;
- j++;
- }
- }
- if (pcdataTransitionType_ == 0)
- pcdataUnreachable = 1;
- follow_.resize(j);
-}
-
-void LeafContentToken::andFinish(Vector<unsigned> &minAndDepthVec,
- Vector<size_t> &elementTransitionVec,
- Vector<ContentModelAmbiguity> &ambiguities,
- Boolean &pcdataUnreachable)
-{
- // Vector mapping element type index to index of leaf content token
- // of that type to which there is a transition, which is the "worst"
- // from the point of view of ambiguity.
- Vector<size_t>::iterator elementTransition = elementTransitionVec.begin();
- // Vector mapping index of leaf content token
- // to minimum AND depth of transition to that token.
- Vector<unsigned>::iterator minAndDepth = minAndDepthVec.begin();
- minAndDepthVec.assign(minAndDepthVec.size(), unsigned(-1));
- elementTransitionVec.assign(elementTransitionVec.size(), size_t(-1));
- pcdataTransitionType_ = 0;
- simplePcdataTransition_ = 0;
- unsigned pcdataMinCovered = 0;
-
- // follow_ is in decreasing order of andDepth because of how it's
- // constructed.
- size_t n = follow_.size();
- size_t j = 0;
- Vector<Transition>::iterator andFollow = andInfo_->follow.begin();
- for (size_t i = 0; i < n; i++) {
- unsigned &minDepth = minAndDepth[follow_[i]->index()];
- // ignore transitions to the same token with the same and depth.
- if (andFollow[i].andDepth < minDepth) {
- minDepth = andFollow[i].andDepth;
- if (j != i) {
- follow_[j] = follow_[i];
- andFollow[j] = andFollow[i];
- }
- if (i == requiredIndex_)
- requiredIndex_ = j;
- const ElementType *e = follow_[i]->elementType();
- unsigned ei;
- if (e == 0) {
- if (pcdataTransitionType_ == 0) {
- const AndModelGroup *andAncestor = andInfo_->andAncestor;
- unsigned groupIndex = andInfo_->andGroupIndex;
- do {
- Boolean hasNonNull = 0;
- for (unsigned k = 0; k < andAncestor->nMembers(); k++)
- if (k != groupIndex
- && !andAncestor->member(k).inherentlyOptional()) {
- hasNonNull = 1;
- break;
- }
- if (hasNonNull) {
- if (minDepth <= andAncestor->andDepth())
- pcdataUnreachable = 1;
- break;
- }
- groupIndex = andAncestor->andGroupIndex();
- andAncestor = andAncestor->andAncestor();
- } while (andAncestor);
- if (andFollow[i].isolated)
- pcdataMinCovered = minDepth;
- pcdataTransitionType_ = 2;
- }
- else {
- if (pcdataMinCovered > minDepth + 1)
- pcdataUnreachable = 1;
- pcdataMinCovered = andFollow[i].isolated ? minDepth : 0;
- }
- ei = 0;
- }
- else
- ei = e->index();
- // If we have transitions t1, t2, ... tN to tokens having
- // the same element type, with
- // and-depths d1, d2, ... dN, where d1 >= d2 >= ... >= dN,
- // then there is an ambiguity unless
- // d1 > d2 > ... > dN and t1, t2, ... , tN-1 are all isolated.
- size_t previ = elementTransition[ei];
- if (previ != size_t(-1)) {
- const LeafContentToken *prev = follow_[previ];
- // This might not be true: consider (a & b?)*; after the
- // a there are two different ways to get to the same b,
- // with the same and depth.
- if (follow_[i] != prev
- && (andFollow[previ].andDepth == andFollow[i].andDepth
- || !andFollow[previ].isolated)) {
- ambiguities.resize(ambiguities.size() + 1);
- ContentModelAmbiguity &a = ambiguities.back();
- a.from = this;
- a.to1 = prev;
- a.to2 = follow_[i];
- a.andDepth = andFollow[i].andDepth;
- }
- if (andFollow[previ].isolated)
- elementTransition[ei] = j;
- }
- else
- elementTransition[ei] = j;
- j++;
- }
- }
- if (pcdataMinCovered > 0 || pcdataTransitionType_ == 0)
- pcdataUnreachable = 1;
- follow_.resize(j);
- andInfo_->follow.resize(j);
-}
-
-void ContentToken::analyze(GroupInfo &info,
- const AndModelGroup *andAncestor,
- unsigned andGroupIndex,
- FirstSet &first,
- LastSet &last)
-{
- analyze1(info, andAncestor, andGroupIndex, first, last);
- if (occurrenceIndicator_ & opt)
- inherentlyOptional_ = 1;
- if (inherentlyOptional_)
- first.setNotRequired();
- if (occurrenceIndicator_ & plus)
- addTransitions(last, first, 0,
- andIndex(andAncestor), andDepth(andAncestor));
-}
-
-void LeafContentToken::analyze1(GroupInfo &info,
- const AndModelGroup *andAncestor,
- unsigned andGroupIndex,
- FirstSet &first,
- LastSet &last)
-{
- leafIndex_ = info.nextLeafIndex++;
- typeIndex_ = info.nextTypeIndex[element_ ? element_->index() : 0]++;
- if (andAncestor) {
- andInfo_ = new AndInfo;
- andInfo_->andAncestor = andAncestor;
- andInfo_->andGroupIndex = andGroupIndex;
- }
- first.init(this);
- last.assign(1, this);
- inherentlyOptional_ = 0;
-}
-
-void PcdataToken::analyze1(GroupInfo &info,
- const AndModelGroup *andAncestor,
- unsigned andGroupIndex,
- FirstSet &first,
- LastSet &last)
-{
- info.containsPcdata = 1;
- LeafContentToken::analyze1(info, andAncestor, andGroupIndex, first, last);
-}
-
-void OrModelGroup::analyze1(GroupInfo &info,
- const AndModelGroup *andAncestor,
- unsigned andGroupIndex,
- FirstSet &first,
- LastSet &last)
-{
- member(0).analyze(info, andAncestor, andGroupIndex, first, last);
- first.setNotRequired();
- inherentlyOptional_ = member(0).inherentlyOptional();
- for (unsigned i = 1; i < nMembers(); i++) {
- FirstSet tempFirst;
- LastSet tempLast;
- member(i).analyze(info, andAncestor, andGroupIndex, tempFirst, tempLast);
- first.append(tempFirst);
- first.setNotRequired();
- last.append(tempLast);
- inherentlyOptional_ |= member(i).inherentlyOptional();
- }
-}
-
-void SeqModelGroup::analyze1(GroupInfo &info,
- const AndModelGroup *andAncestor,
- unsigned andGroupIndex,
- FirstSet &first,
- LastSet &last)
-{
- member(0).analyze(info, andAncestor, andGroupIndex, first, last);
- inherentlyOptional_ = member(0).inherentlyOptional();
- for (unsigned i = 1; i < nMembers(); i++) {
- FirstSet tempFirst;
- LastSet tempLast;
- member(i).analyze(info, andAncestor, andGroupIndex, tempFirst, tempLast);
- addTransitions(last, tempFirst, 1,
- andIndex(andAncestor), andDepth(andAncestor));
- if (inherentlyOptional_)
- first.append(tempFirst);
- if (member(i).inherentlyOptional())
- last.append(tempLast);
- else
- tempLast.swap(last);
- inherentlyOptional_ &= member(i).inherentlyOptional();
- }
-}
-
-void AndModelGroup::analyze1(GroupInfo &info,
- const AndModelGroup *andAncestor,
- unsigned andGroupIndex,
- FirstSet &first,
- LastSet &last)
-{
- andDepth_ = ContentToken::andDepth(andAncestor);
- andIndex_ = ContentToken::andIndex(andAncestor);
- andAncestor_ = andAncestor;
- andGroupIndex_ = andGroupIndex;
- if (andIndex_ + nMembers() > info.andStateSize)
- info.andStateSize = andIndex_ + nMembers();
- Vector<FirstSet> firstVec(nMembers());
- Vector<LastSet> lastVec(nMembers());
- member(0).analyze(info, this, 0, firstVec[0], lastVec[0]);
- first = firstVec[0];
- first.setNotRequired();
- last = lastVec[0];
- inherentlyOptional_ = member(0).inherentlyOptional();
- unsigned i;
- for (i = 1; i < nMembers(); i++) {
- member(i).analyze(info, this, i, firstVec[i], lastVec[i]);
- first.append(firstVec[i]);
- first.setNotRequired();
- last.append(lastVec[i]);
- inherentlyOptional_ &= member(i).inherentlyOptional();
- }
- for (i = 0; i < nMembers(); i++) {
- for (unsigned j = 0; j < nMembers(); j++)
- if (j != i)
- addTransitions(lastVec[i], firstVec[j], 0,
- andIndex() + nMembers(),
- andDepth() + 1,
- !member(j).inherentlyOptional(),
- andIndex() + j, andIndex() + i);
- }
-}
-
-void ContentToken::addTransitions(const LastSet &from,
- const FirstSet &to,
- Boolean maybeRequired,
- unsigned andClearIndex,
- unsigned andDepth,
- Boolean isolated,
- unsigned requireClear,
- unsigned toSet)
-{
- size_t length = from.size();
- for (unsigned i = 0; i < length; i++)
- from[i]->addTransitions(to,
- maybeRequired,
- andClearIndex,
- andDepth,
- isolated,
- requireClear,
- toSet);
-}
-
-void LeafContentToken::addTransitions(const FirstSet &to,
- Boolean maybeRequired,
- unsigned andClearIndex,
- unsigned andDepth,
- Boolean isolated,
- unsigned requireClear,
- unsigned toSet)
-{
- if (maybeRequired && to.requiredIndex() != size_t(-1)) {
- ASSERT(requiredIndex_ == size_t(-1));
- requiredIndex_ = to.requiredIndex() + follow_.size();
- }
- size_t length = follow_.size();
- size_t n = to.size();
- follow_.resize(length + n);
- for (size_t i = 0; i < n; i++)
- follow_[length + i] = to.token(i);
- if (andInfo_) {
- andInfo_->follow.resize(length + n);
- for (size_t i = 0; i < n; i++) {
- Transition &t = andInfo_->follow[length + i];
- t.clearAndStateStartIndex = andClearIndex;
- t.andDepth = andDepth;
- t.isolated = isolated;
- t.requireClear = requireClear;
- t.toSet = toSet;
- }
- }
-}
-
-AndState::AndState(unsigned n)
-: v_(n, PackedBoolean(0)), clearFrom_(0)
-{
-}
-
-void AndState::clearFrom1(unsigned i)
-{
- while (clearFrom_ > i)
- v_[--clearFrom_] = 0;
-}
-
-MatchState::MatchState()
-: andState_(0)
-{
-}
-
-MatchState::MatchState(const CompiledModelGroup *model)
-: pos_(model ? model->initial() : 0),
- andState_(model ? model->andStateSize() : 0),
- minAndDepth_(0)
-{
-}
-
-const LeafContentToken *MatchState::invalidExclusion(const ElementType *e)
- const
-{
- const LeafContentToken *token = pos_->transitionToken(e, andState_,
- minAndDepth_);
- if (token && !token->inherentlyOptional() && !token->orGroupMember())
- return token;
- else
- return 0;
-}
-
-Boolean MatchState::operator==(const MatchState &state) const
-{
- return (pos_ == state.pos_ && andState_ == state.andState_
- && minAndDepth_ == state.minAndDepth_);
-}
-
-Boolean AndState::operator==(const AndState &state) const
-{
- ASSERT(v_.size() == state.v_.size());
- for (size_t i = 0; i < v_.size(); i++) {
- if (i >= clearFrom_ && i >= state.clearFrom_)
- break;
- if (v_[i] != state.v_[i])
- return 0;
- }
- return 1;
-}
-
-const LeafContentToken *
-LeafContentToken::transitionToken(const ElementType *to,
- const AndState &andState,
- unsigned minAndDepth) const
-{
- Vector<LeafContentToken *>::const_iterator p = follow_.begin();
- if (!andInfo_) {
- for (size_t n = follow_.size(); n > 0; n--, p++)
- if ((*p)->elementType() == to)
- return *p;
- }
- else {
- Vector<Transition>::const_iterator q = andInfo_->follow.begin();
- for (size_t n = follow_.size(); n > 0; n--, p++, q++)
- if ((*p)->elementType() == to
- && ((q->requireClear == unsigned(Transition::invalidIndex)
- || andState.isClear(q->requireClear))
- && q->andDepth >= minAndDepth))
- return (*p);
- }
- return 0;
-}
-
-Boolean
-LeafContentToken::tryTransition(const ElementType *to,
- AndState &andState,
- unsigned &minAndDepth,
- const LeafContentToken *&newpos) const
-{
- Vector<LeafContentToken *>::const_iterator p = follow_.begin();
- if (!andInfo_) {
- for (size_t n = follow_.size(); n > 0; n--, p++) {
- if ((*p)->elementType() == to) {
- newpos = *p;
- minAndDepth = newpos->computeMinAndDepth(andState);
- return 1;
- }
- }
- }
- else {
- Vector<Transition>::const_iterator q = andInfo_->follow.begin();
- for (size_t n = follow_.size(); n > 0; n--, p++, q++) {
- if ((*p)->elementType() == to
- && ((q->requireClear == unsigned(Transition::invalidIndex)
- || andState.isClear(q->requireClear))
- && q->andDepth >= minAndDepth)) {
- if (q->toSet != unsigned(Transition::invalidIndex))
- andState.set(q->toSet);
- andState.clearFrom(q->clearAndStateStartIndex);
- newpos = *p;
- minAndDepth = newpos->computeMinAndDepth(andState);
- return 1;
- }
- }
- }
- return 0;
-}
-
-void
-LeafContentToken::possibleTransitions(const AndState &andState,
- unsigned minAndDepth,
- Vector<const ElementType *> &v) const
-{
- Vector<LeafContentToken *>::const_iterator p = follow_.begin();
- if (!andInfo_) {
- for (size_t n = follow_.size(); n > 0; n--, p++)
- v.push_back((*p)->elementType());
- }
- else {
- Vector<Transition>::const_iterator q = andInfo_->follow.begin();
- for (size_t n = follow_.size(); n > 0; n--, p++, q++)
- if ((q->requireClear == unsigned(Transition::invalidIndex)
- || andState.isClear(q->requireClear))
- && q->andDepth >= minAndDepth)
- v.push_back((*p)->elementType());
- }
-}
-
-unsigned LeafContentToken::computeMinAndDepth1(const AndState &andState) const
-{
- ASSERT(andInfo_ != 0);
- unsigned groupIndex = andInfo_->andGroupIndex;
- for (const AndModelGroup *group = andInfo_->andAncestor;
- group;
- groupIndex = group->andGroupIndex(), group = group->andAncestor())
- for (unsigned i = 0; i < group->nMembers(); i++)
- if (i != groupIndex && !group->member(i).inherentlyOptional()
- && andState.isClear(group->andIndex() + i))
- return group->andDepth() + 1;
- return 0;
-}
-
-const LeafContentToken *
-LeafContentToken::impliedStartTag(const AndState &andState,
- unsigned minAndDepth) const
-{
- if (requiredIndex_ != size_t(-1)) {
- if (!andInfo_)
- return follow_[requiredIndex_];
- const Transition &t = andInfo_->follow[requiredIndex_];
- if ((t.requireClear == unsigned(Transition::invalidIndex)
- || andState.isClear(t.requireClear))
- && t.andDepth >= minAndDepth)
- return follow_[requiredIndex_];
- }
- return 0;
-}
-
-void LeafContentToken::doRequiredTransition(AndState &andState,
- unsigned &minAndDepth,
- const LeafContentToken *&newpos)
- const
-{
- ASSERT(requiredIndex_ != size_t(-1));
- if (andInfo_) {
- const Transition &t = andInfo_->follow[requiredIndex_];
- if (t.toSet != unsigned(Transition::invalidIndex))
- andState.set(t.toSet);
- andState.clearFrom(t.clearAndStateStartIndex);
- }
- newpos = follow_[requiredIndex_];
- minAndDepth = newpos->computeMinAndDepth(andState);
-}
-
-FirstSet::FirstSet()
-: requiredIndex_(size_t(-1))
-{
-}
-
-void FirstSet::init(LeafContentToken *p)
-{
- v_.assign(1, p);
- v_.reserve(256);
- requiredIndex_ = 0;
-}
-
-void FirstSet::append(const FirstSet &set)
-{
- if (set.requiredIndex_ != size_t(-1)) {
- ASSERT(requiredIndex_ == size_t(-1));
- requiredIndex_ = set.requiredIndex_ + v_.size();
- }
- size_t oldSize = v_.size();
- v_.resize(v_.size() + set.v_.size());
- for (size_t i = 0; i < set.v_.size(); i++)
- v_[oldSize + i] = set.v_[i];
-}
-
-void LastSet::append(const LastSet &set)
-{
- size_t oldSize = size();
- resize(size() + set.size());
- for (size_t i = 0; i < set.size(); i++)
- (*this)[oldSize + i] = set[i];
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/DescriptorManager.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/DescriptorManager.cxx
deleted file mode 100644
index 2fd62b8f7f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/DescriptorManager.cxx
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "DescriptorManager.h"
-#include "ListIter.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-DescriptorUser::DescriptorUser(DescriptorManager *manager)
-: manager_(manager)
-{
- if (manager_)
- manager_->addUser(this);
-}
-
-DescriptorUser::~DescriptorUser()
-{
- if (manager_)
- manager_->removeUser(this);
-}
-
-void DescriptorUser::managerDeleted()
-{
- manager_ = 0;
-}
-
-Boolean DescriptorUser::suspend()
-{
- return 0;
-}
-
-void DescriptorUser::acquireD()
-{
- if (manager_)
- manager_->acquireD();
-}
-
-void DescriptorUser::releaseD()
-{
- if (manager_)
- manager_->releaseD();
-}
-
-DescriptorManager::DescriptorManager(int maxD)
-: maxD_(maxD), usedD_(0)
-{
-}
-
-DescriptorManager::~DescriptorManager()
-{
- for (ListIter<DescriptorUser *> iter(users_);
- !iter.done();
- iter.next())
- iter.cur()->managerDeleted();
-}
-
-void DescriptorManager::addUser(DescriptorUser *p)
-{
- users_.insert(p);
-}
-
-void DescriptorManager::removeUser(DescriptorUser *p)
-{
- users_.remove(p);
-}
-
-void DescriptorManager::acquireD()
-{
- if (usedD_ >= maxD_) {
- for (ListIter<DescriptorUser *> iter(users_);
- !iter.done();
- iter.next()) {
- if (iter.cur()->suspend())
- break;
- }
- }
- usedD_++;
-}
-
-void DescriptorManager::releaseD()
-{
- usedD_--;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Dtd.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Dtd.cxx
deleted file mode 100644
index 5f38549e0d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Dtd.cxx
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Dtd.h"
-#include "Syntax.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Dtd::Dtd(const StringC &name, Boolean isBase)
-: name_(new StringResource<Char>(name)),
- nCurrentAttribute_(0),
- nElementDefinition_(0),
- nAttributeDefinitionList_(0),
- nElementType_(0),
- isBase_(isBase)
-{
- documentElementType_ = new ElementType(name, allocElementTypeIndex());
- insertElementType(documentElementType_);
-}
-
-Boolean Dtd::shortrefIndex(const StringC &str, const Syntax &syntax,
- size_t &index)
-{
- const int *indexP = shortrefTable_.lookup(str);
- if (indexP) {
- index = *indexP;
- return 1;
- }
- if (!syntax.isValidShortref(str))
- return 0;
- shortrefTable_.insert(str, int(shortrefs_.size()));
- index = shortrefs_.size();
- shortrefs_.push_back(str);
- return 1;
-}
-
-void Dtd::addNeededShortref(const StringC &str)
-{
- if (!shortrefTable_.lookup(str)) {
- shortrefTable_.insert(str, shortrefs_.size());
- shortrefs_.push_back(str);
- }
-}
-
-void Dtd::setDefaultEntity(const Ptr<Entity> &entity,
- ParserState &parser)
-{
- defaultEntity_ = entity;
-
- // If the new default entity was defined in a DTD, then
- // any defaulted entities must have come from an LPD
- // on the first pass, in which case we shouldn't replace them.
- // Otherwise we need to replace all the defaulted entities.
- if (entity->declInActiveLpd()) {
- NamedResourceTable<Entity> tem;
- {
- EntityIter iter(generalEntityTable_);
- for (;;) {
- Ptr<Entity> old(iter.next());
- if (old.isNull())
- break;
- if (old->defaulted()) {
- Ptr<Entity> e(defaultEntity_->copy());
- e->setDefaulted();
- e->setName(old->name());
- e->generateSystemId(parser);
- tem.insert(e);
- }
- }
- }
- {
- EntityIter iter(tem);
- for (;;) {
- Ptr<Entity> e(iter.next());
- if (e.isNull())
- break;
- generalEntityTable_.insert(e, 1);
- }
- }
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EUCJPCodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/EUCJPCodingSystem.cxx
deleted file mode 100644
index 482bf8ea8e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EUCJPCodingSystem.cxx
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "EUCJPCodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class EUCJPDecoder : public Decoder {
-public:
- EUCJPDecoder() { }
- size_t decode(Char *, const char *, size_t, const char **);
-private:
-};
-
-class EUCJPEncoder : public Encoder {
-public:
- EUCJPEncoder() { }
- void output(const Char *, size_t, OutputByteStream *);
- void output(Char *tmp_char, size_t tmp_size_t, OutputByteStream *tmp_obs) {
- output((const Char *)tmp_char, (size_t) tmp_size_t, (OutputByteStream *)tmp_obs);
- }
-
-};
-
-Decoder *EUCJPCodingSystem::makeDecoder() const
-{
- return new EUCJPDecoder;
-}
-
-Encoder *EUCJPCodingSystem::makeEncoder() const
-{
- return new EUCJPEncoder;
-}
-
-size_t EUCJPDecoder::decode(Char *to, const char *s,
- size_t slen, const char **rest)
-{
- Char *start = to;
- const unsigned char *us = (const unsigned char *)s;
- while (slen > 0) {
- if (!(*us & 0x80)) {
- // G0
- *to++ = *us++;
- slen--;
- }
- else if (*us == 0x8e) {
- // G2
- if (slen < 2)
- break;
- slen -= 2;
- ++us;
- *to++ = *us++ | 0x80;
- }
- else if (*us == 0x8f) {
- // G3
- if (slen < 3)
- break;
- slen -= 3;
- ++us;
- unsigned short n = (*us++ | 0x80) << 8;
- n |= (*us++ & ~0x80);
- *to++ = n;
- }
- else {
- // G1
- if (slen < 2)
- break;
- slen -= 2;
- unsigned short n = *us++ << 8;
- n |= (*us++ | 0x80);
- *to++ = n;
- }
- }
- *rest = (const char *)us;
- return to - start;
-}
-
-
-void EUCJPEncoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- for (; n > 0; s++, n--) {
- Char c = *s;
- unsigned short mask = (unsigned short)(c & 0x8080);
- if (mask == 0)
- sb->sputc((unsigned char)(c & 0xff));
- else if (mask == 0x8080) {
- sb->sputc((unsigned char)((c >> 8) & 0xff));
- sb->sputc((unsigned char)(c & 0xff));
- }
- else if (mask == 0x0080) {
- sb->sputc((unsigned char)0x8e);
- sb->sputc((unsigned char)(c & 0xff));
- }
- else {
- // mask == 0x8000
- sb->sputc((unsigned char)0x8f);
- sb->sputc((unsigned char)((c >> 8) & 0xff));
- sb->sputc((unsigned char)(c & 0x7f));
- }
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ElementType.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ElementType.cxx
deleted file mode 100644
index 4d3aabc2dc..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ElementType.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "ElementType.h"
-#include "ContentToken.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ElementType::ElementType(const StringC &name, size_t index)
-: Named(name), index_(index), map_(0), defIndex_(0)
-{
-}
-
-ElementDefinition::ElementDefinition(const Location &location,
- size_t index,
- unsigned char omitFlags,
- DeclaredContent declaredContent)
-: location_(location),
- index_(index),
- omitFlags_(omitFlags),
- declaredContent_(declaredContent)
-{
- computeMode();
-}
-
-ElementDefinition::ElementDefinition(const Location &location,
- size_t index,
- unsigned char omitFlags,
- DeclaredContent declaredContent,
- Owner<CompiledModelGroup> &LOCALmodelGroup)
-: location_(location),
- index_(index),
- omitFlags_(omitFlags),
- declaredContent_(declaredContent),
- modelGroup_(LOCALmodelGroup.extract())
-{
- computeMode();
-}
-
-void ElementDefinition::computeMode()
-{
- switch (declaredContent_) {
- case modelGroup:
- if (!modelGroup_->containsPcdata()) {
- netMode_ = econnetMode;
- mode_ = econMode;
- break;
- }
- // fall through
- case any:
- netMode_ = mconnetMode;
- mode_ = mconMode;
- break;
- case cdata:
- netMode_ = cconnetMode;
- mode_ = cconMode;
- break;
- case rcdata:
- netMode_ = rcconnetMode;
- mode_ = rcconMode;
- break;
- case empty:
- break;
- default:
- CANNOT_HAPPEN();
- }
-}
-
-void ElementType::swap(ElementType &to)
-{
- Named::swap(to);
- {
- size_t tem = to.index_;
- to.index_ = index_;
- index_ = tem;
- }
- {
- size_t tem = to.defIndex_;
- to.defIndex_ = defIndex_;
- defIndex_ = tem;
- }
- def_.swap(to.def_);
- {
- const ShortReferenceMap *tem = to.map_;
- to.map_ = map_;
- map_ = tem;
- }
-}
-
-RankStem::RankStem(const StringC &name, size_t index)
-: Named(name), index_(index)
-{
-}
-
-void RankStem::addDefinition(const ConstPtr<ElementDefinition> &p)
-{
- def_.push_back(p);
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Entity.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Entity.cxx
deleted file mode 100644
index 4ca0a153fe..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Entity.cxx
+++ /dev/null
@@ -1,589 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Entity.h"
-#include "ParserState.h"
-#include "macros.h"
-#include "InternalInputSource.h"
-#include "MessageArg.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Entity::Entity(const StringC &name, DeclType declType, DataType dataType,
- const Location &defLocation)
-: EntityDecl(name, declType, dataType, defLocation),
- used_(0), defaulted_(0)
-{
-}
-
-void Entity::generateSystemId(ParserState &)
-{
-}
-
-InternalEntity::InternalEntity(const StringC &name,
- DeclType declType,
- DataType dataType,
- const Location &defLocation,
- Text &text)
-: Entity(name, declType, dataType, defLocation)
-{
- text.swap(text_);
-}
-
-PiEntity::PiEntity(const StringC &name, DeclType declType,
- const Location &defLocation, Text &text)
-: InternalEntity(name, declType, pi, defLocation, text)
-{
-}
-
-Entity *PiEntity::copy() const
-{
- return new PiEntity(*this);
-}
-
-InternalDataEntity::InternalDataEntity(const StringC &name, DataType dataType,
- const Location &defLocation, Text &text)
-: InternalEntity(name, generalEntity, dataType, defLocation, text)
-{
-}
-
-
-InternalCdataEntity::InternalCdataEntity(const StringC &name,
- const Location &defLocation,
- Text &text)
-: InternalDataEntity(name, cdata, defLocation, text)
-{
-}
-
-Entity *InternalCdataEntity::copy() const
-{
- return new InternalCdataEntity(*this);
-}
-
-InternalSdataEntity::InternalSdataEntity(const StringC &name,
- const Location &defLocation,
- Text &text)
-: InternalDataEntity(name, sdata, defLocation, text)
-{
-}
-
-Entity *InternalSdataEntity::copy() const
-{
- return new InternalSdataEntity(*this);
-}
-
-InternalTextEntity::InternalTextEntity(const StringC &name, DeclType declType,
- const Location &defLocation, Text &text,
- Bracketed bracketed)
-: InternalEntity(name, declType, sgmlText, defLocation, text),
- bracketed_(bracketed)
-{
-}
-
-Entity *InternalTextEntity::copy() const
-{
- return new InternalTextEntity(*this);
-}
-
-
-ExternalEntity::ExternalEntity(const StringC &name,
- DeclType declType,
- DataType dataType,
- const Location &defLocation,
- const ExternalId &id)
-: Entity(name, declType, dataType, defLocation), externalId_(id)
-{
-}
-
-const ExternalEntity *ExternalEntity::asExternalEntity() const
-{
- return this;
-}
-
-const StringC *ExternalEntity::systemIdPointer() const
-{
- return externalId_.systemIdString();
-}
-
-const StringC *ExternalEntity::effectiveSystemIdPointer() const
-{
- if (externalId_.effectiveSystemId().size() > 0)
- return &externalId_.effectiveSystemId();
- return 0;
-}
-
-const StringC *ExternalEntity::publicIdPointer() const
-{
- return externalId_.publicIdString();
-}
-
-void ExternalEntity::generateSystemId(ParserState &parser)
-{
- StringC str;
- if (parser.entityCatalog().lookup(*this,
- parser.syntax(),
- parser.sd().docCharset(),
- parser.messenger(),
- str))
- externalId_.setEffectiveSystem(str);
- // Don't generate warning when declType == sgml.
- else if (externalId_.publicIdString()) {
- if (declType() != sgml)
- parser.message(ParserMessages::cannotGenerateSystemIdPublic,
- StringMessageArg(*externalId_.publicIdString()));
- }
- else {
- switch (declType()) {
- case generalEntity:
- parser.message(ParserMessages::cannotGenerateSystemIdGeneral,
- StringMessageArg(name()));
- break;
- case parameterEntity:
- parser.message(ParserMessages::cannotGenerateSystemIdParameter,
- StringMessageArg(name()));
- break;
- case doctype:
- parser.message(ParserMessages::cannotGenerateSystemIdDoctype,
- StringMessageArg(name()));
- break;
- case linktype:
- parser.message(ParserMessages::cannotGenerateSystemIdLinktype,
- StringMessageArg(name()));
- break;
- case sgml:
- break;
- default:
- CANNOT_HAPPEN();
- }
- }
-}
-
-ExternalTextEntity::ExternalTextEntity(const StringC &name,
- DeclType declType,
- const Location &defLocation,
- const ExternalId &id)
-: ExternalEntity(name, declType, sgmlText, defLocation, id)
-{
-}
-
-Entity *ExternalTextEntity::copy() const
-{
- return new ExternalTextEntity(*this);
-}
-
-ExternalNonTextEntity::ExternalNonTextEntity(const StringC &name,
- DataType dataType,
- const Location &defLocation,
- const ExternalId &id)
-: ExternalEntity(name, generalEntity, dataType, defLocation, id)
-{
-}
-
-ExternalDataEntity::ExternalDataEntity(const StringC &name,
- DataType dataType,
- const Location &defLocation,
- const ExternalId &id,
- const ConstPtr<Notation> &nt,
-
- AttributeList &attributes)
-: ExternalNonTextEntity(name, dataType, defLocation, id),
- notation_(nt)
-{
- attributes.swap(attributes_);
-}
-
-void ExternalDataEntity::setNotation(const ConstPtr<Notation> &notation,
- AttributeList &attributes)
-{
- notation_ = notation;
- attributes.swap(attributes_);
-}
-
-Entity *ExternalDataEntity::copy() const
-{
- return new ExternalDataEntity(*this);
-}
-
-SubdocEntity::SubdocEntity(const StringC &name,
- const Location &defLocation,
- const ExternalId &id)
-: ExternalNonTextEntity(name, subdoc, defLocation, id)
-{
-}
-
-Entity *SubdocEntity::copy() const
-{
- return new SubdocEntity(*this);
-}
-
-Boolean Entity::isDataOrSubdoc() const
-{
- return 0;
-}
-
-Boolean Entity::isCharacterData() const
-{
- return 0;
-}
-
-const ExternalEntity *Entity::asExternalEntity() const
-{
- return 0;
-}
-
-const ExternalDataEntity *Entity::asExternalDataEntity() const
-{
- return 0;
-}
-
-const SubdocEntity *Entity::asSubdocEntity() const
-{
- return 0;
-}
-
-const InternalEntity *Entity::asInternalEntity() const
-{
- return 0;
-}
-
-void Entity::dsReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin)
- const
-{
- normalReference(parser, origin, 1);
-}
-
-void Entity::declReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin)
- const
-{
- normalReference(parser, origin, 0);
- if (parser.currentMarkup())
- parser.currentMarkup()->addEntityStart(origin);
-}
-
-void Entity::contentReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin)
- const
-{
- normalReference(parser, origin, 1);
-}
-
-void Entity::rcdataReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin)
- const
-{
- normalReference(parser, origin, 1);
-}
-
-void Entity::litReference(Text &, ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean)
- const
-{
- normalReference(parser, origin, 0);
-}
-
-const InternalEntity *InternalEntity::asInternalEntity() const
-{
- return this;
-}
-
-void PiEntity::litReference(Text &, ParserState &parser,
- const Ptr<EntityOrigin> &,
- Boolean) const
-{
- parser.message(ParserMessages::piEntityReference);
-}
-
-void PiEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean) const
-{
- parser.noteMarkup();
- parser.eventHandler().pi(new (parser.eventAllocator())
- PiEntityEvent(this, origin.pointer()));
-}
-
-void PiEntity::declReference(ParserState &parser,
- const Ptr<EntityOrigin> &) const
-{
- parser.message(ParserMessages::piEntityReference);
-}
-
-void PiEntity::rcdataReference(ParserState &parser,
- const Ptr<EntityOrigin> &) const
-{
- parser.message(ParserMessages::piEntityRcdata);
-}
-
-void InternalDataEntity::declReference(ParserState &parser,
- const Ptr<EntityOrigin> &) const
-{
- parser.message(ParserMessages::internalDataEntityReference);
-}
-
-Boolean InternalDataEntity::isDataOrSubdoc() const
-{
- return 1;
-}
-
-void InternalCdataEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean) const
-{
- checkEntlvl(parser);
- if (string().size() > 0) {
- parser.noteData();
- parser.eventHandler().data(new (parser.eventAllocator())
- CdataEntityEvent(this, origin.pointer()));
- }
-}
-
-Boolean InternalCdataEntity::isCharacterData() const
-{
- return string().size() > 0;
-}
-
-void InternalCdataEntity::litReference(Text &text,
- ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean squeeze) const
-{
- checkEntlvl(parser);
- if (squeeze) {
- Location loc(origin.pointer(), 0);
- text.addEntityStart(loc);
- text.addCharsTokenize(text_.string(), loc, parser.syntax().space());
- loc += text_.size();
- text.addEntityEnd(loc);
- }
- else
- text.addCdata(this, origin.pointer());
-}
-
-
-void InternalSdataEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean) const
-{
- checkEntlvl(parser);
- parser.noteData();
- parser.eventHandler().sdataEntity(new (parser.eventAllocator())
- SdataEntityEvent(this,
- origin.pointer()));
-}
-
-Boolean InternalSdataEntity::isCharacterData() const
-{
- return 1;
-}
-
-void InternalSdataEntity::litReference(Text &text,
- ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean squeeze) const
-{
- checkEntlvl(parser);
- if (squeeze) {
- Location loc(origin.pointer(), 0);
- text.addEntityStart(loc);
- text.addCharsTokenize(text_.string(), loc, parser.syntax().space());
- loc += text_.size();
- text.addEntityEnd(loc);
- }
- else
- text.addSdata(this, origin.pointer());
-}
-
-void InternalTextEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean generateEvent) const
-{
- checkEntlvl(parser);
- if (checkNotOpen(parser)) {
- if (generateEvent && parser.wantMarkup())
- parser.eventHandler().entityStart(new (parser.eventAllocator())
- EntityStartEvent(origin));
- parser.pushInput(new (parser.internalAllocator())
- InternalInputSource(text_.string(), origin.pointer()));
- }
-}
-
-void InternalTextEntity::litReference(Text &text,
- ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean) const
-{
- text.addEntityStart(Location(origin.pointer(), 0));
- normalReference(parser, origin, 0);
-}
-
-void ExternalTextEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean generateEvent) const
-{
- checkEntlvl(parser);
- if (checkNotOpen(parser)) {
- if (generateEvent && parser.wantMarkup())
- parser.eventHandler().entityStart(new (parser.eventAllocator())
- EntityStartEvent(origin));
- if (externalId().effectiveSystemId().size())
- parser.pushInput(parser.entityManager()
- .open(externalId().effectiveSystemId(),
- parser.sd().docCharset(),
- origin.pointer(),
- 0,
- parser.messenger()));
- else
- parser.message(ParserMessages::nonExistentEntityRef,
- StringMessageArg(name()),
- defLocation());
- }
-}
-
-void ExternalTextEntity::litReference(Text &text,
- ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean) const
-{
- if (parser.options().warnAttributeValueExternalEntityRef
- && declType() == generalEntity)
- parser.message(ParserMessages::attributeValueExternalEntityRef);
- text.addEntityStart(Location(origin.pointer(), 0));
- normalReference(parser, origin, 0);
-}
-
-const ExternalDataEntity *ExternalDataEntity::asExternalDataEntity() const
-{
- return this;
-}
-
-void ExternalDataEntity::contentReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin) const
-{
- if (parser.options().warnExternalDataEntityRef)
- parser.message(ParserMessages::externalDataEntityRef);
- checkEntlvl(parser);
- parser.noteData();
- parser.eventHandler().externalDataEntity(new (parser.eventAllocator())
- ExternalDataEntityEvent(this, origin.pointer()));
-}
-
-Boolean ExternalNonTextEntity::isDataOrSubdoc() const
-{
- return 1;
-}
-
-Boolean ExternalNonTextEntity::isCharacterData() const
-{
- return 1;
-}
-
-
-void ExternalNonTextEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &,
- Boolean) const
-{
- parser.message(ParserMessages::externalNonTextEntityReference);
-}
-
-void ExternalNonTextEntity::litReference(Text &,
- ParserState &parser,
- const Ptr<EntityOrigin> &,
- Boolean) const
-{
- parser.message(ParserMessages::externalNonTextEntityRcdata);
-}
-
-void ExternalNonTextEntity::rcdataReference(ParserState &parser,
- const Ptr<EntityOrigin> &) const
-{
- parser.message(ParserMessages::externalNonTextEntityRcdata);
-}
-
-void SubdocEntity::contentReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin) const
-{
- checkEntlvl(parser);
- parser.noteData();
- parser.eventHandler().subdocEntity(new (parser.eventAllocator())
- SubdocEntityEvent(this, origin.pointer()));
-}
-
-const SubdocEntity *SubdocEntity::asSubdocEntity() const
-{
- return this;
-}
-
-IgnoredEntity::IgnoredEntity(const StringC &name, DeclType declType)
-: Entity(name, declType, sgmlText, Location())
-{
-}
-
-Entity *IgnoredEntity::copy() const
-{
- return new IgnoredEntity(*this);
-}
-
-void IgnoredEntity::declReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin)
- const
-{
- if (parser.currentMarkup()) {
- parser.currentMarkup()->addEntityStart(origin);
- parser.currentMarkup()->addEntityEnd();
- }
-}
-
-void IgnoredEntity::litReference(Text &text,
- ParserState &,
- const Ptr<EntityOrigin> &origin,
- Boolean) const
-{
- text.addEntityStart(Location(origin.pointer(), 0));
- text.addEntityEnd(Location(origin.pointer(), 0));
-}
-
-void IgnoredEntity::normalReference(ParserState &parser,
- const Ptr<EntityOrigin> &origin,
- Boolean generateEvent) const
-{
- if (generateEvent && parser.wantMarkup()) {
- parser.eventHandler().entityStart(new (parser.eventAllocator())
- EntityStartEvent(origin));
- Location loc(origin.pointer(), 0);
- parser.eventHandler().entityEnd(new (parser.eventAllocator())
- EntityEndEvent(loc));
- }
-}
-
-void Entity::checkEntlvl(ParserState &parser)
-{
- // -1 because document entity isn't counted
- if (parser.inputLevel() - 1 == parser.syntax().entlvl())
- parser.message(ParserMessages::entlvl);
-}
-
-Boolean Entity::checkNotOpen(ParserState &parser) const
-{
- if (parser.entityIsOpen(this)) {
- parser.message(ParserMessages::recursiveEntityReference,
- StringMessageArg(name()));
- return 0;
- }
- return 1;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityApp.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityApp.cxx
deleted file mode 100644
index a6b02c332a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityApp.cxx
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "EntityApp.h"
-#include "sptchar.h"
-
-#include <stdlib.h>
-
-#include "PosixStorage.h"
-#ifdef SP_WININET
-#include "WinInetStorage.h"
-#else
-#include "URLStorage.h"
-#endif
-#include "LiteralStorage.h"
-#include "NotationStorage.h"
-#include "ExtendEntityManager.h"
-#include "SOEntityCatalog.h"
-#include "CodingSystem.h"
-#include "macros.h"
-
-#ifndef SGML_SEARCH_PATH_DEFAULT
-#define SGML_SEARCH_PATH_DEFAULT SP_T("")
-#endif
-
-#ifndef SGML_CATALOG_FILES_DEFAULT
-#define SGML_CATALOG_FILES_DEFAULT SP_T("")
-#endif /* not SGML_CATALOG_FILES_DEFAULT */
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_MSDOS_FILENAMES
-const Char FILE_SEP = ';';
-#else
-const Char FILE_SEP = ':';
-#endif
-
-EntityApp::EntityApp(const char *requiredInternalCode)
-: CmdLineApp(requiredInternalCode),
- mapCatalogDocument_(0)
-{
- registerOption('c', SP_T("catalog_sysid"));
- registerOption('C');
- registerOption('D', SP_T("dir"));
-}
-
-void EntityApp::processOption(AppChar opt, const AppChar *arg)
-{
- switch (opt) {
- case 'c':
- catalogSysids_.push_back(arg);
- break;
- case 'C':
- mapCatalogDocument_ = 1;
- break;
- case 'D':
- searchDirs_.push_back(arg);
- break;
- default:
- CmdLineApp::processOption(opt, arg);
- break;
- }
-}
-
-int EntityApp::processArguments(int argc, AppChar **argv)
-{
- StringC sysid;
- if (!makeSystemId(argc, argv, sysid))
- return 1;
- return processSysid(sysid);
-}
-
-Boolean EntityApp::makeSystemId(int nFiles, AppChar *const *files,
- StringC &result)
-{
- Vector<StringC> filenames(nFiles == 0 ? 1 : nFiles);
- int i;
- for (i = 0; i < nFiles; i++)
- filenames[i] = convertInput(tcscmp(files[i], SP_T("-")) == 0
- ? SP_T("<OSFD>0")
- : files[i]);
- if (nFiles == 0)
- filenames[0] = convertInput(SP_T("<OSFD>0"));
- return entityManager()->mergeSystemIds(filenames,
- mapCatalogDocument_,
- systemCharset(),
- *this,
- result);
-}
-
-
-Ptr<ExtendEntityManager> &EntityApp::entityManager()
-{
- if (!entityManager_.isNull())
- return entityManager_;
- PosixStorageManager *sm
- = new PosixStorageManager("OSFILE",
- &systemCharset(),
-#ifndef SP_WIDE_SYSTEM
- codingSystem(),
-#endif
- 5);
- size_t i;
- for (i = 0; i < searchDirs_.size(); i++)
- sm->addSearchDir(convertInput(searchDirs_[i]));
- {
- const AppChar *e = tgetenv(SP_T("SGML_SEARCH_PATH"));
- if (!e)
- e = SGML_SEARCH_PATH_DEFAULT;
- if (*e) {
- StringC str(convertInput(e));
- size_t i = 0;
- size_t start = 0;
- for (;;) {
- if (i == str.size() || str[i] == FILE_SEP) {
- sm->addSearchDir(StringC(str.data() + start,
- i - start));
- if (i == str.size())
- break;
- start = ++i;
- }
- else
- i++;
- }
- }
- }
-
- entityManager_ = ExtendEntityManager::make(sm,
- codingSystem(),
- inputCodingSystemKit(),
- internalCharsetIsDocCharset_);
- entityManager_
- ->registerStorageManager(new PosixFdStorageManager("OSFD",
- &systemCharset()));
-#ifdef SP_WININET
- entityManager_->registerStorageManager(new WinInetStorageManager("URL"));
-#else
- entityManager_->registerStorageManager(new URLStorageManager("URL"));
-#endif
- entityManager_->registerStorageManager(new LiteralStorageManager("LITERAL"));
- entityManager_->registerStorageManager(new NotationStorageManager("CLSID"));
- entityManager_->registerStorageManager(new NotationStorageManager("MIMETYPE"));
- Vector<StringC> v;
- for (i = 0; i < catalogSysids_.size(); i++)
- // filenames specified on command-line must exist
- v.push_back(convertInput(catalogSysids_[i]));
- {
- const AppChar *e = tgetenv(SP_T("SGML_CATALOG_FILES"));
- if (!e)
- e = SGML_CATALOG_FILES_DEFAULT;
- if (*e) {
- StringC str(convertInput(e));
- size_t i = 0;
- size_t start = 0;
- for (;;) {
- if (i == str.size() || str[i] == FILE_SEP) {
- v.push_back(StringC(str.data() + start,
- i - start));
- if (i == str.size())
- break;
- start = ++i;
- }
- else
- i++;
- }
- }
- }
- const SP_TCHAR *useDocCatalogStr = tgetenv(SP_T("SP_USE_DOCUMENT_CATALOG"));
- Boolean useDocCatalog = true;
- if (useDocCatalogStr
- && (stringMatches(useDocCatalogStr, "NO")
- || stringMatches(useDocCatalogStr, "0")))
- useDocCatalog = false;
- entityManager_->setCatalogManager(SOCatalogManager::make(v,
- catalogSysids_.size(),
- &systemCharset(),
- &systemCharset(),
- useDocCatalog));
- return entityManager_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityCatalog.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityCatalog.cxx
deleted file mode 100644
index d75b6cf648..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityCatalog.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "EntityCatalog.h"
-#include "EntityDecl.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-EntityCatalog::~EntityCatalog()
-{
-}
-
-
-Boolean EntityCatalog::sgmlDecl(const CharsetInfo &,
- Messenger &,
- StringC &) const
-{
- return 0;
-}
-
-Boolean EntityCatalog::lookup(const EntityDecl &decl,
- const Syntax &,
- const CharsetInfo &,
- Messenger &,
- StringC &str) const
-{
- const StringC *p = decl.systemIdPointer();
- if (!p)
- return 0;
- str = *p;
- return 1;
-}
-
-Boolean EntityCatalog::lookupPublic(const StringC &,
- const CharsetInfo &,
- Messenger &,
- StringC &) const
-{
- return 0;
-}
-
-Boolean EntityCatalog::lookupChar(const StringC &,
- const CharsetInfo &,
- Messenger &,
- UnivChar &) const
-{
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityDecl.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityDecl.cxx
deleted file mode 100644
index 625b7a85f2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityDecl.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "EntityDecl.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-EntityDecl::EntityDecl(const StringC &str, DeclType declType, DataType dataType,
- const Location &defLocation)
-: NamedResource(str), declType_(declType), dataType_(dataType),
- defLocation_(defLocation), dtdIsBase_(0), lpdIsActive_(0)
-{
-}
-
-void EntityDecl::setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
- Boolean dtdIsBase,
- const ConstPtr<StringResource<Char> > &lpdName,
- Boolean lpdIsActive)
-{
- dtdName_ = dtdName;
- lpdName_ = lpdName;
- dtdIsBase_ = dtdIsBase;
- lpdIsActive_ = lpdIsActive;
-}
-
-void EntityDecl::setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
- Boolean dtdIsBase)
-{
- dtdName_ = dtdName;
- lpdName_.clear();
- dtdIsBase_ = dtdIsBase;
-}
-
-const StringC *EntityDecl::systemIdPointer() const
-{
- return 0;
-}
-
-const StringC *EntityDecl::publicIdPointer() const
-{
- return 0;
-}
-
-const StringC *EntityDecl::effectiveSystemIdPointer() const
-{
- return 0;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManager.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManager.cxx
deleted file mode 100644
index 1c09bbf553..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManager.cxx
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "EntityManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-EntityManager::~EntityManager()
-{
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManagerMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManagerMessages.h
deleted file mode 100644
index 0cf002264c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EntityManagerMessages.h
+++ /dev/null
@@ -1,306 +0,0 @@
-// This file was automatically generated from lib\EntityManagerMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct EntityManagerMessages {
- // 2000
- static const MessageType1 fsiSyntax;
- // 2001
- static const MessageType1 fsiMissingValue;
- // 2002
- static const MessageType1 fsiValueAsName;
- // 2003
- static const MessageType1 fsiBadSmcrd;
- // 2004
- static const MessageType1 fsiUnknownBctf;
- // 2005
- static const MessageType1 fsiUnknownEncoding;
- // 2006
- static const MessageType1 fsiUnsupportedRecords;
- // 2007
- static const MessageType1 fsiUnsupportedAttribute;
- // 2008
- static const MessageType1 fsiUnsupportedAttributeToken;
- // 2009
- static const MessageType1 fsiBadTracking;
- // 2010
- static const MessageType1 fsiDuplicateAttribute;
- // 2011
- static const MessageType1 fsiBadZapeof;
- // 2012
- static const MessageType1 fsiBadSearch;
- // 2013
- static const MessageType1 fsiBadFold;
- // 2014
- static const MessageType0 fsiFoldNotNeutral;
- // 2015
- static const MessageType0 fsiBctfEncodingNotApplicable;
- // 2016
- static const MessageType0 fsiBctfAndEncoding;
- // 2017
- static const MessageType0 fsiZapeofNotApplicable;
- // 2018
- static const MessageType0 fsiRecordsNotApplicable;
- // 2019
- static const MessageType1 fsiBadIndirect;
- // 2020
- static const MessageType1 fsiLookupChar;
-};
-const MessageType1 EntityManagerMessages::fsiSyntax(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2000
-#ifndef SP_NO_MESSAGE_TEXT
-,"bad formal system identifier syntax in %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiMissingValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2001
-#ifndef SP_NO_MESSAGE_TEXT
-,"value for attribute %1 missing in formal system identifier"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiValueAsName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2002
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is a formal system identifier attribute value not an attribute name"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiBadSmcrd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2003
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of SMCRD attribute must be a single character not %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiUnknownBctf(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2004
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown BCTF %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiUnknownEncoding(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2005
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown encoding %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiUnsupportedRecords(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2006
-#ifndef SP_NO_MESSAGE_TEXT
-,"unsupported record boundary indicator %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiUnsupportedAttribute(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2007
-#ifndef SP_NO_MESSAGE_TEXT
-,"unsupported formal system identifier attribute %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiUnsupportedAttributeToken(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2008
-#ifndef SP_NO_MESSAGE_TEXT
-,"unsupported formal system identifier attribute value %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiBadTracking(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2009
-#ifndef SP_NO_MESSAGE_TEXT
-,"bad value %1 for formal system identifier tracking attribute"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiDuplicateAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2010
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate specification for formal system identifier attribute %1"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiBadZapeof(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2011
-#ifndef SP_NO_MESSAGE_TEXT
-,"bad value %1 for formal system identifier zapeof attribute"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiBadSearch(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2012
-#ifndef SP_NO_MESSAGE_TEXT
-,"bad value %1 for formal system identifier search attribute"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiBadFold(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2013
-#ifndef SP_NO_MESSAGE_TEXT
-,"bad value %1 for formal system identifier fold attribute"
-#endif
-);
-const MessageType0 EntityManagerMessages::fsiFoldNotNeutral(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2014
-#ifndef SP_NO_MESSAGE_TEXT
-,"fold attribute allowed only for neutral storage manager"
-#endif
-);
-const MessageType0 EntityManagerMessages::fsiBctfEncodingNotApplicable(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2015
-#ifndef SP_NO_MESSAGE_TEXT
-,"BCTF and encoding attributes not applicable to this storage manager"
-#endif
-);
-const MessageType0 EntityManagerMessages::fsiBctfAndEncoding(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2016
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot specify both BCTF and encoding attribute"
-#endif
-);
-const MessageType0 EntityManagerMessages::fsiZapeofNotApplicable(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2017
-#ifndef SP_NO_MESSAGE_TEXT
-,"ZAPEOF attribute not applicable to this storage manager"
-#endif
-);
-const MessageType0 EntityManagerMessages::fsiRecordsNotApplicable(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2018
-#ifndef SP_NO_MESSAGE_TEXT
-,"RECORDS attribute not applicable to this storage manager"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiBadIndirect(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2019
-#ifndef SP_NO_MESSAGE_TEXT
-,"bad value %1 for formal system identifier indirect attribute"
-#endif
-);
-const MessageType1 EntityManagerMessages::fsiLookupChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2020
-#ifndef SP_NO_MESSAGE_TEXT
-,"non-minimum data character (number %1) in value of formal system identifier lookup attribute"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EquivClass.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/EquivClass.h
deleted file mode 100644
index bda53a3310..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EquivClass.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EquivClass_INCLUDED
-#define EquivClass_INCLUDED 1
-
-#include "Link.h"
-#include "types.h"
-#include "ISet.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct EquivClass : public Link {
- EquivClass(unsigned in = 0) : inSets(in) { }
- ISet<Char> set;
- unsigned inSets;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EquivClass_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ErrnoMessageArg.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ErrnoMessageArg.cxx
deleted file mode 100644
index d790389585..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ErrnoMessageArg.cxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "ErrnoMessageArg.h"
-#include "StringOf.h"
-#include "MessageBuilder.h"
-
-#include <string.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-RTTI_DEF1(ErrnoMessageArg, OtherMessageArg)
-
-MessageArg *ErrnoMessageArg::copy() const
-{
- return new ErrnoMessageArg(*this);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ErrorCountEventHandler.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ErrorCountEventHandler.cxx
deleted file mode 100644
index bcee0eed37..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ErrorCountEventHandler.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "ErrorCountEventHandler.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ErrorCountEventHandler::ErrorCountEventHandler(unsigned errorLimit)
-: errorCount_(0), maxErrors_(errorLimit), cancel_(0)
-{
-}
-
-void ErrorCountEventHandler::message(MessageEvent *event)
-{
- noteMessage(event->message());
- delete event;
-}
-
-void ErrorCountEventHandler::noteMessage(const Message &message)
-{
- if (message.isError() && ++errorCount_ == maxErrors_)
- cancel_ = 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Event.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Event.cxx
deleted file mode 100644
index cb96697d23..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Event.cxx
+++ /dev/null
@@ -1,574 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Event.h"
-#include "Entity.h"
-#include "Attribute.h"
-#include "EventQueue.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-void Event::copyData()
-{
-}
-
-LocatedEvent::LocatedEvent(Type type, const Location &location)
-: location_(location), Event(type)
-{
-}
-
-MarkupEvent::MarkupEvent(Type type)
-: LocatedEvent(type, Location())
-{
-}
-
-MarkupEvent::MarkupEvent(Type type, const Location &loc, Markup *markup)
-: LocatedEvent(type, loc)
-{
- if (markup)
- markup->swap(markup_);
-}
-
-StartElementEvent::StartElementEvent(const ElementType *elementType,
- const ConstPtr<Dtd> &dtd,
- AttributeList *attributes,
- const Location &startLocation,
- Markup *markup)
-: LocatedEvent(startElement, startLocation),
- elementType_(elementType),
- dtd_(dtd),
- included_(0),
- copied_(0),
- markup_(markup),
- attributes_(attributes)
-{
-}
-
-StartElementEvent::~StartElementEvent()
-{
- if (copied_) {
- delete attributes_;
- delete markup_;
- }
-}
-
-void StartElementEvent::copyData()
-{
- if (!copied_) {
- {
- AttributeList *p = new AttributeList;
- attributes_->swap(*p);
- attributes_ = p;
- }
- if (markup_) {
- Markup *p = new Markup;
- markup_->swap(*p);
- markup_ = p;
- }
- copied_ = 1;
- }
-}
-
-EndElementEvent::EndElementEvent(const ElementType *elementType,
- const ConstPtr<Dtd> &dtd,
- const Location &startLocation,
- Markup *markup)
-: LocatedEvent(endElement, startLocation),
- elementType_(elementType),
- dtd_(dtd),
- included_(0),
- copied_(0),
- markup_(markup)
-{
-}
-
-EndElementEvent::~EndElementEvent()
-{
- if (copied_)
- delete markup_;
-}
-
-void EndElementEvent::copyData()
-{
- if (!copied_) {
- if (markup_) {
- Markup *p = new Markup;
- markup_->swap(*p);
- markup_ = p;
- }
- copied_ = 1;
- }
-}
-
-DataEvent::DataEvent(Type type, const Char *p, size_t length,
- const Location &location)
-: p_(p),length_(length), LocatedEvent(type, location)
-{
-}
-
-const Entity *DataEvent::entity() const
-{
- return 0;
-}
-
-Boolean DataEvent::isRe(unsigned long &) const
-{
- return 0;
-}
-
-ImmediateDataEvent::ImmediateDataEvent(Type type, const Char *p, size_t length,
- const Location &location,
- Boolean copy)
-: DataEvent(type, p, length, location), alloc_(0)
-{
- if (copy)
- ImmediateDataEvent::copyData();
-}
-
-ImmediateDataEvent::~ImmediateDataEvent()
-{
- if (alloc_)
- delete [] alloc_;
-}
-
-void ImmediateDataEvent::copyData()
-{
- if (!alloc_) {
- alloc_ = new Char[length_];
- memcpy(alloc_, p_, length_*sizeof(Char));
- p_ = alloc_;
- }
-}
-
-ReEvent::ReEvent(const Char *p, const Location &location, unsigned long serial)
-: ImmediateDataEvent(characterData, p, 1, location, 0),
- serial_(serial)
-{
-}
-
-Boolean ReEvent::isRe(unsigned long &serial) const
-{
- serial = serial_;
- return 1;
-}
-
-DataEntityEvent::DataEntityEvent(Type type, const InternalEntity *entity,
- const ConstPtr<Origin> &origin)
-: DataEvent(type,
- entity->string().data(),
- entity->string().size(),
- Location(origin, 0))
-{
-}
-
-const Entity *DataEntityEvent::entity() const
-{
- return location().origin()->asEntityOrigin()->entity();
-}
-
-CdataEntityEvent::CdataEntityEvent(const InternalEntity *entity,
- const ConstPtr<Origin> &origin)
-: DataEntityEvent(characterData, entity, origin)
-{
-}
-
-SdataEntityEvent::SdataEntityEvent(const InternalEntity *entity,
- const ConstPtr<Origin> &origin)
-: DataEntityEvent(sdataEntity, entity, origin)
-{
-}
-
-MessageEvent::MessageEvent(const Message &m)
-: Event(Event::message), message_(m)
-{
-}
-
-MessageEvent::MessageEvent(Message &m)
-: Event(Event::message)
-{
- m.swap(message_);
-}
-
-PiEvent::PiEvent(const Char *data, size_t dataLength, const Location &location)
-: data_(data), dataLength_(dataLength), LocatedEvent(pi, location)
-{
-}
-
-const Entity *PiEvent::entity() const
-{
- return 0;
-}
-
-PiEntityEvent::PiEntityEvent(const PiEntity *entity,
- const ConstPtr<Origin> &origin)
-: PiEvent(entity->string().data(), entity->string().size(),
- Location(origin, 0))
-{
-}
-
-const Entity *PiEntityEvent::entity() const
-{
- return location().origin()->asEntityOrigin()->entity();
-}
-
-ImmediatePiEvent::ImmediatePiEvent(StringC &str, const Location &loc)
-: PiEvent(str.data(), str.size(), loc)
-{
- str.swap(string_);
-}
-
-ExternalEntityEvent::ExternalEntityEvent(Type type,
- const ConstPtr<EntityOrigin> &origin)
-: origin_(origin), Event(type)
-{
-}
-
-ExternalDataEntityEvent::ExternalDataEntityEvent(const ExternalDataEntity *entity,
- const ConstPtr<EntityOrigin> &origin)
-: dataEntity_(entity), ExternalEntityEvent(externalDataEntity, origin)
-{
-}
-
-SubdocEntityEvent::SubdocEntityEvent(const SubdocEntity *entity,
- const ConstPtr<EntityOrigin> &origin)
-: subdocEntity_(entity), ExternalEntityEvent(subdocEntity, origin)
-{
-}
-
-NonSgmlCharEvent::NonSgmlCharEvent(Char c, const Location &location)
-: LocatedEvent(nonSgmlChar, location), c_(c)
-{
-}
-
-AppinfoEvent::AppinfoEvent(const Location &location)
-: LocatedEvent(appinfo, location), appinfoNone_(1)
-{
-}
-
-AppinfoEvent::AppinfoEvent(const Text &text, const Location &location)
-: LocatedEvent(appinfo, location), appinfoNone_(0), appinfo_(text)
-{
-}
-
-UselinkEvent::UselinkEvent(const ConstPtr<Lpd> &lpd,
- const LinkSet *linkSet,
- Boolean restore,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(uselink, loc, markup),
- lpd_(lpd),
- linkSet_(linkSet),
- restore_(restore)
-{
-}
-
-UsemapEvent::UsemapEvent(const ShortReferenceMap *map,
- Vector<const ElementType *> &elements,
- const ConstPtr<Dtd> &dtd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(usemap, loc, markup),
- map_(map),
- dtd_(dtd)
-{
- elements.swap(elements_);
-}
-
-StartSubsetEvent::StartSubsetEvent(Type type,
- const StringC &name,
- const ConstPtr<Entity> &entity,
- Boolean hasInternalSubset,
- const Location &loc,
- Markup *markup)
-: name_(name), entity_(entity), hasInternalSubset_(hasInternalSubset),
- MarkupEvent(type, loc, markup)
-{
-}
-
-StartDtdEvent::StartDtdEvent(const StringC &name,
- const ConstPtr<Entity> &entity,
- Boolean hasInternalSubset,
- const Location &loc,
- Markup *markup)
-: StartSubsetEvent(startDtd, name, entity, hasInternalSubset, loc, markup)
-{
-}
-
-StartLpdEvent::StartLpdEvent(Boolean active,
- const StringC &name,
- const ConstPtr<Entity> &entity,
- Boolean hasInternalSubset,
- const Location &loc,
- Markup *markup)
-: StartSubsetEvent(startLpd, name, entity, hasInternalSubset, loc, markup),
- active_(active)
-{
-}
-
-EndDtdEvent::EndDtdEvent(const ConstPtr<Dtd> &dtd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(endDtd, loc, markup), dtd_(dtd)
-{
-}
-
-EndLpdEvent::EndLpdEvent(const ConstPtr<Lpd> &lpd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(endLpd, loc, markup), lpd_(lpd)
-{
-}
-
-EndPrologEvent::EndPrologEvent(const ConstPtr<Dtd> &dtd,
- const ConstPtr<ComplexLpd> &lpd,
- Vector<StringC> &simpleLinkNames,
- Vector<AttributeList> &simpleLinkAttributes,
- const Location &location)
-: LocatedEvent(endProlog, location), dtd_(dtd), lpd_(lpd)
-{
- simpleLinkAttributes.swap(simpleLinkAttributes_);
- simpleLinkNames.swap(simpleLinkNames_);
-}
-
-EndPrologEvent::EndPrologEvent(const ConstPtr<Dtd> &dtd,
- const Location &location)
-: LocatedEvent(endProlog, location), dtd_(dtd)
-{
-}
-
-SgmlDeclEvent::SgmlDeclEvent(const ConstPtr<Sd> &sd,
- const ConstPtr<Syntax> &syntax)
-
-: sd_(sd), prologSyntax_(syntax), instanceSyntax_(syntax),
- nextIndex_(0), MarkupEvent(sgmlDecl)
-{
-}
-
-SgmlDeclEvent::SgmlDeclEvent(const ConstPtr<Sd> &sd,
- const ConstPtr<Syntax> &prologSyntax,
- const ConstPtr<Syntax> &instanceSyntax,
- const ConstPtr<Sd> &refSd,
- const ConstPtr<Syntax> &refSyntax,
- Index nextIndex,
- const StringC &implySystemId,
- const Location &loc,
- Markup *markup)
-: sd_(sd), prologSyntax_(prologSyntax), instanceSyntax_(instanceSyntax),
- refSd_(refSd), refSyntax_(refSyntax),
- nextIndex_(nextIndex), implySystemId_(implySystemId),
- MarkupEvent(sgmlDecl, loc, markup)
-{
-}
-
-CommentDeclEvent::CommentDeclEvent(const Location &loc,
- Markup *markup)
-: MarkupEvent(commentDecl, loc, markup)
-{
-}
-
-SSepEvent::SSepEvent(const Char *p, size_t length,
- const Location &location, Boolean copy)
-: ImmediateDataEvent(sSep, p, length, location, copy)
-{
-}
-
-IgnoredRsEvent::IgnoredRsEvent(Char c, const Location &location)
-: LocatedEvent(ignoredRs, location), c_(c)
-{
-}
-
-IgnoredReEvent::IgnoredReEvent(Char c, const Location &location,
- unsigned long serial)
-: LocatedEvent(ignoredRe, location),
- c_(c),
- serial_(serial)
-{
-}
-
-ReOriginEvent::ReOriginEvent(Char c, const Location &location,
- unsigned long serial)
-: LocatedEvent(reOrigin, location), c_(c), serial_(serial)
-{
-}
-
-
-IgnoredCharsEvent::IgnoredCharsEvent(const Char *p, size_t length,
- const Location &location, Boolean copy)
-: ImmediateDataEvent(ignoredChars, p, length, location, copy)
-{
-}
-
-MarkedSectionEvent::MarkedSectionEvent(Type type, Status status,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(type, loc, markup),
- status_(status)
-{
-}
-
-MarkedSectionStartEvent::MarkedSectionStartEvent(Status status,
- const Location &loc,
- Markup *markup)
-: MarkedSectionEvent(markedSectionStart, status, loc, markup)
-{
-}
-
-MarkedSectionEndEvent::MarkedSectionEndEvent(Status status,
- const Location &loc,
- Markup *markup)
-: MarkedSectionEvent(markedSectionEnd, status, loc, markup)
-{
-}
-
-EntityStartEvent::EntityStartEvent(const ConstPtr<EntityOrigin> &origin)
-: Event(entityStart), origin_(origin)
-{
-}
-
-EntityEndEvent::EntityEndEvent(const Location &location)
-: LocatedEvent(entityEnd, location)
-{
-}
-
-EntityDeclEvent:: EntityDeclEvent(const ConstPtr<Entity> &entity,
- Boolean ignored, const Location &loc,
- Markup *markup)
-: MarkupEvent(entityDecl, loc, markup),
- entity_(entity),
- ignored_(ignored)
-{
-}
-
-NotationDeclEvent:: NotationDeclEvent(const ConstPtr<Notation> &notation,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(notationDecl, loc, markup), notation_(notation)
-{
-}
-
-ElementDeclEvent::ElementDeclEvent(Vector<const ElementType *> &elements,
- const ConstPtr<Dtd> &dtd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(elementDecl, loc, markup), dtd_(dtd)
-{
- elements.swap(elements_);
-}
-
-AttlistDeclEvent::AttlistDeclEvent(Vector<const ElementType *> &elements,
- const ConstPtr<Dtd> &dtd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(attlistDecl, loc, markup), dtd_(dtd)
-{
- elements.swap(elements_);
-}
-
-AttlistNotationDeclEvent::AttlistNotationDeclEvent(
- Vector<ConstPtr<Notation> > &notations, const Location &loc,
- Markup *markup)
-: MarkupEvent(attlistNotationDecl, loc, markup)
-{
- notations.swap(notations_);
-}
-
-LinkAttlistDeclEvent
-::LinkAttlistDeclEvent(Vector<const ElementType *> &elements,
- const ConstPtr<Lpd> &lpd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(linkAttlistDecl, loc, markup), lpd_(lpd)
-{
- elements.swap(elements_);
-}
-
-LinkDeclEvent::LinkDeclEvent(const LinkSet *linkSet,
- const ConstPtr<ComplexLpd> &lpd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(linkDecl, loc, markup), lpd_(lpd), linkSet_(linkSet)
-{
-}
-
-IdLinkDeclEvent::IdLinkDeclEvent(const ConstPtr<ComplexLpd> &lpd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(linkDecl, loc, markup), lpd_(lpd)
-{
-}
-
-ShortrefDeclEvent::ShortrefDeclEvent(const ShortReferenceMap *map,
- const ConstPtr<Dtd> &dtd,
- const Location &loc,
- Markup *markup)
-: MarkupEvent(shortrefDecl, loc, markup), map_(map), dtd_(dtd)
-{
-}
-
-IgnoredMarkupEvent::IgnoredMarkupEvent(const Location &loc,
- Markup *markup)
-: MarkupEvent(ignoredMarkup, loc, markup)
-{
-}
-
-EntityDefaultedEvent::EntityDefaultedEvent(const ConstPtr<Entity> &entity,
- const Location &loc)
-: LocatedEvent(entityDefaulted, loc), entity_(entity)
-{
-}
-
-SgmlDeclEntityEvent:: SgmlDeclEntityEvent(const PublicId &publicId,
- PublicId::TextClass entityType,
- const StringC &effectiveSystemId,
- const Location &loc)
-: LocatedEvent(sgmlDeclEntity, loc), publicId_(publicId),
- entityType_(entityType), effectiveSystemId_(effectiveSystemId)
-{
-}
-
-EventHandler::~EventHandler()
-{
-}
-
-EventQueue::EventQueue()
-{
-}
-
-#define EVENT(c, f) \
- void EventHandler::f(c *event) { delete event; } \
- void EventQueue::f(c *event) { append(event); } \
- void c::handle(EventHandler &handler) { handler.f(this); }
-#include "events.h"
-#undef EVENT
-
-Pass1EventHandler::Pass1EventHandler()
-: hadError_(0), origHandler_(0)
-{
-}
-
-void Pass1EventHandler::init(EventHandler *origHandler)
-{
- hadError_ = 0;
- origHandler_ = origHandler;
-}
-
-void Pass1EventHandler::message(MessageEvent *event)
-{
- if (event->message().isError()) {
- hadError_ = 1;
- origHandler_->message(event);
- }
- else
- IQueue<Event>::append(event);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EventGenerator.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/EventGenerator.cxx
deleted file mode 100644
index b423af270b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EventGenerator.cxx
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Boolean.h"
-#include "EventGenerator.h"
-
-EventGenerator::~EventGenerator()
-{
-}
-
-void EventGenerator::inhibitMessages(bool)
-{
-}
-
-EventGenerator *
-EventGenerator::makeSubdocEventGenerator(const SGMLApplication::Char *,
- size_t)
-{
- return 0;
-}
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/EventQueue.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/EventQueue.h
deleted file mode 100644
index d94aea5c52..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/EventQueue.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef EventQueue_INCLUDED
-#define EventQueue_INCLUDED 1
-
-#include "IQueue.h"
-#include "Event.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class EventQueue : public EventHandler, public IQueue<Event> {
-public:
- EventQueue();
-private:
-#define EVENT(c, f) void f(c *);
-#include "events.h"
-#undef EVENT
- void append(Event *);
-};
-
-class Pass1EventHandler : public EventQueue {
-public:
- Pass1EventHandler();
- void init(EventHandler *origHandler);
- void message(MessageEvent *);
- Boolean hadError() const;
- EventHandler *origHandler() const;
-private:
- Boolean hadError_;
- EventHandler *origHandler_;
-};
-
-inline
-void EventQueue::append(Event *event)
-{
- IQueue<Event>::append(event);
-}
-
-inline
-Boolean Pass1EventHandler::hadError() const
-{
- return hadError_;
-}
-
-inline
-EventHandler *Pass1EventHandler::origHandler() const
-{
- return origHandler_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not EventQueue_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ExtendEntityManager.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ExtendEntityManager.cxx
deleted file mode 100644
index 7dc77d5203..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ExtendEntityManager.cxx
+++ /dev/null
@@ -1,2149 +0,0 @@
-// Copyright (c) 1994, 1995, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ExtendEntityManager.h"
-#include "Message.h"
-#include "MessageArg.h"
-#include "OffsetOrderedList.h"
-#include "rtti.h"
-#include "StorageManager.h"
-#include "Vector.h"
-#include "NCVector.h"
-#include "Owner.h"
-#include "constant.h"
-#include "EntityManagerMessages.h"
-#include "StorageObjectPosition.h"
-#include "Owner.h"
-#include "CodingSystem.h"
-#include "CodingSystemKit.h"
-#include "InputSource.h"
-#include "Mutex.h"
-#include "macros.h"
-#include "EntityCatalog.h"
-#include "CharMap.h"
-
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdio.h>
-
-#ifdef DECLARE_MEMMOVE
-extern "C" {
- void *memmove(void *, const void *, size_t);
-}
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const char EOFCHAR = '\032'; // Control-Z
-
-class ExternalInputSource;
-
-class EntityManagerImpl : public ExtendEntityManager {
-public:
- EntityManagerImpl(StorageManager *defaultStorageManager,
- const InputCodingSystem *defaultCodingSystem,
- const ConstPtr<InputCodingSystemKit> &,
- Boolean internalCharsetIsDocCharset);
- void setCatalogManager(CatalogManager *catalogManager);
- void registerStorageManager(StorageManager *);
- InputSource *open(const StringC &sysid,
- const CharsetInfo &,
- InputSourceOrigin *,
- unsigned flags,
- Messenger &);
- const CharsetInfo &charset() const;
- Boolean internalCharsetIsDocCharset() const;
- ConstPtr<EntityCatalog> makeCatalog(StringC &systemId,
- const CharsetInfo &charset,
- Messenger &mgr);
- Boolean expandSystemId(const StringC &,
- const Location &,
- Boolean isNdata,
- const CharsetInfo &,
- const StringC *,
- Messenger &,
- StringC &);
- Boolean mergeSystemIds(const Vector<StringC> &,
- Boolean mapCatalogDocument,
- const CharsetInfo &,
- Messenger &mgr,
- StringC &) const;
- StorageManager *lookupStorageType(const StringC &, const CharsetInfo &) const;
- StorageManager *lookupStorageType(const char *) const;
- StorageManager *guessStorageType(const StringC &, const CharsetInfo &) const;
- const InputCodingSystem *lookupCodingSystem(const StringC &,
- const CharsetInfo &,
- Boolean isBctf,
- const char *&) const;
- Boolean resolveSystemId(const StringC &str,
- const CharsetInfo &idCharset,
- Messenger &mgr,
- const Location &defLocation,
- Boolean isNdata,
- ParsedSystemId &parsedSysid) const;
- Boolean parseSystemId(const StringC &str,
- const CharsetInfo &idCharset,
- Boolean isNdata,
- const StorageObjectLocation *def,
- Messenger &mgr,
- ParsedSystemId &parsedSysid) const;
- const CharsetInfo &internalCharset(const CharsetInfo &docCharset) const {
- if (internalCharsetIsDocCharset_)
- return docCharset;
- else
- return charset();
- }
-private:
- EntityManagerImpl(const EntityManagerImpl &); // undefined
- void operator=(const EntityManagerImpl &); // undefined
- static Boolean defLocation(const Location &, StorageObjectLocation &);
- static Boolean matchKey(const StringC &type, const char *s,
- const CharsetInfo &internalCharset);
- NCVector<Owner<StorageManager> > storageManagers_;
- Owner<StorageManager> defaultStorageManager_;
- const InputCodingSystem *defaultCodingSystem_;
- Owner<CatalogManager> catalogManager_;
- Boolean internalCharsetIsDocCharset_;
- ConstPtr<InputCodingSystemKit> codingSystemKit_;
- friend class FSIParser;
-};
-
-class ExternalInfoImpl : public ExternalInfo {
- RTTI_CLASS
-public:
- ExternalInfoImpl(ParsedSystemId &parsedSysid);
- const StorageObjectSpec &spec(size_t i) const;
- size_t nSpecs() const;
- const ParsedSystemId &parsedSystemId() const;
- void noteRS(Offset);
- void noteStorageObjectEnd(Offset);
- void noteInsertedRSs();
- void setDecoder(size_t i, Decoder *);
- void setId(size_t i, StringC &);
- void getId(size_t i, StringC &) const;
- Boolean convertOffset(Offset, StorageObjectLocation &) const;
-private:
- ParsedSystemId parsedSysid_;
- NCVector<StorageObjectPosition> position_;
- size_t currentIndex_;
- // list of inserted RSs
- OffsetOrderedList rsList_;
- Boolean notrack_;
- Mutex mutex_;
-};
-
-class ExternalInputSource : public InputSource {
-public:
- ExternalInputSource(ParsedSystemId &parsedSysid,
- const CharsetInfo &internalCharset,
- const CharsetInfo &docCharset,
- Boolean internalCharsetIsDocCharset,
- Char replacementChar,
- InputSourceOrigin *origin,
- unsigned flags);
- void pushCharRef(Char, const NamedCharRef &);
- ~ExternalInputSource();
-private:
- Xchar fill(Messenger &);
- Boolean rewind(Messenger &);
- void willNotRewind();
- void setDocCharset(const CharsetInfo &, const CharsetInfo &);
- void willNotSetDocCharset();
-
- void init();
- void noteRS();
- void noteRSAt(const Char *);
- void reallocateBuffer(size_t size);
- void insertChar(Char);
- void buildMap(const CharsetInfo &internalCharset,
- const CharsetInfo &docCharset);
- void buildMap1(const CharsetInfo &, const CharsetInfo &);
- static const Char *findNextCr(const Char *start, const Char *end);
- static const Char *findNextLf(const Char *start, const Char *end);
- static const Char *findNextCrOrLf(const Char *start, const Char *end);
-
- ExternalInfoImpl *info_;
- Char *buf_;
- const Char *bufLim_;
- Offset bufLimOffset_;
- size_t bufSize_;
- size_t readSize_;
- NCVector<Owner<StorageObject> > sov_;
- StorageObject *so_;
- size_t soIndex_;
- Boolean insertRS_;
- Decoder *decoder_;
- const char *leftOver_;
- size_t nLeftOver_;
- Boolean mayRewind_;
- Boolean maySetDocCharset_;
- Boolean mayNotExist_;
- enum RecordType {
- unknown,
- crUnknown,
- crlf,
- lf,
- cr,
- asis
- };
- RecordType recordType_;
- Boolean zapEof_;
- Boolean internalCharsetIsDocCharset_;
- Char replacementChar_;
- Ptr<CharMapResource<Unsigned32> > map_;
-};
-
-class FSIParser {
-public:
- FSIParser(const StringC &, const CharsetInfo &idCharset,
- Boolean isNdata,
- const StorageObjectLocation *defLoc,
- const EntityManagerImpl *em,
- Messenger &mgr);
- Boolean parse(ParsedSystemId &parsedSysid);
- static const char *recordsName(StorageObjectSpec::Records records);
- struct RecordType {
- const char *name;
- StorageObjectSpec::Records value;
- };
-private:
- Boolean handleInformal(size_t startIndex, ParsedSystemId &parsedSysid);
- Boolean convertId(StringC &, Xchar smcrd, const StorageManager *);
- Xchar get();
- void unget();
- StorageManager *lookupStorageType(const StringC &key, Boolean &neutral);
- Boolean matchKey(const StringC &, const char *);
- Boolean matchChar(Xchar, char);
- Boolean isS(Xchar);
- Boolean convertDigit(Xchar c, int &weight);
- void uncharref(StringC &);
- Boolean setAttributes(StorageObjectSpec &sos, Boolean neutral,
- Xchar &smcrd, Boolean &fold);
- Boolean setCatalogAttributes(ParsedSystemId &parsedSysid);
- void setDefaults(StorageObjectSpec &sos);
- Boolean parseAttribute(StringC &token, Boolean &gotValue, StringC &value);
- Boolean lookupRecords(const StringC &token, StorageObjectSpec::Records &);
- void convertMinimumLiteral(const StringC &from, StringC &to);
-
- const StringC &str_;
- size_t strIndex_;
- Messenger &mgr_;
- const EntityManagerImpl *em_;
- const StorageObjectSpec *defSpec_;
- const StringC *defId_;
- const CharsetInfo &idCharset_;
- Boolean isNdata_;
- static RecordType recordTypeTable[];
-};
-
-const Char RS = '\n';
-const Char RE = '\r';
-
-ExtendEntityManager::CatalogManager::~CatalogManager()
-{
-}
-
-ExtendEntityManager *ExtendEntityManager::make(StorageManager *sm,
- const InputCodingSystem *cs,
- const ConstPtr<InputCodingSystemKit> &csKit,
- Boolean internalCharsetIsDocCharset)
-{
- return new EntityManagerImpl(sm, cs, csKit, internalCharsetIsDocCharset);
-}
-
-Boolean ExtendEntityManager::externalize(const ExternalInfo *info,
- Offset off,
- StorageObjectLocation &loc)
-{
- if (!info)
- return false;
- const ExternalInfoImpl *p = DYNAMIC_CAST_CONST_PTR(ExternalInfoImpl, info);
- if (!p)
- return false;
- return p->convertOffset(off, loc);
-}
-
-const ParsedSystemId *
-ExtendEntityManager::externalInfoParsedSystemId(const ExternalInfo *info)
-{
- if (!info)
- return 0;
- const ExternalInfoImpl *p = DYNAMIC_CAST_CONST_PTR(ExternalInfoImpl, info);
- if (!p)
- return 0;
- return &p->parsedSystemId();
-}
-
-EntityManagerImpl::EntityManagerImpl(StorageManager *defaultStorageManager,
- const InputCodingSystem *defaultCodingSystem,
- const ConstPtr<InputCodingSystemKit> &codingSystemKit,
- Boolean internalCharsetIsDocCharset)
-: defaultStorageManager_(defaultStorageManager),
- defaultCodingSystem_(defaultCodingSystem),
- codingSystemKit_(codingSystemKit),
- internalCharsetIsDocCharset_(internalCharsetIsDocCharset)
-{
-}
-
-Boolean EntityManagerImpl::internalCharsetIsDocCharset() const
-{
- return internalCharsetIsDocCharset_;
-}
-
-const CharsetInfo &EntityManagerImpl::charset() const
-{
- return codingSystemKit_->systemCharset();
-}
-
-InputSource *EntityManagerImpl::open(const StringC &sysid,
- const CharsetInfo &docCharset,
- InputSourceOrigin *origin,
- unsigned flags,
- Messenger &mgr)
-{
- ParsedSystemId parsedSysid;
- if (!parseSystemId(sysid, docCharset, (flags & ExtendEntityManager::isNdata) != 0,
- 0, mgr, parsedSysid)
- || !catalogManager_->mapCatalog(parsedSysid, this, mgr))
- return 0;
- return new ExternalInputSource(parsedSysid,
- charset(),
- docCharset,
- internalCharsetIsDocCharset_,
- codingSystemKit_->replacementChar(),
- origin, flags);
-}
-
-
-ConstPtr<EntityCatalog>
-EntityManagerImpl::makeCatalog(StringC &systemId,
- const CharsetInfo &docCharset,
- Messenger &mgr)
-{
- return catalogManager_->makeCatalog(systemId, docCharset, this, mgr);
-}
-
-Boolean
-EntityManagerImpl::mergeSystemIds(const Vector<StringC> &sysids,
- Boolean mapCatalogDocument,
- const CharsetInfo &docCharset,
- Messenger &mgr,
- StringC &result) const
-{
- ParsedSystemId parsedSysid;
- if (mapCatalogDocument) {
- parsedSysid.maps.resize(parsedSysid.maps.size() + 1);
- parsedSysid.maps.back().type = ParsedSystemId::Map::catalogDocument;
- }
- for (size_t i = 0; i < sysids.size(); i++)
- if (!parseSystemId(sysids[i],
- docCharset,
- 0,
- 0,
- mgr,
- parsedSysid))
- return 0;
- parsedSysid.unparse(internalCharset(docCharset), 0, result);
- return 1;
-}
-
-Boolean
-EntityManagerImpl::expandSystemId(const StringC &str,
- const Location &defLoc,
- Boolean LOCALisNdata,
- const CharsetInfo &docCharset,
- const StringC *mapCatalogPublic,
- Messenger &mgr,
- StringC &result)
-{
- ParsedSystemId parsedSysid;
- StorageObjectLocation defSoLoc;
- const StorageObjectLocation *defSoLocP;
- if (defLocation(defLoc, defSoLoc))
- defSoLocP = &defSoLoc;
- else
- defSoLocP = 0;
- if (!parseSystemId(str, docCharset, LOCALisNdata, defSoLocP, mgr, parsedSysid))
- return 0;
- if (mapCatalogPublic) {
- ParsedSystemId::Map map;
- map.type = ParsedSystemId::Map::catalogPublic;
- map.publicId = *mapCatalogPublic;
- parsedSysid.maps.insert(parsedSysid.maps.begin(), 1, map);
- }
- parsedSysid.unparse(internalCharset(docCharset), LOCALisNdata, result);
- return 1;
-}
-
-Boolean EntityManagerImpl::parseSystemId(const StringC &str,
- const CharsetInfo &docCharset,
- Boolean LOCALisNdata,
- const StorageObjectLocation *defLoc,
- Messenger &mgr,
- ParsedSystemId &parsedSysid) const
-{
- FSIParser fsiParser(str, internalCharset(docCharset), LOCALisNdata, defLoc, this, mgr);
- return fsiParser.parse(parsedSysid);
-}
-
-StorageManager *
-EntityManagerImpl::guessStorageType(const StringC &type,
- const CharsetInfo &internalCharset) const
-{
- for (size_t i = 0; i < storageManagers_.size(); i++)
- if (storageManagers_[i]->guessIsId(type, internalCharset))
- return storageManagers_[i].pointer();
- if (defaultStorageManager_->guessIsId(type, internalCharset))
- return defaultStorageManager_.pointer();
- return 0;
-}
-
-StorageManager *
-EntityManagerImpl::lookupStorageType(const StringC &type,
- const CharsetInfo &internalCharset) const
-{
- if (type.size() == 0)
- return 0;
- if (matchKey(type, defaultStorageManager_->type(), internalCharset))
- return defaultStorageManager_.pointer();
- for (size_t i = 0; i < storageManagers_.size(); i++)
- if (matchKey(type, storageManagers_[i]->type(), internalCharset))
- return storageManagers_[i].pointer();
- return 0;
-}
-
-StorageManager *
-EntityManagerImpl::lookupStorageType(const char *type) const
-{
- if (type == defaultStorageManager_->type())
- return defaultStorageManager_.pointer();
- for (size_t i = 0; i < storageManagers_.size(); i++)
- if (type == storageManagers_[i]->type())
- return storageManagers_[i].pointer();
- return 0;
-}
-
-const InputCodingSystem *
-EntityManagerImpl::lookupCodingSystem(const StringC &type,
- const CharsetInfo &internalCharset,
- Boolean isBctf,
- const char *&name) const
-{
- return codingSystemKit_->makeInputCodingSystem(type, internalCharset, isBctf, name);
-}
-
-Boolean
-EntityManagerImpl::matchKey(const StringC &type,
- const char *s,
- const CharsetInfo &internalCharset)
-{
- if (strlen(s) != type.size())
- return false;
- for (size_t i = 0; i < type.size(); i++)
- if (internalCharset.execToDesc(toupper(s[i])) != type[i]
- && internalCharset.execToDesc(tolower(s[i])) != type[i])
- return false;
- return true;
-}
-
-void EntityManagerImpl::registerStorageManager(StorageManager *sm)
-{
- storageManagers_.resize(storageManagers_.size() + 1);
- storageManagers_.back() = sm;
-}
-
-void EntityManagerImpl::setCatalogManager(CatalogManager *catalogManager)
-{
- catalogManager_ = catalogManager;
-}
-
-Boolean
-EntityManagerImpl::defLocation(const Location &defLocation,
- StorageObjectLocation &soLoc)
-{
- Offset off;
- const ExternalInfo *info;
- const Origin *origin = defLocation.origin().pointer();
- Index index = defLocation.index();
- for (;;) {
- if (!origin)
- return 0;
- const InputSourceOrigin *inputSourceOrigin = origin->asInputSourceOrigin();
- if (inputSourceOrigin) {
- off = inputSourceOrigin->startOffset(index);
- info = inputSourceOrigin->externalInfo();
- if (info)
- break;
- if (!inputSourceOrigin->defLocation(off, origin, index))
- return 0;
- }
- else {
- const Location &parentLoc = origin->parent();
- origin = parentLoc.origin().pointer();
- index = parentLoc.index();
- }
- }
- return ExtendEntityManager::externalize(info, off, soLoc);
-}
-
-class UnbufferingStorageObject : public StorageObject {
-public:
- UnbufferingStorageObject(StorageObject *sub,
- const Boolean *unbuffer)
- : sub_(sub), buf_(0), bufAvail_(0), bufNext_(0), unbuffer_(unbuffer) { }
- ~UnbufferingStorageObject() { delete [] buf_; }
- Boolean read(char *buf, size_t bufSize, Messenger &mgr,
- size_t &nread) {
- if (bufNext_ >= bufAvail_) {
- bufAvail_ = bufNext_ = 0;
- if (!*unbuffer_)
- return sub_->read(buf, bufSize, mgr, nread);
- if (buf_ == 0)
- buf_ = new char[bufSize_ = bufSize];
- if (!sub_->read(buf_, bufSize_, mgr, bufAvail_))
- return 0;
- }
- *buf = buf_[bufNext_++];
- nread = 1;
- return 1;
- }
- Boolean rewind(Messenger &mgr) {
- bufAvail_ = bufNext_ = 0;
- return sub_->rewind(mgr);
- }
- void willNotRewind() { sub_->willNotRewind(); }
- size_t getBlockSize() const { return sub_->getBlockSize(); }
-private:
- Owner<StorageObject> sub_;
- size_t bufSize_;
- size_t bufAvail_;
- size_t bufNext_;
- char *buf_;
- const Boolean *unbuffer_;
-};
-
-class MappingDecoder : public Decoder {
-public:
- MappingDecoder(Decoder *,
- const ConstPtr<CharMapResource<Unsigned32> > &);
- Boolean convertOffset(unsigned long &offset) const;
- size_t decode(Char *, const char *, size_t, const char **);
-private:
- Owner<Decoder> sub_;
- ConstPtr<CharMapResource<Unsigned32> > map_;
-};
-
-MappingDecoder::MappingDecoder(Decoder *sub,
- const ConstPtr<CharMapResource<Unsigned32> > &map)
-: Decoder(sub->minBytesPerChar()), sub_(sub), map_(map)
-{
-}
-
-size_t MappingDecoder::decode(Char *to, const char *s,
- size_t slen, const char **rest)
-{
- size_t n = sub_->decode(to, s, slen, rest);
- const CharMap<Unsigned32> &map = *map_;
- for (size_t i = 0; i < n; i++) {
- Unsigned32 d = map[to[i]];
- if (d & (unsigned(1) << 31))
- to[i] = (d & ~(unsigned(1) << 31));
- else
- to[i] += d;
- }
- return n;
-}
-
-Boolean MappingDecoder::convertOffset(unsigned long &offset) const
-{
- return sub_->convertOffset(offset);
-}
-
-ExternalInputSource::ExternalInputSource(ParsedSystemId &parsedSysid,
- const CharsetInfo &systemCharset,
- const CharsetInfo &docCharset,
- Boolean internalCharsetIsDocCharset,
- Char replacementChar,
- InputSourceOrigin *origin,
- unsigned flags)
-: InputSource(origin, 0, 0),
- mayRewind_((flags & EntityManager::mayRewind) != 0),
- mayNotExist_((flags & ExtendEntityManager::mayNotExist) != 0),
- sov_(parsedSysid.size()),
- internalCharsetIsDocCharset_(internalCharsetIsDocCharset),
- // hack
- maySetDocCharset_((flags & EntityManager::maySetDocCharset) != 0),
- replacementChar_(replacementChar)
-{
- for (size_t i = 0; i < parsedSysid.size(); i++) {
- if (parsedSysid[i].codingSystemType
- != (internalCharsetIsDocCharset
- ? StorageObjectSpec::bctf
- : StorageObjectSpec::encoding)
- && parsedSysid[i].codingSystemType != StorageObjectSpec::special) {
- map_ = new CharMapResource<Unsigned32>;
- buildMap(systemCharset, docCharset);
- break;
- }
- }
- for (size_t i = 0; i < sov_.size(); i++)
- sov_[i] = 0;
- init();
- info_ = new ExternalInfoImpl(parsedSysid);
- origin->setExternalInfo(info_);
-}
-
-void ExternalInputSource::setDocCharset(const CharsetInfo &docCharset,
- const CharsetInfo &systemCharset)
-{
- if (!map_.isNull())
- buildMap(systemCharset, docCharset);
- willNotSetDocCharset();
-}
-
-void ExternalInputSource::willNotSetDocCharset()
-{
- maySetDocCharset_ = 0;
-}
-
-void ExternalInputSource::buildMap(const CharsetInfo &systemCharset,
- const CharsetInfo &docCharset)
-{
- CharMap<Unsigned32> &map = *map_;
- // FIXME How should invalidChar be chosen when internalCharsetIsDocCharset_?
- Char invalidChar
- = internalCharsetIsDocCharset_ ? 0 : replacementChar_;
- map.setAll((Unsigned32(1) << 31) | invalidChar);
- if (internalCharsetIsDocCharset_)
- buildMap1(systemCharset, docCharset);
- else
- buildMap1(docCharset, systemCharset);
-}
-
-void ExternalInputSource::buildMap1(const CharsetInfo &fromCharset,
- const CharsetInfo &toCharset)
-{
- UnivCharsetDescIter iter(fromCharset.desc());
- for (;;) {
- WideChar descMin, descMax;
- UnivChar univMin;
- if (!iter.next(descMin, descMax, univMin))
- break;
- if (descMin > charMax)
- break;
- if (descMax > charMax)
- descMax = charMax;
- WideChar totalCount = 1 + (descMax - descMin);
- do {
- WideChar count;
- WideChar toMin;
- ISet<WideChar> set;
- int nMap = toCharset.univToDesc(univMin, toMin, set, count);
- if (count > totalCount)
- count = totalCount;
- if (nMap && toMin <= charMax) {
- Char toMax;
- if (count - 1 > charMax - toMin)
- toMax = charMax;
- else
- toMax = toMin + (count - 1);
- map_->setRange(descMin, descMin + (toMax - toMin), Char(toMin - descMin));
- }
- descMin += count;
- univMin += count;
- totalCount -= count;
- } while (totalCount > 0);
- }
-}
-
-void ExternalInputSource::init()
-{
- so_ = 0;
- buf_ = 0;
- bufSize_ = 0;
- bufLim_ = 0;
- bufLimOffset_ = 0;
- insertRS_ = true;
- soIndex_ = 0;
- leftOver_ = 0;
- nLeftOver_ = 0;
-}
-
-ExternalInputSource::~ExternalInputSource()
-{
- if (buf_)
- delete [] buf_;
-}
-
-Boolean ExternalInputSource::rewind(Messenger &mgr)
-{
- reset(0, 0);
- if (buf_)
- delete [] buf_;
- // reset makes a new EntityOrigin
- ParsedSystemId parsedSysid(info_->parsedSystemId());
- ExternalInfoImpl *oldInfo = info_;
- info_ = new ExternalInfoImpl(parsedSysid);
- so_ = 0;
- for (size_t i = 0; i < soIndex_; i++) {
- if (sov_[i] && !sov_[i]->rewind(mgr))
- return 0;
- StringC tem;
- oldInfo->getId(i, tem);
- info_->setId(i, tem);
- }
- inputSourceOrigin()->setExternalInfo(info_);
- init();
- return 1;
-}
-
-void ExternalInputSource::willNotRewind()
-{
- for (size_t i = 0; i < sov_.size(); i++)
- if (sov_[i])
- sov_[i]->willNotRewind();
- mayRewind_ = 0;
-}
-
-
-// Round up N so that it is a power of TO.
-// TO must be a power of 2.
-
-inline
-size_t roundUp(size_t n, size_t to)
-{
- return (n + (to - 1)) & ~(to - 1);
-}
-
-inline
-void ExternalInputSource::noteRSAt(const Char *p)
-{
- info_->noteRS(bufLimOffset_ - (bufLim_ - p));
-}
-
-inline
-void ExternalInputSource::noteRS()
-{
- noteRSAt(cur());
-}
-
-Xchar ExternalInputSource::fill(Messenger &mgr)
-{
- ASSERT(cur() == end());
- while (end() >= bufLim_) {
- // need more data
- while (so_ == 0) {
- if (soIndex_ >= sov_.size())
- return eE;
- if (soIndex_ > 0)
- info_->noteStorageObjectEnd(bufLimOffset_ - (bufLim_ - end()));
- const StorageObjectSpec &spec = info_->spec(soIndex_);
- if (!sov_[soIndex_]) {
- StringC id;
- if (mayNotExist_) {
- NullMessenger nullMgr;
- sov_[soIndex_]
- = spec.storageManager->makeStorageObject(spec.specId, spec.baseId,
- spec.search,
- mayRewind_, nullMgr, id);
- }
- else
- sov_[soIndex_]
- = spec.storageManager->makeStorageObject(spec.specId, spec.baseId,
- spec.search,
- mayRewind_, mgr, id);
- info_->setId(soIndex_, id);
- }
- so_ = sov_[soIndex_].pointer();
- if (so_) {
- decoder_ = spec.codingSystem->makeDecoder();
- if (spec.codingSystemType != StorageObjectSpec::special
- && spec.codingSystemType != (internalCharsetIsDocCharset_
- ? StorageObjectSpec::bctf
- : StorageObjectSpec::encoding)) {
- decoder_ = new MappingDecoder(decoder_, map_);
- if (maySetDocCharset_) {
- sov_[soIndex_] = new UnbufferingStorageObject(sov_[soIndex_].extract(), &maySetDocCharset_);
- so_ = sov_[soIndex_].pointer();
- }
- }
- info_->setDecoder(soIndex_, decoder_);
- zapEof_ = spec.zapEof;
- switch (spec.records) {
- case StorageObjectSpec::asis:
- recordType_ = asis;
- insertRS_ = false;
- break;
- case StorageObjectSpec::cr:
- recordType_ = cr;
- break;
- case StorageObjectSpec::lf:
- recordType_ = lf;
- break;
- case StorageObjectSpec::crlf:
- recordType_ = crlf;
- break;
- case StorageObjectSpec::find:
- recordType_ = unknown;
- break;
- default:
- CANNOT_HAPPEN();
- }
- soIndex_++;
- readSize_ = so_->getBlockSize();
- nLeftOver_ = 0;
- break;
- }
- else
- setAccessError();
- soIndex_++;
- }
-
- size_t keepSize = end() - start();
- const size_t align = sizeof(int)/sizeof(Char);
- size_t readSizeChars = (readSize_ + (sizeof(Char) - 1))/sizeof(Char);
- readSizeChars = roundUp(readSizeChars, align);
- size_t neededSize; // in Chars
- size_t startOffset;
- // compute neededSize and readSize
- unsigned minBytesPerChar = decoder_->minBytesPerChar();
- if (nLeftOver_ == 0 && minBytesPerChar >= sizeof(Char)) {
- // In this case we want to do decoding in place.
- // FIXME It might be a win on some systems (Irix?) to arrange that the
- // read buffer is on a page boundary.
-
- if (keepSize >= size_t(-1)/sizeof(Char) - (align - 1) - insertRS_)
- abort(); // FIXME throw an exception
-
- // Now size_t(-1)/sizeof(Char) - (align - 1) - insertRS_ - keepSize > 0
- if (readSizeChars
- > size_t(-1)/sizeof(Char) - (align - 1) - insertRS_ - keepSize)
- abort();
- neededSize = roundUp(readSizeChars + keepSize + insertRS_, align);
- startOffset = ((neededSize > bufSize_ ? neededSize : bufSize_)
- - readSizeChars - insertRS_ - keepSize);
- }
- else {
- // Needs to be room for everything before decoding.
- neededSize = (keepSize + insertRS_ + readSizeChars
- + (nLeftOver_ + sizeof(Char) - 1)/sizeof(Char));
- // Also must be room for everything after decoding.
- size_t neededSize2
- = (keepSize + insertRS_
- // all the converted characters
- + (nLeftOver_ + readSize_)/minBytesPerChar
- // enough Chars to contain left over bytes
- + ((readSize_ % minBytesPerChar + sizeof(Char) - 1)
- / sizeof(Char)));
- if (neededSize2 > neededSize)
- neededSize = neededSize2;
- neededSize = roundUp(neededSize, align);
- if (neededSize > size_t(-1)/sizeof(Char))
- abort();
- startOffset = 0;
- }
- if (bufSize_ < neededSize)
- reallocateBuffer(neededSize);
- Char *newStart = buf_ + startOffset;
- if (newStart != start() && keepSize > 0)
- memmove(newStart, start(), keepSize*sizeof(Char));
- char *bytesStart = (char *)(buf_ + bufSize_ - readSizeChars) - nLeftOver_;
- if (nLeftOver_ > 0 && leftOver_ != bytesStart)
- memmove(bytesStart, leftOver_, nLeftOver_);
- moveStart(newStart);
- bufLim_ = end();
-
- size_t nread;
- if (so_->read((char *)(buf_ + bufSize_ - readSizeChars), readSize_,
- mgr, nread)) {
- if (nread > 0) {
- const char *bytesEnd = bytesStart + nLeftOver_ + nread;
- size_t nChars = decoder_->decode((Char *)end() + insertRS_,
- bytesStart,
- nLeftOver_ + nread
- - (zapEof_ && bytesEnd[-1] == EOFCHAR),
- &leftOver_);
- nLeftOver_ = bytesEnd - leftOver_;
- if (nChars > 0) {
- if (insertRS_) {
- noteRS();
- *(Char *)end() = RS;
- advanceEnd(end() + 1);
- insertRS_ = false;
- bufLim_ += 1;
- bufLimOffset_ += 1;
- }
- bufLim_ += nChars;
- bufLimOffset_ += nChars;
- break;
- }
- }
- }
- else
- so_ = 0;
- }
- ASSERT(end() < bufLim_);
- if (insertRS_) {
- noteRS();
- insertChar(RS);
- insertRS_ = false;
- bufLimOffset_ += 1;
- }
- switch (recordType_) {
- case unknown:
- {
- const Char *e = findNextCrOrLf(end(), bufLim_);
- if (e) {
- if (*e == '\n') {
- recordType_ = lf;
- info_->noteInsertedRSs();
- *(Char *)e = RE;
- advanceEnd(e + 1);
- insertRS_ = true;
- }
- else {
- if (e + 1 < bufLim_) {
- if (e[1] == '\n') {
- recordType_ = crlf;
- advanceEnd(e + 1);
- if (e + 2 == bufLim_) {
- bufLim_--;
- bufLimOffset_--;
- insertRS_ = true;
- }
- }
- else {
- advanceEnd(e + 1);
- recordType_ = cr;
- info_->noteInsertedRSs();
- insertRS_ = true;
- }
- }
- else {
- recordType_ = crUnknown;
- advanceEnd(e + 1);
- }
- }
- }
- else
- advanceEnd(bufLim_);
- }
- break;
- case crUnknown:
- {
- if (*cur() == '\n') {
- noteRS();
- advanceEnd(cur() + 1);
- recordType_ = crlf;
- }
- else {
- advanceEnd(cur() + 1);
- insertRS_ = true;
- recordType_ = cr;
- info_->noteInsertedRSs();
- }
- }
- break;
- case lf:
- {
- Char *e = (Char *)findNextLf(end(), bufLim_);
- if (e) {
- advanceEnd(e + 1);
- *e = RE;
- insertRS_ = true;
- }
- else
- advanceEnd(bufLim_);
- }
- break;
- case cr:
- {
- const Char *e = findNextCr(end(), bufLim_);
- if (e) {
- advanceEnd(e + 1);
- insertRS_ = true;
- }
- else
- advanceEnd(bufLim_);
- }
- break;
- case crlf:
- {
- const Char *e = end();
- for (;;) {
- e = findNextLf(e, bufLim_);
- if (!e) {
- advanceEnd(bufLim_);
- break;
- }
- // Need to delete final RS if not followed by anything.
- if (e + 1 == bufLim_) {
- bufLim_--;
- bufLimOffset_--;
- advanceEnd(e);
- insertRS_ = true;
- if (cur() == end())
- return fill(mgr);
- break;
- }
- noteRSAt(e);
- e++;
- }
- }
- break;
- case asis:
- advanceEnd(bufLim_);
- break;
- default:
- CANNOT_HAPPEN();
- }
- ASSERT(cur() < end());
- return nextChar();
-}
-
-const Char *ExternalInputSource::findNextCr(const Char *start,
- const Char *end)
-{
- for (; start < end; start++)
- if (*start == '\r')
- return start;
- return 0;
-}
-
-const Char *ExternalInputSource::findNextLf(const Char *start,
- const Char *end)
-{
- for (; start < end; start++)
- if (*start == '\n')
- return start;
- return 0;
-}
-
-const Char *ExternalInputSource::findNextCrOrLf(const Char *start,
- const Char *end)
-{
- for (; start < end; start++)
- if (*start == '\n' || *start == '\r')
- return start;
- return 0;
-}
-
-void ExternalInputSource::pushCharRef(Char ch, const NamedCharRef &ref)
-{
- ASSERT(cur() == start());
- noteCharRef(startIndex() + (cur() - start()), ref);
- insertChar(ch);
-}
-
-void ExternalInputSource::insertChar(Char ch)
-{
- if (start() > buf_) {
- if (cur() > start())
- memmove((Char *)start() - 1, start(), (cur() - start())*sizeof(Char));
- moveLeft();
- *(Char *)cur() = ch;
- }
- else {
- // must have start == buf
- if (buf_ + (bufSize_ - (nLeftOver_ + sizeof(Char) - 1)/sizeof(Char))
- == bufLim_) {
- if (bufSize_ == size_t(-1))
- abort(); // FIXME throw an exception
- reallocateBuffer(bufSize_ + 1);
- }
- else if (nLeftOver_ > 0 && ((char *)(bufLim_ + 1) > leftOver_)) {
- char *s = (char *)(buf_ + bufSize_) - nLeftOver_;
- memmove(s, leftOver_, nLeftOver_);
- leftOver_ = s;
- }
- if (cur() < bufLim_)
- memmove((Char *)cur() + 1, cur(), (bufLim_ - cur())*sizeof(Char));
- *(Char *)cur() = ch;
- advanceEnd(end() + 1);
- bufLim_ += 1;
- }
-}
-
-void ExternalInputSource::reallocateBuffer(size_t newSize)
-{
- Char *newBuf = new Char[newSize];
-
- memcpy(newBuf, buf_, bufSize_*sizeof(Char));
- bufSize_ = newSize;
- changeBuffer(newBuf, buf_);
- bufLim_ = newBuf + (bufLim_ - buf_);
- if (nLeftOver_ > 0) {
- char *s = (char *)(newBuf + bufSize_) - nLeftOver_;
- memmove(s,
- (char *)newBuf + (leftOver_ - (char *)buf_),
- nLeftOver_);
- leftOver_ = s;
- }
- delete [] buf_;
- buf_ = newBuf;
-}
-
-RTTI_DEF1(ExternalInfoImpl, ExternalInfo)
-
-ExternalInfoImpl::ExternalInfoImpl(ParsedSystemId &parsedSysid)
-: currentIndex_(0), position_(parsedSysid.size())
-{
- parsedSysid.swap(parsedSysid_);
- if (parsedSysid_.size() > 0)
- notrack_ = parsedSysid_[0].notrack;
-}
-
-void ExternalInfoImpl::setId(size_t i, StringC &id)
-{
- Mutex::Lock lock(&mutex_);
- id.swap(position_[i].id);
-}
-
-void ExternalInfoImpl::getId(size_t i, StringC &id) const
-{
- Mutex::Lock lock(&((ExternalInfoImpl *)this)->mutex_);
- id = position_[i].id;
-}
-
-void ExternalInfoImpl::setDecoder(size_t i, Decoder *decoder)
-{
- Mutex::Lock lock(&mutex_);
- position_[i].decoder = decoder;
-}
-
-void ExternalInfoImpl::noteInsertedRSs()
-{
- position_[currentIndex_].insertedRSs = 1;
-}
-
-void ExternalInfoImpl::noteRS(Offset offset)
-{
- // We do the locking in OffsetOrderedList.
- if (!notrack_)
- rsList_.append(offset);
- if (offset
- == (currentIndex_ == 0 ? 0 : position_[currentIndex_- 1].endOffset))
- position_[currentIndex_].startsWithRS = 1;
-}
-
-void ExternalInfoImpl::noteStorageObjectEnd(Offset offset)
-{
- Mutex::Lock lock(&mutex_);
- ASSERT(currentIndex_ < position_.size());
- // The last endOffset_ must be -1.
- if (currentIndex_ < position_.size() - 1) {
- position_[currentIndex_++].endOffset = offset;
- position_[currentIndex_].line1RS = rsList_.size();
- notrack_ = parsedSysid_[currentIndex_].notrack;
- }
-}
-
-Boolean ExternalInfoImpl::convertOffset(Offset off,
- StorageObjectLocation &ret) const
-{
- Mutex::Lock lock(&((ExternalInfoImpl *)this)->mutex_);
- if (off == Offset(-1) || position_.size() == 0)
- return false;
- // the last endOffset_ is Offset(-1), so this will
- // terminate
- int i;
- for (i = 0; off >= position_[i].endOffset; i++)
- ;
- for (; position_[i].id.size() == 0; i--)
- if (i == 0)
- return false;
- ret.storageObjectSpec = &parsedSysid_[i];
- ret.actualStorageId = position_[i].id;
- Offset startOffset = i == 0 ? 0 : position_[i - 1].endOffset;
- ret.storageObjectOffset = off - startOffset;
- ret.byteIndex = ret.storageObjectOffset;
- if (parsedSysid_[i].notrack
- || parsedSysid_[i].records == StorageObjectSpec::asis) {
- ret.lineNumber = (unsigned long)-1;
- if (parsedSysid_[i].records != StorageObjectSpec::asis) {
- if (position_[i].insertedRSs)
- ret.byteIndex = (unsigned long)-1;
- else if (ret.byteIndex > 0 && position_[i].startsWithRS)
- ret.byteIndex--; // first RS is inserted
- }
- ret.columnNumber = (unsigned long)-1;
- return true;
- }
- else {
- size_t line1RS = position_[i].line1RS;
- // line1RS is now the number of RSs that are before or on the current line.
- size_t j;
- Offset colStart;
- if (rsList_.findPreceding(off, j, colStart)) {
- if (position_[i].insertedRSs)
- ret.byteIndex -= j + 1 - line1RS;
- else if (ret.byteIndex > 0 && position_[i].startsWithRS)
- ret.byteIndex--; // first RS is inserted
- j++;
- colStart++;
- }
- else {
- j = 0;
- colStart = 0;
- }
- // j is now the number of RSs that are before or on the current line
- // colStart is the offset of the first column
- ret.lineNumber = j - line1RS + 1 - position_[i].startsWithRS;
- // the offset of the first column
- if (colStart < startOffset)
- colStart = startOffset;
- // the RS that starts a line will be in column 0;
- // the first real character of a line will be column 1
- ret.columnNumber = 1 + off - colStart;
- }
- if (!position_[i].decoder
- || !position_[i].decoder->convertOffset(ret.byteIndex))
- ret.byteIndex = (unsigned long)-1;
- return true;
-}
-
-const StorageObjectSpec &ExternalInfoImpl::spec(size_t i) const
-{
- return parsedSysid_[i];
-}
-
-size_t ExternalInfoImpl::nSpecs() const
-{
- return parsedSysid_.size();
-}
-
-const ParsedSystemId &ExternalInfoImpl::parsedSystemId() const
-{
- return parsedSysid_;
-}
-
-StorageObjectSpec::StorageObjectSpec()
-: storageManager(0), codingSystem(0), codingSystemName(0), notrack(0),
- records(find), zapEof(1), search(1)
-{
-}
-
-StorageObjectPosition::StorageObjectPosition()
-: endOffset(Offset(-1)), line1RS(0), startsWithRS(0), insertedRSs(0)
-{
-}
-
-FSIParser::FSIParser(const StringC &str,
- const CharsetInfo &idCharset,
- Boolean isNdata,
- const StorageObjectLocation *defLoc,
- const EntityManagerImpl *em,
- Messenger &mgr)
-: str_(str),
- strIndex_(0),
- idCharset_(idCharset),
- isNdata_(isNdata),
- defSpec_(defLoc ? defLoc->storageObjectSpec : 0),
- defId_(defLoc ? &defLoc->actualStorageId : 0),
- em_(em),
- mgr_(mgr)
-{
-}
-
-Xchar FSIParser::get()
-{
- if (strIndex_ < str_.size())
- return str_[strIndex_++];
- else
- return -1;
-}
-
-void FSIParser::unget()
-{
- if (strIndex_ > 0)
- strIndex_ -= 1;
-}
-
-Boolean FSIParser::matchKey(const StringC &str, const char *s)
-{
- if (strlen(s) != str.size())
- return false;
- for (size_t i = 0; i < str.size(); i++)
- if (idCharset_.execToDesc(toupper(s[i])) != str[i]
- && idCharset_.execToDesc(tolower(s[i])) != str[i])
- return false;
- return true;
-}
-
-Boolean FSIParser::matchChar(Xchar ch, char execC)
-{
- return ch == idCharset_.execToDesc(execC);
-}
-
-Boolean FSIParser::isS(Xchar c)
-{
- return (matchChar(c, ' ')
- || matchChar(c, '\r')
- || matchChar(c, '\n')
- || matchChar(c, ' '));
-}
-
-Boolean FSIParser::convertDigit(Xchar c, int &weight)
-{
- static const char digits[] = "0123456789";
- for (int i = 0; digits[i] != '\0'; i++)
- if (matchChar(c, digits[i])) {
- weight = i;
- return 1;
- }
- return 0;
-}
-
-Boolean FSIParser::parse(ParsedSystemId &parsedSysid)
-{
- size_t startIndex = strIndex_;
- if (!matchChar(get(), '<'))
- return handleInformal(startIndex, parsedSysid);
- StringC key;
- for (;;) {
- Xchar c = get();
- if (c == -1)
- return handleInformal(startIndex, parsedSysid);
- if (isS(c) || matchChar(c, '>'))
- break;
- key += Char(c);
- }
- unget();
- if (matchKey(key, "CATALOG")) {
- if (!setCatalogAttributes(parsedSysid))
- return 0;
- return parse(parsedSysid);
- }
- Boolean neutral;
- StorageManager *sm = lookupStorageType(key, neutral);
- if (!sm)
- return handleInformal(startIndex, parsedSysid);
- for (;;) {
- parsedSysid.resize(parsedSysid.size() + 1);
- StorageObjectSpec &sos = parsedSysid.back();
- sos.storageManager = sm;
- Xchar smcrd;
- Boolean fold;
- if (!setAttributes(sos, neutral, smcrd, fold))
- return 0;
- sm = 0;
- StringC id;
- Boolean hadData = 0;
- for (;;) {
- Xchar c = get();
- if (c == -1)
- break;
- if (matchChar(c, '<')) {
- hadData = 1;
- Char stago = c;
- key.resize(0);
- for (;;) {
- c = get();
- if (c == -1) {
- id += stago;
- id += key;
- break;
- }
- if (isS(c) || matchChar(c, '>')) {
- unget();
- sm = lookupStorageType(key, neutral);
- if (!sm) {
- id += stago;
- id += key;
- }
- break;
- }
- key += c;
- }
- if (sm)
- break;
- }
- else if (!((!hadData && matchChar(c, '\r')) // ignored RE
- || matchChar(c, '\n') )) { // ignored RS
- hadData = 1;
- id += c;
- }
- }
- if (id.size() > 0 && matchChar(id[id.size() - 1], '\r'))
- id.resize(id.size() - 1);
- uncharref(id);
- id.swap(sos.specId);
- if (!convertId(sos.specId, smcrd, sos.storageManager))
- return 0;
- if (neutral) {
- if (!sos.storageManager->transformNeutral(sos.specId, fold, mgr_))
- return 0;
- }
- if (sos.storageManager->resolveRelative(sos.baseId, sos.specId,
- sos.search))
- sos.baseId.resize(0);
- if (!sm)
- break;
- }
- return 1;
-}
-
-Boolean FSIParser::handleInformal(size_t index, ParsedSystemId &parsedSysid)
-{
- parsedSysid.resize(parsedSysid.size() + 1);
- StorageObjectSpec &sos = parsedSysid.back();
- sos.specId.assign(str_.data() + index,
- str_.size() - index);
- sos.storageManager = em_->guessStorageType(sos.specId, idCharset_);
- if (!sos.storageManager) {
- if (defSpec_ && defSpec_->storageManager->inheritable())
- sos.storageManager = defSpec_->storageManager;
- else
- sos.storageManager = em_->defaultStorageManager_.pointer();
- }
- setDefaults(sos);
- if (!convertId(sos.specId, -1, sos.storageManager))
- return 0;
- if (sos.storageManager->resolveRelative(sos.baseId, sos.specId, sos.search))
- sos.baseId.resize(0);
- return 1;
-}
-
-StorageManager *FSIParser::lookupStorageType(const StringC &key,
- Boolean &neutral)
-{
- if (matchKey(key, "NEUTRAL")) {
- neutral = 1;
- if (defSpec_ && defSpec_->storageManager->inheritable())
- return defSpec_->storageManager;
- else
- return em_->defaultStorageManager_.pointer();
- }
- else {
- StorageManager *sm = em_->lookupStorageType(key, idCharset_);
- if (sm)
- neutral = 0;
- return sm;
- }
-}
-
-Boolean FSIParser::setCatalogAttributes(ParsedSystemId &parsedSysid)
-{
- Boolean hadPublic = 0;
- parsedSysid.maps.resize(parsedSysid.maps.size() + 1);
- parsedSysid.maps.back().type = ParsedSystemId::Map::catalogDocument;
- for (;;) {
- StringC token, value;
- Boolean gotValue;
- if (!parseAttribute(token, gotValue, value)) {
- mgr_.message(EntityManagerMessages::fsiSyntax, StringMessageArg(str_));
- return 0;
- }
- if (token.size() == 0)
- break;
- if (matchKey(token, "PUBLIC")) {
- if (hadPublic)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("PUBLIC")));
- else if (gotValue) {
- convertMinimumLiteral(value, parsedSysid.maps.back().publicId);
- parsedSysid.maps.back().type = ParsedSystemId::Map::catalogPublic;
- }
- else
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- hadPublic = 1;
- }
- else
- mgr_.message(gotValue
- ? EntityManagerMessages::fsiUnsupportedAttribute
- : EntityManagerMessages::fsiUnsupportedAttributeToken,
- StringMessageArg(token));
- }
- return 1;
-}
-
-void FSIParser::convertMinimumLiteral(const StringC &from, StringC &to)
-{
- // Do just enough to ensure it can be reparsed.
- to.resize(0);
- for (size_t i = 0; i < from.size(); i++) {
- Char c = from[i];
- if (matchChar(c, '"') || matchChar(c, '#'))
- mgr_.message(EntityManagerMessages::fsiLookupChar, NumberMessageArg(c));
- else if (matchChar(c, ' ')) {
- if (to.size() && to[to.size() - 1] != c)
- to += c;
- }
- else
- to += c;
- }
- if (to.size() && matchChar(to[to.size() - 1], ' '))
- to.resize(to.size() - 1);
-}
-
-// FIXME This should be table driven.
-
-Boolean FSIParser::setAttributes(StorageObjectSpec &sos,
- Boolean neutral,
- Xchar &smcrd,
- Boolean &fold)
-{
- Boolean hadBctf = 0;
- Boolean hadEncoding = 0;
- Boolean hadTracking = 0;
- Boolean hadSmcrd = 0;
- smcrd = -1;
- fold = 1;
- Boolean hadRecords = 0;
- Boolean hadBase = 0;
- Boolean hadZapeof = 0;
- Boolean hadSearch = 0;
- Boolean hadFold = 0;
- StorageObjectSpec::Records records;
- setDefaults(sos);
- for (;;) {
- StringC token, value;
- Boolean gotValue;
- if (!parseAttribute(token, gotValue, value)) {
- mgr_.message(EntityManagerMessages::fsiSyntax, StringMessageArg(str_));
- return 0;
- }
- if (token.size() == 0)
- break;
- if (matchKey(token, "BCTF")) {
- if (sos.storageManager->requiredCodingSystem())
- mgr_.message(EntityManagerMessages::fsiBctfEncodingNotApplicable);
- else if (hadBctf)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (hadEncoding)
- mgr_.message(EntityManagerMessages::fsiBctfAndEncoding);
- else if (gotValue) {
- const char *codingSystemName;
- const InputCodingSystem *codingSystem
- = em_->lookupCodingSystem(value, idCharset_, 1, codingSystemName);
- if (codingSystem) {
- sos.codingSystem = codingSystem;
- sos.codingSystemName = codingSystemName;
- sos.codingSystemType = StorageObjectSpec::bctf;
- }
- else if (matchKey(value, "SAME")) {
- if (!isNdata_) {
- if (defSpec_) {
- sos.codingSystem = defSpec_->codingSystem;
- sos.codingSystemName = defSpec_->codingSystemName;
- sos.codingSystemType = defSpec_->codingSystemType;
- }
- else {
- sos.codingSystem = em_->defaultCodingSystem_;
- sos.codingSystemName = 0;
- sos.codingSystemType = (em_->internalCharsetIsDocCharset_
- ? StorageObjectSpec::bctf
- : StorageObjectSpec::encoding);
- }
- }
- }
- else
- mgr_.message(EntityManagerMessages::fsiUnknownBctf,
- StringMessageArg(value));
- }
- else
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- hadBctf = 1;
- }
- else if (matchKey(token, "ENCODING")) {
- if (sos.storageManager->requiredCodingSystem())
- mgr_.message(EntityManagerMessages::fsiBctfEncodingNotApplicable);
- else if (hadEncoding)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (hadBctf)
- mgr_.message(EntityManagerMessages::fsiBctfAndEncoding);
- else if (gotValue) {
- const char *codingSystemName;
- const InputCodingSystem *codingSystem
- = em_->lookupCodingSystem(value, idCharset_, 0, codingSystemName);
- if (codingSystem) {
- sos.codingSystem = codingSystem;
- sos.codingSystemName = codingSystemName;
- sos.codingSystemType = StorageObjectSpec::encoding;
- }
- else if (matchKey(value, "SAME")) {
- if (!isNdata_) {
- if (defSpec_) {
- sos.codingSystem = defSpec_->codingSystem;
- sos.codingSystemName = defSpec_->codingSystemName;
- sos.codingSystemType = defSpec_->codingSystemType;
- }
- else {
- sos.codingSystem = em_->defaultCodingSystem_;
- sos.codingSystemName = 0;
- sos.codingSystemType = (em_->internalCharsetIsDocCharset_
- ? StorageObjectSpec::bctf
- : StorageObjectSpec::encoding);
- }
- }
- }
- else
- mgr_.message(EntityManagerMessages::fsiUnknownEncoding,
- StringMessageArg(value));
- }
- else
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- hadEncoding = 1;
- }
- else if (matchKey(token, "TRACKING")) {
- if (hadTracking)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue) {
- if (matchKey(value, "NOTRACK"))
- sos.notrack = 1;
- else if (!matchKey(value, "TRACK"))
- mgr_.message(EntityManagerMessages::fsiBadTracking,
- StringMessageArg(value));
- }
- else
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- hadTracking = 1;
- }
- else if (matchKey(token, "ZAPEOF")) {
- if (sos.storageManager->requiredCodingSystem())
- mgr_.message(EntityManagerMessages::fsiZapeofNotApplicable);
- else if (hadZapeof)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue) {
- if (matchKey(value, "ZAPEOF"))
- sos.zapEof = 1;
- else if (matchKey(value, "NOZAPEOF"))
- sos.zapEof = 0;
- else
- mgr_.message(EntityManagerMessages::fsiBadZapeof,
- StringMessageArg(value));
- }
- else
- sos.zapEof = 1;
- hadZapeof = 1;
- }
- else if (matchKey(token, "NOZAPEOF")) {
- if (sos.storageManager->requiredCodingSystem())
- mgr_.message(EntityManagerMessages::fsiZapeofNotApplicable);
- else if (hadZapeof)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("ZAPEOF")));
- else if (gotValue)
- mgr_.message(EntityManagerMessages::fsiValueAsName,
- StringMessageArg(token));
- else
- sos.zapEof = 0;
- hadZapeof = 1;
- }
- else if (matchKey(token, "SEARCH")) {
- if (hadSearch)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue) {
- if (matchKey(value, "SEARCH"))
- sos.search = 1;
- else if (matchKey(value, "NOSEARCH"))
- sos.search = 0;
- else
- mgr_.message(EntityManagerMessages::fsiBadSearch,
- StringMessageArg(value));
- }
- else
- sos.search = 1;
- hadSearch = 1;
- }
- else if (matchKey(token, "NOSEARCH")) {
- if (hadSearch)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("SEARCH")));
- else if (gotValue)
- mgr_.message(EntityManagerMessages::fsiValueAsName,
- StringMessageArg(token));
- else
- sos.search = 0;
- hadSearch = 1;
- }
- else if (matchKey(token, "FOLD")) {
- if (!neutral)
- mgr_.message(EntityManagerMessages::fsiFoldNotNeutral);
- else if (hadFold)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue) {
- if (matchKey(value, "FOLD"))
- fold = 1;
- else if (matchKey(value, "NOFOLD"))
- fold = 0;
- else
- mgr_.message(EntityManagerMessages::fsiBadFold,
- StringMessageArg(value));
- }
- else
- fold = 1;
- hadFold = 1;
- }
- else if (matchKey(token, "NOFOLD")) {
- if (!neutral)
- mgr_.message(EntityManagerMessages::fsiFoldNotNeutral);
- else if (hadFold)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("FOLD")));
- else if (gotValue)
- mgr_.message(EntityManagerMessages::fsiValueAsName,
- StringMessageArg(token));
- else
- fold = 0;
- hadFold = 1;
- }
- else if (matchKey(token, "SMCRD")) {
- if (hadSmcrd)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue) {
- if (value.size() == 0)
- smcrd = -1;
- else if (value.size() == 1)
- smcrd = value[0];
- else
- mgr_.message(EntityManagerMessages::fsiBadSmcrd,
- StringMessageArg(value));
- }
- else
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- hadSmcrd = 1;
- }
- else if (matchKey(token, "RECORDS")) {
- if (sos.storageManager->requiresCr())
- mgr_.message(EntityManagerMessages::fsiRecordsNotApplicable);
- else if (hadRecords)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue) {
- if (!lookupRecords(value, sos.records))
- mgr_.message(EntityManagerMessages::fsiUnsupportedRecords,
- StringMessageArg(value));
- }
- else
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- hadRecords = 1;
- }
- else if (matchKey(token, "SOIBASE")) {
- if (hadBase)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(token));
- else if (gotValue)
- value.swap(sos.baseId);
- else {
- mgr_.message(EntityManagerMessages::fsiMissingValue,
- StringMessageArg(token));
- sos.baseId.resize(0);
- }
- hadBase = 1;
- }
- else if (lookupRecords(token, records)) {
- if (sos.storageManager->requiresCr())
- mgr_.message(EntityManagerMessages::fsiRecordsNotApplicable);
- else if (hadRecords)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("RECORDS")));
- else if (!gotValue)
- sos.records = records;
- else
- mgr_.message(EntityManagerMessages::fsiValueAsName,
- StringMessageArg(token));
- hadRecords = 1;
- }
- else if (matchKey(token, "NOTRACK")) {
- if (hadTracking)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("TRACKING")));
- else if (!gotValue)
- sos.notrack = 1;
- else
- mgr_.message(EntityManagerMessages::fsiValueAsName,
- StringMessageArg(token));
- hadTracking = 1;
- }
- else if (matchKey(token, "TRACK")) {
- if (hadTracking)
- mgr_.message(EntityManagerMessages::fsiDuplicateAttribute,
- StringMessageArg(idCharset_.execToDesc("TRACKING")));
- else if (gotValue)
- mgr_.message(EntityManagerMessages::fsiValueAsName,
- StringMessageArg(token));
- hadTracking = 1;
- }
- else
- mgr_.message(gotValue
- ? EntityManagerMessages::fsiUnsupportedAttribute
- : EntityManagerMessages::fsiUnsupportedAttributeToken,
- StringMessageArg(token));
- }
- if (hadBase && sos.baseId.size() > 0) {
- convertId(sos.baseId, smcrd, sos.storageManager);
- if (neutral) {
- if (!sos.storageManager->transformNeutral(sos.baseId, fold, mgr_))
- sos.baseId.resize(0);
- }
- }
- if (!hadZapeof && hadRecords && sos.records == StorageObjectSpec::asis)
- sos.zapEof = 0;
- return 1;
-}
-
-FSIParser::RecordType FSIParser::recordTypeTable[] = {
- { "FIND", StorageObjectSpec::find },
- { "ASIS", StorageObjectSpec::asis },
- { "CR", StorageObjectSpec::cr },
- { "LF", StorageObjectSpec::lf },
- { "CRLF", StorageObjectSpec::crlf }
-};
-
-const char *FSIParser::recordsName(StorageObjectSpec::Records records)
-{
- for (size_t i = 0; i < SIZEOF(recordTypeTable); i++)
- if (records == recordTypeTable[i].value)
- return recordTypeTable[i].name;
- return 0;
-}
-
-Boolean FSIParser::lookupRecords(const StringC &token,
- StorageObjectSpec::Records &result)
-{
- for (size_t i = 0; i < SIZEOF(recordTypeTable); i++)
- if (matchKey(token, recordTypeTable[i].name)) {
- result = recordTypeTable[i].value;
- return 1;
- }
- return 0;
-}
-
-void FSIParser::setDefaults(StorageObjectSpec &sos)
-{
- if (sos.storageManager->requiresCr())
- sos.records = StorageObjectSpec::cr;
- else if (isNdata_
- || (defSpec_ && defSpec_->records == StorageObjectSpec::asis))
- sos.records = StorageObjectSpec::asis;
- if (isNdata_ || (defSpec_ && !defSpec_->zapEof))
- sos.zapEof = 0;
- if (defSpec_ && defSpec_->storageManager == sos.storageManager) {
- if (defId_)
- sos.baseId = *defId_;
- else {
- sos.baseId = defSpec_->specId;
- sos.storageManager->resolveRelative(defSpec_->baseId,
- sos.baseId,
- 0);
- }
- }
- sos.codingSystem = sos.storageManager->requiredCodingSystem();
- if (sos.codingSystem) {
- sos.zapEof = 0; // hack
- sos.codingSystemType = StorageObjectSpec::special;
- }
- else {
- sos.codingSystem = em_->defaultCodingSystem_;
- sos.codingSystemType
- = (em_->internalCharsetIsDocCharset_
- ? StorageObjectSpec::bctf
- : StorageObjectSpec::encoding);
- if (isNdata_) {
- sos.codingSystem = em_->codingSystemKit_->identityInputCodingSystem();
- sos.codingSystemType = StorageObjectSpec::special;
- }
- else if (defSpec_) {
- sos.codingSystem = defSpec_->codingSystem;
- sos.codingSystemName = defSpec_->codingSystemName;
- sos.codingSystemType = defSpec_->codingSystemType;
- }
- }
-}
-
-Boolean FSIParser::parseAttribute(StringC &token, Boolean &gotValue,
- StringC &value)
-{
- Xchar c = get();
- while (isS(c))
- c = get();
- if (c == -1) {
- return 0;
- }
- token.resize(0);
- if (matchChar(c, '>'))
- return 1;
- if (matchChar(c, '"') || matchChar(c, '\'') || matchChar(c, '='))
- return 0;
- for (;;) {
- token += c;
- c = get();
- if (c == -1)
- return 0;
- if (isS(c))
- break;
- if (matchChar(c, '>') || matchChar(c, '='))
- break;
- }
- while (isS(c))
- c = get();
- if (c == -1)
- return 0;
- if (!matchChar(c, '=')) {
- unget();
- gotValue = 0;
- return 1;
- }
- gotValue = 1;
- value.resize(0);
-
- c = get();
- while (isS(c))
- c = get();
- if (matchChar(c, '>') || matchChar(c, '='))
- return 0;
- if (matchChar(c, '"') || matchChar(c, '\'')) {
- Char lit = c;
- for (;;) {
- Xchar c = get();
- if (c == lit)
- break;
- if (c == -1)
- return 0;
- if (matchChar(c, '\n'))
- ;
- else if (matchChar(c, '\r') || matchChar(c, '\t'))
- value += idCharset_.execToDesc(' ');
- else
- value += c;
- }
- uncharref(value);
- }
- else {
- for (;;) {
- value += c;
- c = get();
- if (c == -1)
- return 0;
- if (isS(c))
- break;
- if (matchChar(c, '>') || matchChar(c, '=')) {
- unget();
- break;
- }
- }
- }
- return 1;
-}
-
-void FSIParser::uncharref(StringC &str)
-{
- size_t j = 0;
- size_t i = 0;
- while (i < str.size()) {
- int digit;
- if (matchChar(str[i], '&')
- && i + 2 < str.size()
- && matchChar(str[i + 1], '#')
- && convertDigit(str[i + 2], digit)) {
- unsigned long val = digit;
- i += 3;
- while (i < str.size() && convertDigit(str[i], digit)) {
- val = val*10 + digit;
- i++;
- }
- str[j++] = val;
- if (i < str.size() && matchChar(str[i], ';'))
- i++;
- }
- else
- str[j++] = str[i++];
- }
- str.resize(j);
-}
-
-Boolean FSIParser::convertId(StringC &id, Xchar smcrd,
- const StorageManager *sm)
-{
- const CharsetInfo *smCharset = sm->idCharset();
- StringC newId;
- size_t i = 0;
- while (i < id.size()) {
- UnivChar univ;
- WideChar wide;
- ISet<WideChar> wideSet;
- int digit;
- if (Xchar(id[i]) == smcrd
- && i + 1 < id.size()
- && convertDigit(id[i + 1], digit)) {
- i += 2;
- Char val = digit;
- while (i < id.size() && convertDigit(id[i], digit)) {
- val = val*10 + digit;
- i++;
- }
- newId += val;
- if (i < id.size() && matchChar(id[i], ';'))
- i++;
- }
- else if (smCharset) {
- if (!idCharset_.descToUniv(id[i++], univ))
- return 0;
- if (univ == UnivCharsetDesc::rs)
- ;
- else if (univ == UnivCharsetDesc::re && sm->reString())
- newId += *sm->reString();
- else if (smCharset->univToDesc(univ, wide, wideSet) != 1
- || wide > charMax)
- return 0; // FIXME give error
- else
- newId += Char(wide);
- }
- else
- newId += id[i++];
- }
- newId.swap(id);
- return 1;
-}
-
-ParsedSystemId:: ParsedSystemId()
-{
-}
-
-static
-void unparseSoi(const StringC &soi,
- const CharsetInfo *idCharset,
- const CharsetInfo &resultCharset,
- StringC &result,
- Boolean &needSmcrd);
-
-void ParsedSystemId::unparse(const CharsetInfo &resultCharset,
- Boolean isNdata,
- StringC &result) const
-{
- size_t len = size();
- result.resize(0);
- size_t i;
- for (i = 0; i < maps.size(); i++) {
- if (maps[i].type == Map::catalogDocument)
- result += resultCharset.execToDesc("<CATALOG>");
- else if (maps[i].type == Map::catalogPublic) {
- result += resultCharset.execToDesc("<CATALOG PUBLIC=\"");
- result += maps[i].publicId;
- result += resultCharset.execToDesc("\">");
- }
- }
- for (i = 0; i < len; i++) {
- const StorageObjectSpec &sos = (*this)[i];
- result += resultCharset.execToDesc('<');
- result += resultCharset.execToDesc(sos.storageManager->type());
- if (sos.notrack)
- result += resultCharset.execToDesc(" NOTRACK");
- if (!sos.search)
- result += resultCharset.execToDesc(" NOSEARCH");
- if (!sos.storageManager->requiresCr()
- && sos.records != (isNdata ? StorageObjectSpec::asis : StorageObjectSpec::find)) {
- result += resultCharset.execToDesc(' ');
- result += resultCharset.execToDesc(FSIParser::recordsName(sos.records));
- }
- if (sos.codingSystemName && sos.codingSystemType != StorageObjectSpec::special) {
- if (!sos.zapEof)
- result += resultCharset.execToDesc(" NOZAPEOF");
- result += resultCharset.execToDesc(sos.codingSystemType == StorageObjectSpec::bctf
- ? " BCTF="
- : " ENCODING=");
- result += resultCharset.execToDesc(sos.codingSystemName);
- }
- Boolean needSmcrd = 0;
- if (sos.baseId.size() != 0) {
- result += resultCharset.execToDesc(" SOIBASE='");
- unparseSoi(sos.baseId,
- sos.storageManager->idCharset(),
- resultCharset,
- result,
- needSmcrd);
- result += resultCharset.execToDesc('\'');
- }
- StringC tem;
- unparseSoi(sos.specId,
- sos.storageManager->idCharset(),
- resultCharset,
- tem,
- needSmcrd);
- if (needSmcrd)
- result += resultCharset.execToDesc(" SMCRD='^'");
- result += resultCharset.execToDesc('>');
- result += tem;
- }
-}
-
-void unparseSoi(const StringC &soi,
- const CharsetInfo *idCharset,
- const CharsetInfo &resultCharset,
- StringC &result,
- Boolean &needSmcrd)
-{
- if (!idCharset) {
- for (size_t i = 0; i < soi.size(); i++) {
- char buf[32];
- sprintf(buf, "&#%lu;", (unsigned long)soi[i]);
- result += resultCharset.execToDesc(buf);
- }
- return;
- }
- for (size_t i = 0; i < soi.size(); i++) {
- UnivChar univ;
- WideChar to;
- ISet<WideChar> toSet;
- if (!idCharset->descToUniv(soi[i], univ)
- || univ >= 127
- || univ < 32
- || univ == 36 // $
- || univ == 96 // `
-#ifndef MSDOS_FILENAMES
- || univ == 92 // backslash
-#endif
- || univ == 94 // ^
- || resultCharset.univToDesc(univ, to, toSet) != 1) {
- needSmcrd = 1;
- char buf[32];
- sprintf(buf, "^%lu;", (unsigned long)soi[i]);
- result += resultCharset.execToDesc(buf);
- }
- else {
- switch (univ) {
- case 34: // double quote
- case 35: // #
- case 39: // apostrophe
- case 60: // <
- {
- char buf[32];
- sprintf(buf, "&#%lu;", (unsigned long)to);
- result += resultCharset.execToDesc(buf);
- }
- break;
- default:
- result += Char(to);
- break;
- }
- }
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ExternalId.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ExternalId.cxx
deleted file mode 100644
index a7bebc1668..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ExternalId.cxx
+++ /dev/null
@@ -1,266 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "ExternalId.h"
-#include "CharsetInfo.h"
-#include "macros.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ExternalId::ExternalId()
-: haveSystem_(0), havePublic_(0)
-{
-}
-
-void ExternalId::setSystem(Text &text)
-{
- text.swap(system_);
- haveSystem_ = 1;
-}
-
-Boolean ExternalId::setPublic(Text &text, const CharsetInfo &charset,
- Char space, const MessageType1 *&error)
-{
- havePublic_ = 1;
- return public_.init(text, charset, space, error);
-}
-
-void ExternalId::setLocation(const Location &loc)
-{
- loc_ = loc;
-}
-
-PublicId::PublicId()
-: formal_(0)
-{
-}
-
-Boolean PublicId::init(Text &text, const CharsetInfo &charset,
- Char space, const MessageType1 *&error)
-{
- text.swap(text_);
- const StringC &str = text_.string();
- formal_ = 0;
- const Char *next = str.data();
- const Char *lim = str.data() + str.size();
- Char solidus = charset.execToDesc('/');
- Char minus = charset.execToDesc('-');
- Char plus = charset.execToDesc('+');
- const Char *fieldStart;
- size_t fieldLength;
- if (!nextField(solidus, next, lim, fieldStart, fieldLength)) {
- error = &ParserMessages::fpiMissingField;
- return 0;
- }
- if (fieldLength == 1 && (*fieldStart == minus || *fieldStart == plus)) {
- ownerType_ = (*fieldStart == plus ? registered : unregistered);
- if (!nextField(solidus, next, lim, fieldStart, fieldLength)) {
- error = &ParserMessages::fpiMissingField;
- return 0;
- }
- }
- else
- ownerType_ = ISO;
- owner_.assign(fieldStart, fieldLength);
- if (!nextField(solidus, next, lim, fieldStart, fieldLength)) {
- error = &ParserMessages::fpiMissingField;
- return 0;
- }
- size_t i;
- for (i = 0; i < fieldLength; i++)
- if (fieldStart[i] == space)
- break;
- if (i >= fieldLength) {
- error = &ParserMessages::fpiMissingTextClassSpace;
- return 0;
- }
- StringC textClassString(fieldStart, i);
- if (!lookupTextClass(textClassString, charset, textClass_)) {
- error = &ParserMessages::fpiInvalidTextClass;
- return 0;
- }
- i++; // skip the space
- fieldStart += i;
- fieldLength -= i;
- if (fieldLength == 1 && *fieldStart == minus) {
- unavailable_ = 1;
- if (!nextField(solidus, next, lim, fieldStart, fieldLength)) {
- error = &ParserMessages::fpiMissingField;
- return 0;
- }
- }
- else
- unavailable_ = 0;
- description_.assign(fieldStart, fieldLength);
- if (!nextField(solidus, next, lim, fieldStart, fieldLength)) {
- error = &ParserMessages::fpiMissingField;
- return 0;
- }
- if (textClass_ != CHARSET) {
- for (i = 0; i < fieldLength; i++) {
- UnivChar c;
- if (!charset.descToUniv(fieldStart[i], c)
- || c < UnivCharsetDesc::A || c >= UnivCharsetDesc::A + 26) {
- error = &ParserMessages::fpiInvalidLanguage;
- return 0;
- }
- }
- // The public text language must be a name.
- // Names cannot be empty.
- if (fieldLength == 0) {
- error = &ParserMessages::fpiInvalidLanguage;
- return 0;
- }
- }
- languageOrDesignatingSequence_.assign(fieldStart, fieldLength);
- if (nextField(solidus, next, lim, fieldStart, fieldLength)) {
- switch (textClass_) {
- case CAPACITY:
- case CHARSET:
- case NOTATION:
- case SYNTAX:
- error = &ParserMessages::fpiIllegalDisplayVersion;
- return 0;
- default:
- break;
- }
- haveDisplayVersion_ = 1;
- displayVersion_.assign(fieldStart, fieldLength);
- }
- else
- haveDisplayVersion_ = 0;
- if (next != 0) {
- error = &ParserMessages::fpiExtraField;
- return 0;
- }
- formal_ = 1;
- return 1;
-}
-
-Boolean PublicId::nextField(Char solidus,
- const Char *&next,
- const Char *lim,
- const Char *&fieldStart,
- size_t &fieldLength)
-
-{
- if (next == 0)
- return 0;
- fieldStart = next;
- for (; next < lim; next++) {
- if (next[0] == solidus && next + 1 < lim && next[1] == solidus) {
- fieldLength = next - fieldStart;
- next += 2;
- return 1;
- }
- }
- fieldLength = lim - fieldStart;
- next = 0;
- return 1;
-}
-
-const char *const PublicId::textClasses[] = {
- "CAPACITY",
- "CHARSET",
- "DOCUMENT",
- "DTD",
- "ELEMENTS",
- "ENTITIES",
- "LPD",
- "NONSGML",
- "NOTATION",
- "SD",
- "SHORTREF",
- "SUBDOC",
- "SYNTAX",
- "TEXT",
-};
-
-Boolean PublicId::lookupTextClass(const StringC &str,
- const CharsetInfo &charset,
- TextClass &textClass)
-{
- for (size_t i = 0; i < SIZEOF(textClasses); i++)
- if (str == charset.execToDesc(textClasses[i])) {
- textClass = TextClass(i);
- return 1;
- }
- return 0;
-}
-
-Boolean PublicId::getOwnerType(OwnerType &result) const
-{
- if (!formal_)
- return 0;
- result = ownerType_;
- return 1;
-}
-
-Boolean PublicId::getOwner(StringC &result) const
-{
- if (!formal_)
- return 0;
- result = owner_;
- return 1;
-}
-
-Boolean PublicId::getTextClass(TextClass &result) const
-{
- if (!formal_)
- return 0;
- result = textClass_;
- return 1;
-}
-
-Boolean PublicId::getUnavailable(Boolean &result) const
-{
- if (!formal_)
- return 0;
- result = unavailable_;
- return 1;
-}
-
-Boolean PublicId::getDescription(StringC &result) const
-{
- if (!formal_)
- return 0;
- result = description_;
- return 1;
-}
-
-Boolean PublicId::getLanguage(StringC &result) const
-{
- if (!formal_ || textClass_ == CHARSET)
- return 0;
- result = languageOrDesignatingSequence_;
- return 1;
-}
-
-Boolean PublicId::getDesignatingSequence(StringC &result) const
-{
- if (!formal_ || textClass_ != CHARSET)
- return 0;
- result = languageOrDesignatingSequence_;
- return 1;
-}
-
-Boolean PublicId::getDisplayVersion(StringC &result) const
-{
- if (!formal_)
- return 0;
- if (haveDisplayVersion_)
- result = displayVersion_;
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Fixed2CodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Fixed2CodingSystem.cxx
deleted file mode 100644
index a349760492..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Fixed2CodingSystem.cxx
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-// This uses a big endian byte order irrespective of host byte order.
-// Nothing special is done with FEFF/FFFE.
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "Fixed2CodingSystem.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Fixed2Decoder : public Decoder {
-public:
- Fixed2Decoder();
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
- Boolean convertOffset(unsigned long &offset) const;
-};
-
-class Fixed2Encoder : public Encoder {
-public:
- Fixed2Encoder();
- ~Fixed2Encoder();
- void output(Char *, size_t, OutputByteStream *);
- void output(const Char *, size_t, OutputByteStream *);
-private:
- void allocBuf(size_t);
- char *buf_;
- size_t bufSize_;
-};
-
-Decoder *Fixed2CodingSystem::makeDecoder() const
-{
- return new Fixed2Decoder;
-}
-
-Encoder *Fixed2CodingSystem::makeEncoder() const
-{
- return new Fixed2Encoder;
-}
-
-unsigned Fixed2CodingSystem::fixedBytesPerChar() const
-{
- return 2;
-}
-
-Fixed2Decoder::Fixed2Decoder()
-: Decoder(2)
-{
-}
-
-size_t Fixed2Decoder::decode(Char *to, const char *from, size_t fromLen,
- const char **rest)
-{
-#ifdef SP_BIG_ENDIAN
- if (sizeof(Char) == 2 && from == (char *)to) {
- *rest = from + (fromLen & ~1);
- return fromLen/2;
- }
-#endif
- fromLen &= ~1;
- *rest = from + fromLen;
- for (size_t n = fromLen; n > 0; n -= 2) {
- *to++ = ((unsigned char)from[0] << 8) + (unsigned char)from[1];
- from += 2;
- }
- return fromLen/2;
-}
-
-Boolean Fixed2Decoder::convertOffset(unsigned long &n) const
-{
- n *= 2;
- return true;
-}
-
-Fixed2Encoder::Fixed2Encoder()
-: buf_(0), bufSize_(0)
-{
-}
-
-Fixed2Encoder::~Fixed2Encoder()
-{
- delete [] buf_;
-}
-
-void Fixed2Encoder::allocBuf(size_t n)
-{
- if (bufSize_ < n) {
- delete [] buf_;
- buf_ = new char[bufSize_ = n];
- }
-}
-
-void Fixed2Encoder::output(Char *s, size_t n, OutputByteStream *sb)
-{
-#ifdef SP_BIG_ENDIAN
- if (sizeof(Char) == 2) {
- sb->sputn((char *)s, n*2);
- return;
- }
-#endif
- ASSERT(sizeof(Char) >= 2);
- char *p = (char *)s;
- for (size_t i = 0; i < n; i++) {
- Char c = s[i];
- *p++ = (c >> 8) & 0xff;
- *p++ = c & 0xff;
- }
- sb->sputn((char *)s, n*2);
-}
-
-void Fixed2Encoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
-#ifdef SP_BIG_ENDIAN
- if (sizeof(Char) == 2) {
- sb->sputn((char *)s, n*2);
- return;
- }
-#endif
- allocBuf(n*2);
- for (size_t i = 0; i < n; i++) {
- buf_[i*2] = (s[i] >> 8) & 0xff;
- buf_[i*2 + 1] = s[i] & 0xff;
- }
- sb->sputn(buf_, n*2);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/GenericEventHandler.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/GenericEventHandler.cxx
deleted file mode 100644
index 832cb98d11..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/GenericEventHandler.cxx
+++ /dev/null
@@ -1,807 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "GenericEventHandler.h"
-#include "macros.h"
-#include "ExtendEntityManager.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SpOpenEntity : public SGMLApplication::OpenEntity {
-public:
- SpOpenEntity(const ConstPtr<Origin> &origin);
- SGMLApplication::Location location(SGMLApplication::Position) const;
-private:
- ConstPtr<Origin> origin_;
- StorageObjectLocation soLoc_;
-};
-
-inline
-void GenericEventHandler::freeAll()
-{
- if (allocBlocks_)
- freeAll1();
-}
-
-inline
-void GenericEventHandler::clearNotation(SGMLApplication::Notation &to)
-{
- clearString(to.name);
-}
-
-inline
-void GenericEventHandler::setLocation(SGMLApplication::Position &pos,
- const Location &loc)
-{
- if (lastOrigin_ != loc.origin())
- setLocation1(pos, loc);
- else
- pos = loc.index();
-}
-
-GenericEventHandler::GenericEventHandler(SGMLApplication &app,
- bool generalEntities)
-: app_(&app), generalEntities_(generalEntities),
- freeBlocks_(0), allocBlocks_(0), firstBlockSpare_(0), firstBlockUsed_(0)
-{
-}
-
-GenericEventHandler::~GenericEventHandler()
-{
- freeAll();
- while (freeBlocks_) {
- Block *tem = freeBlocks_;
- freeBlocks_ = freeBlocks_->next;
- delete [] tem->mem;
- delete tem;
- }
-}
-
-void GenericEventHandler::freeAll1()
-{
- Block **p;
- for (p = &allocBlocks_; *p; p = &(*p)->next)
- ;
- *p = freeBlocks_;
- freeBlocks_ = allocBlocks_;
- allocBlocks_ = 0;
- if (freeBlocks_)
- firstBlockSpare_ = freeBlocks_->size;
- else
- firstBlockSpare_ = 0;
- firstBlockUsed_ = 0;
-}
-
-void *GenericEventHandler::allocate(size_t n)
-{
- if (n == 0)
- return 0;
- // round up to avoid alignment problems
- n = (n + sizeof(char *) - 1) & ~(sizeof(char *) - 1);
- enum { BIG = 1024 };
- if (n > firstBlockSpare_) {
- if (freeBlocks_ && firstBlockUsed_) {
- Block *tem = freeBlocks_;
- freeBlocks_ = freeBlocks_->next;
- tem->next = allocBlocks_;
- allocBlocks_ = tem;
- }
- if (!freeBlocks_ || freeBlocks_->size < n) {
- Block *tem = new Block;
- tem->size = n < BIG ? int(BIG) : n;
- tem->mem = new char[tem->size];
- tem->next = freeBlocks_;
- freeBlocks_ = tem;
- }
- firstBlockUsed_ = 0;
- firstBlockSpare_ = freeBlocks_->size;
- }
- char *tem = freeBlocks_->mem + firstBlockUsed_;
- firstBlockUsed_ += n;
- firstBlockSpare_ -= n;
- return tem;
-}
-
-void GenericEventHandler::startElement(StartElementEvent *event)
-{
- SGMLApplication::StartElementEvent appEvent;
- setString(appEvent.gi, event->name());
- const ElementDefinition *def = event->elementType()->definition();
- switch (def->declaredContent()) {
- case ElementDefinition::modelGroup:
- appEvent.contentType
- = (def->compiledModelGroup()->containsPcdata()
- ? SGMLApplication::StartElementEvent::mixed
- : SGMLApplication::StartElementEvent::element);
- break;
- case ElementDefinition::any:
- appEvent.contentType = SGMLApplication::StartElementEvent::mixed;
- break;
- case ElementDefinition::cdata:
- appEvent.contentType = SGMLApplication::StartElementEvent::cdata;
- break;
- case ElementDefinition::rcdata:
- appEvent.contentType = SGMLApplication::StartElementEvent::rcdata;
- break;
- case ElementDefinition::empty:
- appEvent.contentType = SGMLApplication::StartElementEvent::empty;
- break;
- }
- appEvent.included = event->included();
- appEvent.nAttributes = event->attributes().size();
- if (appEvent.nAttributes != 0) {
- if (event->attributes().conref())
- appEvent.contentType = SGMLApplication::StartElementEvent::empty;
- setAttributes(appEvent.attributes, event->attributes());
- }
- setLocation(appEvent.pos, event->location());
- app_->startElement(appEvent);
- freeAll();
- delete event;
-}
-
-void GenericEventHandler::endElement(EndElementEvent *event)
-{
- SGMLApplication::EndElementEvent appEvent;
- setString(appEvent.gi, event->name());
- setLocation(appEvent.pos, event->location());
- app_->endElement(appEvent);
- delete event;
-}
-
-void GenericEventHandler::data(DataEvent *event)
-{
- SGMLApplication::DataEvent appEvent;
- appEvent.data.ptr = event->data();
- appEvent.data.len = event->dataLength();
- setLocation(appEvent.pos, event->location());
- app_->data(appEvent);
- delete event;
-}
-
-void GenericEventHandler::pi(PiEvent *event)
-{
- SGMLApplication::PiEvent appEvent;
- appEvent.data.ptr = event->data();
- appEvent.data.len = event->dataLength();
- const Entity *entity = event->entity();
- if (entity)
- setString(appEvent.entityName, entity->name());
- else
- appEvent.entityName.len = 0;
- setLocation(appEvent.pos, event->location());
- app_->pi(appEvent);
- delete event;
-}
-
-void GenericEventHandler::sdataEntity(SdataEntityEvent *event)
-{
- SGMLApplication::SdataEvent appEvent;
- appEvent.text.ptr = event->data();
- appEvent.text.len = event->dataLength();
- setString(appEvent.entityName, event->entity()->name());
- // Don't want location of chars in entity.
- setLocation(appEvent.pos, event->location().origin()->parent());
- app_->sdata(appEvent);
- delete event;
-}
-
-void GenericEventHandler::externalDataEntity(ExternalDataEntityEvent *event)
-{
- SGMLApplication::ExternalDataEntityRefEvent appEvent;
- setEntity(appEvent.entity, *event->entity());
- setLocation(appEvent.pos, event->location());
- app_->externalDataEntityRef(appEvent);
- freeAll();
- delete event;
-}
-
-void GenericEventHandler::subdocEntity(SubdocEntityEvent *event)
-{
- SGMLApplication::SubdocEntityRefEvent appEvent;
- setEntity(appEvent.entity, *event->entity());
- setLocation(appEvent.pos, event->location());
- app_->subdocEntityRef(appEvent);
- freeAll();
- delete event;
-}
-
-void GenericEventHandler::nonSgmlChar(NonSgmlCharEvent *event)
-{
- SGMLApplication::NonSgmlCharEvent appEvent;
- appEvent.c = event->character();
- setLocation(appEvent.pos, event->location());
- app_->nonSgmlChar(appEvent);
- delete event;
-}
-
-void GenericEventHandler::startDtd(StartDtdEvent *event)
-{
- SGMLApplication::StartDtdEvent appEvent;
- setString(appEvent.name, event->name());
- const Entity *entity = event->entity().pointer();
- if (entity) {
- appEvent.haveExternalId = 1;
- setExternalId(appEvent.externalId,
- entity->asExternalEntity()->externalId());
- }
- else
- appEvent.haveExternalId = 0;
- setLocation(appEvent.pos, event->location());
- app_->startDtd(appEvent);
- freeAll();
- delete event;
-}
-
-void GenericEventHandler::endDtd(EndDtdEvent *event)
-{
- SGMLApplication::EndDtdEvent appEvent;
- setString(appEvent.name, event->dtd().name());
- setLocation(appEvent.pos, event->location());
- app_->endDtd(appEvent);
- delete event;
-}
-
-void GenericEventHandler::endProlog(EndPrologEvent *event)
-{
- if (generalEntities_) {
- SGMLApplication::GeneralEntityEvent entityEvent;
- const Dtd &dtd = event->dtd();
- Dtd::ConstEntityIter iter(dtd.generalEntityIter());
- for (;;) {
- const Entity *entity = iter.nextTemp();
- if (!entity)
- break;
- setEntity(entityEvent.entity, *entity);
- app_->generalEntity(entityEvent);
- }
- freeAll();
- }
- SGMLApplication::EndPrologEvent appEvent;
- setLocation(appEvent.pos, event->location());
- app_->endProlog(appEvent);
- delete event;
-}
-
-void GenericEventHandler::entityDefaulted(EntityDefaultedEvent *event)
-{
- if (generalEntities_) {
- SGMLApplication::GeneralEntityEvent appEvent;
- setEntity(appEvent.entity, event->entity());
- app_->generalEntity(appEvent);
- }
- delete event;
-}
-
-void GenericEventHandler::appinfo(AppinfoEvent *event)
-{
- SGMLApplication::AppinfoEvent appEvent;
- const StringC *str;
- if (event->literal(str)) {
- setString(appEvent.string, *str);
- appEvent.none = 0;
- }
- else
- appEvent.none = 1;
- setLocation(appEvent.pos, event->location());
- app_->appinfo(appEvent);
- delete event;
-}
-
-void GenericEventHandler::commentDecl(CommentDeclEvent *event)
-{
- SGMLApplication::CommentDeclEvent appEvent;
- appEvent.nComments = 0;
- {
- for (MarkupIter iter(event->markup()); iter.valid(); iter.advance())
- if (iter.type() == Markup::comment)
- appEvent.nComments++;
- }
- SGMLApplication::CharString *comments
- = (SGMLApplication::CharString *)allocate(appEvent.nComments * 2
- * sizeof(SGMLApplication::CharString));
- appEvent.comments = comments;
- appEvent.seps = appEvent.comments + appEvent.nComments;
- size_t i = 0;
- for (MarkupIter iter(event->markup()); iter.valid(); iter.advance())
- switch (iter.type()) {
- case Markup::comment:
- comments[i].ptr = iter.charsPointer();
- comments[i].len = iter.charsLength();
- clearString(comments[appEvent.nComments + i]);
- i++;
- break;
- case Markup::s:
- comments[appEvent.nComments + i - 1].ptr = iter.charsPointer();
- comments[appEvent.nComments + i - 1].len = iter.charsLength();
- break;
- default:
- break;
- }
- setLocation(appEvent.pos, event->location());
- app_->commentDecl(appEvent);
- freeAll();
- delete event;
-}
-
-void GenericEventHandler::markedSectionStart(MarkedSectionStartEvent *event)
-{
- SGMLApplication::MarkedSectionStartEvent appEvent;
- unsigned depth = 0;
- appEvent.nParams = 0;
- {
- for (MarkupIter iter(event->markup()); iter.valid(); iter.advance())
- switch (iter.type()) {
- case Markup::reservedName:
- if (!depth)
- appEvent.nParams++;
- break;
- case Markup::entityStart:
- if (!depth)
- appEvent.nParams++;
- depth++;
- break;
- case Markup::entityEnd:
- depth--;
- break;
- default:
- break;
- }
- }
- SGMLApplication::MarkedSectionStartEvent::Param *params
- = (SGMLApplication::MarkedSectionStartEvent::Param *)
- allocate(appEvent.nParams * sizeof(appEvent.params[0]));
- appEvent.params = params;
- size_t i = 0;
- for (MarkupIter iter(event->markup()); iter.valid(); iter.advance())
- switch (iter.type()) {
- case Markup::reservedName:
- if (!depth) {
- switch (iter.reservedName()) {
- case Syntax::rTEMP:
- params[i].type
- = SGMLApplication::MarkedSectionStartEvent::Param::temp;
- break;
- case Syntax::rINCLUDE:
- params[i].type
- = SGMLApplication::MarkedSectionStartEvent::Param::include;
- break;
- case Syntax::rRCDATA:
- params[i].type
- = SGMLApplication::MarkedSectionStartEvent::Param::rcdata;
- break;
- case Syntax::rCDATA:
- params[i].type
- = SGMLApplication::MarkedSectionStartEvent::Param::cdata;
- break;
- case Syntax::rIGNORE:
- params[i].type
- = SGMLApplication::MarkedSectionStartEvent::Param::ignore;
- break;
- default:
- CANNOT_HAPPEN();
- }
- clearString(params[i].entityName);
- i++;
- }
- break;
- case Markup::entityStart:
- if (!depth) {
- params[i].type
- = SGMLApplication::MarkedSectionStartEvent::Param::entityRef;
- setString(params[i].entityName,
- iter.entityOrigin()->entity()->name());
- i++;
- }
- depth++;
- break;
- case Markup::entityEnd:
- depth--;
- break;
- default:
- break;
- }
- switch (event->status()) {
- case MarkedSectionEvent::include:
- appEvent.status = SGMLApplication::MarkedSectionStartEvent::include;
- break;
- case MarkedSectionEvent::rcdata:
- appEvent.status = SGMLApplication::MarkedSectionStartEvent::rcdata;
- break;
- case MarkedSectionEvent::cdata:
- appEvent.status = SGMLApplication::MarkedSectionStartEvent::cdata;
- break;
- case MarkedSectionEvent::ignore:
- appEvent.status = SGMLApplication::MarkedSectionStartEvent::ignore;
- break;
- }
- setLocation(appEvent.pos, event->location());
- app_->markedSectionStart(appEvent);
- freeAll();
- delete event;
-}
-
-void GenericEventHandler::ignoredChars(IgnoredCharsEvent *event)
-{
- SGMLApplication::IgnoredCharsEvent appEvent;
- appEvent.data.ptr = event->data();
- appEvent.data.len = event->dataLength();
- setLocation(appEvent.pos, event->location());
- app_->ignoredChars(appEvent);
- delete event;
-}
-
-void GenericEventHandler::markedSectionEnd(MarkedSectionEndEvent *event)
-{
- SGMLApplication::MarkedSectionEndEvent appEvent;
- switch (event->status()) {
- case MarkedSectionEvent::include:
- appEvent.status = SGMLApplication::MarkedSectionEndEvent::include;
- break;
- case MarkedSectionEvent::rcdata:
- appEvent.status = SGMLApplication::MarkedSectionEndEvent::rcdata;
- break;
- case MarkedSectionEvent::cdata:
- appEvent.status = SGMLApplication::MarkedSectionEndEvent::cdata;
- break;
- case MarkedSectionEvent::ignore:
- appEvent.status = SGMLApplication::MarkedSectionEndEvent::ignore;
- break;
- }
- setLocation(appEvent.pos, event->location());
- app_->markedSectionEnd(appEvent);
- delete event;
-}
-
-void GenericEventHandler::message(MessageEvent *event)
-{
- SGMLApplication::ErrorEvent appEvent;
- switch (event->message().type->severity()) {
- case MessageType::quantityError:
- appEvent.type = SGMLApplication::ErrorEvent::quantity;
- break;
- case MessageType::idrefError:
- appEvent.type = SGMLApplication::ErrorEvent::idref;
- break;
- case MessageType::error:
- appEvent.type = SGMLApplication::ErrorEvent::otherError;
- break;
- case MessageType::info:
- appEvent.type = SGMLApplication::ErrorEvent::info;
- break;
- case MessageType::warning:
- appEvent.type = SGMLApplication::ErrorEvent::warning;
- break;
- }
- setLocation(appEvent.pos, event->message().loc);
- StringC str;
- reportMessage(event->message(), str);
- setString(appEvent.message, str);
- app_->error(appEvent);
- ErrorCountEventHandler::message(event);
-}
-
-void GenericEventHandler::setLocation1(SGMLApplication::Position &pos,
- const Location &loc)
-{
- const Location *locp = &loc;
- for (;;) {
- if (locp->origin().isNull()) {
- lastOrigin_.clear();
- openEntityPtr_ = (SpOpenEntity *)0;
- return;
- }
- const InputSourceOrigin *origin = locp->origin()->asInputSourceOrigin();
- if (origin && origin->externalInfo())
- break;
- locp = &locp->origin()->parent();
- }
- lastOrigin_ = locp->origin();
- pos = locp->index();
- openEntityPtr_ = new SpOpenEntity(locp->origin());
- app_->openEntityChange(openEntityPtr_);
-}
-
-void
-GenericEventHandler::setAttributes(const SGMLApplication::Attribute *&attributes,
- const AttributeList &attributeList)
-{
- size_t nAttributes = attributeList.size();
- SGMLApplication::Attribute *to
- = (SGMLApplication::Attribute *)allocate(nAttributes * sizeof(*to));
- attributes = to;
- for (size_t i = 0; i < nAttributes; i++) {
- SGMLApplication::Attribute *p = to + i;
- setString(p->name, attributeList.name(i));
- const AttributeValue *value = attributeList.value(i);
- if (!value)
- p->type = SGMLApplication::Attribute::invalid;
- else {
- const Text *text;
- const StringC *string;
- switch (value->info(text, string)) {
- case AttributeValue::implied:
- p->type = SGMLApplication::Attribute::implied;
- break;
- case AttributeValue::tokenized:
- {
- if (attributeList.specified(i))
- p->defaulted = SGMLApplication::Attribute::specified;
- else if (attributeList.current(i))
- p->defaulted = SGMLApplication::Attribute::current;
- else
- p->defaulted = SGMLApplication::Attribute::definition;
- p->type = SGMLApplication::Attribute::tokenized;
- p->nEntities = 0;
- p->notation.name.len = 0;
- p->isId = attributeList.id(i);
- p->isGroup = (attributeList.getAllowedTokens(i) != 0);
- setString(p->tokens, *string);
- const AttributeSemantics *semantics = attributeList.semantics(i);
- if (semantics) {
- ConstPtr<Notation> notation = semantics->notation();
- if (!notation.isNull())
- setNotation(p->notation, *notation);
- else {
- size_t nEntities = semantics->nEntities();
- if (nEntities) {
- SGMLApplication::Entity *v
- = (SGMLApplication::Entity *)allocate(nEntities * sizeof(*v));
- p->entities = v;
- p->nEntities = nEntities;
- for (size_t i = 0; i < nEntities; i++)
- setEntity(v[i], *semantics->entity(i));
- }
- }
- }
- }
- break;
- case AttributeValue::cdata:
- {
- p->type = SGMLApplication::Attribute::cdata;
- if (attributeList.specified(i))
- p->defaulted = SGMLApplication::Attribute::specified;
- else if (attributeList.current(i))
- p->defaulted = SGMLApplication::Attribute::current;
- else
- p->defaulted = SGMLApplication::Attribute::definition;
- TextItem::Type type;
- const Char *s;
- size_t length;
- const Location *loc;
- size_t nChunks = 0;
- {
- TextIter iter(*text);
- while (iter.next(type, s, length, loc))
- switch (type) {
- case TextItem::data:
- case TextItem::sdata:
- case TextItem::cdata:
- case TextItem::nonSgml:
- nChunks++;
- break;
- default:
- break;
- }
- }
- p->cdataChunks
- = (SGMLApplication::Attribute::CdataChunk *)allocate(nChunks * sizeof(SGMLApplication::Attribute::CdataChunk));
- p->nCdataChunks = nChunks;
-
- {
- size_t i = 0;
- for (TextIter iter(*text); iter.next(type, s, length, loc);) {
- switch (type) {
- case TextItem::data:
- case TextItem::sdata:
- case TextItem::cdata:
- {
- SGMLApplication::Attribute::CdataChunk *chunk
- = (SGMLApplication::Attribute::CdataChunk *)(p->cdataChunks + i++);
- if (type != TextItem::sdata) {
- chunk->isSdata = 0;
- chunk->isNonSgml = 0;
- }
- else {
- chunk->isSdata = 1;
- setString(chunk->entityName,
- *loc->origin()->asInputSourceOrigin()->entityName());
- }
- chunk->data.ptr = s;
- chunk->data.len = length;
- }
- break;
- case TextItem::nonSgml:
- {
- SGMLApplication::Attribute::CdataChunk *chunk
- = (SGMLApplication::Attribute::CdataChunk *)(p->cdataChunks + i++);
- chunk->isSdata = 0;
- chunk->isNonSgml = 1;
- chunk->nonSgmlChar = *s;
- chunk->data.len = 0;
- chunk->data.ptr = 0;
- }
- break;
- default:
- break;
- }
- }
- }
- }
- break;
- }
- }
- }
-}
-
-
-void GenericEventHandler::setEntity(SGMLApplication::Entity &to,
- const Entity &from)
-{
- setString(to.name, from.name());
- switch (from.declType()) {
- case Entity::generalEntity:
- to.declType = SGMLApplication::Entity::general;
- break;
- case Entity::parameterEntity:
- to.declType = SGMLApplication::Entity::parameter;
- break;
- case Entity::doctype:
- to.declType = SGMLApplication::Entity::doctype;
- break;
- case Entity::linktype:
- to.declType = SGMLApplication::Entity::linktype;
- break;
- default:
- CANNOT_HAPPEN();
- }
- switch (from.dataType()) {
- case Entity::sgmlText:
- to.dataType = SGMLApplication::Entity::sgml;
- break;
- case Entity::cdata:
- to.dataType = SGMLApplication::Entity::cdata;
- break;
- case Entity::sdata:
- to.dataType = SGMLApplication::Entity::sdata;
- break;
- case Entity::ndata:
- to.dataType = SGMLApplication::Entity::ndata;
- break;
- case Entity::subdoc:
- to.dataType = SGMLApplication::Entity::subdoc;
- break;
- case Entity::pi:
- to.dataType = SGMLApplication::Entity::pi;
- break;
- }
- const InternalEntity *internal = from.asInternalEntity();
- if (internal) {
- to.isInternal = 1;
- setString(to.text, internal->string());
- }
- else {
- const ExternalEntity *external = from.asExternalEntity();
- to.isInternal = 0;
- setExternalId(to.externalId, external->externalId());
- const ExternalDataEntity *externalData = from.asExternalDataEntity();
- if (externalData) {
- setNotation(to.notation, *externalData->notation());
- to.nAttributes = externalData->attributes().size();
- if (to.nAttributes)
- setAttributes(to.attributes, externalData->attributes());
- }
- else {
- to.notation.name.len = 0;
- to.nAttributes = 0;
- }
- }
-}
-
-
-void GenericEventHandler::setNotation(SGMLApplication::Notation &to,
- const Notation &from)
-{
- setString(to.name, from.name());
- setExternalId(to.externalId, from.externalId());
-}
-
-void GenericEventHandler::setExternalId(SGMLApplication::ExternalId &to,
- const ExternalId &from)
-{
- const StringC *str;
- str = from.systemIdString();
- if (str) {
- to.haveSystemId = 1;
- setString(to.systemId, *str);
- }
- else
- to.haveSystemId = 0;
- str = from.publicIdString();
- if (str) {
- to.havePublicId = 1;
- setString(to.publicId, *str);
- }
- else
- to.havePublicId = 0;
- str = &from.effectiveSystemId();
- if (str->size()) {
- to.haveGeneratedSystemId = 1;
- setString(to.generatedSystemId, *str);
- }
- else
- to.haveGeneratedSystemId = 0;
-}
-
-MsgGenericEventHandler::MsgGenericEventHandler(SGMLApplication &app,
- bool generalEntities,
- MessageReporter &reporter,
- const bool *messagesInhibitedPtr)
-: GenericEventHandler(app, generalEntities),
- reporter_(&reporter),
- messagesInhibitedPtr_(messagesInhibitedPtr)
-{
-}
-
-void MsgGenericEventHandler::reportMessage(const Message &msg, StringC &str)
-{
- WrapReporter wrap(reporter_);
- reporter_->dispatchMessage(msg);
- wrap.strStream.extractString(str);
- if (!*messagesInhibitedPtr_)
- *wrap.origStream << str;
-}
-
-SpOpenEntity::SpOpenEntity(const ConstPtr<Origin> &origin)
-: origin_(origin)
-{
-}
-
-SGMLApplication::Location
-SpOpenEntity::location(SGMLApplication::Position pos) const
-{
- SGMLApplication::Location loc;
- const Origin *origin = origin_.pointer();
- const InputSourceOrigin *inputSourceOrigin;
- const ExternalInfo *externalInfo;
- Index index = Index(pos);
- for (;;) {
- if (!origin)
- return loc;
- inputSourceOrigin = origin->asInputSourceOrigin();
- if (inputSourceOrigin) {
- externalInfo = inputSourceOrigin->externalInfo();
- if (externalInfo)
- break;
- }
- // Qualifier is for CodeWarrior
- const ::SP_NAMESPACE_SCOPE Location &loc = origin->parent();
- index = loc.index();
- origin = loc.origin().pointer();
- }
- const StringC *entityName = inputSourceOrigin->entityName();
- if (entityName)
- GenericEventHandler::setString(loc.entityName, *entityName);
- Offset off = inputSourceOrigin->startOffset(index);
- loc.entityOffset = off;
- if (!ExtendEntityManager::externalize(externalInfo, off, ((SpOpenEntity *)this)->soLoc_))
- return loc;
- loc.lineNumber = soLoc_.lineNumber;
- GenericEventHandler::setString(loc.filename, soLoc_.actualStorageId);
- loc.columnNumber = soLoc_.columnNumber;
- loc.byteOffset = soLoc_.byteIndex;
- loc.other = soLoc_.storageObjectSpec;
- return loc;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Group.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Group.cxx
deleted file mode 100644
index 0dda606f8c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Group.cxx
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Group.h"
-#include "MessageBuilder.h"
-#include "ParserMessages.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-AllowedGroupTokens::AllowedGroupTokens(GroupToken::Type t1, GroupToken::Type t2,
- GroupToken::Type t3, GroupToken::Type t4)
-: flags_(0)
-{
- allow(t1);
- allow(t2);
- allow(t3);
- allow(t4);
-}
-
-AllowedGroupConnectors::AllowedGroupConnectors(GroupConnector::Type c1)
-: flags_(0)
-{
- allow(c1);
-}
-
-AllowedGroupConnectors::AllowedGroupConnectors(GroupConnector::Type c1,
- GroupConnector::Type c2)
-: flags_(0)
-{
- allow(c1);
- allow(c2);
-}
-
-AllowedGroupConnectors::AllowedGroupConnectors(GroupConnector::Type c1,
- GroupConnector::Type c2,
- GroupConnector::Type c3)
-: flags_(0)
-{
- allow(c1);
- allow(c2);
- allow(c3);
-}
-
-AllowedGroupConnectors::AllowedGroupConnectors(GroupConnector::Type c1,
- GroupConnector::Type c2,
- GroupConnector::Type c3,
- GroupConnector::Type c4)
-: flags_(0)
-{
- allow(c1);
- allow(c2);
- allow(c3);
- allow(c4);
-}
-
-
-AllowedGroupConnectorsMessageArg::AllowedGroupConnectorsMessageArg(
- const AllowedGroupConnectors &allow,
- const ConstPtr<Syntax> &syntax)
-: allow_(allow),
- syntax_(syntax)
-{
-}
-
-MessageArg *AllowedGroupConnectorsMessageArg::copy() const
-{
- return new AllowedGroupConnectorsMessageArg(*this);
-}
-
-void AllowedGroupConnectorsMessageArg::append(MessageBuilder &builder) const
-{
- static GroupConnector::Type types[] = {
- GroupConnector::andGC, GroupConnector::orGC, GroupConnector::seqGC,
- GroupConnector::grpcGC, GroupConnector::dtgcGC
- };
- static Syntax::DelimGeneral delims[] = {
- Syntax::dAND, Syntax::dOR, Syntax::dSEQ,
- Syntax::dGRPC, Syntax::dDTGC
- };
- Boolean first = 1;
- for (size_t i = 0; i < SIZEOF(types); i++)
- if (allow_.groupConnector(types[i])) {
- if (!first)
- builder.appendFragment(ParserMessages::listSep);
- else
- first = 0;
- const StringC &delim = syntax_->delimGeneral(delims[i]);
- builder.appendFragment(ParserMessages::delimStart);
- builder.appendChars(delim.data(), delim.size());
- builder.appendFragment(ParserMessages::delimEnd);
- }
-}
-
-AllowedGroupTokensMessageArg::AllowedGroupTokensMessageArg(
- const AllowedGroupTokens &allow,
- const ConstPtr<Syntax> &syntax)
-: allow_(allow),
- syntax_(syntax)
-{
-}
-
-MessageArg *AllowedGroupTokensMessageArg::copy() const
-{
- return new AllowedGroupTokensMessageArg(*this);
-}
-
-void AllowedGroupTokensMessageArg::append(MessageBuilder &builder) const
-{
- const MessageFragment *fragment[4];
- int nFragments = 0;
- if (allow_.groupToken(GroupToken::dataTagLiteral))
- fragment[nFragments++] = &ParserMessages::parameterLiteral;
- if (allow_.groupToken(GroupToken::dataTagGroup))
- fragment[nFragments++] = &ParserMessages::dataTagGroup;
- switch (allow_.group()) {
- case GroupToken::modelGroup:
- fragment[nFragments++] = &ParserMessages::modelGroup;
- break;
- case GroupToken::dataTagTemplateGroup:
- fragment[nFragments++] = &ParserMessages::dataTagTemplateGroup;
- break;
- default:
- break;
- }
- switch (allow_.nameStart()) {
- case GroupToken::name:
- fragment[nFragments++] = &ParserMessages::name;
- break;
- case GroupToken::nameToken:
- fragment[nFragments++] = &ParserMessages::nameToken;
- break;
- case GroupToken::elementToken:
- fragment[nFragments++] = &ParserMessages::elementToken;
- break;
- default:
- break;
- }
- Boolean first = 1;
- for (int i = 0; i < nFragments; i++) {
- if (!first)
- builder.appendFragment(ParserMessages::listSep);
- else
- first = 0;
- builder.appendFragment(*fragment[i]);
- }
- if (allow_.groupToken(GroupToken::pcdata)) {
- if (!first)
- builder.appendFragment(ParserMessages::listSep);
- StringC pcdata(syntax_->delimGeneral(Syntax::dRNI));
- pcdata += syntax_->reservedName(Syntax::rPCDATA);
- builder.appendChars(pcdata.data(), pcdata.size());
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Group.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Group.h
deleted file mode 100644
index c81e6b0af5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Group.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Group_INCLUDED
-#define Group_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Boolean.h"
-#include "ContentToken.h"
-#include "StringC.h"
-#include "MessageArg.h"
-#include "Owner.h"
-#include "Syntax.h"
-#include "Text.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class GroupToken {
-public:
- GroupToken() { }
- enum Type {
- invalid,
- nameToken,
- name,
- dataTagLiteral, // data tag (padding) template
- dataTagGroup,
- elementToken,
- modelGroup,
- pcdata,
- dataTagTemplateGroup
- };
- Type type;
- StringC token; // name nameToken; with substitution
- Owner<ModelGroup> model;
- Owner<ContentToken> contentToken; // elementToken pcdata dataTagGroup
- Text text;
- Vector<Text> textVector;
-private:
- GroupToken(const GroupToken &); // undefined
- void operator=(const GroupToken &); // undefined
-};
-
-class AllowedGroupTokens {
-public:
- AllowedGroupTokens(GroupToken::Type,
- GroupToken::Type = GroupToken::invalid,
- GroupToken::Type = GroupToken::invalid,
- GroupToken::Type = GroupToken::invalid);
- Boolean groupToken(GroupToken::Type) const;
- // modelGroup, dataTagTemplateGroup
- GroupToken::Type group() const;
- GroupToken::Type nameStart() const;
-private:
- void allow(GroupToken::Type);
- unsigned flags_;
-};
-
-struct GroupConnector {
- enum Type {
- andGC,
- orGC,
- seqGC,
- grpcGC,
- dtgcGC
- };
- Type type;
-};
-
-class AllowedGroupConnectors {
-public:
- AllowedGroupConnectors(GroupConnector::Type);
- AllowedGroupConnectors(GroupConnector::Type, GroupConnector::Type);
- AllowedGroupConnectors(GroupConnector::Type, GroupConnector::Type,
- GroupConnector::Type);
- AllowedGroupConnectors(GroupConnector::Type, GroupConnector::Type,
- GroupConnector::Type, GroupConnector::Type);
- Boolean groupConnector(GroupConnector::Type) const;
-private:
- void allow(GroupConnector::Type);
- unsigned flags_;
-};
-
-class AllowedGroupTokensMessageArg : public MessageArg {
-public:
- AllowedGroupTokensMessageArg(const AllowedGroupTokens &allow,
- const ConstPtr<Syntax> &syntax);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- AllowedGroupTokens allow_;
- ConstPtr<Syntax> syntax_;
-};
-
-class AllowedGroupConnectorsMessageArg : public MessageArg {
-public:
- AllowedGroupConnectorsMessageArg(const AllowedGroupConnectors &allow,
- const ConstPtr<Syntax> &syntax);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- AllowedGroupConnectors allow_;
- ConstPtr<Syntax> syntax_;
-};
-
-inline
-Boolean AllowedGroupTokens::groupToken(GroupToken::Type i) const
-{
- return ((1 << i) & flags_) != 0;
-}
-
-inline
-GroupToken::Type AllowedGroupTokens::group() const
-{
- if (groupToken(GroupToken::modelGroup))
- return GroupToken::modelGroup;
- else if (groupToken(GroupToken::dataTagTemplateGroup))
- return GroupToken::dataTagTemplateGroup;
- else
- return GroupToken::invalid;
-}
-
-inline
-GroupToken::Type AllowedGroupTokens::nameStart() const
-{
- if (groupToken(GroupToken::elementToken))
- return GroupToken::elementToken;
- else if (groupToken(GroupToken::nameToken))
- return GroupToken::nameToken;
- else if (groupToken(GroupToken::name))
- return GroupToken::name;
- else
- return GroupToken::invalid;
-}
-
-inline
-void AllowedGroupTokens::allow(GroupToken::Type t)
-{
- flags_ |= (1 << t);
-}
-
-
-inline
-Boolean AllowedGroupConnectors::groupConnector(GroupConnector::Type c) const
-{
- return (flags_ & (1 << c)) != 0;
-}
-
-inline
-void AllowedGroupConnectors::allow(GroupConnector::Type c)
-{
- flags_ |= (1 << c);
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Group_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Hash.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Hash.cxx
deleted file mode 100644
index 21b2f4645d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Hash.cxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Hash.h"
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-unsigned long Hash::hash(const StringC &str)
-{
- const Char *p = str.data();
- unsigned long h = 0;
- for (size_t n = str.size(); n > 0; n--)
- h = (h << 5) + h + *p++; // from Chris Torek
- return h;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/IListBase.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/IListBase.cxx
deleted file mode 100644
index 55d7547dba..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/IListBase.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "IListBase.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-void IListBase::append(Link *p)
-{
- Link **pp;
- for (pp = &head_; *pp; pp = &(*pp)->next_)
- ;
- *pp = p;
-}
-
-void IListBase::remove(Link *p)
-{
- for (Link **pp = &head_; *pp; pp = &(*pp)->next_)
- if (*pp == p) {
- *pp = p->next_;
- break;
- }
-}
-
-void IListBase::clear()
-{
- while (!empty())
- delete get();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Id.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Id.cxx
deleted file mode 100644
index 716d2fcaaa..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Id.cxx
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Id.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Id::Id(const StringC &name)
-: Named(name)
-{
-}
-
-void Id::define(const Location &loc)
-{
- defLocation_ = loc;
- // release memory for pendingRefs_
- Vector<Location> tem;
- pendingRefs_.swap(tem);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Id.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Id.h
deleted file mode 100644
index fdea2ab812..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Id.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Id_INCLUDED
-#define Id_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Named.h"
-#include "Location.h"
-#include "Vector.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Id : public Named {
-public:
- Id(const StringC &);
- void define(const Location &);
- void addPendingRef(const Location &);
- Boolean defined() const;
- const Location &defLocation() const;
- const Vector<Location> &pendingRefs() const;
-private:
- Location defLocation_;
- Vector<Location> pendingRefs_;
-};
-
-inline
-Boolean Id::defined() const
-{
- return !defLocation_.origin().isNull();
-}
-
-inline
-const Location &Id::defLocation() const
-{
- return defLocation_;
-}
-
-inline
-const Vector<Location> &Id::pendingRefs() const
-{
- return pendingRefs_;
-}
-
-inline
-void Id::addPendingRef(const Location &loc)
-{
- pendingRefs_.push_back(loc);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Id_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/IdentityCodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/IdentityCodingSystem.cxx
deleted file mode 100644
index 8e95de2522..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/IdentityCodingSystem.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "IdentityCodingSystem.h"
-#include <limits.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class IdentityDecoder : public Decoder {
-public:
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
- Boolean convertOffset(unsigned long &offset) const;
-};
-
-class IdentityEncoder : public RecoveringEncoder {
-public:
- IdentityEncoder();
- void output(const Char *, size_t, OutputByteStream *);
- void output(Char *tmp_char, size_t tmp_size_t, OutputByteStream *tmp_obs) {
- output((const Char *)tmp_char, (size_t) tmp_size_t, (OutputByteStream *)tmp_obs);
- }
-};
-
-IdentityCodingSystem::IdentityCodingSystem()
-{
-}
-
-Decoder *IdentityCodingSystem::makeDecoder() const
-{
- return new IdentityDecoder;
-}
-
-Encoder *IdentityCodingSystem::makeEncoder() const
-{
- return new IdentityEncoder;
-}
-
-Boolean IdentityCodingSystem::isIdentity() const
-{
- return 1;
-}
-
-size_t IdentityDecoder::decode(Char *to, const char *from, size_t fromLen,
- const char **rest)
-{
- if (sizeof(Char) == sizeof(char) && from == (char *)to) {
- *rest = from + fromLen;
- return fromLen;
- }
- for (size_t n = fromLen; n > 0; n--)
- *to++ = (unsigned char)*from++; // zero extend
- *rest = from;
- return fromLen;
-}
-
-Boolean IdentityDecoder::convertOffset(unsigned long &) const
-{
- return true;
-}
-
-IdentityEncoder::IdentityEncoder()
-{
-}
-
-void IdentityEncoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- if (sizeof(Char) != sizeof(char)) {
- for (size_t i = 0; i < n; i++) {
- Char c = s[i];
- if (c > UCHAR_MAX)
- handleUnencodable(c, sb);
- else
- sb->sputc((unsigned char)c);
- }
- }
- else
- sb->sputn((const char *)s, n);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/InputSource.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/InputSource.cxx
deleted file mode 100644
index c2168524e6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/InputSource.cxx
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "InputSource.h"
-#include "MarkupScan.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-InputSource::InputSource(InputSourceOrigin *origin, const Char *start,
- const Char *end)
-: origin_(origin), start_(start), end_(end), cur_(start), accessError_(0),
- startLocation_(origin, 0), multicode_(0), scanSuppress_(0)
-{
-}
-
-void InputSource::reset(const Char *start,
- const Char *end)
-{
- origin_ = origin_->copy();
- start_ = start;
- end_ = end;
- cur_ = start_;
- startLocation_ = Location(origin_.pointer(), 0);
- multicode_ = 0;
- scanSuppress_ = 0;
- markupScanTable_.clear();
-}
-
-InputSource::~InputSource()
-{
-}
-
-void InputSource::advanceStartMulticode(const Char *to)
-{
- while (start_ < to) {
- switch (markupScanTable_[*start_]) {
- case MarkupScan::normal:
- break;
- case MarkupScan::in:
- scanSuppress_ = 0;
- break;
- case MarkupScan::out:
- if (!scanSuppress()) {
- scanSuppress_ = 1;
- scanSuppressSingle_ = 0;
- }
- break;
- case MarkupScan::suppress:
- // what's the effect of MSSCHAR followed by MSSCHAR
- if (!scanSuppress()) {
- scanSuppress_ = 1;
- scanSuppressSingle_ = 1;
- scanSuppressIndex_ = startLocation_.index() + 1;
- }
- break;
- }
- start_++;
- startLocation_ += 1;
- }
-}
-
-void InputSource::willNotRewind()
-{
-}
-
-void InputSource::setDocCharset(const CharsetInfo &,
- const CharsetInfo &)
-{
-}
-
-void InputSource::willNotSetDocCharset()
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/InternalInputSource.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/InternalInputSource.cxx
deleted file mode 100644
index 54e8bd5181..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/InternalInputSource.cxx
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include <string.h>
-#include "InternalInputSource.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-InternalInputSource::InternalInputSource(const StringC &str,
- InputSourceOrigin *origin)
-: InputSource(origin, str.data(), str.data() + str.size()), buf_(0),
- contents_(&str)
-{
-}
-
-InternalInputSource::~InternalInputSource()
-{
- if (buf_)
- delete [] buf_;
-}
-
-Xchar InternalInputSource::fill(Messenger &)
-{
- return eE;
-}
-
-void InternalInputSource::pushCharRef(Char c, const NamedCharRef &ref)
-{
- ASSERT(cur() == start());
- noteCharRef(startIndex() + (cur() - start()), ref);
- if (buf_ == 0) {
- buf_ = new Char[end() - start() + 1];
- memcpy(buf_ + 1, cur(), (end() - start())*sizeof(Char));
- changeBuffer(buf_ + 1, cur());
- }
- moveLeft();
- *(Char *)cur() = c;
-}
-
-Boolean InternalInputSource::rewind(Messenger &)
-{
- reset(contents_->data(),
- contents_->data() + contents_->size());
- if (buf_) {
- delete [] buf_;
- buf_ = 0;
- }
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Link.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Link.cxx
deleted file mode 100644
index 88f28f444c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Link.cxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Link.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Link::~Link()
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/LinkProcess.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/LinkProcess.cxx
deleted file mode 100644
index 4745b52ceb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/LinkProcess.cxx
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "LinkProcess.h"
-// ParserState is used for access to parser messages
-#include "ParserState.h"
-#include "MessageArg.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-LinkProcess::LinkProcess()
-{
-}
-
-void LinkProcess::init(const ConstPtr<ComplexLpd> &lpd)
-{
- lpd_ = lpd;
- open_.clear();
- open_.insert(new LinkProcessOpenElement(lpd_->initialLinkSet()));
-}
-
-Boolean LinkProcess::startElement(const ElementType *element,
- const AttributeList &attributes,
- const Location &location,
- Messenger &mgr,
- const AttributeList *&linkAttributes,
- const ResultElementSpec *&resultElementSpec)
-{
- if (lpd_.isNull()) {
- linkAttributes = 0;
- resultElementSpec = 0;
- return 1;
- }
- const StringC *id = attributes.getId();
- if (id) {
- const IdLinkRuleGroup *p = lpd_->lookupIdLink(*id);
- if (p) {
- size_t selected;
- if (p->nLinkRules() > 1) {
- linkAttributes_.resize(p->nLinkRules());
- for (size_t i = 0; i < linkAttributes_.size(); i++)
- linkAttributes_[i] = &p->linkRule(i).attributes();
- if (!selectLinkRule(linkAttributes_,
- location,
- selected))
- return 0;
- }
- else
- selected = 0;
- const IdLinkRule &rule = p->linkRule(selected);
- open_.insert(new LinkProcessOpenElement(open_.head()->current,
- rule));
- linkAttributes = &rule.attributes();
- resultElementSpec = &rule.resultElementSpec();
- if (!rule.isAssociatedWith(element)) {
- mgr.setNextLocation(location);
- mgr.message(ParserMessages::idlinkElementType,
- StringMessageArg(element->name()),
- StringMessageArg(*id));
- }
- return 1;
- }
- }
- const LinkSet *currentLinkSet = open_.head()->current;
- size_t nRules = currentLinkSet->nLinkRules(element);
- if (nRules > 0) {
- size_t selected;
- if (nRules > 1) {
- linkAttributes_.resize(nRules);
- for (size_t i = 0; i < nRules; i++)
- linkAttributes_[i]
- = &currentLinkSet->linkRule(element, i).attributes();
- if (!selectLinkRule(linkAttributes_,
- location,
- selected))
- return 0;
- }
- else
- selected = 0;
- const SourceLinkRule &rule = currentLinkSet->linkRule(element, selected);
- open_.insert(new LinkProcessOpenElement(open_.head()->current,
- rule));
- linkAttributes = &rule.attributes();
- resultElementSpec = &rule.resultElementSpec();
- return 1;
- }
- // FIXME construct attributes from attribute definition list
- linkAttributes = 0;
- resultElementSpec = 0;
- open_.insert(new LinkProcessOpenElement(open_.head()->current));
- return 1;
-}
-
-
-void LinkProcess::endElement()
-{
- if (lpd_.isNull())
- return;
- LinkProcessOpenElement *top = open_.get();
- if (top->post)
- open_.head()->current = top->post;
- else if (top->postRestore)
- open_.head()->current = open_.head()->restore;
- delete top;
-}
-
-void LinkProcess::uselink(const LinkSet *linkSet,
- Boolean restore,
- const Lpd *lpd)
-{
- if (lpd_.isNull())
- return;
- if (lpd != lpd_.pointer())
- return;
- if (restore)
- open_.head()->current = open_.head()->restore;
- else if (linkSet)
- open_.head()->current = linkSet;
-}
-
-size_t LinkProcess::nImpliedLinkRules() const
-{
- if (!open_.head())
- return 0;
- return open_.head()->current->nImpliedLinkRules();
-}
-
-const ResultElementSpec &LinkProcess::impliedLinkRule(size_t i) const
-{
- return open_.head()->current->impliedLinkRule(i);
-}
-
-// Usually redefined by application.
-
-Boolean LinkProcess::selectLinkRule(const Vector<const AttributeList *> &,
- const Location &,
- size_t &selected)
-{
- selected = 0;
- return 1;
-}
-
-void LinkProcess::clear()
-{
- open_.clear();
- lpd_.clear();
- linkAttributes_.clear();
-}
-
-void LinkProcess::swap(LinkProcess &to)
-{
- open_.swap(to.open_);
- lpd_.swap(to.lpd_);
- linkAttributes_.swap(to.linkAttributes_);
-}
-
-LinkProcessOpenElement::LinkProcessOpenElement(const LinkSet *cur,
- const SourceLinkRule &rule)
-{
- current = rule.uselink();
- if (!current)
- current = cur;
- restore = cur;
- post = rule.postlink();
- postRestore = rule.postlinkRestore();
-}
-
-LinkProcessOpenElement::LinkProcessOpenElement(const LinkSet *cur)
-{
- restore = current = cur;
- post = 0;
- postRestore = 0;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/LiteralStorage.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/LiteralStorage.cxx
deleted file mode 100644
index 3927110238..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/LiteralStorage.cxx
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "LiteralStorage.h"
-#include "CodingSystem.h"
-#include <string.h>
-
-#ifdef DECLARE_MEMMOVE
-extern "C" {
- void *memmove(void *, const void *, size_t);
-}
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class LiteralStorageObject : public StorageObject {
-public:
- LiteralStorageObject(const StringC &);
- Boolean read(char *buf, size_t bufSize, Messenger &, size_t &nread);
- Boolean rewind(Messenger &);
-private:
- LiteralStorageObject(const LiteralStorageObject &); // undefined
- void operator=(const LiteralStorageObject &); // undefined
-
- StringC str_;
- size_t nBytesRead_;
-};
-
-class MemoryInputCodingSystem : public InputCodingSystem {
-public:
- Decoder *makeDecoder() const;
-};
-
-class MemoryDecoder : public Decoder {
-public:
- MemoryDecoder();
- size_t decode(Char *, const char *, size_t, const char **);
-};
-
-LiteralStorageManager::LiteralStorageManager(const char *type)
-: type_(type)
-{
-}
-
-StorageObject *LiteralStorageManager::makeStorageObject(const StringC &id,
- const StringC &,
- Boolean,
- Boolean,
- Messenger &,
- StringC &foundId)
-{
- foundId = id;
- return new LiteralStorageObject(id);
-}
-
-const InputCodingSystem *LiteralStorageManager::requiredCodingSystem() const
-{
- static MemoryInputCodingSystem cs;
- return &cs;
-}
-
-Boolean LiteralStorageManager::requiresCr() const
-{
- return 1;
-}
-
-const char *LiteralStorageManager::type() const
-{
- return type_;
-}
-
-Boolean LiteralStorageManager::inheritable() const
-{
- return 0;
-}
-
-LiteralStorageObject::LiteralStorageObject(const StringC &str)
-: str_(str), nBytesRead_(0)
-{
-}
-
-Boolean LiteralStorageObject::rewind(Messenger &)
-{
- nBytesRead_ = 0;
- return 1;
-}
-
-Boolean LiteralStorageObject::read(char *buf, size_t bufSize,
- Messenger &, size_t &nread)
-{
- if (nBytesRead_ >= str_.size()*sizeof(Char))
- return 0;
- nread = str_.size()*sizeof(Char) - nBytesRead_;
- if (nread > bufSize)
- nread = bufSize;
- memcpy(buf, (char *)str_.data() + nBytesRead_, nread);
- nBytesRead_ += nread;
- return 1;
-}
-
-Decoder *MemoryInputCodingSystem::makeDecoder() const
-{
- return new MemoryDecoder;
-}
-
-MemoryDecoder::MemoryDecoder()
-: Decoder(sizeof(Char))
-{
-}
-
-size_t MemoryDecoder::decode(Char *to, const char *from, size_t fromLen,
- const char **rest)
-{
- size_t nChars = fromLen/sizeof(Char);
- *rest = from + nChars*sizeof(Char);
- if (from != (char *)to)
- memmove(to, from, nChars*sizeof(Char));
- return nChars;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Location.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Location.cxx
deleted file mode 100644
index 74cfc71edf..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Location.cxx
+++ /dev/null
@@ -1,557 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Location.h"
-#include "Entity.h"
-#include "Mutex.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class InputSourceOriginImpl : public EntityOrigin {
-public:
- InputSourceOriginImpl();
- InputSourceOriginImpl(const Location &refLocation);
- const Location &parent() const;
- const ExternalInfo *externalInfo() const;
- Offset startOffset(Index ind) const;
- void noteCharRef(Index replacementIndex, const NamedCharRef &);
- Boolean isNamedCharRef(Index ind, NamedCharRef &ref) const;
- void setExternalInfo(ExternalInfo *);
- virtual InputSourceOrigin *copy() const;
- const InputSourceOrigin *asInputSourceOrigin() const;
-private:
- InputSourceOriginImpl(const InputSourceOriginImpl &); // undefined
- void operator=(const InputSourceOriginImpl &); // undefined
- size_t nPrecedingCharRefs(Index ind) const;
- Vector<InputSourceOriginNamedCharRef> charRefs_;
- StringC charRefOrigNames_;
- Owner<ExternalInfo> externalInfo_; // 0 for internal entities
- Location refLocation_; // where referenced from
- Mutex mutex_;
-};
-
-class EntityOriginImpl : public InputSourceOriginImpl {
-public:
- void *operator new(size_t sz, Allocator &alloc) {
- return alloc.alloc(sz);
- }
- void *operator new(size_t sz) {
- return Allocator::allocSimple(sz);
- }
- void operator delete(void *p) {
- Allocator::free(p);
- }
- EntityOriginImpl(const ConstPtr<Entity> &);
- EntityOriginImpl(const ConstPtr<Entity> &,
- const Location &refLocation);
- EntityOriginImpl(const ConstPtr<Entity> &,
- const Location &refLocation, Index refLength,
- Owner<Markup> &markup);
- ~EntityOriginImpl();
- InputSourceOrigin *copy() const;
- const Entity *entity() const { return entity_.pointer(); }
- const EntityDecl *entityDecl() const;
- const EntityOrigin *asEntityOrigin() const;
- Boolean defLocation(Offset off, const Origin *&, Index &) const;
- Index refLength() const;
- const Markup *markup() const;
-private:
- EntityOriginImpl(const EntityOriginImpl &); // undefined
- void operator=(const EntityOriginImpl &); // undefined
- ConstPtr<Entity> entity_; // 0 for document entity
- // total length of reference
- // (characters that were replaced by the entity)
- Index refLength_;
- Owner<Markup> markup_;
-};
-
-const size_t EntityOrigin::allocSize = sizeof(EntityOriginImpl);
-
-Location::Location()
-{
-}
-
-Location::Location(Origin *origin, Index i)
-: origin_(origin), index_(i)
-{
-}
-
-Location::Location(ConstPtr<Origin> origin, Index i)
-: origin_(origin), index_(i)
-{
-}
-
-Origin::~Origin()
-{
-}
-
-const EntityOrigin *Origin::asEntityOrigin() const
-{
- return 0;
-}
-
-const InputSourceOrigin *Origin::asInputSourceOrigin() const
-{
- return 0;
-}
-
-Index Origin::refLength() const
-{
- return 0;
-}
-
-Boolean Origin::origChars(const Char *&) const
-{
- return 0;
-}
-
-Boolean Origin::inBracketedTextOpenDelim() const
-{
- return 0;
-}
-
-Boolean Origin::inBracketedTextCloseDelim() const
-{
- return 0;
-}
-
-Boolean Origin::isNumericCharRef(const Markup *&) const
-{
- return 0;
-}
-
-Boolean Origin::isNamedCharRef(Index, NamedCharRef &) const
-{
- return 0;
-}
-
-const EntityDecl *Origin::entityDecl() const
-{
- return 0;
-}
-
-const Markup *Origin::markup() const
-{
- return 0;
-}
-
-const Entity *Origin::entity() const
-{
- return 0;
-}
-
-Boolean Origin::defLocation(Offset, const Origin *&, Index &) const
-{
- return 0;
-}
-
-const ExternalInfo *Origin::externalInfo() const
-{
- return 0;
-}
-
-Offset Origin::startOffset(Index ind) const
-{
- return ind;
-}
-
-const StringC *Origin::entityName() const
-{
- const EntityDecl *ent = entityDecl();
- if (ent)
- return &ent->name();
- else
- return 0;
-}
-
-BracketOrigin::BracketOrigin(const Location &loc, Position pos)
-: loc_(loc), pos_(pos)
-{
-}
-
-const Location &BracketOrigin::parent() const
-{
- return loc_;
-}
-
-Boolean BracketOrigin::inBracketedTextOpenDelim() const
-{
- return pos_ == open;
-}
-
-Boolean BracketOrigin::inBracketedTextCloseDelim() const
-{
- return pos_ == close;
-}
-
-InputSourceOrigin *InputSourceOrigin::make()
-{
- return new InputSourceOriginImpl;
-}
-
-InputSourceOrigin *InputSourceOrigin::make(const Location &refLocation)
-{
- return new InputSourceOriginImpl(refLocation);
-}
-
-InputSourceOriginImpl::InputSourceOriginImpl()
-{
-}
-
-InputSourceOriginImpl::InputSourceOriginImpl(const Location &refLocation)
-: refLocation_(refLocation)
-{
-}
-
-const InputSourceOrigin *InputSourceOriginImpl::asInputSourceOrigin() const
-{
- return this;
-}
-
-const ExternalInfo *InputSourceOriginImpl::externalInfo() const
-{
- return externalInfo_.pointer();
-}
-
-InputSourceOrigin *InputSourceOriginImpl::copy() const
-{
- return new InputSourceOriginImpl(refLocation_);
-}
-
-const Location &InputSourceOriginImpl::parent() const
-{
- return refLocation_;
-}
-
-void InputSourceOriginImpl::setExternalInfo(ExternalInfo *info)
-{
- externalInfo_ = info;
-}
-
-void InputSourceOriginImpl::noteCharRef(Index replacementIndex,
- const NamedCharRef &ref)
-{
- Mutex::Lock lock(&mutex_);
- charRefs_.resize(charRefs_.size() + 1);
- charRefs_.back().replacementIndex = replacementIndex;
- charRefs_.back().refStartIndex = ref.refStartIndex();
- charRefs_.back().refEndType = ref.refEndType();
- charRefs_.back().origNameOffset = charRefOrigNames_.size();
- charRefOrigNames_ += ref.origName();
-}
-
-// Number of character references whose replacement index < ind.
-
-size_t InputSourceOriginImpl::nPrecedingCharRefs(Index ind) const
-{
- size_t i;
- // Find i such that
- // charRefs_[I].replacementIndex >= ind
- // charRefs_[i - 1].replacementIndex < ind
- if (charRefs_.size() == 0
- || ind > charRefs_.back().replacementIndex)
- // This will be a common case, so optimize it.
- i = charRefs_.size();
- else {
- // Binary search
- // Invariant:
- // charRefs_ < i have replacementIndex < ind
- // charRefs_ >= lim have replacementIndex >= ind
- i = 0;
- size_t lim = charRefs_.size();
- while (i < lim) {
- size_t mid = i + (lim - i)/2;
- if (charRefs_[mid].replacementIndex >= ind)
- lim = mid;
- else
- i = mid + 1;
- }
- }
- return i;
-}
-
-Offset InputSourceOriginImpl::startOffset(Index ind) const
-{
- Mutex::Lock lock(&((InputSourceOriginImpl *)this)->mutex_);
- size_t n = nPrecedingCharRefs(ind);
- if (n < charRefs_.size()
- && ind == charRefs_[n].replacementIndex) {
- for (;;) {
- ind = charRefs_[n].refStartIndex;
- if (n == 0 || charRefs_[n - 1].replacementIndex != ind)
- break;
- --n;
- }
- }
- // charRefs[n - 1].replacementIndex < ind
- return Offset(ind - n);
-}
-
-Boolean InputSourceOriginImpl::isNamedCharRef(Index ind, NamedCharRef &ref) const
-{
- Mutex::Lock lock(&((InputSourceOriginImpl *)this)->mutex_);
- size_t n = nPrecedingCharRefs(ind);
- if (n < charRefs_.size() && ind == charRefs_[n].replacementIndex) {
- ref.set(charRefs_[n].refStartIndex,
- charRefs_[n].refEndType,
- charRefOrigNames_.data() + charRefs_[n].origNameOffset,
- (n + 1 < charRefs_.size()
- ? charRefs_[n + 1].origNameOffset
- : charRefOrigNames_.size())
- - charRefs_[n].origNameOffset);
- return 1;
- }
- return 0;
-}
-
-EntityOrigin *EntityOrigin::make(Allocator &alloc,
- const ConstPtr<Entity> &entity)
-{
- return new (alloc) EntityOriginImpl(entity);
-}
-
-EntityOrigin *EntityOrigin::make(Allocator &alloc,
- const ConstPtr<Entity> &entity,
- const Location &refLocation)
-{
- return new (alloc) EntityOriginImpl(entity, refLocation);
-}
-
-EntityOrigin *EntityOrigin::make(Allocator &alloc,
- const ConstPtr<Entity> &entity,
- const Location &refLocation,
- Index refLength,
- Owner<Markup> &markup)
-{
- return new (alloc) EntityOriginImpl(entity, refLocation, refLength, markup);
-}
-
-EntityOrigin *EntityOrigin::make(const ConstPtr<Entity> &entity,
- const Location &refLocation,
- Index refLength,
- Owner<Markup> &markup)
-{
- return new EntityOriginImpl(entity, refLocation, refLength, markup);
-}
-
-EntityOrigin *EntityOrigin::make(const ConstPtr<Entity> &entity,
- const Location &refLocation)
-{
- return new EntityOriginImpl(entity, refLocation);
-}
-
-EntityOriginImpl::EntityOriginImpl(const ConstPtr<Entity> &entity)
-: refLength_(0), entity_(entity)
-{
-}
-
-EntityOriginImpl::EntityOriginImpl(const ConstPtr<Entity> &entity,
- const Location &refLocation)
-: InputSourceOriginImpl(refLocation), refLength_(0), entity_(entity)
-{
-}
-
-EntityOriginImpl::EntityOriginImpl(const ConstPtr<Entity> &entity,
- const Location &refLocation,
- Index refLength,
- Owner<Markup> &markup)
-: InputSourceOriginImpl(refLocation), refLength_(refLength), entity_(entity)
-{
- markup.swap(markup_);
-}
-
-EntityOriginImpl::~EntityOriginImpl()
-{
-}
-
-InputSourceOrigin *EntityOriginImpl::copy() const
-{
- Owner<Markup> m;
- if (markup_)
- m = new Markup(*markup_);
- return new EntityOriginImpl(entity_, parent(), refLength_, m);
-}
-
-Index EntityOriginImpl::refLength() const
-{
- return refLength_;
-}
-
-const EntityOrigin *EntityOriginImpl::asEntityOrigin() const
-{
- return this;
-}
-
-Boolean EntityOriginImpl::defLocation(Offset off, const Origin *&origin, Index &index) const
-{
- if (entity_.isNull())
- return 0;
- const InternalEntity *internal = entity_->asInternalEntity();
- if (!internal)
- return 0;
- return internal->text().charLocation(off, origin, index);
-}
-
-const EntityDecl *EntityOriginImpl::entityDecl() const
-{
- return entity_.pointer();
-}
-
-const Markup *EntityOriginImpl::markup() const
-{
- return markup_.pointer();
-}
-
-
-ReplacementOrigin::ReplacementOrigin(const Location &loc, Char origChar)
-: loc_(loc), origChar_(origChar)
-{
-}
-
-const Location &ReplacementOrigin::parent() const
-{
- return loc_;
-}
-
-Boolean ReplacementOrigin::origChars(const Char *&s) const
-{
- if (loc_.origin().isNull() || !loc_.origin()->origChars(s))
- s = &origChar_;
- return 1;
-}
-
-MultiReplacementOrigin::MultiReplacementOrigin(const Location &loc,
- StringC &origChars)
-: loc_(loc)
-{
- origChars.swap(origChars_);
-}
-
-const Location &MultiReplacementOrigin::parent() const
-{
- return loc_;
-}
-
-Boolean MultiReplacementOrigin::origChars(const Char *&s) const
-{
- if (loc_.origin().isNull() || !loc_.origin()->origChars(s))
- s = origChars_.data();
- return 1;
-}
-
-ProxyOrigin::ProxyOrigin(const Origin *origin)
-: origin_(origin)
-{
-}
-
-const EntityOrigin *ProxyOrigin::asEntityOrigin() const
-{
- return origin_->asEntityOrigin();
-}
-
-const InputSourceOrigin *ProxyOrigin::asInputSourceOrigin() const
-{
- return origin_->asInputSourceOrigin();
-}
-
-const Location &ProxyOrigin::parent() const
-{
- return origin_->parent();
-}
-
-Index ProxyOrigin::refLength() const
-{
- return origin_->refLength();
-}
-
-Boolean ProxyOrigin::origChars(const Char *&p) const
-{
- return origin_->origChars(p);
-}
-
-Boolean ProxyOrigin::inBracketedTextOpenDelim() const
-{
- return origin_->inBracketedTextOpenDelim();
-}
-
-Boolean ProxyOrigin::inBracketedTextCloseDelim() const
-{
- return origin_->inBracketedTextCloseDelim();
-}
-
-Boolean ProxyOrigin::isNumericCharRef(const Markup *&markup) const
-{
- return origin_->isNumericCharRef(markup);
-}
-
-Boolean ProxyOrigin::isNamedCharRef(Index ind, NamedCharRef &ref) const
-{
- return origin_->isNamedCharRef(ind, ref);
-}
-
-const EntityDecl *ProxyOrigin::entityDecl() const
-{
- return origin_->entityDecl();
-}
-
-Boolean ProxyOrigin::defLocation(Offset off, const Origin *&origin, Index &index) const
-{
- return origin_->defLocation(off, origin, index);
-}
-
-const Markup *ProxyOrigin::markup() const
-{
- return origin_->markup();
-}
-
-const Entity *ProxyOrigin::entity() const
-{
- return origin_->entity();
-}
-
-const ExternalInfo *ProxyOrigin::externalInfo() const
-{
- return origin_->externalInfo();
-}
-
-Offset ProxyOrigin::startOffset(Index ind) const
-{
- return origin_->startOffset(ind);
-}
-
-ExternalInfo::~ExternalInfo()
-{
-}
-
-RTTI_DEF0(ExternalInfo)
-
-NamedCharRef::NamedCharRef()
-{
-}
-
-NamedCharRef::NamedCharRef(Index refStartIndex, RefEndType refEndType,
- const StringC &origName)
-: refStartIndex_(refStartIndex),
- refEndType_(refEndType),
- origName_(origName)
-{
-}
-
-void NamedCharRef::set(Index refStartIndex, RefEndType refEndType,
- const Char *s, size_t n)
-{
- refStartIndex_ = refStartIndex;
- refEndType_ = refEndType;
- origName_.assign(s, n);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Lpd.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Lpd.cxx
deleted file mode 100644
index 80d99b5d72..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Lpd.cxx
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Lpd.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Lpd::Lpd(const StringC &name, Type type, const Location &location,
- const Ptr<Dtd> &sourceDtd)
-: name_(new StringResource<Char>(name)), type_(type), location_(location),
- active_(0), sourceDtd_(sourceDtd)
-{
-}
-
-Lpd::~Lpd()
-{
-}
-
-SimpleLpd::SimpleLpd(const StringC &name, const Location &location,
- const Ptr<Dtd> &sourceDtd)
-: Lpd(name, simpleLink, location, sourceDtd)
-{
-}
-
-ResultElementSpec::ResultElementSpec()
-: elementType(0)
-{
-}
-
-void ResultElementSpec::swap(ResultElementSpec &to)
-{
- attributeList.swap(to.attributeList);
- {
- const ElementType *tem = to.elementType;
- to.elementType = elementType;
- elementType = tem;
- }
-}
-
-SourceLinkRule::SourceLinkRule()
-: uselink_(0), postlink_(0), postlinkRestore_(0)
-{
-}
-
-void SourceLinkRule::swap(SourceLinkRule &to)
-{
- linkAttributes_.swap(to.linkAttributes_);
- resultElementSpec_.swap(to.resultElementSpec_);
- {
- const LinkSet *tem = to.uselink_;
- to.uselink_ = uselink_;
- uselink_ = tem;
- }
- {
- const LinkSet *tem = to.postlink_;
- to.postlink_ = postlink_;
- postlink_ = tem;
- }
- {
- Boolean tem = to.postlinkRestore_;
- to.postlinkRestore_ = postlinkRestore_;
- postlinkRestore_ = tem;
- }
-}
-
-SourceLinkRuleResource::SourceLinkRuleResource()
-{
-}
-
-LinkSet::LinkSet(const StringC &name, const Dtd *dtd)
-: Named(name), defined_(0), linkRules_(dtd ? dtd->nElementTypeIndex() : 0)
-{
-}
-
-void LinkSet::addLinkRule(const ElementType *element,
- const ConstPtr<SourceLinkRuleResource> &rule)
-{
- linkRules_[element->index()].push_back(rule);
-}
-
-void LinkSet::addImplied(const ElementType *element, AttributeList &attributes)
-{
- impliedSourceLinkRules_.resize(impliedSourceLinkRules_.size() + 1);
- ResultElementSpec &result = impliedSourceLinkRules_.back();
- result.elementType = element;
- result.attributeList = attributes;
-}
-
-Boolean LinkSet::impliedResultAttributes(const ElementType *resultType,
- const AttributeList *&attributes)
-{
- for (size_t i = 0; i < impliedSourceLinkRules_.size(); i++)
- if (impliedSourceLinkRules_[i].elementType == resultType) {
- attributes = &impliedSourceLinkRules_[i].attributeList;
- return 1;
- }
- return 0;
-}
-
-size_t LinkSet::nLinkRules(const ElementType *e) const
-{
- if (e->index() >= linkRules_.size())
- return 0;
- return linkRules_[e->index()].size();
-}
-
-IdLinkRule::IdLinkRule()
-{
-}
-
-Boolean IdLinkRule::isAssociatedWith(const ElementType *e) const
-{
- for (size_t i = 0; i < assocElementTypes_.size(); i++)
- if (assocElementTypes_[i] == e)
- return 1;
- return 0;
-}
-
-void IdLinkRule::setAssocElementTypes(Vector<const ElementType *> &v)
-{
- v.swap(assocElementTypes_);
-}
-
-void IdLinkRule::swap(IdLinkRule &to)
-{
- SourceLinkRule::swap(to);
- assocElementTypes_.swap(to.assocElementTypes_);
-}
-
-IdLinkRuleGroup::IdLinkRuleGroup(const StringC &name)
-: Named(name)
-{
-}
-
-void IdLinkRuleGroup::addLinkRule(IdLinkRule &rule)
-{
- linkRules_.resize(linkRules_.size() + 1);
- rule.swap(linkRules_.back());
-}
-
-ComplexLpd::ComplexLpd(const StringC &name, Type type,
- const Location &location,
- const Syntax &syntax,
- const Ptr<Dtd> &sourceDtd,
- const Ptr<Dtd> &resultDtd)
-: Lpd(name, type, location, sourceDtd), resultDtd_(resultDtd),
- hadIdLinkSet_(0), nAttributeDefinitionList_(0),
- initialLinkSet_(syntax.rniReservedName(Syntax::rINITIAL),
- sourceDtd.pointer()),
- emptyLinkSet_(syntax.rniReservedName(Syntax::rEMPTY),
- sourceDtd.pointer()),
- linkAttributeDefs_(sourceDtd.isNull() ? 0 : sourceDtd->nElementTypeIndex())
-{
-}
-
-IdLinkRuleGroup *ComplexLpd::lookupCreateIdLink(const StringC &id)
-{
- IdLinkRuleGroup *group = idLinkTable_.lookup(id);
- if (!group) {
- group = new IdLinkRuleGroup(id);
- idLinkTable_.insert(group);
- }
- return group;
-}
-
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/LpdEntityRef.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/LpdEntityRef.h
deleted file mode 100644
index 4aba9a00a1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/LpdEntityRef.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef LpdEntityRef_INCLUDED
-#define LpdEntityRef_INCLUDED 1
-
-#include "Entity.h"
-#include "Boolean.h"
-#include "Ptr.h"
-
-// Information about a reference to an entity that
-// used a definition in an LPD.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct LpdEntityRef {
- ConstPtr<Entity> entity;
- PackedBoolean lookedAtDefault;
- PackedBoolean foundInPass1Dtd;
- static inline const LpdEntityRef &key(const LpdEntityRef &r) { return r; }
- static inline unsigned long hash(const LpdEntityRef &r) {
- return Hash::hash(r.entity->name());
- }
-};
-
-inline
-Boolean operator==(const LpdEntityRef &r1, const LpdEntityRef &r2)
-{
- return (r1.entity == r2.entity
- && r1.foundInPass1Dtd == r2.foundInPass1Dtd
- && r1.lookedAtDefault == r2.lookedAtDefault);
-}
-
-inline
-Boolean operator!=(const LpdEntityRef &r1, const LpdEntityRef &r2)
-{
- return !(r1 == r2);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not LpdEntityRef_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Makefile.sub b/usr/src/cmd/man/src/util/nsgmls.src/lib/Makefile.sub
deleted file mode 100644
index 9636e71fba..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Makefile.sub
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-
-LIB=sp
-INCLUDE=-I$(srcdir)/../generic
-MSGGENFLAGS=-l
-COMMON_OBJS=Allocator.o Link.o IListBase.o TypeId.o assert.o
-ENTMGR_OBJS=CharsetInfo.o EntityCatalog.o EntityDecl.o EntityManager.o \
- Hash.o InputSource.o Location.o Message.o MessageArg.o \
- UnivCharsetDesc.o entmgr_inst.o
-XENTMGR_OBJS=LiteralStorage.o URLStorage.o RewindStorageObject.o \
- ErrnoMessageArg.o OffsetOrderedList.o DescriptorManager.o \
- ExtendEntityManager.o PosixStorage.o StdioStorage.o NotationStorage.o \
- StorageManager.o CodingSystem.o IdentityCodingSystem.o \
- UTF8CodingSystem.o Fixed2CodingSystem.o UnicodeCodingSystem.o \
- EUCJPCodingSystem.o SJISCodingSystem.o TranslateCodingSystem.o \
- Big5CodingSystem.o XMLCodingSystem.o CodingSystemKit.o \
- SearchResultMessageArg.o SOEntityCatalog.o OutputByteStream.o \
- xentmgr_inst.o
-PARSER_OBJS=ContentState.o ParserState.o parser_inst.o parseSd.o Parser.o \
- parseInstance.o parseMode.o parseAttribute.o \
- LinkProcess.o Lpd.o parseDecl.o ShortReferenceMap.o \
- parseParam.o parseCommon.o SgmlParser.o \
- Entity.o Attribute.o OpenElement.o Notation.o ParserOptions.o Dtd.o \
- Undo.o Param.o TokenMessageArg.o Group.o \
- CharsetDecl.o CharsetRegistry.o ExternalId.o \
- TrieBuilder.o Sd.o Syntax.o Partition.o ModeInfo.o Recognizer.o \
- Markup.o Text.o ContentToken.o ElementType.o Event.o \
- InternalInputSource.o OutputState.o ParserMessages.o \
- SdText.o NumericCharRefOrigin.o Id.o StringVectorMessageArg.o
-APP_OBJS=ErrorCountEventHandler.o MessageEventHandler.o MessageFormatter.o \
- MessageReporter.o MessageTable.o OutputCharStream.o ConsoleOutput.o \
- CmdLineApp.o EntityApp.o ParserApp.o app_inst.o \
- ArcEngine.o arc_inst.o
-GENERIC_OBJS=ParserEventGeneratorKit.o SGMLApplication.o EventGenerator.o \
- GenericEventHandler.o
-
-OBJS=$(COMMON_OBJS) $(ENTMGR_OBJS) $(XENTMGR_OBJS) $(PARSER_OBJS) $(APP_OBJS) \
- $(GENERIC_OBJS) $(LIBOBJS)
-
-GENSRCS=version.h entmgr_inst.cxx \
- xentmgr_inst.cxx EntityManagerMessages.h CatalogMessages.h \
- PosixStorageMessages.h URLStorageMessages.h StdioStorageMessages.h \
- ParserMessages.h parser_inst.cxx app_inst.cxx \
- ParserAppMessages.h CmdLineAppMessages.h \
- ArcEngineMessages.h arc_inst.cxx MessageReporterMessages.h \
- MessageFormatterMessages.h
-
-#$(srcdir)/version.h: $(srcdir)/../VERSION $(srcdir)/mkversion.pl
-# rm -f $@
-# $(PERL) -w $(srcdir)/mkversion.pl $(srcdir)/../VERSION >$@
-# chmod -w $@
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Markup.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Markup.cxx
deleted file mode 100644
index 30a5f34612..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Markup.cxx
+++ /dev/null
@@ -1,423 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Markup.h"
-#include "InputSource.h"
-#include "Location.h"
-#include "macros.h"
-#include "Entity.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-MarkupItem::MarkupItem()
-: type(Markup::delimiter), index(0)
-{
-}
-
-MarkupItem::~MarkupItem()
-{
- switch (type) {
- case Markup::entityStart:
- delete origin;
- break;
- case Markup::literal:
- delete text;
- break;
- case Markup::sdLiteral:
- delete sdText;
- break;
- }
-}
-
-MarkupItem::MarkupItem(const MarkupItem &item)
-: type(item.type), index(item.index)
-{
- switch (item.type) {
- case Markup::entityStart:
- origin = new ConstPtr<Origin>(*item.origin);
- break;
- case Markup::literal:
- text = new Text(*item.text);
- break;
- case Markup::sdLiteral:
- sdText = new SdText(*item.sdText);
- break;
- case Markup::delimiter:
- break;
- default:
- nChars = item.nChars;
- break;
- }
-}
-
-void MarkupItem::operator=(const MarkupItem &item)
-{
- switch (type) {
- case Markup::entityStart:
- if (item.type == Markup::entityStart) {
- *origin = *item.origin;
- return;
- }
- delete origin;
- break;
- case Markup::literal:
- if (item.type == Markup::literal) {
- *text = *item.text;
- return;
- }
- delete text;
- break;
- case Markup::sdLiteral:
- if (item.type == Markup::sdLiteral) {
- *sdText = *item.sdText;
- return;
- }
- delete sdText;
- break;
- }
- type = item.type;
- index = item.index;
- switch (item.type) {
- case Markup::entityStart:
- origin = new ConstPtr<Origin>(*item.origin);
- break;
- case Markup::literal:
- text = new Text(*item.text);
- break;
- case Markup::sdLiteral:
- sdText = new SdText(*item.sdText);
- break;
- case Markup::delimiter:
- break;
- default:
- nChars = item.nChars;
- break;
- }
-}
-
-Markup::Markup()
-{
-}
-
-void Markup::resize(size_t n)
-{
- size_t chopChars = 0;
- for (size_t i = n; i < items_.size(); i++)
- switch (items_[i].type) {
- case Markup::reservedName:
- case Markup::sdReservedName:
- case Markup::name:
- case Markup::nameToken:
- case Markup::number:
- case Markup::attributeValue:
- case Markup::s:
- case Markup::comment:
- case Markup::shortref:
- chopChars += items_[i].nChars;
- break;
- }
- items_.resize(n);
- chars_.resize(chars_.size() - chopChars);
-}
-
-void Markup::addDelim(Syntax::DelimGeneral d)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::delimiter;
- item.index = d;
-}
-
-void Markup::addReservedName(Syntax::ReservedName rn, const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::reservedName;
- item.index = rn;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addReservedName(Syntax::ReservedName rn, const StringC &str)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.nChars = str.size();
- item.type = Markup::reservedName;
- item.index = rn;
- chars_.append(str.data(), str.size());
-}
-
-void Markup::addSdReservedName(Sd::ReservedName rn, const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::sdReservedName;
- item.index = rn;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addSdReservedName(Sd::ReservedName rn,
- const Char *str, size_t length)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.nChars = length;
- item.type = Markup::sdReservedName;
- item.index = rn;
- chars_.append(str, length);
-}
-
-void Markup::addS(Char c)
-{
- if (items_.size() > 0) {
- MarkupItem &item = items_.back();
- if (item.type == Markup::s) {
- item.nChars += 1;
- chars_ += c;
- return;
- }
- }
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::s;
- item.nChars = 1;
- chars_ += c;
-}
-
-void Markup::addS(const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::s;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addCommentStart()
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::comment;
- item.nChars = 0;
-}
-
-void Markup::addRefEndRe()
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::refEndRe;
-}
-
-void Markup::addCommentChar(Char c)
-{
- items_.back().nChars += 1;
- chars_ += c;
-}
-
-void Markup::addName(const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::name;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addName(const Char *str, size_t length)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.nChars = length;
- item.type = Markup::name;
- chars_.append(str, length);
-}
-
-void Markup::addNumber(const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::number;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addNameToken(const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::nameToken;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addAttributeValue(const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::attributeValue;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addShortref(const InputSource *in)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- size_t length = in->currentTokenLength();
- item.nChars = length;
- item.type = Markup::shortref;
- chars_.append(in->currentTokenStart(), length);
-}
-
-void Markup::addEntityStart(const Ptr<EntityOrigin> &origin)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::entityStart;
- item.origin = new ConstPtr<Origin>(origin.pointer());
-}
-
-void Markup::addEntityEnd()
-{
- items_.resize(items_.size() + 1);
- items_.back().type = Markup::entityEnd;
-}
-
-void Markup::addLiteral(const Text &text)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::literal;
- item.text = new Text(text);
-}
-
-void Markup::addSdLiteral(const SdText &sdText)
-{
- items_.resize(items_.size() + 1);
- MarkupItem &item = items_.back();
- item.type = Markup::sdLiteral;
- item.sdText = new SdText(sdText);
-}
-
-void Markup::changeToAttributeValue(size_t i)
-{
- ASSERT(items_[i].type == Markup::name);
- items_[i].type = Markup::attributeValue;
-}
-
-void Markup::changeToSdReservedName(size_t i, Sd::ReservedName rn)
-{
- ASSERT(items_[i].type == Markup::name);
- items_[i].type = Markup::sdReservedName;
- items_[i].index = rn;
-}
-
-void Markup::swap(Markup &to)
-{
- chars_.swap(to.chars_);
- items_.swap(to.items_);
-}
-
-MarkupIter::MarkupIter(const Markup &m)
-: chars_(m.chars_.data()),
- items_(m.items_.begin()),
- nItems_(m.items_.size()),
- index_(0),
- charIndex_(0)
-{
-}
-
-void MarkupIter::advance(Location &loc,
- const ConstPtr<Syntax> &syntax)
-{
- switch (items_[index_].type) {
- case Markup::delimiter:
- loc += syntax->delimGeneral(delimGeneral()).size();
- break;
- case Markup::refEndRe:
- loc += 1;
- break;
- case Markup::reservedName:
- case Markup::sdReservedName:
- case Markup::name:
- case Markup::nameToken:
- case Markup::number:
- case Markup::attributeValue:
- case Markup::s:
- case Markup::shortref:
- loc += items_[index_].nChars;
- charIndex_ += items_[index_].nChars;
- break;
- case Markup::comment:
- loc += items_[index_].nChars + (2 * syntax->delimGeneral(Syntax::dCOM).size());
- charIndex_ += items_[index_].nChars;
- break;
- case Markup::entityStart:
- loc = Location(*items_[index_].origin, 0);
- break;
- case Markup::entityEnd:
- {
- ConstPtr<Origin> origin(loc.origin());
- loc = origin->parent();
- loc += origin->refLength();
- }
- break;
- case Markup::literal:
- {
- const Text &text = *items_[index_].text;
- text.endDelimLocation(loc);
- Boolean lita;
- text.delimType(lita);
- loc
- += syntax->delimGeneral(lita ? Syntax::dLITA : Syntax::dLIT).size();
- }
- break;
- case Markup::sdLiteral:
- {
- const SdText &text = *items_[index_].sdText;
- loc = text.endDelimLocation();
- loc += 1;
- }
- break;
- }
- index_++;
-}
-
-void MarkupIter::advance()
-{
- switch (items_[index_].type) {
- case Markup::reservedName:
- case Markup::sdReservedName:
- case Markup::name:
- case Markup::nameToken:
- case Markup::number:
- case Markup::attributeValue:
- case Markup::s:
- case Markup::comment:
- case Markup::shortref:
- charIndex_ += items_[index_].nChars;
- break;
- }
- index_++;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MarkupScan.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/MarkupScan.h
deleted file mode 100644
index 9f51d9e1de..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MarkupScan.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef MarkupScan_INCLUDED
-#define MarkupScan_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct MarkupScan {
- enum Type {
- normal,
- in,
- out,
- suppress
- };
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not MarkupScan_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Message.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Message.cxx
deleted file mode 100644
index 6f3680de79..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Message.cxx
+++ /dev/null
@@ -1,318 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Message.h"
-#include "MessageArg.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-MessageFragment::MessageFragment(unsigned module, unsigned number, const char *
-#ifndef SP_NO_MESSAGE_TEXT
- text
-#endif
- )
-: module_(module),
-#ifndef SP_NO_MESSAGE_TEXT
- text_(text),
-#endif
- number_(number)
-{
-}
-
-MessageType::MessageType(Severity severity, unsigned module, unsigned number,
- const char *text, const char *
-#ifndef SP_NO_MESSAGE_TEXT
- auxText
-#endif
- )
-:
-#ifndef SP_NO_MESSAGE_TEXT
- auxText_(auxText),
-#endif
- MessageFragment(module, number, text)
-{
- spare_ = severity;
-}
-
-MessageType0::MessageType0(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType1::MessageType1(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType2::MessageType2(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType3::MessageType3(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType4::MessageType4(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType5::MessageType5(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType6::MessageType6(Severity severity, unsigned module, unsigned number,
- const char *text)
-: MessageType(severity, module, number, text)
-{
-}
-
-MessageType0L::MessageType0L(Severity severity, unsigned module, unsigned number,
- const char *text, const char *auxText)
-: MessageType(severity, module, number, text, auxText)
-{
-}
-
-MessageType1L::MessageType1L(Severity severity, unsigned module, unsigned number,
- const char *text, const char *auxText)
-: MessageType(severity, module, number, text, auxText)
-{
-}
-
-OpenElementInfo::OpenElementInfo()
-: included(0), matchIndex(0)
-{
-}
-
-Message::Message()
-{
-}
-
-Message::Message(int nArgs)
-: args(nArgs)
-{
-}
-
-void Message::swap(Message &to)
-{
- const MessageType *tem = type;
- type = to.type;
- to.type = tem;
- to.loc.swap(loc);
- to.auxLoc.swap(auxLoc);
- args.swap(to.args);
- openElementInfo.swap(to.openElementInfo);
-}
-
-Messenger::Messenger()
-: haveNextLocation_(0)
-{
-}
-
-Messenger::~Messenger()
-{
-}
-
-void Messenger::dispatchMessage(Message &msg)
-{
- const Message &tem = msg;
- dispatchMessage(tem);
-}
-
-void Messenger::message(const MessageType0 &type)
-{
- Message msg(0);
- doInitMessage(msg);
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType1 &type, const MessageArg &arg0)
-{
- Message msg(1);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType2 &type,
- const MessageArg &arg0,
- const MessageArg &arg1)
-{
- Message msg(2);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.args[1] = arg1.copy();
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType3 &type,
- const MessageArg &arg0,
- const MessageArg &arg1,
- const MessageArg &arg2)
-{
- Message msg(3);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.args[1] = arg1.copy();
- msg.args[2] = arg2.copy();
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType4 &type,
- const MessageArg &arg0,
- const MessageArg &arg1,
- const MessageArg &arg2,
- const MessageArg &arg3)
-{
- Message msg(4);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.args[1] = arg1.copy();
- msg.args[2] = arg2.copy();
- msg.args[3] = arg3.copy();
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType5 &type,
- const MessageArg &arg0,
- const MessageArg &arg1,
- const MessageArg &arg2,
- const MessageArg &arg3,
- const MessageArg &arg4)
-{
- Message msg(5);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.args[1] = arg1.copy();
- msg.args[2] = arg2.copy();
- msg.args[3] = arg3.copy();
- msg.args[4] = arg4.copy();
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType6 &type,
- const MessageArg &arg0,
- const MessageArg &arg1,
- const MessageArg &arg2,
- const MessageArg &arg3,
- const MessageArg &arg4,
- const MessageArg &arg5)
-{
- Message msg(6);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.args[1] = arg1.copy();
- msg.args[2] = arg2.copy();
- msg.args[3] = arg3.copy();
- msg.args[4] = arg4.copy();
- msg.args[5] = arg5.copy();
- msg.type = &type;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType0L &type, const Location &loc)
-{
- Message msg(0);
- doInitMessage(msg);
- msg.type = &type;
- msg.auxLoc = loc;
- dispatchMessage(msg);
-}
-
-void Messenger::message(const MessageType1L &type, const MessageArg &arg0,
- const Location &loc)
-{
- Message msg(1);
- doInitMessage(msg);
- msg.args[0] = arg0.copy();
- msg.type = &type;
- msg.auxLoc = loc;
- dispatchMessage(msg);
-}
-
-
-void Messenger::setNextLocation(const Location &loc)
-{
- haveNextLocation_ = 1;
- nextLocation_ = loc;
-}
-
-void Messenger::initMessage(Message &)
-{
-}
-
-void Messenger::doInitMessage(Message &msg)
-{
- initMessage(msg);
- if (haveNextLocation_) {
- msg.loc = nextLocation_;
- haveNextLocation_ = 0;
- }
-}
-
-ForwardingMessenger::ForwardingMessenger(Messenger &to)
-: to_(&to)
-{
-}
-
-void ForwardingMessenger::dispatchMessage(Message &msg)
-{
- to_->dispatchMessage(msg);
-}
-
-void ForwardingMessenger::dispatchMessage(const Message &msg)
-{
- to_->dispatchMessage(msg);
-}
-
-void ForwardingMessenger::initMessage(Message &msg)
-{
- to_->initMessage(msg);
-}
-
-ParentLocationMessenger::ParentLocationMessenger(Messenger &mgr)
-: ForwardingMessenger(mgr)
-{
-}
-
-void ParentLocationMessenger::initMessage(Message &msg)
-{
- ForwardingMessenger::initMessage(msg);
- if (!msg.loc.origin().isNull())
- msg.loc = msg.loc.origin()->parent();
-}
-
-NullMessenger::NullMessenger()
-{
-}
-
-void NullMessenger::dispatchMessage(const Message &)
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageArg.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageArg.cxx
deleted file mode 100644
index fa9c85b548..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageArg.cxx
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "MessageArg.h"
-#include "MessageBuilder.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-MessageArg::MessageArg()
-{
-}
-
-MessageArg::~MessageArg()
-{
-}
-
-StringMessageArg::StringMessageArg(const StringC &s)
-: s_(s)
-{
-}
-
-MessageArg *StringMessageArg::copy() const
-{
- return new StringMessageArg(*this);
-}
-
-void StringMessageArg::append(MessageBuilder &builder) const
-{
- builder.appendChars(s_.data(), s_.size());
-}
-
-NumberMessageArg::NumberMessageArg(unsigned long n)
-: n_(n)
-{
-}
-
-MessageArg *NumberMessageArg::copy() const
-{
- return new NumberMessageArg(*this);
-}
-
-void NumberMessageArg::append(MessageBuilder &builder) const
-{
- builder.appendNumber(n_);
-}
-
-
-OrdinalMessageArg::OrdinalMessageArg(unsigned long n)
-: n_(n)
-{
-}
-
-MessageArg *OrdinalMessageArg::copy() const
-{
- return new OrdinalMessageArg(*this);
-}
-
-void OrdinalMessageArg::append(MessageBuilder &builder) const
-{
- builder.appendOrdinal(n_);
-}
-
-RTTI_DEF0(OtherMessageArg)
-
-OtherMessageArg::OtherMessageArg()
-{
-}
-
-void OtherMessageArg::append(MessageBuilder &builder) const
-{
- builder.appendOther(this);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageEventHandler.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageEventHandler.cxx
deleted file mode 100644
index e4cc21cff3..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageEventHandler.cxx
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "MessageEventHandler.h"
-#include "SgmlParser.h"
-#include "ParserOptions.h"
-#ifdef __GNUG__
-#include "Entity.h"
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-MessageEventHandler::MessageEventHandler(Messenger *messenger,
- const SgmlParser *parser)
-: messenger_(messenger), parser_(parser)
-{
-}
-
-void MessageEventHandler::subdocEntity(SubdocEntityEvent *event)
-{
- const SubdocEntity *entity = event->entity();
- if (entity && parser_) {
- SgmlParser::Params params;
- params.subdocReferenced = 1;
- params.subdocInheritActiveLinkTypes = 1;
- params.origin = event->entityOrigin()->copy();
- params.parent = parser_;
- params.sysid = entity->externalId().effectiveSystemId();
- params.entityType = SgmlParser::Params::subdoc;
- SgmlParser parser(params);
- const SgmlParser *oldParser = parser_;
- parser_ = &parser;
- parser.parseAll(*this);
- parser_ = oldParser;
- }
- delete event;
-}
-
-void MessageEventHandler::message(MessageEvent *event)
-{
- messenger_->dispatchMessage(event->message());
- ErrorCountEventHandler::message(event);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatter.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatter.cxx
deleted file mode 100644
index e07cc1abf1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatter.cxx
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (c) 1994, 1995, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "MessageFormatter.h"
-#include "OutputCharStream.h"
-#include "rtti.h"
-#include "MessageArg.h"
-#include "ErrnoMessageArg.h"
-#include "SearchResultMessageArg.h"
-#include "MessageFormatterMessages.h"
-
-#include <string.h>
-#include <errno.h>
-
-#ifdef DECLARE_STRERROR
-extern "C" {
- char *strerror(int);
-}
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-MessageFormatter::MessageFormatter()
-{
-}
-
-void MessageFormatter::formatOpenElements(const Vector<OpenElementInfo> &openElementInfo,
- OutputCharStream &os)
-{
- unsigned nOpenElements = openElementInfo.size();
- for (unsigned i = 0;; i++) {
- if (i > 0
- && (i == nOpenElements || openElementInfo[i].included)) {
- // describe last match in previous open element
- const OpenElementInfo &prevInfo = openElementInfo[i - 1];
- if (prevInfo.matchType.size() != 0) {
- os << " (" << prevInfo.matchType;
- if (prevInfo.matchIndex != 0)
- os << '[' << (unsigned long)prevInfo.matchIndex << ']';
- os << ')';
- }
- }
- if (i == nOpenElements)
- break;
- const OpenElementInfo &e = openElementInfo[i];
- os << ' ' << e.gi;
- if (i > 0 && !e.included) {
- unsigned long n = openElementInfo[i - 1].matchIndex;
- if (n != 0)
- os << '[' << n << ']';
- }
- }
-}
-
-void MessageFormatter::formatMessage(const MessageFragment &frag,
- const Vector<CopyOwner<MessageArg> > &args,
- OutputCharStream &os)
-{
- StringC text;
- if (!getMessageText(frag, text)) {
- formatFragment(MessageFormatterMessages::invalidMessage, os);
- return;
- }
- Builder builder(this, os, text.size() == 2);
- size_t i = 0;
- while (i < text.size()) {
- if (text[i] == '%') {
- i++;
- if (i >= text.size())
- break;
- if (text[i] >= '1' && text[i] <= '9') {
- if (unsigned(text[i] - '1') < args.size())
- args[text[i] - '1']->append(builder);
- }
- else
- os.put(text[i]);
- i++;
- }
- else {
- os.put(text[i]);
- i++;
- }
- }
-}
-
-Boolean MessageFormatter::formatFragment(const MessageFragment &frag,
- OutputCharStream &os)
-{
- StringC text;
- if (!getMessageText(frag, text))
- return 0;
- os << text;
- return 1;
-}
-
-void MessageFormatter::Builder::appendNumber(unsigned long n)
-{
- os() << n;
-}
-
-void MessageFormatter::Builder::appendOrdinal(unsigned long n)
-{
- os() << n;
- switch (n % 10) {
- case 1:
- appendFragment(MessageFormatterMessages::ordinal1);
- break;
- case 2:
- appendFragment(MessageFormatterMessages::ordinal2);
- break;
- case 3:
- appendFragment(MessageFormatterMessages::ordinal3);
- break;
- default:
- appendFragment(MessageFormatterMessages::ordinaln);
- break;
- }
-}
-
-void MessageFormatter::Builder::appendChars(const Char *p, size_t n)
-{
- if (argIsCompleteMessage_)
- os().write(p, n);
- else
- os().put('"').write(p, n).put('"');
-}
-
-void MessageFormatter::Builder::appendOther(const OtherMessageArg *p)
-{
- const ErrnoMessageArg *ea = DYNAMIC_CAST_CONST_PTR(ErrnoMessageArg, p);
-
- if (ea) {
- os() << strerror(ea->errnum());
- return;
- }
-
- const SearchResultMessageArg *sr
- = DYNAMIC_CAST_CONST_PTR(SearchResultMessageArg, p);
- if (sr) {
- for (size_t i = 0; i < sr->nTried(); i++) {
- if (i > 0)
- os() << ", ";
- const StringC &f = sr->filename(i);
- appendChars(f.data(), f.size());
- switch (sr->errnum(i)) {
- default:
- os() << " (";
- os() << strerror(sr->errnum(i));
- os() << ")";
-#ifdef ENOENT
- case ENOENT:
-#endif
- break;
- }
- }
- return;
- }
- appendFragment(MessageFormatterMessages::invalidArgumentType);
-}
-
-void MessageFormatter::Builder::appendFragment(const MessageFragment &frag)
-{
- formatter_->formatFragment(frag, os());
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatterMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatterMessages.h
deleted file mode 100644
index 9f62407145..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageFormatterMessages.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// This file was automatically generated from lib\MessageFormatterMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct MessageFormatterMessages {
- // 5100
- static const MessageFragment ordinal1;
- // 5101
- static const MessageFragment ordinal2;
- // 5102
- static const MessageFragment ordinal3;
- // 5103
- static const MessageFragment ordinaln;
- // 5104
- static const MessageFragment invalidArgumentType;
- // 5105
- static const MessageFragment invalidMessage;
-};
-const MessageFragment MessageFormatterMessages::ordinal1(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5100
-#ifndef SP_NO_MESSAGE_TEXT
-,"st"
-#endif
-);
-const MessageFragment MessageFormatterMessages::ordinal2(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5101
-#ifndef SP_NO_MESSAGE_TEXT
-,"nd"
-#endif
-);
-const MessageFragment MessageFormatterMessages::ordinal3(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5102
-#ifndef SP_NO_MESSAGE_TEXT
-,"rd"
-#endif
-);
-const MessageFragment MessageFormatterMessages::ordinaln(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5103
-#ifndef SP_NO_MESSAGE_TEXT
-,"th"
-#endif
-);
-const MessageFragment MessageFormatterMessages::invalidArgumentType(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5104
-#ifndef SP_NO_MESSAGE_TEXT
-,"(invalid argument type)"
-#endif
-);
-const MessageFragment MessageFormatterMessages::invalidMessage(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5105
-#ifndef SP_NO_MESSAGE_TEXT
-,"(invalid message)"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporter.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporter.cxx
deleted file mode 100644
index 68e62e1655..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporter.cxx
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "MessageReporter.h"
-#include "MessageReporterMessages.h"
-#include "ExtendEntityManager.h"
-#include "StorageManager.h"
-#include "macros.h"
-
-#include <string.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const OutputCharStream::Newline nl = OutputCharStream::newline;
-
-MessageReporter::MessageReporter(OutputCharStream *os)
-: os_(os), options_(0)
-{
-}
-
-MessageReporter::~MessageReporter()
-{
- delete os_;
-}
-
-void MessageReporter::setMessageStream(OutputCharStream *os)
-{
- if (os != os_) {
- delete os_;
- os_ = os;
- }
-}
-
-void MessageReporter::addOption(Option option)
-{
- options_ |= option;
-}
-
-void MessageReporter::dispatchMessage(const Message &message)
-{
- Offset off;
- const ExternalInfo *externalInfo = locationHeader(message.loc, off);
- if (programName_.size())
- os() << programName_ << ':';
- if (externalInfo) {
- printLocation(externalInfo, off);
- os() << ':';
- }
- if (options_ & messageNumbers)
- os() << (unsigned long)message.type->module() << "."
- << (unsigned long)message.type->number() << ":";
- switch (message.type->severity()) {
- case MessageType::info:
- formatFragment(MessageReporterMessages::infoTag, os());
- break;
- case MessageType::warning:
- formatFragment(MessageReporterMessages::warningTag, os());
- break;
- case MessageType::quantityError:
- formatFragment(MessageReporterMessages::quantityErrorTag, os());
- break;
- case MessageType::idrefError:
- formatFragment(MessageReporterMessages::idrefErrorTag, os());
- break;
- case MessageType::error:
- formatFragment(MessageReporterMessages::errorTag, os());
- break;
- default:
- CANNOT_HAPPEN();
- }
- os() << ": ";
- formatMessage(*message.type, message.args, os());
- os() << nl;
- if (!message.auxLoc.origin().isNull()) {
- Offset off;
- const ExternalInfo *externalInfo = locationHeader(message.auxLoc, off);
- if (programName_.size())
- os() << programName_ << ':';
- if (externalInfo) {
- printLocation(externalInfo, off);
- os() << ": ";
- }
- formatMessage(message.type->auxFragment(), message.args, os());
- os() << nl;
- }
- if ((options_ & openElements) && message.openElementInfo.size() > 0) {
- if (programName_.size())
- os() << programName_ << ':';
- if (externalInfo) {
- printLocation(externalInfo, off);
- os() << ": ";
- }
- formatFragment(MessageReporterMessages::openElements, os());
- os() << ':';
- formatOpenElements(message.openElementInfo, os());
- os() << nl;
- }
- os().flush();
-}
-
-// Note this is written so as not to change any reference counts.
-
-const ExternalInfo *MessageReporter::locationHeader(const Location &loc,
- Offset &off)
-{
- return locationHeader(loc.origin().pointer(), loc.index(), off);
-}
-
-const ExternalInfo *MessageReporter::locationHeader(const Origin *origin,
- Index index,
- Offset &off)
-{
- if (!(options_ & openEntities)) {
- while (origin) {
- const ExternalInfo *externalInfo = origin->externalInfo();
- if (externalInfo) {
- off = origin->startOffset(index);
- return externalInfo;
- }
- const Location &loc = origin->parent();
- if (loc.origin().isNull()) {
- if (!origin->defLocation(origin->startOffset(index), origin, index))
- break;
- }
- else {
- index = loc.index() + origin->refLength();
- origin = loc.origin().pointer();
- }
- }
- }
- else {
- Boolean doneHeader = 0;
- while (origin) {
- if (origin->entityName() || origin->parent().origin().isNull()) {
- if (!doneHeader) {
- Offset parentOff;
- const Location &parentLoc = origin->parent();
- const ExternalInfo *parentInfo
- = locationHeader(parentLoc.origin().pointer(),
- parentLoc.index() + origin->refLength(),
- parentOff);
- if (parentInfo) {
- StringC text;
- if (getMessageText(origin->entityName()
- ? MessageReporterMessages::inNamedEntity
- : MessageReporterMessages::inUnnamedEntity,
- text)) {
- for (size_t i = 0; i < text.size(); i++) {
- if (text[i] == '%') {
- if (i + 1 < text.size()) {
- i++;
- if (text[i] == '1')
- os() << *origin->entityName();
- else if (text[i] == '2')
- printLocation(parentInfo, parentOff);
- else if (text[i] >= '3' && text[i] <= '9')
- ;
- else
- os().put(text[i]);
- }
- }
- else
- os().put(text[i]);
- }
- os() << nl;
- }
- }
- doneHeader = 1;
- }
- off = origin->startOffset(index);
- const ExternalInfo *externalInfo = origin->externalInfo();
- if (externalInfo)
- return externalInfo;
- if (!origin->defLocation(off, origin, index))
- break;
- }
- else {
- const Location &loc = origin->parent();
- index = loc.index() + origin->refLength();
- origin = loc.origin().pointer();
- }
- }
- }
- return 0;
-}
-
-void MessageReporter::printLocation(const ExternalInfo *externalInfo,
- Offset off)
-{
- if (!externalInfo) {
- formatFragment(MessageReporterMessages::invalidLocation, os());
- return;
- }
- StorageObjectLocation soLoc;
- if (!ExtendEntityManager::externalize(externalInfo, off, soLoc)) {
- formatFragment(MessageReporterMessages::invalidLocation, os());
- return;
- }
- if (strcmp(soLoc.storageObjectSpec->storageManager->type(), "OSFILE") != 0)
- os() << '<' << soLoc.storageObjectSpec->storageManager->type() << '>';
- os() << soLoc.actualStorageId;
- if (soLoc.lineNumber == (unsigned long)-1) {
- os() << ": ";
- formatFragment(MessageReporterMessages::offset, os());
- os() << soLoc.storageObjectOffset;
- }
- else {
- os() << ':' << soLoc.lineNumber;
- if (soLoc.columnNumber != 0 && soLoc.columnNumber != (unsigned long)-1)
- os() << ':' << soLoc.columnNumber - 1;
- }
-#if 0
- if (soLoc.byteIndex != (unsigned long)-1)
- os() << ':' << soLoc.byteIndex;
-#endif
-}
-
-Boolean MessageReporter::getMessageText(const MessageFragment &frag,
- StringC &str)
-{
- const char *p = frag.text();
- if (!p)
- return 0;
- str.resize(0);
- for (; *p; p++)
- str += Char((unsigned char)*p);
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporterMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporterMessages.h
deleted file mode 100644
index 7f6977c119..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageReporterMessages.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// This file was automatically generated from lib\MessageReporterMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct MessageReporterMessages {
- // 5000
- static const MessageFragment infoTag;
- // 5001
- static const MessageFragment warningTag;
- // 5002
- static const MessageFragment quantityErrorTag;
- // 5003
- static const MessageFragment idrefErrorTag;
- // 5004
- static const MessageFragment errorTag;
- // 5005
- static const MessageFragment openElements;
- // 5006
- static const MessageFragment inNamedEntity;
- // 5007
- static const MessageFragment inUnnamedEntity;
- // 5008
- static const MessageFragment invalidLocation;
- // 5009
- static const MessageFragment offset;
-};
-const MessageFragment MessageReporterMessages::infoTag(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5000
-#ifndef SP_NO_MESSAGE_TEXT
-,"I"
-#endif
-);
-const MessageFragment MessageReporterMessages::warningTag(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5001
-#ifndef SP_NO_MESSAGE_TEXT
-,"W"
-#endif
-);
-const MessageFragment MessageReporterMessages::quantityErrorTag(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5002
-#ifndef SP_NO_MESSAGE_TEXT
-,"Q"
-#endif
-);
-const MessageFragment MessageReporterMessages::idrefErrorTag(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5003
-#ifndef SP_NO_MESSAGE_TEXT
-,"X"
-#endif
-);
-const MessageFragment MessageReporterMessages::errorTag(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5004
-#ifndef SP_NO_MESSAGE_TEXT
-,"E"
-#endif
-);
-const MessageFragment MessageReporterMessages::openElements(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5005
-#ifndef SP_NO_MESSAGE_TEXT
-,"open elements"
-#endif
-);
-const MessageFragment MessageReporterMessages::inNamedEntity(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5006
-#ifndef SP_NO_MESSAGE_TEXT
-,"In entity %1 included from %2"
-#endif
-);
-const MessageFragment MessageReporterMessages::inUnnamedEntity(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5007
-#ifndef SP_NO_MESSAGE_TEXT
-,"In entity included from %2"
-#endif
-);
-const MessageFragment MessageReporterMessages::invalidLocation(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5008
-#ifndef SP_NO_MESSAGE_TEXT
-,"(invalid location)"
-#endif
-);
-const MessageFragment MessageReporterMessages::offset(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5009
-#ifndef SP_NO_MESSAGE_TEXT
-,"offset "
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageTable.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageTable.cxx
deleted file mode 100644
index 41a41a9296..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/MessageTable.cxx
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "MessageTable.h"
-
-#ifdef SP_NO_MESSAGE_TEXT
-
-// Windows only
-
-#define STRICT
-#include "windows.h"
-static HINSTANCE dllInstanceHandle = NULL;
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class WinMessageTable : public MessageTable {
-public:
- Boolean getText(const MessageFragment &,
- String<SP_TCHAR> &) const;
-
-};
-
-Boolean WinMessageTable::getText(const MessageFragment &frag,
- String<SP_TCHAR> &str) const
-{
- static const int bufSize = 4096;
- SP_TCHAR buf[bufSize];
-#ifdef SP_WIDE_SYSTEM
- int len = LoadStringW(frag.module() == MessageFragment::libModule
- ? dllInstanceHandle
- : 0,
- frag.number(),
- buf,
- bufSize);
- if (len == 0 && GetLastError() != 0) {
- char bufmb[bufSize*2];
- len = LoadStringA(frag.module() == MessageFragment::libModule
- ? dllInstanceHandle
- : 0,
- frag.number(),
- bufmb,
- bufSize*2);
- if (len != 0) {
- len = MultiByteToWideChar(CP_ACP, 0, bufmb, len, buf, bufSize);
- if (len == 0 && GetLastError() != 0)
- return 0;
- }
- else if (GetLastError() != 0)
- return 0;
- }
-#else /* not SP_WIDE_SYSTEM */
- int len = LoadStringA(frag.module() == MessageFragment::libModule
- ? dllInstanceHandle
- : 0,
- frag.number(),
- buf,
- bufSize);
- if (len == 0 && GetLastError() != 0)
- return 0;
-#endif /* not SP_WIDE_SYSTEM */
- if (len == 0) {
- str.resize(0);
- return 1;
- }
- str.assign(buf, len);
- return 1;
-}
-
-const MessageTable *MessageTable::instance()
-{
- if (!instance_)
- instance_ = new WinMessageTable;
- return instance_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#ifdef SP_USE_DLL
-extern "C"
-BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID)
-{
- if (reason == DLL_PROCESS_ATTACH)
- dllInstanceHandle = inst;
- return TRUE;
-}
-#endif
-
-#else /* not SP_NO_MESSAGE_TEXT */
-
-#ifdef SP_HAVE_GETTEXT
-extern "C" {
-extern char *dgettext(const char *, const char *);
-extern char *gettext(const char *);
-extern char *textdomain(const char *);
-extern char *bindtextdomain(const char *, const char *);
-}
-
-#include <stdlib.h>
-
-#ifndef MESSAGE_DOMAIN
-#define MESSAGE_DOMAIN "sp"
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class GettextMessageTable : public MessageTable {
-public:
- GettextMessageTable();
- Boolean getText(const MessageFragment &, String<SP_TCHAR> &) const;
-
-};
-
-GettextMessageTable::GettextMessageTable()
-{
- const char *dir = getenv("TEXTDOMAINDIR");
- if (dir)
- bindtextdomain(MESSAGE_DOMAIN, dir);
-}
-
-Boolean GettextMessageTable::getText(const MessageFragment &frag,
- String<SP_TCHAR> &str) const
-{
- const char *s = frag.text();
- if (!s)
- return 0;
- s = dgettext(MESSAGE_DOMAIN, s);
- if (!s)
- return 0;
- str.assign(s, strlen(s));
- return 1;
-}
-
-const MessageTable *MessageTable::instance()
-{
- if (!instance_)
- instance_ = new GettextMessageTable;
- return instance_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_HAVE_GETTEXT */
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class DefaultMessageTable : public MessageTable {
-public:
- Boolean getText(const MessageFragment &, String<SP_TCHAR> &) const;
-};
-
-Boolean DefaultMessageTable::getText(const MessageFragment &frag,
- String<SP_TCHAR> &str) const
-{
- if (!frag.text())
- return 0;
- str.resize(0);
- for (const char *s = frag.text(); *s; s++)
- str += SP_TCHAR((unsigned char)*s);
- return 1;
-}
-
-const MessageTable *MessageTable::instance()
-{
- if (!instance_)
- instance_ = new DefaultMessageTable;
- return instance_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SP_HAVE_GETTEXT */
-
-#endif /* not SP_NO_MESSAGE_TEXT */
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-MessageTable *MessageTable::instance_ = 0;
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.cxx
deleted file mode 100644
index f1fa39153f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.cxx
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include <limits.h>
-#include <stdlib.h>
-#include "macros.h"
-#include "types.h"
-#include "Syntax.h"
-#include "token.h"
-#include "Sd.h"
-#include "Mode.h"
-#include "ModeInfo.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const unsigned REQUIRE_EMPTY_STARTTAG = 01;
-const unsigned REQUIRE_EMPTY_ENDTAG = 02;
-const unsigned REQUIRE_CONCUR = 04;
-const unsigned REQUIRE_LINK_OR_CONCUR = 010;
-const unsigned REQUIRE_NOT_KEEPRSRE = 020;
-const unsigned REQUIRE_FLAGS = 037;
-
-#define ULONG_BIT (CHAR_BIT * sizeof(unsigned long))
-
-struct PackedTokenInfo {
- Token token; // token to be returned
- unsigned flags;
- unsigned char contents[2]; // components of the delimiter or d-i-c
- unsigned char modes[25]; // list of modes in which it is recognized,
- // terminated by EOM
- // a bit vector computed from modes (lo to hi)
- unsigned long modeBits[(nModes + ULONG_BIT - 1)/ULONG_BIT];
- void computeModeBits();
- Boolean inMode(Mode mode) const;
-};
-
-const unsigned char SET = Syntax::nDelimGeneral;
-const unsigned char FUNCTION = SET + Syntax::nSet;
-const unsigned char NOTHING = UCHAR_MAX;
-
-const unsigned char EOM = 255; // end of modes
-
-static PackedTokenInfo tokenTable[] = {
- // Delimiters and delimiters in context
- { tokenAnd, 0, { Syntax::dAND, NOTHING }, { grpMode, EOM }},
- { tokenCom, 0, { Syntax::dCOM, NOTHING },
- { mdMode, mdMinusMode, mdPeroMode, sdMode, comMode, sdcomMode, EOM }},
- { tokenCroDigit, 0, { Syntax::dCRO, SET + Syntax::digit },
- { econMode, mconMode, rcconMode, econnetMode, mconnetMode, rcconnetMode,
- rcconeMode, plitMode, plitaMode, pliteMode, sdplitMode, sdplitaMode,
- alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode, rcmsMode, EOM }},
- { tokenCroNameStart, 0, { Syntax::dCRO, SET + Syntax::nameStart },
- { econMode, mconMode, rcconMode, econnetMode, mconnetMode, rcconnetMode,
- rcconeMode, plitMode, plitaMode, pliteMode, sdplitMode, sdplitaMode,
- alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode, rcmsMode, EOM }},
- { tokenDsc, 0, { Syntax::dDSC, NOTHING },
- { /* mdMode, */ asMode, dsMode, EOM }},
- { tokenDso, 0, { Syntax::dDSO, NOTHING }, { mdMode, EOM }},
- { tokenDtgc, 0, { Syntax::dDTGC, NOTHING }, { grpMode, EOM }},
- { tokenDtgo, 0, { Syntax::dDTGO, NOTHING }, { grpMode, EOM }},
- { tokenEroNameStart, 0, { Syntax::dERO, SET + Syntax::nameStart },
- { econMode, mconMode, rcconMode, econnetMode, mconnetMode, rcconnetMode,
- rcconeMode, alitMode, alitaMode, aliteMode, talitMode, talitaMode,
- taliteMode, rcmsMode, EOM }},
- { tokenEroGrpo, REQUIRE_LINK_OR_CONCUR, { Syntax::dERO, Syntax::dGRPO },
- { econMode, mconMode, rcconMode, econnetMode, mconnetMode, rcconnetMode,
- rcconeMode, alitMode, alitaMode, aliteMode, talitMode, talitaMode,
- taliteMode, rcmsMode, EOM }},
- { tokenEtago, 0, { Syntax::dETAGO, NOTHING }, { tagMode, EOM }},
- { tokenEtagoNameStart, 0, { Syntax::dETAGO, SET + Syntax::nameStart },
- { econMode, mconMode, cconMode, rcconMode,
- econnetMode, mconnetMode, cconnetMode, rcconnetMode, EOM }},
- { tokenEtagoTagc, REQUIRE_EMPTY_ENDTAG, { Syntax::dETAGO, Syntax::dTAGC },
- { econMode, mconMode, cconMode, rcconMode,
- econnetMode, mconnetMode, cconnetMode, rcconnetMode, EOM }},
- { tokenEtagoGrpo, REQUIRE_CONCUR, { Syntax::dETAGO, Syntax::dGRPO },
- { econMode, mconMode, cconMode, rcconMode,
- econnetMode, mconnetMode, cconnetMode, rcconnetMode, EOM }},
- { tokenGrpc, 0, { Syntax::dGRPC, NOTHING }, { grpMode, EOM }},
- { tokenGrpo, 0, { Syntax::dGRPO, NOTHING },
- { mdMode, mdMinusMode, grpMode, EOM }},
- { tokenHcroHexDigit, 0, { Syntax::dHCRO, SET + Syntax::hexDigit },
- { econMode, mconMode, rcconMode, econnetMode, mconnetMode, rcconnetMode,
- rcconeMode, plitMode, plitaMode, pliteMode,
- alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode, rcmsMode, EOM }},
- { tokenLit, 0, { Syntax::dLIT, NOTHING },
- { alitMode, talitMode, plitMode, sdplitMode, mlitMode, slitMode, sdslitMode,
- asMode, tagMode, mdMode, sdMode, grpMode, EOM }},
- { tokenLita, 0, { Syntax::dLITA, NOTHING },
- { alitaMode, talitaMode, plitaMode, sdplitaMode, mlitaMode, slitaMode, sdslitaMode,
- asMode, tagMode, mdMode, sdMode, grpMode, EOM }},
- { tokenMdc, 0, { Syntax::dMDC, NOTHING }, { mdMode, sdMode, EOM }},
- { tokenMdoNameStart, 0, { Syntax::dMDO, SET + Syntax::nameStart },
- { econMode, mconMode, econnetMode, mconnetMode,
- proMode, dsMode, dsiMode, EOM }},
- { tokenMdoMdc, 0, { Syntax::dMDO, Syntax::dMDC },
- { econMode, mconMode, econnetMode, mconnetMode,
- proMode, dsMode, dsiMode, EOM }},
- { tokenMdoCom, 0, { Syntax::dMDO, Syntax::dCOM },
- { econMode, mconMode, econnetMode, mconnetMode,
- proMode, dsMode, dsiMode, EOM }},
- { tokenMdoDso, 0, { Syntax::dMDO, Syntax::dDSO },
- { econMode, mconMode, econnetMode, mconnetMode,
- dsMode, dsiMode, imsMode, EOM }},
- { tokenMinus, 0, { Syntax::dMINUS, NOTHING }, { mdMinusMode, sdMode, EOM }},
- { tokenMinusGrpo, 0, { Syntax::dMINUS, Syntax::dGRPO }, { mdMode, EOM }},
- { tokenMscMdc, 0, { Syntax::dMSC, Syntax::dMDC},
- { imsMode, cmsMode, rcmsMode,
- econMode, mconMode, econnetMode, mconnetMode, dsMode, dsiMode, EOM }},
- { tokenNestc, 0, { Syntax::dNESTC, NOTHING }, { tagMode, EOM }},
- { tokenNet, 0, { Syntax::dNET, NOTHING },
- { econnetMode, mconnetMode, cconnetMode, rcconnetMode, EOM }},
- { tokenOpt, 0, { Syntax::dOPT, NOTHING }, { grpMode, grpsufMode, EOM }},
- { tokenOr, 0, { Syntax::dOR, NOTHING }, { grpMode, EOM }},
- { tokenPero, 0, { Syntax::dPERO, NOTHING }, { mdPeroMode, EOM }},
- { tokenPeroNameStart, 0, { Syntax::dPERO, SET + Syntax::nameStart }, {
- mdMode, mdMinusMode, mdPeroMode, dsMode, dsiMode, grpMode,
- plitMode, plitaMode, pliteMode, sdplitMode, sdplitaMode, EOM }},
- { tokenPeroGrpo, REQUIRE_LINK_OR_CONCUR, { Syntax::dPERO, Syntax::dGRPO },
- { mdMode, mdMinusMode, mdPeroMode, dsMode, dsiMode, grpMode,
- plitMode, plitaMode, pliteMode, sdplitMode, sdplitaMode, EOM }},
- { tokenPic, 0, { Syntax::dPIC, NOTHING }, { piMode, EOM }},
- { tokenPio, 0, { Syntax::dPIO, NOTHING },
- { econMode, mconMode, econnetMode, mconnetMode, proMode,
- dsMode, dsiMode, EOM }},
- { tokenPlus, 0, { Syntax::dPLUS, NOTHING }, { grpMode, grpsufMode, EOM }},
- { tokenPlusGrpo, 0, { Syntax::dPLUS, Syntax::dGRPO }, { mdMode, EOM }},
- { tokenRefc, 0, { Syntax::dREFC, NOTHING }, { refMode, EOM }},
- { tokenRep, 0, { Syntax::dREP, NOTHING }, { grpMode, grpsufMode, EOM }},
- { tokenRni, 0, { Syntax::dRNI, NOTHING },
- { grpMode, mdMode, mdPeroMode, EOM }},
- { tokenSeq, 0, { Syntax::dSEQ, NOTHING }, { grpMode, EOM }},
- { tokenStago, 0, { Syntax::dSTAGO, NOTHING }, { tagMode, EOM }},
- { tokenStagoNameStart, 0, { Syntax::dSTAGO, SET + Syntax::nameStart },
- { econMode, mconMode, econnetMode, mconnetMode, EOM }},
- { tokenStagoTagc, REQUIRE_EMPTY_STARTTAG, { Syntax::dSTAGO, Syntax::dTAGC },
- { econMode, mconMode, econnetMode, mconnetMode, EOM }},
- { tokenStagoGrpo, REQUIRE_CONCUR, { Syntax::dSTAGO, Syntax::dGRPO },
- { econMode, mconMode, econnetMode, mconnetMode, EOM }},
- { tokenTagc, 0, { Syntax::dTAGC, NOTHING }, { tagMode, EOM }},
- { tokenVi, 0, { Syntax::dVI, NOTHING }, { tagMode, asMode, EOM }},
- // Other tokens
- { tokenRe, REQUIRE_NOT_KEEPRSRE, { FUNCTION + Syntax::fRE, NOTHING },
- { mconMode, cconMode, rcconMode,
- mconnetMode, cconnetMode, rcconnetMode,
- rcconeMode, cmsMode, rcmsMode, EOM }},
- { tokenRe, 0, { FUNCTION + Syntax::fRE, NOTHING },
- { refMode,
- mlitMode, mlitaMode, alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode,
- EOM }},
- { tokenRs, REQUIRE_NOT_KEEPRSRE, { FUNCTION + Syntax::fRS, NOTHING },
- { mconMode, cconMode, rcconMode,
- mconnetMode, cconnetMode, rcconnetMode,
- rcconeMode, cmsMode, rcmsMode, EOM }},
- { tokenRs, 0, { FUNCTION + Syntax::fRS, NOTHING },
- { mlitMode, mlitaMode, alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode,
- EOM }},
- { tokenSpace, 0, { FUNCTION + Syntax::fSPACE, NOTHING },
- { mlitMode, mlitaMode, talitMode, talitaMode, taliteMode, EOM }},
- { tokenSepchar, 0, { SET + Syntax::sepchar, NOTHING },
- { alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode, EOM }},
- { tokenS, 0, { SET + Syntax::s, NOTHING },
- { econMode, econnetMode, grpMode, mdMode, mdMinusMode, mdPeroMode, sdMode,
- proMode, dsMode, dsiMode, asMode, tagMode, EOM }},
- { tokenNameStart, 0, { SET + Syntax::nameStart, NOTHING },
- { grpMode, mdMode, mdMinusMode, mdPeroMode, sdMode,
- asMode, tagMode, EOM }},
- { tokenDigit, 0, { SET + Syntax::digit, NOTHING },
- { grpMode, mdMode, mdMinusMode, sdMode, asMode, tagMode, EOM }},
- { tokenLcUcNmchar, 0, { SET + Syntax::nmchar, NOTHING },
- { grpMode, mdMode, asMode, tagMode, EOM }},
- { tokenIgnoredChar, 0, { SET + Syntax::sgmlChar, NOTHING },
- { imsMode, EOM }},
- { tokenChar, 0, { SET + Syntax::sgmlChar, NOTHING },
- // Note that character data is recognized in element content,
- // and will cause #PCDATA to begin.
- { alitMode, alitaMode, aliteMode,
- talitMode, talitaMode, taliteMode,
- comMode, piMode,
- cmsMode, rcmsMode,
- plitMode, plitaMode, pliteMode,
- slitMode, slitaMode,
- econMode, mconMode, cconMode, rcconMode,
- econnetMode, mconnetMode, cconnetMode, rcconnetMode, rcconeMode, EOM }},
- { tokenChar, 0, { SET + Syntax::minimumData, NOTHING },
- { mlitMode, mlitaMode, EOM }},
- { tokenChar, 0, { SET + Syntax::significant, NOTHING },
- { sdplitMode, sdplitaMode, sdslitMode, sdslitaMode, sdcomMode, EOM }},
-};
-
-inline Boolean PackedTokenInfo::inMode(Mode mode) const
-{
- return ((modeBits[unsigned(mode) / ULONG_BIT]
- & ((unsigned long)1 << (unsigned(mode) % ULONG_BIT)))
- != 0);
-}
-
-void PackedTokenInfo::computeModeBits()
-{
- for (unsigned char *p = modes; *p != EOM; p++)
- modeBits[*p / ULONG_BIT] |= (unsigned long)1 << (*p % ULONG_BIT);
-}
-
-struct TokenTableIniter {
- TokenTableIniter();
-};
-
-static TokenTableIniter tokenTableIniter;
-
-TokenTableIniter::TokenTableIniter()
-{
- for (size_t i = 0; i < SIZEOF(tokenTable); i++)
- tokenTable[i].computeModeBits();
-}
-
-ModeInfo::ModeInfo(Mode mode, const Sd &sd)
-: mode_(mode), p_(tokenTable), count_(SIZEOF(tokenTable)),
- missingRequirements_(REQUIRE_FLAGS)
-{
- if (sd.startTagEmpty())
- missingRequirements_ &= ~REQUIRE_EMPTY_STARTTAG;
- if (sd.endTagEmpty())
- missingRequirements_ &= ~REQUIRE_EMPTY_ENDTAG;
- if (sd.concur())
- missingRequirements_ &= ~(REQUIRE_CONCUR|REQUIRE_LINK_OR_CONCUR);
- if (sd.link())
- missingRequirements_ &= ~REQUIRE_LINK_OR_CONCUR;
- if (!sd.keeprsre())
- missingRequirements_ &= ~REQUIRE_NOT_KEEPRSRE;
-}
-
-Boolean ModeInfo::nextToken(TokenInfo *t)
-{
- for (; count_ > 0; --count_, ++p_)
- if (p_->inMode(mode_) && (p_->flags & missingRequirements_) == 0) {
- t->token = p_->token;
- t->priority = Priority::delim;
- const unsigned char *contents = p_->contents;
- --count_;
- ++p_;
- unsigned char c = contents[0];
- if (c < SET)
- t->delim1 = Syntax::DelimGeneral(c);
- else if (c < SET + Syntax::nSet) {
- t->set = Syntax::Set(c - SET);
- t->type = TokenInfo::setType;
- switch (t->set) {
- case Syntax::sepchar:
- case Syntax::s:
- case Syntax::blank:
- t->priority = Priority::function;
- break;
- default:
- t->priority = Priority::data;
- break;
- }
- return 1;
- }
- else {
- t->function = Syntax::StandardFunction(c - FUNCTION);
- t->priority = Priority::function;
- t->type = TokenInfo::functionType;
- return 1;
- }
- c = contents[1];
- if (c == NOTHING) {
- t->type = TokenInfo::delimType;
- return 1;
- }
- if (c < SET) {
- t->delim2 = Syntax::DelimGeneral(c);
- t->type = TokenInfo::delimDelimType;
- return 1;
- }
- if (c < SET + Syntax::nSet) {
- t->set = Syntax::Set(c - SET);
- t->type = TokenInfo::delimSetType;
- return 1;
- }
- abort();
- }
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.h
deleted file mode 100644
index 5e8d34ad90..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ModeInfo.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _MODEINFO_H
-#define _MODEINFO_H
-
-#ifndef ModeInfo_INCLUDED
-#define ModeInfo_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stdlib.h>
-#include "Boolean.h"
-#include "Syntax.h"
-#include "Mode.h"
-#include "Priority.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct TokenInfo {
- enum Type {
- delimType,
- setType,
- functionType,
- delimDelimType,
- delimSetType
- };
- Type type;
- Priority::Type priority;
- Token token;
- Syntax::DelimGeneral delim1;
- union {
- Syntax::DelimGeneral delim2;
- Syntax::Set set;
- Syntax::StandardFunction function;
- };
-};
-
-class Sd;
-struct PackedTokenInfo;
-
-class ModeInfo {
-public:
- ModeInfo(Mode mode, const Sd &sd);
- Boolean nextToken(TokenInfo *);
- Boolean includesShortref() const;
-private:
- Mode mode_;
- const PackedTokenInfo *p_; // points to next
- size_t count_;
- unsigned missingRequirements_;
-};
-
-inline Boolean ModeInfo::includesShortref() const
-{
- return (mode_ >= (enum Mode) minShortrefMode);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ModeInfo_INCLUDED */
-
-#endif /* _MODEINFO_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Mutex.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Mutex.h
deleted file mode 100644
index 2991904965..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Mutex.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file copying.txt for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Mutex_INCLUDED
-#define Mutex_INCLUDED 1
-
-#ifdef SP_MUTEX_WIN32
-#define SP_MUTEX
-
-#define STRICT 1
-#include <windows.h>
-// <windows.h> appears to turn these warnings back on
-#ifdef _MSC_VER
-#pragma warning ( disable : 4237 )
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Mutex {
-public:
- class Lock {
- public:
- Lock(Mutex *mp) : mp_(mp) {
- if (mp) ::EnterCriticalSection(&mp->cs_);
- }
- ~Lock() {
- if (mp_) ::LeaveCriticalSection(&mp_->cs_);
- }
- private:
- Mutex *mp_;
- };
- Mutex() {
- ::InitializeCriticalSection(&cs_);
- }
- ~Mutex() {
- ::DeleteCriticalSection(&cs_);
- }
- friend class Lock;
-private:
- CRITICAL_SECTION cs_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MUTEX_WIN32 */
-
-#ifdef SP_MUTEX_MACH
-#define SP_MUTEX
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MUTEX_MACH */
-
-#ifndef SP_MUTEX
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Mutex {
-public:
- class Lock {
- public:
- Lock(Mutex *) { }
- };
- Mutex() { }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SP_MUTEX */
-
-#endif /* not Mutex_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/NameToken.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/NameToken.h
deleted file mode 100644
index 73b115275d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/NameToken.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef NameToken_INCLUDED
-#define NameToken_INCLUDED 1
-
-#include "Location.h"
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct NameToken {
- StringC name;
- StringC origName;
- Location loc;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NameToken_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Notation.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Notation.cxx
deleted file mode 100644
index 49faa0bc5c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Notation.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Notation.h"
-#include "ParserState.h"
-#include "Sd.h"
-#include "Syntax.h"
-#include "MessageArg.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Notation::Notation(const StringC &name,
- const ConstPtr<StringResource<Char> > &dtdName,
- Boolean dtdIsBase)
-: EntityDecl(name, notation, ndata, Location()), defined_(0)
-{
- setDeclIn(dtdName, dtdIsBase);
-}
-
-void Notation::setExternalId(const ExternalId &id, const Location &defLocation)
-{
- externalId_ = id;
- defined_ = 1;
- setDefLocation(defLocation);
-}
-
-void Notation::generateSystemId(ParserState &parser)
-{
- StringC str;
- if (parser.entityCatalog().lookup(*this,
- parser.syntax(),
- parser.sd().docCharset(),
- parser.messenger(),
- str))
- externalId_.setEffectiveSystem(str);
- else if (parser.options().warnNotationSystemId)
- parser.message(ParserMessages::cannotGenerateSystemIdNotation,
- StringMessageArg(name()));
-}
-
-const StringC *Notation::systemIdPointer() const
-{
- return externalId_.systemIdString();
-}
-
-const StringC *Notation::publicIdPointer() const
-{
- return externalId_.publicIdString();
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/NotationStorage.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/NotationStorage.cxx
deleted file mode 100644
index 098bd74908..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/NotationStorage.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "NotationStorage.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-NotationStorageManager::NotationStorageManager(const char *type)
-: type_(type)
-{
-}
-
-Boolean NotationStorageManager::inheritable() const
-{
- return 0;
-}
-
-const char *NotationStorageManager::type() const
-{
- return type_;
-}
-
-StorageObject *NotationStorageManager::makeStorageObject(const StringC &,
- const StringC &,
- Boolean,
- Boolean,
- Messenger &,
- StringC &)
-{
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.cxx
deleted file mode 100644
index a3ac2d302b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "NumericCharRefOrigin.h"
-#include "Markup.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-NumericCharRefOrigin::NumericCharRefOrigin(const Location &start,
- Index refLength,
- Owner<Markup> &markup)
-: start_(start), refLength_(refLength)
-{
- markup.swap(markup_);
-}
-
-const Location &NumericCharRefOrigin::parent() const
-{
- return start_;
-}
-
-Index NumericCharRefOrigin::refLength() const
-{
- return refLength_;
-}
-
-Boolean NumericCharRefOrigin::isNumericCharRef(const Markup *&markup) const
-{
- markup = markup_.pointer();
- return 1;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.h
deleted file mode 100644
index f46f59a239..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/NumericCharRefOrigin.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef NumericCharRefOrigin_INCLUDED
-#define NumericCharRefOrigin_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Location.h"
-#include "Markup.h"
-#include "Owner.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class NumericCharRefOrigin : public Origin {
-public:
- NumericCharRefOrigin(const Location &start, Index endIndex,
- Owner<Markup> &markup);
- const Location &parent() const;
- Index refLength() const;
- Boolean isNumericCharRef(const Markup *&) const;
-private:
- NumericCharRefOrigin(const NumericCharRefOrigin &); // undefined
- void operator=(const NumericCharRefOrigin &); // undefined
- Location start_;
- Index refLength_;
- Owner<Markup> markup_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not NumericCharRefOrigin_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.cxx
deleted file mode 100644
index 77493a1190..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.cxx
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "OffsetOrderedList.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-OffsetOrderedList::OffsetOrderedList()
-: blockUsed_(OffsetOrderedListBlock::size)
-{
-}
-
-void OffsetOrderedList::append(Offset offset)
-{
- // At any position in the list there's a current offset.
- // The offset is initially zero.
- // A byte of 255 says add 255 to the current offset.
- // A byte B < 255, says that there's an item in the list whose
- // offset is the current offset + B, and that B + 1 should be
- // added to the current offset.
- Offset curOffset = blocks_.size() > 0 ? blocks_.back()->offset : 0;
- ASSERT(offset >= curOffset);
- Offset count = offset - curOffset;
- while (count >= 255) {
- addByte(255);
- count -= 255;
- }
- addByte(count);
-}
-
-void OffsetOrderedList::addByte(unsigned char b)
-{
- if (blockUsed_ >= OffsetOrderedListBlock::size) {
- Mutex::Lock lock(&mutex_);
- blocks_.resize(blocks_.size() + 1);
- Owner<OffsetOrderedListBlock> &last = blocks_.back();
- last = new OffsetOrderedListBlock;
- if (blocks_.size() == 1) {
- last->nextIndex = 0;
- last->offset = 0;
- }
- else {
- OffsetOrderedListBlock &lastButOne = *blocks_[blocks_.size() - 2];
- last->nextIndex = lastButOne.nextIndex;
- last->offset = lastButOne.offset;
- }
- blockUsed_ = 0;
- }
- blocks_.back()->bytes[blockUsed_] = b;
- if (b == 255)
- blocks_.back()->offset += 255;
- else {
- blocks_.back()->offset += b + 1;
- blocks_.back()->nextIndex += 1;
- }
- blockUsed_++;
-}
-
-// Find the last offset <= off.
-
-Boolean OffsetOrderedList::findPreceding(Offset off,
- size_t &foundIndex,
- Offset &foundOffset) const
-{
- Mutex::Lock lock(&((OffsetOrderedList *)this)->mutex_);
- // Invariant:
- // blocks with index < i have offset <= off
- // blocks with index >= lim have offset > off
- size_t i = 0;
- size_t lim = blocks_.size();
- // Most commonly we'll want to know the about positions near the end,
- // so optimize this case.
- if (lim > 0 && blocks_[lim - 1]->offset <= off)
- i = lim;
- else if (lim > 1 && blocks_[lim - 2]->offset <= off)
- i = lim - 1;
- else {
- // Do a binary search.
- while (i < lim) {
- size_t mid = i + (lim - i)/2;
- if (blocks_[mid]->offset > off)
- lim = mid;
- else
- i = mid + 1;
- }
- }
- if (i == blocks_.size()) {
- if (i == 0)
- return 0;
- foundIndex = blocks_.back()->nextIndex - 1;
- foundOffset = blocks_.back()->offset - 1;
- return 1;
- }
- // Note that an item with offset X can only occur in a block with offset > X
- // i is now the first block with offset > off
- Offset curOff = blocks_[i]->offset;
- size_t curIndex = blocks_[i]->nextIndex;
- const unsigned char *bytes = blocks_[i]->bytes;
- int j = (i == blocks_.size() - 1
- ? blockUsed_
- : int(OffsetOrderedListBlock::size));
- for (;;) {
- j--;
- if (bytes[j] != 255) {
- curIndex -= 1;
- curOff -= 1;
- if (curOff <= off)
- break;
- }
- curOff -= bytes[j];
- if (j == 0) {
- if (i == 0)
- return 0;
- i--;
- j = OffsetOrderedListBlock::size;
- curOff = blocks_[i]->offset;
- curIndex = blocks_[i]->nextIndex;
- bytes = blocks_[i]->bytes;
- }
- }
- foundIndex = curIndex;
- foundOffset = curOff;
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.h
deleted file mode 100644
index fca40b407f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OffsetOrderedList.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OffsetOrderedList_INCLUDED
-#define OffsetOrderedList_INCLUDED 1
-
-#include "types.h"
-#include "Owner.h"
-#include "NCVector.h"
-#include "Boolean.h"
-#include "Mutex.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct OffsetOrderedListBlock {
- Offset offset; // next Offset
- size_t nextIndex; // index of first item in next block
- enum { size = 200 };
- unsigned char bytes[size];
-};
-
-// This is an ordered list of Offsets with no duplicates.
-
-class OffsetOrderedList {
-public:
- OffsetOrderedList();
- // off must be > the last offset added.
- void append(Offset off);
- // Find the last offset in the list <= off.
- Boolean findPreceding(Offset off, size_t &foundIndex, Offset &foundOffset)
- const;
- size_t size() const;
-private:
- OffsetOrderedList(const OffsetOrderedList &); // undefined
- void operator=(const OffsetOrderedList &); // undefined
- void addByte(unsigned char b);
- // bytes used in current block
- int blockUsed_;
- NCVector<Owner<OffsetOrderedListBlock> > blocks_;
- Mutex mutex_;
-};
-
-inline
-size_t OffsetOrderedList::size() const
-{
- return blocks_.size() == 0 ? 0 : blocks_.back()->nextIndex;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OffsetOrderedList_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OpenElement.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/OpenElement.cxx
deleted file mode 100644
index f89428a04e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OpenElement.cxx
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "OpenElement.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-OpenElement::OpenElement(const ElementType *type,
- Boolean net,
- Boolean included,
- const ShortReferenceMap *map,
- const Location &startLocation)
-: elementType_(type),
- netEnabling_(net),
- included_(included),
- matchState_(type->definition()->compiledModelGroup()),
- map_(map),
- startLocation_(startLocation),
- declaredContent_(type->definition()->declaredContent())
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputByteStream.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputByteStream.cxx
deleted file mode 100644
index f9d3daa707..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputByteStream.cxx
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "OutputByteStream.h"
-
-#include <sys/types.h>
-
-#ifdef SP_INCLUDE_IO_H
-#include <io.h> // for open, fstat, lseek, read prototypes
-#endif
-
-#ifdef SP_INCLUDE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef SP_INCLUDE_OSFCN_H
-#include <osfcn.h>
-#endif
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-
-#ifdef SP_WIDE_SYSTEM
-#define STRICT
-#include <windows.h>
-#endif
-
-#ifndef O_CREAT
-#ifdef _O_CREAT
-#define O_CREAT _O_CREAT
-#endif
-#endif
-
-#ifndef O_WRONLY
-#ifdef _O_WRONLY
-#define O_WRONLY _O_WRONLY
-#endif
-#endif
-
-#ifndef O_TRUNC
-#ifdef _O_TRUNC
-#define O_TRUNC _O_TRUNC
-#endif
-#endif
-
-#ifndef O_BINARY
-#ifdef _O_BINARY
-#define O_BINARY _O_BINARY
-#else
-#define O_BINARY 0
-#endif
-#endif
-
-#ifndef S_IRUSR
-#if defined(S_IREAD)
-#define S_IRUSR S_IREAD
-#elif defined(_S_IREAD)
-#define S_IRUSR _S_IREAD
-#else
-#define S_IRUSR 0400
-#endif
-#endif
-
-#ifndef S_IWUSR
-#if defined(S_IWRITE)
-#define S_IWUSR S_IWRITE
-#elif defined(_S_IWRITE)
-#define S_IWUSR _S_IWRITE
-#else
-#define S_IWUSR 0200
-#endif
-#endif
-
-#ifndef S_IRGRP
-#if defined(S_IREAD)
-#define S_IRGRP S_IREAD
-#elif defined(_S_IREAD)
-#define S_IRGRP _S_IREAD
-#else
-#define S_IRGRP 0040
-#endif
-#endif
-
-#ifndef S_IWGRP
-#if defined(S_IWRITE)
-#define S_IWGRP S_IWRITE
-#elif defined(_S_IWRITE)
-#define S_IWGRP _S_IWRITE
-#else
-#define S_IWGRP 0020
-#endif
-#endif
-
-#ifndef S_IROTH
-#if defined(S_IREAD)
-#define S_IROTH S_IREAD
-#elif defined(_S_IREAD)
-#define S_IROTH _S_IREAD
-#else
-#define S_IROTH 0004
-#endif
-#endif
-
-#ifndef S_IWOTH
-#if defined(S_IWRITE)
-#define S_IWOTH S_IWRITE
-#elif defined(_S_IWRITE)
-#define S_IWOTH _S_IWRITE
-#else
-#define S_IWOTH 0002
-#endif
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const int openFlags = O_CREAT|O_WRONLY|O_TRUNC|O_BINARY;
-const int protMode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
-const int bufSize = 8192;
-
-OutputByteStream::OutputByteStream()
-: ptr_(0), end_(0)
-{
-}
-
-OutputByteStream::~OutputByteStream()
-{
-}
-
-void OutputByteStream::sputn(const char *s, size_t n)
-{
- for (; n > 0; n--, s++)
- sputc(*s);
-}
-
-OutputByteStream &OutputByteStream::operator<<(long n)
-{
- char buf[32];
- sprintf(buf, "%ld", n);
- return *this << buf;
-}
-
-OutputByteStream &OutputByteStream::operator<<(unsigned long n)
-{
- char buf[32];
- sprintf(buf, "%lu", n);
- return *this << buf;
-}
-
-OutputByteStream &OutputByteStream::operator<<(const char *s)
-{
- while (*s)
- sputc(*s++);
- return *this;
-}
-
-StrOutputByteStream::StrOutputByteStream()
-{
-}
-
-void StrOutputByteStream::extractString(String<char> &str)
-{
- if (ptr_)
- buf_.resize(ptr_ - &buf_[0]);
- str.resize(0);
- buf_.swap(str);
- ptr_ = end_ = 0;
-}
-
-void StrOutputByteStream::flush()
-{
-}
-
-void StrOutputByteStream::flushBuf(char c)
-{
- if (!ptr_) {
- buf_.resize(16);
- ptr_ = &buf_[0];
- }
- else {
- size_t i = ptr_ - &buf_[0];
- buf_.resize(buf_.size()*2);
- ptr_ = &buf_[0] + i;
- }
- end_ = &buf_[0] + buf_.size();
- *ptr_++ = c;
-}
-
-FileOutputByteStream::FileOutputByteStream()
-: fd_(-1)
-{
-}
-
-FileOutputByteStream::FileOutputByteStream(int fd, Boolean closeFd)
-: fd_(-1)
-{
- attach(fd, closeFd);
-}
-
-FileOutputByteStream::~FileOutputByteStream()
-{
- close();
-}
-
-#ifdef SP_WIDE_SYSTEM
-
-Boolean FileOutputByteStream::open(const wchar_t *filename)
-{
- int fd = _wopen(filename, openFlags, protMode);
- if (fd >= 0)
- return attach(fd);
- // _wopen will always fail on Windows 95
- String<char> buf;
- int len = WideCharToMultiByte(CP_ACP, 0, filename, -1, 0, 0, 0, 0);
- buf.resize(len + 1);
- WideCharToMultiByte(CP_ACP, 0, filename, -1, buf.begin(), len, 0, 0);
- buf[len] = '\0';
- return attach(::open(buf.data(), openFlags, protMode));
-}
-
-#else /* not SP_WIDE_SYSTEM */
-
-Boolean FileOutputByteStream::open(const char *filename)
-{
- return attach(::open(filename, openFlags, protMode));
-}
-
-#endif /* not SP_WIDE_SYSTEM */
-
-Boolean FileOutputByteStream::attach(int fd, Boolean closeFd)
-{
- close();
- fd_ = fd;
- closeFd_ = closeFd;
- return fd_ >= 0;
-}
-
-Boolean FileOutputByteStream::close()
-{
- if (fd_ < 0)
- return 0;
- flush();
- int fd = fd_;
- fd_ = -1;
- if (!closeFd_)
- return 1;
- return ::close(fd) == 0;
-}
-
-void FileOutputByteStream::flush()
-{
- if (!buf_.size()) {
- if (fd_ < 0)
- return;
- buf_.resize(bufSize);
- ptr_ = &buf_[0];
- end_ = ptr_ + buf_.size();
- }
- size_t n = ptr_ - &buf_[0];
- const char *s = buf_.data();
- while (n > 0) {
- int nw = ::write(fd_, s, n);
- if (nw < 0)
- break;
- n -= nw;
- s += nw;
- }
- ptr_ = &buf_[0];
-}
-
-void FileOutputByteStream::flushBuf(char c)
-{
- flush();
- *ptr_++ = c;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputCharStream.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputCharStream.cxx
deleted file mode 100644
index dc47c112d5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputCharStream.cxx
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "OutputCharStream.h"
-#include "CodingSystem.h"
-#include "macros.h"
-#include <stdio.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-OutputCharStream::OutputCharStream()
-: ptr_(0), end_(0)
-{
-}
-
-OutputCharStream::~OutputCharStream()
-{
-}
-
-void OutputCharStream::setEscaper(Escaper)
-{
-}
-
-OutputCharStream &OutputCharStream::write(const Char *s, size_t n)
-{
- for (;;) {
- size_t spare = end_ - ptr_;
- if (n <= spare) {
- memcpy(ptr_, s, n*sizeof(Char));
- ptr_ += n;
- break;
- }
- if (spare > 0) {
- memcpy(ptr_, s, spare*sizeof(Char));
- ptr_ += spare;
- s += spare;
- n -= spare;
- }
- n--;
- flushBuf(*s++);
- }
- return *this;
-}
-
-OutputCharStream &OutputCharStream::operator<<(const char *s)
-{
- while (*s)
- put(*s++);
- return *this;
-}
-
-// FIXME Avoid stdio
-
-OutputCharStream &OutputCharStream::operator<<(unsigned long n)
-{
- char buf[sizeof(unsigned long)*3 + 1];
- sprintf(buf, "%lu", n);
- return *this << buf;
-}
-
-OutputCharStream &OutputCharStream::operator<<(int n)
-{
- char buf[sizeof(int)*3 + 2];
- sprintf(buf, "%d", n);
- return *this << buf;
-}
-
-EncodeOutputCharStream::EncodeOutputCharStream()
-: buf_(0), byteStream_(0), escaper_(0)
-{
-}
-
-EncodeOutputCharStream::EncodeOutputCharStream(OutputByteStream *byteStream,
- const OutputCodingSystem *codingSystem)
-: buf_(0),
- byteStream_(byteStream),
- escaper_(0),
- ownedEncoder_(codingSystem->makeEncoder())
-{
- encoder_ = ownedEncoder_.pointer();
- encoder_->setUnencodableHandler(this);
- allocBuf(codingSystem->fixedBytesPerChar());
- encoder_->startFile(byteStream_);
-}
-
-EncodeOutputCharStream::EncodeOutputCharStream(OutputByteStream *byteStream,
- Encoder *encoder)
-: buf_(0),
- byteStream_(byteStream),
- escaper_(0),
- encoder_(encoder)
-{
- allocBuf(0);
-}
-
-EncodeOutputCharStream::~EncodeOutputCharStream()
-{
- if (byteStream_)
- flush();
- delete [] buf_;
-}
-
-void EncodeOutputCharStream::open(OutputByteStream *byteStream,
- const OutputCodingSystem *codingSystem)
-{
- if (byteStream_)
- flush();
- byteStream_ = byteStream;
- ownedEncoder_ = codingSystem->makeEncoder();
- encoder_ = ownedEncoder_.pointer();
- encoder_->setUnencodableHandler(this);
- delete [] buf_;
- buf_ = 0;
- ptr_ = end_ = buf_;
- allocBuf(codingSystem->fixedBytesPerChar());
- encoder_->startFile(byteStream_);
-}
-
-void EncodeOutputCharStream::flush()
-{
- if (ptr_ > buf_) {
- encoder_->output(buf_, ptr_ - buf_, byteStream_);
- ptr_ = buf_;
- }
- byteStream_->flush();
-}
-
-void EncodeOutputCharStream::flushBuf(Char c)
-{
- ASSERT(buf_ != 0);
- encoder_->output(buf_, ptr_ - buf_, byteStream_);
- ptr_ = buf_;
- *ptr_++ = c;
-}
-
-void EncodeOutputCharStream::allocBuf(int bytesPerChar)
-{
- const int blockSize = 1024;
- size_t bufSize = bytesPerChar ? blockSize/bytesPerChar : blockSize;
- ptr_ = buf_ = new Char[bufSize];
- end_ = buf_ + bufSize;
-}
-
-void EncodeOutputCharStream::setEscaper(Escaper f)
-{
- escaper_ = f;
-}
-
-void EncodeOutputCharStream::handleUnencodable(Char c, OutputByteStream *)
-{
- EncodeOutputCharStream tem(byteStream_, encoder_);
- if (escaper_)
- (*escaper_)(tem, c);
-}
-
-StrOutputCharStream::StrOutputCharStream()
-: buf_(0), bufSize_(0)
-{
- sync(0);
-}
-
-StrOutputCharStream::~StrOutputCharStream()
-{
- delete [] buf_;
-}
-
-void StrOutputCharStream::extractString(StringC &str)
-{
- str.assign(buf_, ptr_ - buf_);
- sync(0);
-}
-
-void StrOutputCharStream::flushBuf(Char c)
-{
- size_t used = ptr_ - buf_;
- size_t oldSize = bufSize_;
- bufSize_ = oldSize ? 2*oldSize : 10;
- Char *oldBuf = buf_;
- buf_ = new Char[bufSize_];
- if (oldSize) {
- memcpy(buf_, oldBuf, oldSize * sizeof(Char));
- delete [] oldBuf;
- }
- sync(used);
- *ptr_++ = c;
-}
-
-void StrOutputCharStream::flush()
-{
-}
-
-void StrOutputCharStream::sync(size_t length)
-{
- ptr_ = buf_ + length;
- end_ = buf_ + bufSize_;
-}
-
-RecordOutputCharStream::RecordOutputCharStream(OutputCharStream *os)
-: os_(os)
-{
- ptr_ = buf_;
- end_ = buf_ + bufSize_;
-}
-
-RecordOutputCharStream::~RecordOutputCharStream()
-{
- outputBuf();
- delete os_;
-}
-
-void RecordOutputCharStream::setEscaper(Escaper f)
-{
- os_->setEscaper(f);
-}
-
-void RecordOutputCharStream::flush()
-{
- outputBuf();
- os_->flush();
-}
-
-void RecordOutputCharStream::flushBuf(Char c)
-{
- outputBuf();
- *ptr_++ = c;
-}
-
-void RecordOutputCharStream::outputBuf()
-{
- Char *start = buf_;
- Char *p = start;
- while (p < ptr_) {
- switch (*p) {
- case '\r': // translate RE to newline
- if (start < p)
- os_->write(start, p - start);
- start = ++p;
- *os_ << newline;
- break;
- case '\n': // ignore RS
- if (start < p)
- os_->write(start, p - start);
- start = ++p;
- break;
- default:
- ++p;
- break;
- }
- }
- if (start < p)
- os_->write(start, p - start);
- ptr_ = buf_;
- end_ = buf_ + bufSize_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.cxx
deleted file mode 100644
index de2010cf58..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "OutputState.h"
-#include "Event.h"
-#include "Allocator.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-OutputState::OutputState()
-{
- init();
-}
-
-void OutputState::init()
-{
- nextSerial_ = 0;
- stack_.clear();
- stack_.insert(new OutputStateLevel);
-}
-
-OutputStateLevel::OutputStateLevel()
-: state(OutputState::afterStartTag)
-{
-}
-
-void OutputState::handleRe(EventHandler &handler, Allocator &alloc,
- const EventsWanted &eventsWanted, Char re,
- const Location &location)
-{
- re_ = re;
- if (eventsWanted.wantInstanceMarkup())
- handler.reOrigin(new (alloc) ReOriginEvent(re_, location, nextSerial_));
- switch (top().state) {
- case afterStartTag:
- // it's the first RE in the element
- if (eventsWanted.wantInstanceMarkup())
- handler.ignoredRe(new (alloc) IgnoredReEvent(re_, location, nextSerial_++));
- top().state = afterRsOrRe;
- break;
- case afterRsOrRe:
- case afterData:
- top().state = pendingAfterRsOrRe;
- top().reLocation = location;
- top().reSerial = nextSerial_++;
- break;
- case pendingAfterRsOrRe:
- // We now know that the pending RE won't be ignored as the last RE.
- handler.data(new (alloc) ReEvent(&re_, top().reLocation, top().reSerial));
- top().state = pendingAfterRsOrRe;
- top().reLocation = location;
- top().reSerial = nextSerial_++;
- break;
- case pendingAfterMarkup:
- // We've had only markup since the last RS or RE, so this
- // RE is ignored. Note that it's this RE that's ignored, not
- // the pending one.
- if (eventsWanted.wantInstanceMarkup())
- handler.ignoredRe(new (alloc) IgnoredReEvent(re_, location, nextSerial_++));
- top().state = pendingAfterRsOrRe;
- break;
- }
-}
-
-void OutputState::noteRs(EventHandler &, Allocator &, const EventsWanted &)
-{
- if (top().hasPendingRe())
- top().state = pendingAfterRsOrRe;
- else
- top().state = afterRsOrRe;
-}
-
-void OutputState::noteMarkup(EventHandler &, Allocator &, const EventsWanted &)
-{
- switch (top().state) {
- case afterRsOrRe:
- top().state = afterStartTag;
- break;
- case pendingAfterRsOrRe:
- top().state = pendingAfterMarkup;
- break;
- default:
- break; // avoid warning
- }
-}
-
-void OutputState::noteData(EventHandler &handler, Allocator &alloc,
- const EventsWanted &)
-{
- if (top().hasPendingRe())
- handler.data(new (alloc) ReEvent(&re_, top().reLocation, top().reSerial));
- top().state = afterData;
-}
-
-void OutputState::noteStartElement(Boolean included,
- EventHandler &handler, Allocator &alloc,
- const EventsWanted &)
-{
- if (included)
- stack_.insert(new OutputStateLevel);
- else {
- if (top().hasPendingRe())
- handler.data(new (alloc) ReEvent(&re_, top().reLocation, top().reSerial));
- top().state = afterStartTag;
- }
-}
-
-void OutputState::noteEndElement(Boolean included, EventHandler &handler,
- Allocator &alloc,
- const EventsWanted &eventsWanted)
-{
- if (eventsWanted.wantInstanceMarkup() && top().hasPendingRe())
- handler.ignoredRe(new (alloc) IgnoredReEvent(re_, top().reLocation,
- top().reSerial));
- if (included) {
- delete stack_.get();
- noteMarkup(handler, alloc, eventsWanted);
- }
- else
- top().state = afterData;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.h
deleted file mode 100644
index c6b84cf17a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/OutputState.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef OutputState_INCLUDED
-#define OutputState_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Location.h"
-#include "IList.h"
-#include "Link.h"
-#include "Boolean.h"
-#include "types.h"
-#include "EventsWanted.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct OutputStateLevel : public Link {
- OutputStateLevel();
- Boolean hasPendingRe() const;
- char state; // should be OutputState::State
- unsigned long reSerial;
- Location reLocation;
-};
-
-class EventHandler;
-class Allocator;
-
-class OutputState {
-public:
- OutputState();
- void init();
- void handleRe(EventHandler &, Allocator &, const EventsWanted &,
- Char, const Location &);
- void noteRs(EventHandler &, Allocator &, const EventsWanted &);
- void noteMarkup(EventHandler &, Allocator &, const EventsWanted &);
- void noteData(EventHandler &, Allocator &, const EventsWanted &);
- void noteStartElement(Boolean included,
- EventHandler &, Allocator &, const EventsWanted &);
- void noteEndElement(Boolean included,
- EventHandler &, Allocator &, const EventsWanted &);
-private:
- OutputState(const OutputState &); // undefined
- void operator=(const OutputState &); // undefined
- enum State {
- afterStartTag,
- afterRsOrRe,
- afterData,
- pendingAfterRsOrRe,
- pendingAfterMarkup
- };
- IList<OutputStateLevel> stack_;
- OutputStateLevel &top();
- Char re_;
- unsigned long nextSerial_;
- friend struct OutputStateLevel;
-};
-
-inline
-Boolean OutputStateLevel::hasPendingRe() const
-{
- return int(state) >= int(OutputState::pendingAfterRsOrRe);
-}
-
-inline
-OutputStateLevel &OutputState::top()
-{
- return *stack_.head();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not OutputState_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Param.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Param.cxx
deleted file mode 100644
index ca9efc8e0c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Param.cxx
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Param.h"
-#include "MessageBuilder.h"
-#include "macros.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-AllowedParams::AllowedParams(Param::Type p1,
- Param::Type p2,
- Param::Type p3,
- Param::Type p4,
- Param::Type p5,
- Param::Type p6,
- Param::Type p7,
- Param::Type p8,
- Param::Type p9,
- Param::Type p10)
-{
- init();
- allow(p1);
- allow(p2);
- allow(p3);
- allow(p4);
- allow(p5);
- allow(p6);
- allow(p7);
- allow(p8);
- allow(p9);
- allow(p10);
-}
-
-AllowedParams::AllowedParams(const Param::Type *v, int n)
-{
- init();
- for (int i = 0; i < n; i++)
- allow(v[i]);
-}
-
-void AllowedParams::init()
-{
- for (int i = 0; i < Syntax::nNames; i++)
- reservedNames_[i] = 0;
- mainMode_ = mdMode;
- mdc_ = 0;
- rni_ = 0;
- dso_ = 0;
- inclusions_ = 0;
- exclusions_ = 0;
- extraDelimiter_ = Param::invalid;
- group_ = Param::invalid;
- nameStart_ = Param::invalid;
- digit_ = Param::invalid;
- nmchar_ = Param::invalid;
- literal_ = Param::invalid;
-}
-
-
-void AllowedParams::allow(Param::Type p)
-{
- switch (p) {
- case Param::invalid:
- break;
- case Param::dso:
- dso_ = 1;
- break;
- case Param::mdc:
- mdc_ = 1;
- break;
- case Param::minus:
- ASSERT(mainMode_ == mdMode);
- mainMode_ = mdMinusMode;
- extraDelimiter_ = p;
- break;
- case Param::pero:
- ASSERT(mainMode_ == mdMode);
- mainMode_ = mdPeroMode;
- extraDelimiter_ = p;
- break;
- case Param::inclusions:
- inclusions_ = 1;
- break;
- case Param::exclusions:
- exclusions_ = 1;
- break;
- case Param::nameGroup:
- case Param::nameTokenGroup:
- case Param::modelGroup:
- ASSERT(group_ == Param::invalid);
- group_ = p;
- break;
- case Param::number:
- ASSERT(digit_ == Param::invalid);
- digit_ = p;
- break;
- case Param::minimumLiteral:
- case Param::tokenizedAttributeValueLiteral:
- case Param::attributeValueLiteral:
- case Param::systemIdentifier:
- case Param::paramLiteral:
- ASSERT(literal_ == Param::invalid);
- literal_ = p;
- break;
- case Param::name:
- case Param::entityName:
- case Param::paramEntityName:
- ASSERT(nameStart_ == Param::invalid);
- nameStart_ = p;
- break;
- case Param::attributeValue:
- ASSERT(nameStart_ == Param::invalid);
- nameStart_ = p;
- ASSERT(digit_ == Param::invalid);
- digit_ = p;
- ASSERT(nmchar_ == Param::invalid);
- nmchar_ = p;
- break;
- default:
- if (p < Param::indicatedReservedName) {
- ASSERT(nameStart_ == Param::invalid
- || nameStart_ == Param::reservedName);
- ASSERT(rni_ == 0);
- nameStart_ = Param::reservedName;
- reservedNames_[p - Param::reservedName] = 1;
- }
- else {
- ASSERT(nameStart_ != Param::reservedName);
- rni_ = 1;
- reservedNames_[p - Param::indicatedReservedName] = 1;
- }
- break;
- }
-}
-
-AllowedParamsMessageArg::AllowedParamsMessageArg(
- const AllowedParams &allow,
- const ConstPtr<Syntax> &syntax)
-: allow_(allow),
- syntax_(syntax)
-{
-}
-
-MessageArg *AllowedParamsMessageArg::copy() const
-{
- return new AllowedParamsMessageArg(*this);
-}
-
-void AllowedParamsMessageArg::append(MessageBuilder &builder) const
-{
- Syntax::DelimGeneral delims[3];
- int nDelims = 0;
- if (allow_.mdc())
- delims[nDelims++] = Syntax::dMDC;
- if (allow_.dso())
- delims[nDelims++] = Syntax::dDSO;
- switch (allow_.mainMode()) {
- case mdMinusMode:
- delims[nDelims++] = Syntax::dMINUS;
- break;
- case mdPeroMode:
- delims[nDelims++] = Syntax::dPERO;
- break;
- default:
- break;
- }
- Boolean first = 1;
- int i;
- for (i = 0; i < nDelims; i++) {
- if (!first)
- builder.appendFragment(ParserMessages::listSep);
- else
- first = 0;
- const StringC &delim = syntax_->delimGeneral(delims[i]);
- builder.appendFragment(ParserMessages::delimStart);
- builder.appendChars(delim.data(), delim.size());
- builder.appendFragment(ParserMessages::delimEnd);
- }
- const MessageFragment *fragment[5];
- int nFragments = 0;
- if (allow_.inclusions())
- fragment[nFragments++] = &ParserMessages::inclusions;
- if (allow_.exclusions())
- fragment[nFragments++] = &ParserMessages::exclusions;
- switch (allow_.literal()) {
- case Param::minimumLiteral:
- fragment[nFragments++] = &ParserMessages::minimumLiteral;
- break;
- case Param::attributeValueLiteral:
- case Param::tokenizedAttributeValueLiteral:
- fragment[nFragments++] = &ParserMessages::attributeValueLiteral;
- break;
- case Param::systemIdentifier:
- fragment[nFragments++] = &ParserMessages::systemIdentifier;
- break;
- case Param::paramLiteral:
- fragment[nFragments++] = &ParserMessages::parameterLiteral;
- break;
- }
- switch (allow_.nameStart()) {
- case Param::name:
- case Param::entityName:
- case Param::paramEntityName:
- fragment[nFragments++] = &ParserMessages::name;
- break;
- case Param::attributeValue:
- fragment[nFragments++] = &ParserMessages::attributeValue;
- break;
- }
- if (allow_.digit() == Param::number)
- fragment[nFragments++] = &ParserMessages::number;
-
- for (i = 0; i < nFragments; i++) {
- if (!first)
- builder.appendFragment(ParserMessages::listSep);
- else
- first = 0;
- builder.appendFragment(*fragment[i]);
- }
- if (allow_.rni() || allow_.nameStart() == Param::reservedName) {
- for (int i = 0; i < Syntax::nNames; i++) {
- if (allow_.reservedName(Syntax::ReservedName(i))) {
- if (!first)
- builder.appendFragment(ParserMessages::listSep);
- else
- first = 0;
- StringC str;
- if (allow_.rni())
- str = syntax_->delimGeneral(Syntax::dRNI);
- str += syntax_->reservedName(Syntax::ReservedName(i));
- builder.appendChars(str.data(), str.size());
- }
- }
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Param.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Param.h
deleted file mode 100644
index 6151a50073..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Param.h
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Param_INCLUDED
-#define Param_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Boolean.h"
-#include "ContentToken.h"
-#include "StringC.h"
-#include "Location.h"
-#include "MessageArg.h"
-#include "Mode.h"
-#include "NameToken.h"
-#include "Owner.h"
-#include "Ptr.h"
-#include "Syntax.h"
-#include "Text.h"
-#include "Vector.h"
-
-// This describes a markup declaration parameter.
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ElementType;
-
-class Param {
-public:
- Param() { }
- typedef unsigned char Type;
- enum {
- invalid,
- dso,
- mdc,
- minus,
- pero,
- inclusions,
- exclusions,
- nameGroup,
- nameTokenGroup,
- modelGroup,
- number,
- minimumLiteral,
- attributeValueLiteral,
- tokenizedAttributeValueLiteral,
- systemIdentifier,
- paramLiteral,
- name,
- entityName,
- paramEntityName,
- attributeValue,
- reservedName, // Syntax::ReservedName is added to this
- // this is a reserved name preceded by the RNI delimiter
- indicatedReservedName = reservedName + Syntax::nNames
- };
- enum { nTypes = indicatedReservedName + Syntax::nNames };
- Type type;
- Location startLocation;
- Text literalText;
- Boolean lita;
- Owner<ModelGroup> modelGroupPtr;
- Vector<NameToken> nameTokenVector;
- StringC token; // name nameToken; with substitution
- Vector<const ElementType *> elementVector;
-private:
- Param(const Param &); // undefined
- void operator=(const Param &); // undefined
-};
-
-class AllowedParams {
-public:
- AllowedParams(Param::Type,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid,
- Param::Type = Param::invalid);
- AllowedParams(const Param::Type *types, int nTypes);
- Mode mainMode() const;
- Boolean mdc() const;
- Boolean rni() const;
- Boolean dso() const;
- Boolean inclusions() const;
- Boolean exclusions() const;
- Boolean reservedName(Syntax::ReservedName) const;
- Param::Type group() const;
- Param::Type nameStart() const;
- Param::Type digit() const;
- Param::Type nmchar() const;
- Param::Type literal() const;
-private:
- void init();
- void allow(Param::Type);
- PackedBoolean mdc_;
- PackedBoolean rni_;
- PackedBoolean dso_;
- PackedBoolean inclusions_;
- PackedBoolean exclusions_;
- // invalid, minus, pero
- Param::Type extraDelimiter_;
- // invalid, nameGroup, nameTokenGroup, modelGroup
- Param::Type group_;
- // invalid, reservedName, name, entityName, paramEntityName, attributeValue
- Param::Type nameStart_;
- // invalid, number, attributeValue
- Param::Type digit_;
- // invalid, attributeValue
- Param::Type nmchar_; // LCNMCHAR or UCNMCHAR
- // invalid, minimumLiteral, systemIdentifier, paramLiteral,
- // (tokenized)attributeValueLiteral
- Param::Type literal_;
- PackedBoolean reservedNames_[Syntax::nNames];
- Mode mainMode_; // mdMode mdMinusMode mdPeroMode
-};
-
-class MessageBuilder;
-
-class AllowedParamsMessageArg : public MessageArg {
-public:
- AllowedParamsMessageArg(const AllowedParams &allow,
- const ConstPtr<Syntax> &syntax);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- AllowedParams allow_;
- ConstPtr<Syntax> syntax_;
-};
-
-inline
-Mode AllowedParams::mainMode() const
-{
- return mainMode_;
-}
-
-inline
-Boolean AllowedParams::mdc() const
-{
- return mdc_;
-}
-
-inline
-Boolean AllowedParams::rni() const
-{
- return rni_;
-}
-
-inline
-Boolean AllowedParams::dso() const
-{
- return dso_;
-}
-
-inline
-Boolean AllowedParams::inclusions() const
-{
- return inclusions_;
-}
-
-inline
-Boolean AllowedParams::exclusions() const
-{
- return exclusions_;
-}
-
-inline
-Boolean AllowedParams::reservedName(Syntax::ReservedName i) const
-{
- return reservedNames_[i];
-}
-
-inline
-Param::Type AllowedParams::group() const
-{
- return group_;
-}
-
-inline
-Param::Type AllowedParams::nameStart() const
-{
- return nameStart_;
-}
-
-inline
-Param::Type AllowedParams::digit() const
-{
- return digit_;
-}
-
-inline
-Param::Type AllowedParams::nmchar() const
-{
- return nmchar_;
-}
-
-inline
-Param::Type AllowedParams::literal() const
-{
- return literal_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Param_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.cxx
deleted file mode 100644
index 9669371d1a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.cxx
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Parser.h"
-#include "ParserMessages.h"
-#include "constant.h"
-#include "Trie.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Parser::Parser(const SgmlParser::Params &params)
-: ParserState(params.parent
- ? params.parent->parser_->entityManagerPtr()
- : params.entityManager,
- params.options
- ? *params.options
- : params.parent->parser_->options(),
- paramsSubdocLevel(params),
- params.entityType == SgmlParser::Params::dtd
- ? declSubsetPhase
- : contentPhase)
-{
- Parser *parent = 0;
- if (params.parent)
- parent = params.parent->parser_;
- if (params.entityType == SgmlParser::Params::document) {
- Sd *sd = new Sd(entityManagerPtr());
- const ParserOptions &opt = options();
- sd->setBooleanFeature(Sd::fDATATAG, opt.datatag);
- sd->setBooleanFeature(Sd::fOMITTAG, opt.omittag);
- sd->setBooleanFeature(Sd::fRANK, opt.rank);
- sd->setShorttag(opt.shorttag);
- sd->setBooleanFeature(Sd::fEMPTYNRM, opt.emptynrm);
- sd->setNumberFeature(Sd::fSIMPLE, opt.linkSimple);
- sd->setBooleanFeature(Sd::fIMPLICIT, opt.linkImplicit);
- sd->setNumberFeature(Sd::fEXPLICIT, opt.linkExplicit);
- sd->setNumberFeature(Sd::fCONCUR, opt.concur);
- sd->setNumberFeature(Sd::fSUBDOC, opt.subdoc);
- sd->setBooleanFeature(Sd::fFORMAL, opt.formal);
- setSdOverrides(*sd);
- PublicId publicId;
- CharsetDecl docCharsetDecl;
- docCharsetDecl.addSection(publicId);
- docCharsetDecl.addRange(0, charMax > 99999999 ? 99999999 : charMax + 1, 0);
- sd->setDocCharsetDecl(docCharsetDecl);
- setSd(sd);
- }
- else if (params.sd.isNull()) {
- setSd(parent->sdPointer());
- setSyntaxes(parent->prologSyntaxPointer(),
- parent->instanceSyntaxPointer());
- }
- else {
- setSd(params.sd);
- setSyntaxes(params.prologSyntax, params.instanceSyntax);
- }
-
- // Make catalog
- StringC sysid(params.sysid);
- ConstPtr<EntityCatalog> catalog
- = entityManager().makeCatalog(sysid,
- sd().docCharset(),
- messenger());
- if (!catalog.isNull())
- setEntityCatalog(catalog);
- else if (parent)
- setEntityCatalog(parent->entityCatalogPtr());
- else {
- allDone();
- return;
- }
-
- // Set up the input stack.
- if (sysid.size() == 0) {
- allDone();
- return;
- }
- Ptr<InputSourceOrigin> origin;
- if (params.origin.isNull())
- origin = InputSourceOrigin::make();
- else
- origin = params.origin;
- pushInput(entityManager().open(sysid,
- sd().docCharset(),
- origin.pointer(),
- EntityManager::mayRewind|EntityManager::maySetDocCharset,
- messenger()));
- if (inputLevel() == 0) {
- allDone();
- return;
- }
- switch (params.entityType) {
- case SgmlParser::Params::document:
- setPhase(initPhase);
- break;
- case SgmlParser::Params::subdoc:
- if (params.subdocInheritActiveLinkTypes && parent)
- inheritActiveLinkTypes(*parent);
- if (subdocLevel() == sd().subdoc() + 1)
- message(ParserMessages::subdocLevel, NumberMessageArg(sd().subdoc()));
- setPhase(prologPhase);
- compilePrologModes();
- break;
- case SgmlParser::Params::dtd:
- compilePrologModes();
- startDtd(params.doctypeName);
- setPhase(declSubsetPhase);
- break;
- }
-}
-
-void Parser::setSdOverrides(Sd &sd)
-{
- if (options().typeValid != ParserOptions::sgmlDeclTypeValid) {
- sd.setTypeValid(options().typeValid);
- sd.setBooleanFeature(Sd::fIMPLYDEFATTLIST, !options().typeValid);
- sd.setBooleanFeature(Sd::fIMPLYDEFELEMENT, !options().typeValid);
- }
- if (options().noUnclosedTag) {
- sd.setBooleanFeature(Sd::fSTARTTAGUNCLOSED, 0);
- sd.setBooleanFeature(Sd::fENDTAGUNCLOSED, 0);
- }
- if (options().noNet)
- sd.setStartTagNetEnable(Sd::netEnableNo);
-}
-
-void Parser::giveUp()
-{
- if (subdocLevel() > 0) // FIXME might be subdoc if level == 0
- message(ParserMessages::subdocGiveUp);
- else
- message(ParserMessages::giveUp);
- allDone();
-}
-
-unsigned Parser::paramsSubdocLevel(const SgmlParser::Params &params)
-{
- if (!params.parent)
- return 0;
- unsigned n = params.parent->parser_->subdocLevel();
- if (params.subdocReferenced)
- return n + 1;
- else
- return n;
-}
-
-Event *Parser::nextEvent()
-{
- while (eventQueueEmpty()) {
- switch (phase()) {
- case noPhase:
- return 0;
- case initPhase:
- doInit();
- break;
- case prologPhase:
- doProlog();
- break;
- case declSubsetPhase:
- doDeclSubset();
- break;
- case instanceStartPhase:
- doInstanceStart();
- break;
- case contentPhase:
- doContent();
- break;
- }
- }
- return eventQueueGet();
-}
-
-void Parser::parseAll(EventHandler &handler,
- const volatile sig_atomic_t *cancelPtr)
-{
- while (!eventQueueEmpty())
- eventQueueGet()->handle(handler);
- // FIXME catch exceptions and reset handler.
- setHandler(&handler, cancelPtr);
- for (;;) {
- switch (phase()) {
- case noPhase:
- unsetHandler();
- return;
- case initPhase:
- doInit();
- break;
- case prologPhase:
- doProlog();
- break;
- case declSubsetPhase:
- doDeclSubset();
- break;
- case instanceStartPhase:
- doInstanceStart();
- break;
- case contentPhase:
- doContent();
- break;
- }
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.h
deleted file mode 100644
index e4734a4880..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Parser.h
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Parser_INCLUDED
-#define Parser_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "Attribute.h"
-#include "Attributed.h"
-#include "Boolean.h"
-#include "StringC.h"
-#include "ElementType.h"
-#include "Entity.h"
-#include "Event.h"
-#include "IList.h"
-#include "ISet.h"
-#include "Location.h"
-#include "Owner.h"
-#include "ParserState.h"
-#include "Ptr.h"
-#include "SgmlParser.h"
-#include "StringOf.h"
-#include "Undo.h"
-#include "Vector.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class AllowedParams;
-class Param;
-class ExternalId;
-class PublicId;
-class GroupToken;
-class AllowedGroupTokens;
-struct GroupConnector;
-class AllowedGroupConnectors;
-class AllowedSdParams;
-class Text;
-class AttributeList;
-class AttributeDefinition;
-class AttributeDefinitionList;
-class UnivCharsetDesc;
-class CharsetInfo;
-class CharsetDecl;
-class DeclaredValue;
-struct SdBuilder;
-struct SdParam;
-class Syntax;
-class ElementDefinition;
-class CharSwitcher;
-struct StandardSyntaxSpec;
-class Undo;
-class Decl;
-
-class Parser : private ParserState {
-public:
- Parser(const SgmlParser::Params &);
- Event *nextEvent();
- void parseAll(EventHandler &, const volatile sig_atomic_t *cancelPtr);
- ParserState::sdPointer;
- ParserState::instanceSyntaxPointer;
- ParserState::prologSyntaxPointer;
- ParserState::activateLinkType;
- ParserState::allLinkTypesActivated;
- ParserState::entityManager;
- ParserState::entityCatalog;
- ParserState::baseDtd;
- ParserState::options;
-private:
- Parser(const Parser &); // undefined
- void operator=(const Parser &); // undefined
- Boolean setStandardSyntax(Syntax &syn, const StandardSyntaxSpec &,
- const CharsetInfo &docCharset,
- CharSwitcher &,
- Boolean www);
- Boolean addRefDelimShortref(Syntax &syntax,
- const CharsetInfo &syntaxCharset,
- const CharsetInfo &docCharset,
- CharSwitcher &switcher);
- Boolean setRefDelimGeneral(Syntax &syntax,
- const CharsetInfo &syntaxCharset,
- const CharsetInfo &docCharset,
- CharSwitcher &switcher);
- void setRefNames(Syntax &syntax, const CharsetInfo &docCharset, Boolean www);
-
- void giveUp();
- void compileSdModes();
- void compilePrologModes();
- void compileInstanceModes();
- void addNeededShortrefs(Dtd &, const Syntax &);
- Boolean shortrefCanPreemptDelim(const StringC &sr,
- const StringC &d,
- Boolean dIsSr,
- const Syntax &);
- void compileModes(const Mode *modes, int n, const Dtd *);
- void compileNormalMap();
-
- void doInit();
- void doProlog();
- void doDeclSubset();
- void doInstanceStart();
- void doContent();
- void extendNameToken(size_t, const MessageType1 &);
- void extendNumber(size_t, const MessageType1 &);
- void extendHexNumber();
- void extendData();
- void extendS();
- void extendContentS();
- void declSubsetRecover(unsigned startLevel);
- void prologRecover();
- void skipDeclaration(unsigned startLevel);
- Boolean parseElementDecl();
- Boolean parseAttlistDecl();
- Boolean parseNotationDecl();
- Boolean parseEntityDecl();
- Boolean parseShortrefDecl();
- Boolean parseUsemapDecl();
- Boolean parseUselinkDecl();
- Boolean parseDoctypeDeclStart();
- Boolean parseDoctypeDeclEnd(Boolean fake = 0);
- Boolean parseMarkedSectionDeclStart();
- void handleMarkedSectionEnd();
- Boolean parseCommentDecl();
- void emptyCommentDecl();
- Boolean parseExternalId(const AllowedParams &,
- const AllowedParams &,
- Boolean,
- unsigned,
- Param &,
- ExternalId &);
- Boolean parseParam(const AllowedParams &, unsigned, Param &);
- Boolean parseMinimumLiteral(Boolean, Text &);
- Boolean parseAttributeValueLiteral(Boolean, Text &);
- Boolean parseTokenizedAttributeValueLiteral(Boolean, Text &);
- Boolean parseSystemIdentifier(Boolean, Text &);
- Boolean parseParameterLiteral(Boolean, Text &);
- Boolean parseDataTagParameterLiteral(Boolean, Text &);
- // flags for parseLiteral()
- enum {
- literalSingleSpace = 01,
- literalDataTag = 02,
- literalMinimumData = 04,
- // Keep info about delimiters
- literalDelimInfo = 010,
- // Ignore references in the literal
- literalNoProcess = 020,
- // Allow numeric character references to non-SGML characters
- literalNonSgml = 040
- };
- Boolean parseLiteral(Mode litMode, Mode liteMode, size_t maxLength,
- const MessageType1 &tooLongMessage,
- unsigned flags, Text &text);
-
- Boolean parseGroupToken(const AllowedGroupTokens &allow,
- unsigned nestingLevel,
- unsigned declInputLevel,
- unsigned groupInputLevel,
- GroupToken &gt);
- Boolean parseGroupConnector(const AllowedGroupConnectors &allow,
- unsigned declInputLevel,
- unsigned groupInputLevel,
- GroupConnector &gc);
- Boolean parseGroup(const AllowedGroupTokens &allowToken,
- unsigned declInputLevel,
- Param &parm);
- Boolean parseModelGroup(unsigned nestingLevel, unsigned declInputLevel,
- ModelGroup *&, Mode);
- Boolean parseNameGroup(unsigned declInputLevel, Param &);
- Boolean parseNameTokenGroup(unsigned declInputLevel, Param &);
- Boolean parseDataTagGroup(unsigned nestingLevel, unsigned declInputLevel,
- GroupToken &);
- Boolean parseDataTagTemplateGroup(unsigned nestingLevel,
- unsigned declInputLevel, GroupToken &);
-
- Boolean parseElementNameGroup(unsigned declInputLevel, Param &);
- Boolean parseReservedName(const AllowedParams &allow, Param &parm);
- Boolean parseIndicatedReservedName(const AllowedParams &allow, Param &parm);
- Boolean getReservedName(Syntax::ReservedName *);
- Boolean getIndicatedReservedName(Syntax::ReservedName *);
- Boolean parseAttributeValueParam(Param &parm);
- Boolean parseEntityReference(Boolean isParameter,
- int ignoreLevel,
- ConstPtr<Entity> &entity,
- Ptr<EntityOrigin> &origin);
- ContentToken::OccurrenceIndicator getOccurrenceIndicator(Mode);
- Boolean parseComment(Mode);
- Boolean parseNamedCharRef();
- Boolean parseNumericCharRef(Boolean isHex, Char &, Location &);
- Boolean translateNumericCharRef(Char &ch, Boolean &isSgmlChar);
- Boolean parseDeclarationName(Syntax::ReservedName *, Boolean allowAfdr = 0);
- void paramInvalidToken(Token, const AllowedParams &);
- void groupTokenInvalidToken(Token, const AllowedGroupTokens &);
- void groupConnectorInvalidToken(Token, const AllowedGroupConnectors &);
- ElementType *lookupCreateElement(const StringC &);
- RankStem *lookupCreateRankStem(const StringC &);
- Boolean parseExceptions(unsigned declInputLevel,
- Ptr<ElementDefinition> &def);
- void parsePcdata();
- void parseStartTag();
- ElementType *completeRankStem(const StringC &);
- void handleRankedElement(const ElementType *);
- void parseEmptyStartTag();
- void acceptPcdata(const Location &);
- void acceptStartTag(const ElementType *, StartElementEvent *,
- Boolean netEnabling);
- void handleBadStartTag(const ElementType *, StartElementEvent *,
- Boolean netEnabling);
- void undo(IList<Undo> &);
- Boolean tryStartTag(const ElementType *, StartElementEvent *,
- Boolean netEnabling, IList<Event> &);
- void checkExclusion(const ElementType *e);
- Boolean tryImplyTag(const Location &, unsigned &, unsigned &,
- IList<Undo> &, IList<Event> &);
- void pushElementCheck(const ElementType *, StartElementEvent *,
- Boolean netEnabling);
- void pushElementCheck(const ElementType *, StartElementEvent *,
- IList<Undo> &, IList<Event> &);
- void queueElementEvents(IList<Event> &);
- Boolean parseAttributeSpec(Boolean inDeclaration,
- AttributeList &,
- Boolean &netEnabling,
- Ptr<AttributeDefinitionList> &);
-
- Boolean handleAttributeNameToken(Text &text,
- AttributeList &,
- unsigned &specLength);
- struct AttributeParameter {
- enum Type {
- end,
- name,
- nameToken,
- vi,
- recoverUnquoted
- };
- };
-
- Boolean parseAttributeParameter(Boolean inDecl,
- Boolean allowVi,
- AttributeParameter::Type &result,
- Boolean &netEnabling);
- void extendUnquotedAttributeValue();
-
- Boolean parseAttributeValueSpec(Boolean inDecl,
- const StringC &name,
- AttributeList &atts,
- unsigned &specLength,
- Ptr<AttributeDefinitionList> &newAttDefList);
-
- EndElementEvent *parseEndTag();
- void parseEndTagClose();
- void parseEmptyEndTag();
- void parseNullEndTag();
- void endAllElements();
- void acceptEndTag(EndElementEvent *);
- void endTagEmptyElement(const ElementType *,
- Boolean netEnabling,
- Boolean included,
- const Location &startLoc);
- void implyCurrentElementEnd(const Location &);
- void implyEmptyElementEnd(const ElementType *, Boolean included, const Location &);
- void maybeDefineEntity(const Ptr<Entity> &entity);
- Notation *lookupCreateNotation(const StringC &name);
- Boolean parseExternalEntity(StringC &name,
- Entity::DeclType declType,
- unsigned declInputLevel,
- Param &parm);
- ShortReferenceMap *lookupCreateMap(const StringC &);
- StringC prettifyDelim(const StringC &delim);
- void handleShortref(int index);
- Boolean parseProcessingInstruction();
- Boolean parseAttributed(unsigned declInputLevel, Param &parm,
- Vector<Attributed *> &attributed,
- Boolean &isNotation);
- Boolean parseDeclaredValue(unsigned declInputLevel, Boolean isNotation,
- Param &parm, Owner<DeclaredValue> &value);
- Boolean parseDefaultValue(unsigned declInputLevel, Boolean isNotation,
- Param &parm, const StringC &attributeName,
- Owner<DeclaredValue> &declaredValue,
- Owner<AttributeDefinition> &def,
- Boolean &anyCurrent);
- Boolean reportNonSgmlCharacter();
- void endInstance();
- Boolean implySgmlDecl();
- Boolean scanForSgmlDecl(const CharsetInfo &initCharset);
- void findMissingMinimum(const CharsetInfo &charset, ISet<WideChar> &);
- Boolean parseSgmlDecl();
- Boolean sdParseSgmlDeclRef(SdBuilder &, SdParam &, ExternalId &);
- Boolean sdParseDocumentCharset(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseCapacity(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseScope(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseSyntax(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseExplicitSyntax(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseSyntaxCharset(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseShunchar(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseFunction(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseNaming(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseDelim(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseNames(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseQuantity(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseEntities(SdBuilder &sdBuilder, SdParam &parm);
- Boolean sdParseFeatures(SdBuilder &sd, SdParam &parm);
- Boolean sdParseAppinfo(SdBuilder &sd, SdParam &parm);
- Boolean sdParseSeealso(SdBuilder &sd, SdParam &parm);
- void requireWWW(SdBuilder &sdBuilder);
- Boolean parseSdParam(const AllowedSdParams &allow, SdParam &);
- Boolean parseSdParamLiteral(Boolean lita, String<SyntaxChar> &str);
- Boolean parseSdSystemIdentifier(Boolean lita, Text &);
- Boolean stringToNumber(const Char *s, size_t length, unsigned long &);
- void sdParamConvertToLiteral(SdParam &parm);
- void sdParamInvalidToken(Token token, const AllowedSdParams &);
- Boolean sdParseCharset(SdBuilder &sdBuilder, SdParam &parm,
- Boolean isDocument,
- CharsetDecl &, UnivCharsetDesc &);
- Boolean sdParseExternalCharset(Sd &, UnivCharsetDesc &desc);
- UnivChar charNameToUniv(Sd &sd, const StringC &name);
- Boolean translateSyntax(CharSwitcher &switcher,
- const CharsetInfo &syntaxCharset,
- const CharsetInfo &docCharset,
- WideChar syntaxChar,
- Char &docChar);
- Boolean translateSyntax(SdBuilder &sdBuilder,
- WideChar syntaxChar, Char &docChar);
- Boolean translateSyntax(SdBuilder &sdBuilder,
- const String<SyntaxChar> &syntaxString,
- StringC &docString);
- Boolean translateSyntaxNoSwitch(SdBuilder &sdBuilder,
- WideChar syntaxChar, Char &docChar,
- Number &count);
- Boolean translateName(SdBuilder &sdBuilder,
- const StringC &name,
- StringC &str);
- void translateRange(SdBuilder &sdBuilder, SyntaxChar start,
- SyntaxChar end, ISet<Char> &chars);
- UnivChar translateUniv(UnivChar univChar,
- CharSwitcher &switcher,
- const CharsetInfo &syntaxCharset);
- Boolean univToDescCheck(const CharsetInfo &charset, UnivChar from,
- Char &to);
- Boolean univToDescCheck(const CharsetInfo &charset, UnivChar from,
- Char &to, WideChar &count);
- void translateDocSet(const CharsetInfo &fromCharset,
- const CharsetInfo &toCharset,
- const ISet<Char> &fromSet,
- ISet<Char> &toSet);
- Boolean checkNotFunction(const Syntax &syn, Char c);
- Boolean checkGeneralDelim(const Syntax &syn, const StringC &delim);
- Boolean checkShortrefDelim(const Syntax &syn,
- const CharsetInfo &charset,
- const StringC &delim);
- Boolean checkNmchars(const ISet<Char> &set, const Syntax &syntax);
- void intersectCharSets(const ISet<Char> &s1, const ISet<Char> &s2,
- ISet<WideChar> &inter);
- Boolean checkSwitches(CharSwitcher &switcher,
- const CharsetInfo &syntaxCharset);
- Boolean checkSwitchesMarkup(CharSwitcher &switcher);
-
- const StandardSyntaxSpec *lookupSyntax(const PublicId &id);
- Boolean referencePublic(const PublicId &id, PublicId::TextClass,
- Boolean &givenError);
- void checkIdrefs();
- void checkTaglen(Index tagStartIndex);
- void checkSyntaxNamelen(const Syntax &syn);
- void checkElementAttribute(const ElementType *e, size_t checkFrom = 0);
- void checkDtd(Dtd &dtd);
- Boolean maybeStatusKeyword(const Entity &entity);
- void reportAmbiguity(const LeafContentToken *from,
- const LeafContentToken *to1,
- const LeafContentToken *to2,
- unsigned ambigAndDepth);
- Boolean parseLinktypeDeclStart();
- Boolean parseLinktypeDeclEnd();
- Boolean parseLinkDecl();
- Boolean parseIdlinkDecl();
- Boolean parseLinkSet(Boolean idlink);
- void addIdLinkRule(const StringC &id, IdLinkRule &rule);
- void addLinkRule(LinkSet *linkSet,
- const ElementType *sourceElement,
- const ConstPtr<SourceLinkRuleResource> &linkRule);
- Boolean parseResultElementSpec(unsigned declInputLevel,
- Param &parm,
- Boolean idlink,
- Boolean &implied,
- const ElementType *&resultType,
- AttributeList &attributes);
- LinkSet *lookupCreateLinkSet(const StringC &name);
- ElementType *lookupResultElementType(const StringC &name);
- void endProlog();
- Boolean parseEntityReferenceNameGroup(Boolean &ignore);
- Boolean parseTagNameGroup(Boolean &active);
- void parseGroupStartTag();
- void parseGroupEndTag();
- Boolean skipAttributeSpec();
- Boolean lookingAtStartTag(StringC &gi);
- void implyDtd(const StringC &gi);
- void findMissingTag(const ElementType *e, Vector<const ElementType *> &);
- unsigned paramsSubdocLevel(const SgmlParser::Params &);
- void addCommonAttributes(Dtd &dtd);
- Boolean parseAfdrDecl();
- void setSdOverrides(Sd &sd);
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Parser_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserApp.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserApp.cxx
deleted file mode 100644
index 1896f6eae1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserApp.cxx
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ParserApp.h"
-#include "ParserAppMessages.h"
-#include "MessageArg.h"
-#include "Location.h"
-#include "macros.h"
-#include "sptchar.h"
-#include "ArcEngine.h"
-
-#include <limits.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#ifndef DEFAULT_ERROR_LIMIT
-#define DEFAULT_ERROR_LIMIT 200
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ParserApp::ParserApp(const char *requiredInternalCode)
-: EntityApp(requiredInternalCode),
- errorLimit_(DEFAULT_ERROR_LIMIT)
-{
- registerOption('a', SP_T("link_type"));
- registerOption('A', SP_T("arch"));
- registerOption('e');
- registerOption('E', SP_T("max_errors"));
- registerOption('g');
- registerOption('i', SP_T("entity"));
- registerOption('w', SP_T("warning_type"));
-}
-
-void ParserApp::initParser(const StringC &sysid)
-{
- SgmlParser::Params params;
- params.sysid = sysid;
- params.entityManager = entityManager().pointer();
- params.options = &options_;
- parser_.init(params);
- if (arcNames_.size() > 0)
- parser_.activateLinkType(arcNames_[0]);
- for (size_t i = 0; i < activeLinkTypes_.size(); i++)
- parser_.activateLinkType(convertInput(activeLinkTypes_[i]));
- allLinkTypesActivated();
-}
-
-void ParserApp::allLinkTypesActivated()
-{
- parser_.allLinkTypesActivated();
-}
-
-int ParserApp::processSysid(const StringC &sysid)
-{
- initParser(sysid);
- ErrorCountEventHandler *eceh = makeEventHandler();
- if (errorLimit_)
- eceh->setErrorLimit(errorLimit_);
- return generateEvents(eceh);
-}
-
-int ParserApp::generateEvents(ErrorCountEventHandler *eceh)
-{
- Owner<EventHandler> eh(eceh);
- parseAll(parser_, *eh, eceh->cancelPtr());
- unsigned errorCount = eceh->errorCount();
- if (errorLimit_ != 0 && errorCount >= errorLimit_)
- message(ParserAppMessages::errorLimitExceeded,
- NumberMessageArg(errorLimit_));
- return errorCount > 0;
-}
-
-void ParserApp::parseAll(SgmlParser &parser,
- EventHandler &eh,
- const volatile sig_atomic_t *cancelPtr)
-{
- if (arcNames_.size() > 0) {
- SelectOneArcDirector director(arcNames_, eh);
- ArcEngine::parseAll(parser, director, director, cancelPtr);
- }
- else
- parser.parseAll(eh, cancelPtr);
-}
-
-void ParserApp::processOption(AppChar opt, const AppChar *arg)
-{
- switch (opt) {
- case 'a':
- // activate link
- activeLinkTypes_.push_back(arg);
- break;
- case 'A':
- arcNames_.push_back(convertInput(arg));
- break;
- case 'E':
- {
- AppChar *end;
- unsigned long n = tcstoul((AppChar *)arg, &end, 10);
- if ((n == 0 && end == arg)
- || *end != SP_T('\0')
- || (n == ULONG_MAX && errno == ERANGE)
- || n > UINT_MAX)
- message(ParserAppMessages::badErrorLimit);
- else
- errorLimit_ = unsigned(n);
- }
- break;
- case 'e':
- // describe open entities in error messages
- addOption(MessageReporter::openEntities);
- break;
- case 'g':
- // show gis of open elements in error messages
- addOption(MessageReporter::openElements);
- break;
- case 'i':
- // pretend that arg is defined as INCLUDE
- options_.includes.push_back(convertInput(arg));
- break;
- case 'w':
- if (!enableWarning(arg))
- message(ParserAppMessages::unknownWarning,
- StringMessageArg(convertInput(arg)));
- break;
- default:
- EntityApp::processOption(opt, arg);
- break;
- }
-}
-
-Boolean ParserApp::enableWarning(const AppChar *s)
-{
- enum { groupAll = 01, groupMinTag = 02, groupXML = 04 };
- static struct {
- // Explicit qualifier works around CodeWarrior bug
- const CmdLineApp::AppChar *name;
- PackedBoolean ParserOptions::*ptr;
- unsigned char groups;
- } table[] = {
- { SP_T("mixed"), &ParserOptions::warnMixedContent, groupAll },
- { SP_T("should"), &ParserOptions::warnShould, groupAll },
- { SP_T("duplicate"), &ParserOptions::warnDuplicateEntity, 0 },
- { SP_T("default"), &ParserOptions::warnDefaultEntityReference, groupAll },
- { SP_T("undefined"), &ParserOptions::warnUndefinedElement, groupAll },
- { SP_T("sgmldecl"), &ParserOptions::warnSgmlDecl, groupAll },
- { SP_T("unclosed"), &ParserOptions::noUnclosedTag, groupAll|groupMinTag },
- { SP_T("net"), &ParserOptions::noNet, groupMinTag },
- { SP_T("empty"), &ParserOptions::warnEmptyTag, groupAll|groupMinTag },
- { SP_T("unused-map"), &ParserOptions::warnUnusedMap, groupAll },
- { SP_T("unused-param"), &ParserOptions::warnUnusedParam, groupAll },
- { SP_T("notation-sysid"), &ParserOptions::warnNotationSystemId, 0 },
- { SP_T("inclusion"), &ParserOptions::warnInclusion, groupXML },
- { SP_T("exclusion"), &ParserOptions::warnExclusion, groupXML },
- { SP_T("rcdata-content"), &ParserOptions::warnRcdataContent, groupXML },
- { SP_T("cdata-content"), &ParserOptions::warnCdataContent, groupXML },
- { SP_T("ps-comment"), &ParserOptions::warnPsComment, groupXML },
- { SP_T("attlist-group-decl"), &ParserOptions::warnAttlistGroupDecl, groupXML },
- { SP_T("element-group-decl"), &ParserOptions::warnElementGroupDecl, groupXML },
- { SP_T("pi-entity"), &ParserOptions::warnPiEntity, groupXML },
- { SP_T("internal-sdata-entity"), &ParserOptions::warnInternalSdataEntity, groupXML },
- { SP_T("internal-cdata-entity"), &ParserOptions::warnInternalCdataEntity, groupXML },
- { SP_T("external-sdata-entity"), &ParserOptions::warnExternalSdataEntity, groupXML },
- { SP_T("external-cdata-entity"), &ParserOptions::warnExternalCdataEntity, groupXML },
- { SP_T("bracket-entity"), &ParserOptions::warnBracketEntity, groupXML },
- { SP_T("data-atts"), &ParserOptions::warnDataAttributes, groupXML },
- { SP_T("missing-system-id"), &ParserOptions::warnMissingSystemId, groupXML },
- { SP_T("conref"), &ParserOptions::warnConref, groupXML },
- { SP_T("current"), &ParserOptions::warnCurrent, groupXML },
- { SP_T("nutoken-decl-value"), &ParserOptions::warnNutokenDeclaredValue, groupXML },
- { SP_T("number-decl-value"), &ParserOptions::warnNumberDeclaredValue, groupXML },
- { SP_T("name-decl-value"), &ParserOptions::warnNameDeclaredValue, groupXML },
- { SP_T("named-char-ref"), &ParserOptions::warnNamedCharRef, groupXML },
- { SP_T("refc"), &ParserOptions::warnRefc, groupXML },
- { SP_T("temp-ms"), &ParserOptions::warnTempMarkedSection, groupXML },
- { SP_T("rcdata-ms"), &ParserOptions::warnRcdataMarkedSection, groupXML },
- { SP_T("instance-include-ms"), &ParserOptions::warnInstanceIncludeMarkedSection, groupXML },
- { SP_T("instance-ignore-ms"), &ParserOptions::warnInstanceIgnoreMarkedSection, groupXML },
- { SP_T("and-group"), &ParserOptions::warnAndGroup, groupXML },
- { SP_T("rank"), &ParserOptions::warnRank, groupXML },
- { SP_T("empty-comment-decl"), &ParserOptions::warnEmptyCommentDecl, groupXML },
- { SP_T("att-value-not-literal"), &ParserOptions::warnAttributeValueNotLiteral, groupXML },
- { SP_T("missing-att-name"), &ParserOptions::warnMissingAttributeName, groupXML },
- { SP_T("comment-decl-s"), &ParserOptions::warnCommentDeclS, groupXML },
- { SP_T("comment-decl-multiple"), &ParserOptions::warnCommentDeclMultiple, groupXML },
- { SP_T("missing-status-keyword"), &ParserOptions::warnMissingStatusKeyword, groupXML },
- { SP_T("multiple-status-keyword"), &ParserOptions::warnMultipleStatusKeyword, groupXML },
- { SP_T("instance-param-entity"), &ParserOptions::warnInstanceParamEntityRef, groupXML },
- { SP_T("min-param"), &ParserOptions::warnMinimizationParam, groupXML },
- { SP_T("mixed-content-xml"), &ParserOptions::warnMixedContentRepOrGroup, groupXML },
- { SP_T("name-group-not-or"), &ParserOptions::warnNameGroupNotOr, groupXML },
- { SP_T("pi-missing-name"), &ParserOptions::warnPiMissingName, groupXML },
- { SP_T("instance-status-keyword-s"), &ParserOptions::warnInstanceStatusKeywordSpecS, groupXML },
- { SP_T("external-data-entity-ref"), &ParserOptions::warnExternalDataEntityRef, groupXML },
- { SP_T("att-value-external-entity-ref"), &ParserOptions::warnAttributeValueExternalEntityRef, groupXML },
- { SP_T("data-delim"), &ParserOptions::warnDataDelim, groupXML },
- { SP_T("explicit-sgml-decl"), &ParserOptions::warnExplicitSgmlDecl, groupXML },
- { SP_T("internal-subset-ms"), &ParserOptions::warnInternalSubsetMarkedSection, groupXML },
- { SP_T("default-entity"), &ParserOptions::warnDefaultEntityDecl, groupXML },
- { SP_T("non-sgml-char-ref"), &ParserOptions::warnNonSgmlCharRef, groupXML },
- { SP_T("internal-subset-ps-param-entity"), &ParserOptions::warnInternalSubsetPsParamEntityRef, groupXML },
- { SP_T("internal-subset-ts-param-entity"), &ParserOptions::warnInternalSubsetTsParamEntityRef, groupXML },
- { SP_T("internal-subset-literal-param-entity"), &ParserOptions::warnInternalSubsetLiteralParamEntityRef, groupXML },
- { SP_T("idref"), &ParserOptions::errorIdref, 0 },
- { SP_T("significant"), &ParserOptions::errorSignificant, 0 },
- { SP_T("afdr"), &ParserOptions::errorAfdr, 0 },
- };
- static struct {
- const CmdLineApp::AppChar *name;
- unsigned char flag;
- } groupTable[] = {
- { SP_T("all"), groupAll },
- { SP_T("min-tag"), groupMinTag },
- { SP_T("xml"), groupXML },
- };
- PackedBoolean val = 1;
- if (tcsncmp(s, SP_T("no-"), 3) == 0) {
- s += 3;
- val = 0;
- }
- for (size_t i = 0; i < SIZEOF(groupTable); i++)
- if (tcscmp(s, groupTable[i].name) == 0) {
- for (size_t j = 0; j < SIZEOF(table); j++)
- if (table[j].groups & groupTable[i].flag) {
- // Use parentheses to work around Watcom 10.0a bug.
- (options_.*(table[j].ptr)) = val;
- }
- return 1;
- }
- for (size_t i = 0; i < SIZEOF(table); i++)
- if (tcscmp(s, table[i].name) == 0) {
- // Use parentheses to work around Watcom 10.0a bug.
- (options_.*(table[i].ptr)) = val;
- return 1;
- }
- if (tcscmp(s, SP_T("valid")) == 0) {
- options_.typeValid = val;
- return 1;
- }
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserAppMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserAppMessages.h
deleted file mode 100644
index 31cef84125..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserAppMessages.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// This file was automatically generated from lib\ParserAppMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct ParserAppMessages {
- // 4200
- static const MessageType1 unknownWarning;
- // 4201
- static const MessageType0 badErrorLimit;
- // 4202
- static const MessageType1 errorLimitExceeded;
-};
-const MessageType1 ParserAppMessages::unknownWarning(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4200
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown warning type %1"
-#endif
-);
-const MessageType0 ParserAppMessages::badErrorLimit(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4201
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid error limit"
-#endif
-);
-const MessageType1 ParserAppMessages::errorLimitExceeded(
-MessageType::info,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4202
-#ifndef SP_NO_MESSAGE_TEXT
-,"maximum number of errors (%1) reached; change with -E option"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserEventGeneratorKit.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserEventGeneratorKit.cxx
deleted file mode 100644
index b9cf180548..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserEventGeneratorKit.cxx
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Boolean.h"
-#include "ParserApp.h"
-#include "macros.h"
-#include "SGMLApplication.h"
-#include "ParserEventGeneratorKit.h"
-#include "GenericEventHandler.h"
-
-class ParserEventGeneratorKitImpl : public SP_NAMESPACE_SCOPE ParserApp {
-public:
- SP_NAMESPACE_SCOPE ParserOptions &options() { return options_; }
- bool generalEntities;
- unsigned refCount;
-private:
- SP_NAMESPACE_SCOPE ErrorCountEventHandler *makeEventHandler() { return 0; }
-};
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ParserEventGenerator : public EventGenerator {
-public:
- ParserEventGenerator(SgmlParser &,
- bool generalEntities,
- ParserEventGeneratorKitImpl *kit_);
- ParserEventGenerator(const SgmlParser &,
- const SGMLApplication::Char *,
- size_t n,
- bool generalEntities,
- bool messagesInhibited,
- ParserEventGeneratorKitImpl *kit_);
- ~ParserEventGenerator();
- unsigned run(SGMLApplication &);
- void inhibitMessages(bool);
- void halt();
- EventGenerator *
- makeSubdocEventGenerator(const SGMLApplication::Char *systemId,
- size_t systemIdLength);
-private:
- SgmlParser parser_;
- bool generalEntities_;
- bool messagesInhibited_;
- sig_atomic_t cancel_;
- ParserEventGeneratorKitImpl *kit_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-ParserEventGeneratorKit::ParserEventGeneratorKit()
-{
- impl_ = new ParserEventGeneratorKitImpl;
- impl_->refCount = 1;
- impl_->generalEntities = 0;
-}
-
-ParserEventGeneratorKit::~ParserEventGeneratorKit()
-{
- impl_->refCount -= 1;
- if (impl_->refCount == 0)
- delete impl_;
-}
-
-EventGenerator *
-ParserEventGeneratorKit::makeEventGenerator(int nFiles,
- SP_NAMESPACE_SCOPE ParserApp::AppChar *const *files)
-{
- SP_NAMESPACE_SCOPE StringC sysid;
- if (impl_->makeSystemId(nFiles, files, sysid))
- impl_->initParser(sysid);
- return new SP_NAMESPACE_SCOPE ParserEventGenerator(impl_->parser(),
- impl_->generalEntities,
- impl_);
-}
-
-void ParserEventGeneratorKit::setProgramName(const SP_NAMESPACE_SCOPE ParserApp::AppChar *prog)
-{
- if (prog)
- impl_->setProgramName(impl_->convertInput(prog));
-}
-
-void ParserEventGeneratorKit::setOption(Option opt)
-{
- switch (opt) {
- case showOpenEntities:
- impl_->processOption('e', 0);
- break;
- case showOpenElements:
- impl_->processOption('g', 0);
- break;
- case outputCommentDecls:
- impl_->options().eventsWanted.addCommentDecls();
- break;
- case outputMarkedSections:
- impl_->options().eventsWanted.addMarkedSections();
- break;
- case outputGeneralEntities:
- impl_->generalEntities = 1;
- break;
- case mapCatalogDocument:
- impl_->processOption('C', 0);
- break;
- }
-}
-
-void ParserEventGeneratorKit::setOption(OptionWithArg opt,
- const SP_NAMESPACE_SCOPE ParserApp::AppChar *arg)
-{
- switch (opt) {
- case addCatalog:
- impl_->processOption('c', arg);
- break;
- case includeParam:
- impl_->processOption('i', arg);
- break;
- case enableWarning:
- impl_->processOption('w', arg);
- break;
- case addSearchDir:
- impl_->processOption('D', arg);
- break;
- case activateLink:
- impl_->processOption('a', arg);
- break;
- case architecture:
- impl_->processOption('A', arg);
- break;
- }
-}
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ParserEventGenerator::ParserEventGenerator(SgmlParser &parser,
- bool generalEntities,
- ParserEventGeneratorKitImpl *kit)
-: generalEntities_(generalEntities),
- messagesInhibited_(0),
- cancel_(0),
- kit_(kit)
-{
- parser_.swap(parser);
- kit_->refCount += 1;
-}
-
-ParserEventGenerator::ParserEventGenerator(const SgmlParser &parser,
- const SGMLApplication::Char *s,
- size_t n,
- bool generalEntities,
- bool messagesInhibited,
- ParserEventGeneratorKitImpl *kit)
-: generalEntities_(generalEntities),
- messagesInhibited_(messagesInhibited),
- cancel_(0),
- kit_(kit)
-{
- kit_->refCount += 1;
- SgmlParser::Params params;
- params.parent = &parser;
- params.sysid.assign(s, n);
- params.entityType = SgmlParser::Params::subdoc;
- parser_.init(params);
-}
-
-void ParserEventGenerator::halt()
-{
- cancel_ = 1;
-}
-
-ParserEventGenerator::~ParserEventGenerator()
-{
- kit_->refCount -= 1;
- if (kit_->refCount == 0)
- delete kit_;
-}
-
-unsigned ParserEventGenerator::run(SGMLApplication &app)
-{
- MsgGenericEventHandler handler(app, generalEntities_,
- *kit_, &messagesInhibited_);
- kit_->parseAll(parser_, handler, &cancel_);
- return handler.errorCount();
-}
-
-void ParserEventGenerator::inhibitMessages(bool b)
-{
- messagesInhibited_ = b;
-}
-
-EventGenerator *
-ParserEventGenerator::makeSubdocEventGenerator(const SGMLApplication::Char *s,
- size_t n)
-{
- return new ParserEventGenerator(parser_, s, n, generalEntities_,
- messagesInhibited_, kit_);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.cxx
deleted file mode 100644
index 0327441920..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.cxx
+++ /dev/null
@@ -1,5306 +0,0 @@
-// This file was automatically generated from lib\ParserMessages.msg by msggen.pl.
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const MessageType1 ParserMessages::nameLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-0
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of name must not exceed NAMELEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::parameterEntityNameLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of parameter entity name must not exceed NAMELEN less the length of the PERO delimiter (%1)"
-#endif
-);
-const MessageType1 ParserMessages::numberLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of number must not exceed NAMELEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::attributeValueLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-3
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of attribute value must not exceed LITLEN less NORMSEP (%1)"
-#endif
-);
-const MessageType0 ParserMessages::peroGrpoProlog(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-4
-#ifndef SP_NO_MESSAGE_TEXT
-,"a name group is not allowed in a parameter entity reference in the prolog"
-#endif
-);
-const MessageType0 ParserMessages::groupLevel(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-5
-#ifndef SP_NO_MESSAGE_TEXT
-,"an entity end in a token separator must terminate an entity referenced in the same group"
-#endif
-);
-const MessageType2 ParserMessages::groupCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-6
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 invalid: only %2 and token separators allowed"
-#endif
-);
-const MessageType0 ParserMessages::psRequired(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-7
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter separator is required after a number that is followed by a name start character"
-#endif
-);
-const MessageType2 ParserMessages::markupDeclarationCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-8
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 invalid: only %2 and parameter separators allowed"
-#endif
-);
-const MessageType0 ParserMessages::declarationLevel(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-9
-#ifndef SP_NO_MESSAGE_TEXT
-,"an entity end in a parameter separator must terminate an entity referenced in the same declaration"
-#endif
-);
-const MessageType0 ParserMessages::groupEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-10
-#ifndef SP_NO_MESSAGE_TEXT
-,"an entity end is not allowed in a token separator that does not follow a token"
-#endif
-);
-const MessageType1 ParserMessages::invalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-11
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid token here"
-#endif
-);
-const MessageType0 ParserMessages::groupEntityReference(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-12
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter entity reference can only occur in a group where a token could occur"
-#endif
-);
-const MessageType1 ParserMessages::duplicateGroupToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-13
-#ifndef SP_NO_MESSAGE_TEXT
-,"token %1 has already occurred in this group"
-#endif
-);
-const MessageType1 ParserMessages::groupCount(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-14
-#ifndef SP_NO_MESSAGE_TEXT
-,"the number of tokens in a group must not exceed GRPCNT (%1)"
-#endif
-);
-const MessageType0 ParserMessages::literalLevel(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-15
-#ifndef SP_NO_MESSAGE_TEXT
-,"an entity end in a literal must terminate an entity referenced in the same literal"
-#endif
-);
-const MessageType1 ParserMessages::literalMinimumData(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-16
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 invalid: only minimum data characters allowed"
-#endif
-);
-const MessageType0 ParserMessages::dataTagPatternNonSgml(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-17
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter literal in a data tag pattern must not contain a numeric character reference to a non-SGML character"
-#endif
-);
-const MessageType0 ParserMessages::dataTagPatternFunction(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-18
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter literal in a data tag pattern must not contain a numeric character reference to a function character"
-#endif
-);
-const MessageType0 ParserMessages::eroGrpoStartTag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-19
-#ifndef SP_NO_MESSAGE_TEXT
-,"a name group is not allowed in a general entity reference in a start tag"
-#endif
-);
-const MessageType0 ParserMessages::eroGrpoProlog(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-20
-#ifndef SP_NO_MESSAGE_TEXT
-,"a name group is not allowed in a general entity reference in the prolog"
-#endif
-);
-const MessageType1 ParserMessages::functionName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-21
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a function name"
-#endif
-);
-const MessageType1 ParserMessages::characterNumber(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-22
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a character number in the document character set"
-#endif
-);
-const MessageType1 ParserMessages::parameterEntityUndefined(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-23
-#ifndef SP_NO_MESSAGE_TEXT
-,"parameter entity %1 not defined"
-#endif
-);
-const MessageType1 ParserMessages::entityUndefined(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-24
-#ifndef SP_NO_MESSAGE_TEXT
-,"general entity %1 not defined and no default entity"
-#endif
-);
-const MessageType0 ParserMessages::rniNameStart(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-25
-#ifndef SP_NO_MESSAGE_TEXT
-,"RNI delimiter must be followed by name start character"
-#endif
-);
-const MessageType0L ParserMessages::commentEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-26
-#ifndef SP_NO_MESSAGE_TEXT
-,"unterminated comment: found end of entity inside comment"
-,"comment started here"
-#endif
-);
-const MessageType0 ParserMessages::mixedConnectors(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-28
-#ifndef SP_NO_MESSAGE_TEXT
-,"only one type of connector should be used in a single group"
-#endif
-);
-const MessageType1 ParserMessages::noSuchReservedName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-29
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a reserved name"
-#endif
-);
-const MessageType1 ParserMessages::invalidReservedName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-30
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not allowed as a reserved name here"
-#endif
-);
-const MessageType1 ParserMessages::minimumLiteralLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-31
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of interpreted minimum literal must not exceed reference LITLEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::tokenizedAttributeValueLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-32
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of tokenized attribute value must not exceed LITLEN less NORMSEP (%1)"
-#endif
-);
-const MessageType1 ParserMessages::systemIdentifierLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-33
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of system identifier must not exceed LITLEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::parameterLiteralLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-34
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of interpreted parameter literal must not exceed LITLEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::dataTagPatternLiteralLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-35
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of interpreted parameter literal in data tag pattern must not exceed DTEMPLEN"
-#endif
-);
-const MessageType0 ParserMessages::literalClosingDelimiter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-36
-#ifndef SP_NO_MESSAGE_TEXT
-,"literal is missing closing delimiter"
-#endif
-);
-const MessageType2 ParserMessages::paramInvalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-37
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 invalid: only %2 and parameter separators are allowed"
-#endif
-);
-const MessageType2 ParserMessages::groupTokenInvalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-38
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 invalid: only %2 and token separators are allowed"
-#endif
-);
-const MessageType2 ParserMessages::connectorInvalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-39
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 invalid: only %2 and token separators are allowed"
-#endif
-);
-const MessageType1 ParserMessages::noSuchDeclarationType(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-40
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown declaration type %1"
-#endif
-);
-const MessageType1 ParserMessages::dtdSubsetDeclaration(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-41
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 declaration not allowed in DTD subset"
-#endif
-);
-const MessageType1 ParserMessages::declSubsetCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-42
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 not allowed in declaration subset"
-#endif
-);
-const MessageType0 ParserMessages::documentEndDtdSubset(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-43
-#ifndef SP_NO_MESSAGE_TEXT
-,"end of document in DTD subset"
-#endif
-);
-const MessageType1 ParserMessages::prologCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-44
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 not allowed in prolog"
-#endif
-);
-const MessageType0 ParserMessages::documentEndProlog(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-45
-#ifndef SP_NO_MESSAGE_TEXT
-,"end of document in prolog"
-#endif
-);
-const MessageType1 ParserMessages::prologDeclaration(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-46
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 declaration not allowed in prolog"
-#endif
-);
-const MessageType1 ParserMessages::rankStemGenericIdentifier(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-47
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 used both a rank stem and generic identifier"
-#endif
-);
-const MessageType0 ParserMessages::missingTagMinimization(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-48
-#ifndef SP_NO_MESSAGE_TEXT
-,"omitted tag minimization parameter can be omitted only if \"OMITTAG NO\" is specified on the SGML declaration"
-#endif
-);
-const MessageType1 ParserMessages::duplicateElementDefinition(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-49
-#ifndef SP_NO_MESSAGE_TEXT
-,"element type %1 already defined"
-#endif
-);
-const MessageType0 ParserMessages::entityApplicableDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-50
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity reference with no applicable DTD"
-#endif
-);
-const MessageType1L ParserMessages::commentDeclInvalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-51
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid comment declaration: found %1 outside comment but inside comment declaration"
-,"comment declaration started here"
-#endif
-);
-const MessageType1 ParserMessages::instanceDeclaration(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-53
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 declaration not allowed in instance"
-#endif
-);
-const MessageType0 ParserMessages::contentNonSgml(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-54
-#ifndef SP_NO_MESSAGE_TEXT
-,"non-SGML character not allowed in content"
-#endif
-);
-const MessageType1 ParserMessages::noCurrentRank(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-55
-#ifndef SP_NO_MESSAGE_TEXT
-,"no current rank for rank stem %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateAttlistNotation(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-56
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate attribute definition list for notation %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateAttlistElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-57
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate attribute definition list for element %1"
-#endif
-);
-const MessageType0 ParserMessages::endTagEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-58
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity end not allowed in end tag"
-#endif
-);
-const MessageType1 ParserMessages::endTagCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-59
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 not allowed in end tag"
-#endif
-);
-const MessageType1 ParserMessages::endTagInvalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-60
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 invalid: only s and tagc allowed here"
-#endif
-);
-const MessageType0 ParserMessages::pcdataNotAllowed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-61
-#ifndef SP_NO_MESSAGE_TEXT
-,"character data is not allowed here"
-#endif
-);
-const MessageType1 ParserMessages::elementNotAllowed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-62
-#ifndef SP_NO_MESSAGE_TEXT
-,"document type does not allow element %1 here"
-#endif
-);
-const MessageType2 ParserMessages::missingElementMultiple(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-63
-#ifndef SP_NO_MESSAGE_TEXT
-,"document type does not allow element %1 here; missing one of %2 start-tag"
-#endif
-);
-const MessageType2 ParserMessages::missingElementInferred(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-64
-#ifndef SP_NO_MESSAGE_TEXT
-,"document type does not allow element %1 here; assuming missing %2 start-tag"
-#endif
-);
-const MessageType1 ParserMessages::startTagEmptyElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-65
-#ifndef SP_NO_MESSAGE_TEXT
-,"no start tag specified for implied empty element %1"
-#endif
-);
-const MessageType1L ParserMessages::omitEndTagDeclare(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-66
-#ifndef SP_NO_MESSAGE_TEXT
-,"end tag for %1 omitted, but its declaration does not permit this"
-,"start tag was here"
-#endif
-);
-const MessageType1L ParserMessages::omitEndTagOmittag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-68
-#ifndef SP_NO_MESSAGE_TEXT
-,"end tag for %1 omitted, but OMITTAG NO was specified"
-,"start tag was here"
-#endif
-);
-const MessageType1 ParserMessages::omitStartTagDeclaredContent(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-70
-#ifndef SP_NO_MESSAGE_TEXT
-,"start tag omitted for element %1 with declared content"
-#endif
-);
-const MessageType1 ParserMessages::elementEndTagNotFinished(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-71
-#ifndef SP_NO_MESSAGE_TEXT
-,"end tag for %1 which is not finished"
-#endif
-);
-const MessageType1 ParserMessages::omitStartTagDeclare(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-72
-#ifndef SP_NO_MESSAGE_TEXT
-,"start tag for %1 omitted, but its declaration does not permit this"
-#endif
-);
-const MessageType1 ParserMessages::taglvlOpenElements(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-73
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of open elements exceeds TAGLVL (%1)"
-#endif
-);
-const MessageType1 ParserMessages::undefinedElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-74
-#ifndef SP_NO_MESSAGE_TEXT
-,"element %1 undefined"
-#endif
-);
-const MessageType0 ParserMessages::emptyEndTagNoOpenElements(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-75
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty end tag but no open elements"
-#endif
-);
-const MessageType1 ParserMessages::elementNotFinished(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-76
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 not finished but containing element ended"
-#endif
-);
-const MessageType1 ParserMessages::elementNotOpen(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-77
-#ifndef SP_NO_MESSAGE_TEXT
-,"end tag for element %1 which is not open"
-#endif
-);
-const MessageType1 ParserMessages::internalParameterDataEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-78
-#ifndef SP_NO_MESSAGE_TEXT
-,"internal parameter entity %1 cannot be CDATA or SDATA"
-#endif
-);
-const MessageType1 ParserMessages::attributeSpecCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-79
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 not allowed in attribute specification list"
-#endif
-);
-const MessageType0 ParserMessages::unquotedAttributeValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-80
-#ifndef SP_NO_MESSAGE_TEXT
-,"an attribute value must be a literal unless it contains only name characters"
-#endif
-);
-const MessageType0 ParserMessages::attributeSpecEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-81
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity end not allowed in attribute specification list except in attribute value literal"
-#endif
-);
-const MessageType1 ParserMessages::externalParameterDataSubdocEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-82
-#ifndef SP_NO_MESSAGE_TEXT
-,"external parameter entity %1 cannot be CDATA, SDATA, NDATA or SUBDOC"
-#endif
-);
-const MessageType1 ParserMessages::duplicateEntityDeclaration(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-83
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate declaration of entity %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateParameterEntityDeclaration(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-84
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate declaration of parameter entity %1"
-#endif
-);
-const MessageType0 ParserMessages::piEntityReference(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-85
-#ifndef SP_NO_MESSAGE_TEXT
-,"a reference to a PI entity is allowed only in a context where a processing instruction could occur"
-#endif
-);
-const MessageType0 ParserMessages::internalDataEntityReference(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-86
-#ifndef SP_NO_MESSAGE_TEXT
-,"a reference to a CDATA or SDATA entity is allowed only in a context where a data character could occur"
-#endif
-);
-const MessageType0 ParserMessages::externalNonTextEntityReference(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-87
-#ifndef SP_NO_MESSAGE_TEXT
-,"a reference to a subdocument entity or external data entity is allowed only in a context where a data character could occur"
-#endif
-);
-const MessageType0 ParserMessages::externalNonTextEntityRcdata(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-88
-#ifndef SP_NO_MESSAGE_TEXT
-,"a reference to a subdocument entity or external data entity is not allowed in replaceable character data"
-#endif
-);
-const MessageType0 ParserMessages::entlvl(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-89
-#ifndef SP_NO_MESSAGE_TEXT
-,"the number of open entities cannot exceed ENTLVL"
-#endif
-);
-const MessageType0 ParserMessages::piEntityRcdata(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-90
-#ifndef SP_NO_MESSAGE_TEXT
-,"a reference to a PI entity is not allowed in replaceable character data"
-#endif
-);
-const MessageType1 ParserMessages::recursiveEntityReference(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-91
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity %1 is already open"
-#endif
-);
-const MessageType1 ParserMessages::undefinedShortrefMapInstance(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-92
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference map %1 not defined"
-#endif
-);
-const MessageType0 ParserMessages::usemapAssociatedElementTypeDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-93
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference map in DTD must specify associated element type"
-#endif
-);
-const MessageType0 ParserMessages::usemapAssociatedElementTypeInstance(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-94
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference map in document instance cannot specify associated element type"
-#endif
-);
-const MessageType2 ParserMessages::undefinedShortrefMapDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-95
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference map %1 for element %2 not defined in DTD"
-#endif
-);
-const MessageType1 ParserMessages::unknownShortrefDelim(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-96
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a short reference delimiter"
-#endif
-);
-const MessageType1 ParserMessages::delimDuplicateMap(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-97
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference delimiter %1 already mapped in this declaration"
-#endif
-);
-const MessageType0 ParserMessages::noDocumentElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-98
-#ifndef SP_NO_MESSAGE_TEXT
-,"no document element"
-#endif
-);
-const MessageType0 ParserMessages::processingInstructionEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-99
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity end not allowed in processing instruction"
-#endif
-);
-const MessageType1 ParserMessages::processingInstructionLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-100
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of processing instruction must not exceed PILEN (%1)"
-#endif
-);
-const MessageType0 ParserMessages::processingInstructionClose(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-101
-#ifndef SP_NO_MESSAGE_TEXT
-,"missing pic delimiter"
-#endif
-);
-const MessageType0 ParserMessages::attributeSpecNameTokenExpected(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-102
-#ifndef SP_NO_MESSAGE_TEXT
-,"an attribute specification must start with a name or name token"
-#endif
-);
-const MessageType1 ParserMessages::noSuchAttributeToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-103
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a member of a group specified for any attribute"
-#endif
-);
-const MessageType0 ParserMessages::attributeNameShorttag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-104
-#ifndef SP_NO_MESSAGE_TEXT
-,"the name and vi delimiter can be omitted from an attribute specification only if SHORTTAG YES is specified"
-#endif
-);
-const MessageType1 ParserMessages::noSuchAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-105
-#ifndef SP_NO_MESSAGE_TEXT
-,"there is no attribute %1"
-#endif
-);
-const MessageType0 ParserMessages::attributeValueExpected(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-106
-#ifndef SP_NO_MESSAGE_TEXT
-,"an attribute value specification must start with a literal or a name character"
-#endif
-);
-const MessageType1 ParserMessages::nameTokenLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-107
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of name token must not exceed NAMELEN (%1)"
-#endif
-);
-const MessageType0 ParserMessages::attributeSpecLiteral(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-108
-#ifndef SP_NO_MESSAGE_TEXT
-,"an attribute value literal can occur in an attribute specification list only after a vi delimiter"
-#endif
-);
-const MessageType1 ParserMessages::duplicateAttributeSpec(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-109
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate specification of attribute %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateAttributeDef(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-110
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate definition of attribute %1"
-#endif
-);
-const MessageType0 ParserMessages::emptyDataAttributeSpec(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-111
-#ifndef SP_NO_MESSAGE_TEXT
-,"data attribute specification must be omitted if attribute specification list is empty"
-#endif
-);
-const MessageType0 ParserMessages::markedSectionEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-112
-#ifndef SP_NO_MESSAGE_TEXT
-,"marked section end not in marked section declaration"
-#endif
-);
-const MessageType1 ParserMessages::markedSectionLevel(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-113
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of open marked sections must not exceed TAGLVL (%1)"
-#endif
-);
-const MessageType0L ParserMessages::unclosedMarkedSection(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-114
-#ifndef SP_NO_MESSAGE_TEXT
-,"missing marked section end"
-,"marked section started here"
-#endif
-);
-const MessageType0 ParserMessages::specialParseEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-116
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity end in character data, replaceable character data or ignored marked section"
-#endif
-);
-const MessageType2 ParserMessages::normalizedAttributeValueLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-117
-#ifndef SP_NO_MESSAGE_TEXT
-,"normalized length of attribute value literal must not exceed LITLEN (%1); length was %2"
-#endif
-);
-const MessageType0 ParserMessages::attributeValueSyntax(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-118
-#ifndef SP_NO_MESSAGE_TEXT
-,"syntax of attribute value does not conform to declared value"
-#endif
-);
-const MessageType2 ParserMessages::attributeValueChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-119
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 is not allowed in the value of attribute %2"
-#endif
-);
-const MessageType1 ParserMessages::attributeValueMultiple(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-120
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of attribute %1 must be a single token"
-#endif
-);
-const MessageType2 ParserMessages::attributeValueNumberToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-121
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of attribute %2 invalid: %1 cannot start a number token"
-#endif
-);
-const MessageType2 ParserMessages::attributeValueName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-122
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of attribute %2 invalid: %1 cannot start a name"
-#endif
-);
-const MessageType1 ParserMessages::attributeMissing(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-123
-#ifndef SP_NO_MESSAGE_TEXT
-,"non-impliable attribute %1 not specified but OMITTAG NO and SHORTTAG NO"
-#endif
-);
-const MessageType1 ParserMessages::requiredAttributeMissing(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-124
-#ifndef SP_NO_MESSAGE_TEXT
-,"required attribute %1 not specified"
-#endif
-);
-const MessageType1 ParserMessages::currentAttributeMissing(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-125
-#ifndef SP_NO_MESSAGE_TEXT
-,"first occurrence of current attribute %1 not specified"
-#endif
-);
-const MessageType1 ParserMessages::invalidNotationAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-126
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a notation name"
-#endif
-);
-const MessageType1 ParserMessages::invalidEntityAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-127
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a general entity name"
-#endif
-);
-const MessageType3 ParserMessages::attributeValueNotInGroup(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-128
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of attribute %2 cannot be %1; must be one of %3"
-#endif
-);
-const MessageType1 ParserMessages::notDataOrSubdocEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-129
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a data or subdocument entity"
-#endif
-);
-const MessageType3 ParserMessages::ambiguousModelInitial(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-130
-#ifndef SP_NO_MESSAGE_TEXT
-,"content model is ambiguous: when no tokens have been matched, both the %2 and %3 occurrences of %1 are possible"
-#endif
-);
-const MessageType5 ParserMessages::ambiguousModel(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-131
-#ifndef SP_NO_MESSAGE_TEXT
-,"content model is ambiguous: when the current token is the %2 occurrence of %1, both the %4 and %5 occurrences of %3 are possible"
-#endif
-);
-const MessageType5 ParserMessages::ambiguousModelSingleAnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-132
-#ifndef SP_NO_MESSAGE_TEXT
-,"content model is ambiguous: when the current token is the %2 occurrence of %1 and the innermost containing and group has been matched, both the %4 and %5 occurrences of %3 are possible"
-#endif
-);
-const MessageType6 ParserMessages::ambiguousModelMultipleAnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-133
-#ifndef SP_NO_MESSAGE_TEXT
-,"content model is ambiguous: when the current token is the %2 occurrence of %1 and the innermost %3 containing and groups have been matched, both the %5 and %6 occurrences of %4 are possible"
-#endif
-);
-const MessageType1L ParserMessages::commentDeclarationCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-134
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid comment declaration: found character %1 outside comment but inside comment declaration"
-,"comment declaration started here"
-#endif
-);
-const MessageType1 ParserMessages::nonSgmlCharacter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-136
-#ifndef SP_NO_MESSAGE_TEXT
-,"non SGML character number %1"
-#endif
-);
-const MessageType0 ParserMessages::dataMarkedSectionDeclSubset(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-137
-#ifndef SP_NO_MESSAGE_TEXT
-,"data or replaceable character data in declaration subset"
-#endif
-);
-const MessageType1L ParserMessages::duplicateId(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-138
-#ifndef SP_NO_MESSAGE_TEXT
-,"ID %1 already defined"
-,"ID %1 first defined here"
-#endif
-);
-const MessageType1 ParserMessages::notFixedValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-140
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of fixed attribute %1 not equal to default"
-#endif
-);
-const MessageType1 ParserMessages::sdCommentSignificant(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-141
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 is not significant in the reference concrete syntax and so cannot occur in a comment in the SGML declaration"
-#endif
-);
-const MessageType1 ParserMessages::standardVersion(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-142
-#ifndef SP_NO_MESSAGE_TEXT
-,"minimum data of first minimum literal in SGML declaration must be \"ISO 8879:1986\" or \"ISO 8879:1986 (ENR)\" or \"ISO 8879:1986 (WWW)\" not %1"
-#endif
-);
-const MessageType1 ParserMessages::namingBeforeLcnmstrt(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-143
-#ifndef SP_NO_MESSAGE_TEXT
-,"parameter before \"LCNMSTRT\" must be \"NAMING\" not %1"
-#endif
-);
-const MessageType1 ParserMessages::sdEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-144
-#ifndef SP_NO_MESSAGE_TEXT
-,"unexpected entity end in SGML declaration: only %1, S separators and comments allowed"
-#endif
-);
-const MessageType2 ParserMessages::sdInvalidNameToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-145
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 invalid: only %2 and parameter separators allowed"
-#endif
-);
-const MessageType1 ParserMessages::numberTooBig(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-146
-#ifndef SP_NO_MESSAGE_TEXT
-,"magnitude of %1 too big (length exceeds NAMELEN)"
-#endif
-);
-const MessageType1 ParserMessages::sdLiteralSignificant(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-147
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 is not significant in the reference concrete syntax and so cannot occur in a literal in the SGML declaration except as the replacement of a character reference"
-#endif
-);
-const MessageType1 ParserMessages::syntaxCharacterNumber(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-148
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid syntax reference character number"
-#endif
-);
-const MessageType0 ParserMessages::sdParameterEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-149
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter entity reference cannot occur in an SGML declaration"
-#endif
-);
-const MessageType2 ParserMessages::sdParamInvalidToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-150
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 invalid: only %2 and parameter separators are allowed"
-#endif
-);
-const MessageType0 ParserMessages::giveUp(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-151
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot continue because of previous errors"
-#endif
-);
-const MessageType1 ParserMessages::sdMissingCharacters(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-152
-#ifndef SP_NO_MESSAGE_TEXT
-,"SGML declaration cannot be parsed because the character set does not contain characters having the following numbers in ISO 646: %1"
-#endif
-);
-const MessageType1 ParserMessages::missingMinimumChars(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-153
-#ifndef SP_NO_MESSAGE_TEXT
-,"the specified character set is invalid because it does not contain the minimum data characters having the following numbers in ISO 646: %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateCharNumbers(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-154
-#ifndef SP_NO_MESSAGE_TEXT
-,"character numbers declared more than once: %1"
-#endif
-);
-const MessageType1 ParserMessages::codeSetHoles(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-155
-#ifndef SP_NO_MESSAGE_TEXT
-,"character numbers should have been declared UNUSED: %1"
-#endif
-);
-const MessageType1 ParserMessages::basesetCharsMissing(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-156
-#ifndef SP_NO_MESSAGE_TEXT
-,"character numbers missing in base set: %1"
-#endif
-);
-const MessageType1 ParserMessages::documentCharMax(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-157
-#ifndef SP_NO_MESSAGE_TEXT
-,"characters in the document character set with numbers exceeding %1 not supported"
-#endif
-);
-const MessageType1 ParserMessages::fpiMissingField(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-158
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid formal public identifier %1: missing //"
-#endif
-);
-const MessageType1 ParserMessages::fpiMissingTextClassSpace(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-159
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid formal public identifier %1: no SPACE after public text class"
-#endif
-);
-const MessageType1 ParserMessages::fpiInvalidTextClass(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-160
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid formal public identifier %1: invalid public text class"
-#endif
-);
-const MessageType1 ParserMessages::fpiInvalidLanguage(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-161
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid formal public identifier %1: public text language must be a name containing only upper case letters"
-#endif
-);
-const MessageType1 ParserMessages::fpiIllegalDisplayVersion(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-162
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid formal public identifer %1: public text display version not permitted with this text class"
-#endif
-);
-const MessageType1 ParserMessages::fpiExtraField(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-163
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid formal public identifier %1: extra field"
-#endif
-);
-const MessageType0 ParserMessages::notationIdentifierTextClass(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-164
-#ifndef SP_NO_MESSAGE_TEXT
-,"public text class of public identifier in notation identifier must be NOTATION"
-#endif
-);
-const MessageType1 ParserMessages::unknownBaseset(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-165
-#ifndef SP_NO_MESSAGE_TEXT
-,"base character set %1 is unknown"
-#endif
-);
-const MessageType2 ParserMessages::lexicalAmbiguity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-166
-#ifndef SP_NO_MESSAGE_TEXT
-,"delimiter set is ambiguous: %1 and %2 can be recognized in the same mode"
-#endif
-);
-const MessageType1 ParserMessages::missingSignificant(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-167
-#ifndef SP_NO_MESSAGE_TEXT
-,"characters with the following numbers in the syntax reference character set are significant in the concrete syntax but are not in the document character set: %1"
-#endif
-);
-const MessageType1 ParserMessages::translateSyntaxCharDoc(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-168
-#ifndef SP_NO_MESSAGE_TEXT
-,"there is no unique character in the document character set corresponding to character number %1 in the syntax reference character set"
-#endif
-);
-const MessageType1 ParserMessages::translateSyntaxCharInternal(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-169
-#ifndef SP_NO_MESSAGE_TEXT
-,"there is no unique character in the internal character set corresponding to character number %1 in the syntax reference character set"
-#endif
-);
-const MessageType1 ParserMessages::missingSyntaxChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-170
-#ifndef SP_NO_MESSAGE_TEXT
-,"the character with number %1 in ISO 646 is significant but has no representation in the syntax reference character set"
-#endif
-);
-const MessageType1 ParserMessages::unknownCapacitySet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-171
-#ifndef SP_NO_MESSAGE_TEXT
-,"capacity set %1 is unknown"
-#endif
-);
-const MessageType1 ParserMessages::duplicateCapacity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-172
-#ifndef SP_NO_MESSAGE_TEXT
-,"capacity %1 already specified"
-#endif
-);
-const MessageType1 ParserMessages::capacityExceedsTotalcap(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-173
-#ifndef SP_NO_MESSAGE_TEXT
-,"value of capacity %1 exceeds value of TOTALCAP"
-#endif
-);
-const MessageType1 ParserMessages::unknownPublicSyntax(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-174
-#ifndef SP_NO_MESSAGE_TEXT
-,"syntax %1 is unknown"
-#endif
-);
-const MessageType0 ParserMessages::nmstrtLength(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-175
-#ifndef SP_NO_MESSAGE_TEXT
-,"UCNMSTRT must have the same number of characters as LCNMSTRT"
-#endif
-);
-const MessageType0 ParserMessages::nmcharLength(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-176
-#ifndef SP_NO_MESSAGE_TEXT
-,"UCNMCHAR must have the same number of characters as LCNMCHAR"
-#endif
-);
-const MessageType1 ParserMessages::subdocLevel(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-177
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of open subdocuments exceeds quantity specified for SUBDOC parameter in SGML declaration (%1)"
-#endif
-);
-const MessageType1 ParserMessages::subdocEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-178
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity %1 declared SUBDOC, but SUBDOC NO specified in SGML declaration"
-#endif
-);
-const MessageType0 ParserMessages::parameterEntityNotEnded(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-179
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter entity referenced in a parameter separator must end in the same declaration"
-#endif
-);
-const MessageType1 ParserMessages::missingId(
-MessageType::idrefError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-180
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to non-existent ID %1"
-#endif
-);
-const MessageType1 ParserMessages::dtdUndefinedElement(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-181
-#ifndef SP_NO_MESSAGE_TEXT
-,"generic identifier %1 used in DTD but not defined"
-#endif
-);
-const MessageType1 ParserMessages::elementNotFinishedDocumentEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-182
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 not finished but document ended"
-#endif
-);
-const MessageType0 ParserMessages::subdocGiveUp(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-183
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot continue with subdocument because of previous errors"
-#endif
-);
-const MessageType0 ParserMessages::noDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-184
-#ifndef SP_NO_MESSAGE_TEXT
-,"no document type declaration; will parse without validation"
-#endif
-);
-const MessageType0 ParserMessages::noDtdSubset(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-185
-#ifndef SP_NO_MESSAGE_TEXT
-,"no internal or external document type declaration subset; will parse without validation"
-#endif
-);
-const MessageType0 ParserMessages::notSgml(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-186
-#ifndef SP_NO_MESSAGE_TEXT
-,"this is not an SGML document"
-#endif
-);
-const MessageType1 ParserMessages::taglen(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-187
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of start-tag before interpretation of literals must not exceed TAGLEN (%1)"
-#endif
-);
-const MessageType0 ParserMessages::groupParameterEntityNotEnded(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-188
-#ifndef SP_NO_MESSAGE_TEXT
-,"a parameter entity referenced in a token separator must end in the same group"
-#endif
-);
-const MessageType1 ParserMessages::invalidSgmlChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-189
-#ifndef SP_NO_MESSAGE_TEXT
-,"the following character numbers are shunned characters that are not significant and so should have been declared UNUSED: %1"
-#endif
-);
-const MessageType1 ParserMessages::translateDocChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-190
-#ifndef SP_NO_MESSAGE_TEXT
-,"there is no unique character in the specified document character set corresponding to character number %1 in ISO 646"
-#endif
-);
-const MessageType1 ParserMessages::attributeValueLengthNeg(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-191
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of attribute value must not exceed LITLEN less NORMSEP (-%1)"
-#endif
-);
-const MessageType1 ParserMessages::tokenizedAttributeValueLengthNeg(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-192
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of tokenized attribute value must not exceed LITLEN less NORMSEP (-%1)"
-#endif
-);
-const MessageType1 ParserMessages::scopeInstanceQuantity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-193
-#ifndef SP_NO_MESSAGE_TEXT
-,"concrete syntax scope is INSTANCE but value of %1 quantity is less than value in reference quantity set"
-#endif
-);
-const MessageType1 ParserMessages::basesetTextClass(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-194
-#ifndef SP_NO_MESSAGE_TEXT
-,"public text class of formal public identifier of base character set must be CHARSET"
-#endif
-);
-const MessageType1 ParserMessages::capacityTextClass(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-195
-#ifndef SP_NO_MESSAGE_TEXT
-,"public text class of formal public identifier of capacity set must be CAPACITY"
-#endif
-);
-const MessageType1 ParserMessages::syntaxTextClass(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-196
-#ifndef SP_NO_MESSAGE_TEXT
-,"public text class of formal public identifier of concrete syntax must be SYNTAX"
-#endif
-);
-const MessageType0 ParserMessages::msocharRequiresMsichar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-197
-#ifndef SP_NO_MESSAGE_TEXT
-,"when there is an MSOCHAR there must also be an MSICHAR"
-#endif
-);
-const MessageType1 ParserMessages::switchNotMarkup(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-198
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 in the syntax reference character set was specified as a character to be switched but is not a markup character"
-#endif
-);
-const MessageType1 ParserMessages::switchNotInCharset(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-199
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 was specified as a character to be switched but is not in the syntax reference character set"
-#endif
-);
-const MessageType1 ParserMessages::ambiguousDocCharacter(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-200
-#ifndef SP_NO_MESSAGE_TEXT
-,"character numbers %1 in the document character set have been assigned the same meaning, but this is the meaning of a significant character"
-#endif
-);
-const MessageType1 ParserMessages::oneFunction(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-201
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 assigned to more than one function"
-#endif
-);
-const MessageType1 ParserMessages::duplicateFunctionName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-202
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is already a function name"
-#endif
-);
-const MessageType1 ParserMessages::missingSignificant646(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-203
-#ifndef SP_NO_MESSAGE_TEXT
-,"characters with the following numbers in ISO 646 are significant in the concrete syntax but are not in the document character set: %1"
-#endif
-);
-const MessageType1 ParserMessages::generalDelimAllFunction(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-204
-#ifndef SP_NO_MESSAGE_TEXT
-,"general delimiter %1 consists solely of function characters"
-#endif
-);
-const MessageType1 ParserMessages::nmcharLetter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-205
-#ifndef SP_NO_MESSAGE_TEXT
-,"letters assigned to LCNMCHAR, UCNMCHAR, LCNMSTRT or UCNMSTRT: %1"
-#endif
-);
-const MessageType1 ParserMessages::nmcharDigit(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-206
-#ifndef SP_NO_MESSAGE_TEXT
-,"digits assigned to LCNMCHAR, UCNMCHAR, LCNMSTRT or UCNMSTRT: %1"
-#endif
-);
-const MessageType1 ParserMessages::nmcharRe(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-207
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 cannot be assigned to LCNMCHAR, UCNMCHAR, LCNMSTRT or UCNMSTRT because it is RE"
-#endif
-);
-const MessageType1 ParserMessages::nmcharRs(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-208
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 cannot be assigned to LCNMCHAR, UCNMCHAR, LCNMSTRT or UCNMSTRT because it is RS"
-#endif
-);
-const MessageType1 ParserMessages::nmcharSpace(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-209
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 cannot be assigned to LCNMCHAR, UCNMCHAR, LCNMSTRT or UCNMSTRT because it is SPACE"
-#endif
-);
-const MessageType1 ParserMessages::nmcharSepchar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-210
-#ifndef SP_NO_MESSAGE_TEXT
-,"separator characters assigned to LCNMCHAR, UCNMCHAR, LCNMSTRT or UCNMSTRT: %1"
-#endif
-);
-const MessageType1 ParserMessages::switchLetterDigit(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-211
-#ifndef SP_NO_MESSAGE_TEXT
-,"character number %1 cannot be switched because it is a Digit, LC Letter or UC Letter"
-#endif
-);
-const MessageType0 ParserMessages::zeroNumberOfCharacters(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-212
-#ifndef SP_NO_MESSAGE_TEXT
-,"pointless for number of characters to be 0"
-#endif
-);
-const MessageType1 ParserMessages::nameReferenceReservedName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-213
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 cannot be the replacement for a reference reserved name because it is another reference reserved name"
-#endif
-);
-const MessageType1 ParserMessages::ambiguousReservedName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-214
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 cannot be the replacement for a reference reserved name because it is the replacement of another reference reserved name"
-#endif
-);
-const MessageType1 ParserMessages::duplicateReservedName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-215
-#ifndef SP_NO_MESSAGE_TEXT
-,"replacement for reserved name %1 already specified"
-#endif
-);
-const MessageType1 ParserMessages::reservedNameSyntax(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-216
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid name in the declared concrete syntax"
-#endif
-);
-const MessageType1 ParserMessages::multipleBSequence(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-217
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid short reference delimiter because it has more than one B sequence"
-#endif
-);
-const MessageType1 ParserMessages::blankAdjacentBSequence(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-218
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid short reference delimiter because it is adjacent to a character that can occur in a blank sequence"
-#endif
-);
-const MessageType2 ParserMessages::delimiterLength(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-219
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of delimiter %1 exceeds NAMELEN (%2)"
-#endif
-);
-const MessageType2 ParserMessages::reservedNameLength(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-220
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of reserved name %1 exceeds NAMELEN (%2)"
-#endif
-);
-const MessageType1 ParserMessages::nmcharNmstrt(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-221
-#ifndef SP_NO_MESSAGE_TEXT
-,"character numbers assigned to both LCNMCHAR or UCNMCHAR and LCNMSTRT or UCNMSTRT: %1"
-#endif
-);
-const MessageType0 ParserMessages::scopeInstanceSyntaxCharset(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-222
-#ifndef SP_NO_MESSAGE_TEXT
-,"when the concrete syntax scope is INSTANCE the syntax reference character set of the declared syntax must be the same as that of the reference concrete syntax"
-#endif
-);
-const MessageType0 ParserMessages::emptyOmitEndTag(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-223
-#ifndef SP_NO_MESSAGE_TEXT
-,"end-tag minimization should be \"O\" for element with declared content of EMPTY"
-#endif
-);
-const MessageType1 ParserMessages::conrefOmitEndTag(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-224
-#ifndef SP_NO_MESSAGE_TEXT
-,"end-tag minimization should be \"O\" for element %1 because it has CONREF attribute"
-#endif
-);
-const MessageType1 ParserMessages::conrefEmpty(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-225
-#ifndef SP_NO_MESSAGE_TEXT
-,"element %1 has a declared content of EMPTY and a CONREF attribute"
-#endif
-);
-const MessageType1 ParserMessages::notationEmpty(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-226
-#ifndef SP_NO_MESSAGE_TEXT
-,"element %1 has a declared content of EMPTY and a NOTATION attribute"
-#endif
-);
-const MessageType0 ParserMessages::dataAttributeDeclaredValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-227
-#ifndef SP_NO_MESSAGE_TEXT
-,"declared value of data attribute cannot be ENTITY, ENTITIES, ID, IDREF, IDREFS or NOTATION"
-#endif
-);
-const MessageType0 ParserMessages::dataAttributeDefaultValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-228
-#ifndef SP_NO_MESSAGE_TEXT
-,"default value of data attribute cannot be CONREF or CURRENT"
-#endif
-);
-const MessageType2 ParserMessages::attcnt(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-229
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of attribute names and name tokens (%1) exceeds ATTCNT (%2)"
-#endif
-);
-const MessageType0 ParserMessages::idDeclaredValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-230
-#ifndef SP_NO_MESSAGE_TEXT
-,"if the declared value is ID the default value must be IMPLIED or REQUIRED"
-#endif
-);
-const MessageType1 ParserMessages::multipleIdAttributes(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-231
-#ifndef SP_NO_MESSAGE_TEXT
-,"the attribute definition list already declared attribute %1 as the ID attribute"
-#endif
-);
-const MessageType1 ParserMessages::multipleNotationAttributes(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-232
-#ifndef SP_NO_MESSAGE_TEXT
-,"the attribute definition list already declared attribute %1 as the NOTATION attribute"
-#endif
-);
-const MessageType1 ParserMessages::duplicateAttributeToken(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-233
-#ifndef SP_NO_MESSAGE_TEXT
-,"token %1 occurs more than once in attribute definition list"
-#endif
-);
-const MessageType1 ParserMessages::notationNoAttributes(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-234
-#ifndef SP_NO_MESSAGE_TEXT
-,"no attributes defined for notation %1"
-#endif
-);
-const MessageType2 ParserMessages::entityNotationUndefined(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-235
-#ifndef SP_NO_MESSAGE_TEXT
-,"notation %1 for entity %2 undefined"
-#endif
-);
-const MessageType2 ParserMessages::mapEntityUndefined(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-236
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity %1 undefined in short reference map %2"
-#endif
-);
-const MessageType1 ParserMessages::attlistNotationUndefined(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-237
-#ifndef SP_NO_MESSAGE_TEXT
-,"notation %1 is undefined but had attribute definition"
-#endif
-);
-const MessageType1 ParserMessages::bracketedLitlen(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-238
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of interpreted parameter literal in bracketed text plus the length of the bracketing delimiters must not exceed LITLEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::genericIdentifierLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-239
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of rank stem plus length of rank suffix must not exceed NAMELEN (%1)"
-#endif
-);
-const MessageType0 ParserMessages::instanceStartOmittag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-240
-#ifndef SP_NO_MESSAGE_TEXT
-,"document instance must start with document element"
-#endif
-);
-const MessageType1 ParserMessages::grplvl(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-241
-#ifndef SP_NO_MESSAGE_TEXT
-,"content model nesting level exceeds GRPLVL (%1)"
-#endif
-);
-const MessageType1 ParserMessages::grpgtcnt(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-242
-#ifndef SP_NO_MESSAGE_TEXT
-,"grand total of content tokens exceeds GRPGTCNT (%1)"
-#endif
-);
-const MessageType0 ParserMessages::unclosedStartTagShorttag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-243
-#ifndef SP_NO_MESSAGE_TEXT
-,"unclosed start-tag requires SHORTTAG YES"
-#endif
-);
-const MessageType0 ParserMessages::netEnablingStartTagShorttag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-244
-#ifndef SP_NO_MESSAGE_TEXT
-,"net-enabling start-tag requires SHORTTAG YES"
-#endif
-);
-const MessageType0 ParserMessages::unclosedEndTagShorttag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-245
-#ifndef SP_NO_MESSAGE_TEXT
-,"unclosed end-tag requires SHORTTAG YES"
-#endif
-);
-const MessageType0 ParserMessages::multipleDtds(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-246
-#ifndef SP_NO_MESSAGE_TEXT
-,"DTDs other than base allowed only if CONCUR YES or EXPLICIT YES"
-#endif
-);
-const MessageType0 ParserMessages::afterDocumentElementEntityEnd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-247
-#ifndef SP_NO_MESSAGE_TEXT
-,"end of entity other than document entity after document element"
-#endif
-);
-const MessageType1 ParserMessages::declarationAfterDocumentElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-248
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 declaration illegal after document element"
-#endif
-);
-const MessageType0 ParserMessages::characterReferenceAfterDocumentElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-249
-#ifndef SP_NO_MESSAGE_TEXT
-,"character reference illegal after document element"
-#endif
-);
-const MessageType0 ParserMessages::entityReferenceAfterDocumentElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-250
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity reference illegal after document element"
-#endif
-);
-const MessageType0 ParserMessages::markedSectionAfterDocumentElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-251
-#ifndef SP_NO_MESSAGE_TEXT
-,"marked section illegal after document element"
-#endif
-);
-const MessageType3 ParserMessages::requiredElementExcluded(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-252
-#ifndef SP_NO_MESSAGE_TEXT
-,"the %1 occurrence of %2 in the content model for %3 cannot be excluded at this point because it is contextually required"
-#endif
-);
-const MessageType3 ParserMessages::invalidExclusion(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-253
-#ifndef SP_NO_MESSAGE_TEXT
-,"the %1 occurrence of %2 in the content model for %3 cannot be excluded because it is neither inherently optional nor a member of an or group"
-#endif
-);
-const MessageType0 ParserMessages::attributeValueShorttag(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-254
-#ifndef SP_NO_MESSAGE_TEXT
-,"an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified"
-#endif
-);
-const MessageType0 ParserMessages::conrefNotation(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-255
-#ifndef SP_NO_MESSAGE_TEXT
-,"value cannot be specified both for notation attribute and content reference attribute"
-#endif
-);
-const MessageType1 ParserMessages::duplicateNotationDeclaration(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-256
-#ifndef SP_NO_MESSAGE_TEXT
-,"notation %1 already defined"
-#endif
-);
-const MessageType1L ParserMessages::duplicateShortrefDeclaration(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-257
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference map %1 already defined"
-,"first defined here"
-#endif
-);
-const MessageType1 ParserMessages::duplicateDelimGeneral(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-259
-#ifndef SP_NO_MESSAGE_TEXT
-,"general delimiter role %1 already defined"
-#endif
-);
-const MessageType1 ParserMessages::idrefGrpcnt(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-260
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of id references in start-tag must not exceed GRPCNT (%1)"
-#endif
-);
-const MessageType1 ParserMessages::entityNameGrpcnt(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-261
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of entity names in attribute specification list must not exceed GRPCNT (%1)"
-#endif
-);
-const MessageType2 ParserMessages::attsplen(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-262
-#ifndef SP_NO_MESSAGE_TEXT
-,"normalized length of attribute specification list must not exceed ATTSPLEN (%1); length was %2"
-#endif
-);
-const MessageType1 ParserMessages::duplicateDelimShortref(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-263
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference delimiter %1 already specified"
-#endif
-);
-const MessageType1 ParserMessages::duplicateDelimShortrefSet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-264
-#ifndef SP_NO_MESSAGE_TEXT
-,"single character short references were already specified for character numbers: %1"
-#endif
-);
-const MessageType1 ParserMessages::defaultEntityInAttribute(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-265
-#ifndef SP_NO_MESSAGE_TEXT
-,"default entity used in entity attribute %1"
-#endif
-);
-const MessageType1 ParserMessages::defaultEntityReference(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-266
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to entity %1 uses default entity "
-#endif
-);
-const MessageType2 ParserMessages::mapDefaultEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-267
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity %1 in short reference map %2 uses default entity"
-#endif
-);
-const MessageType1 ParserMessages::noSuchDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-268
-#ifndef SP_NO_MESSAGE_TEXT
-,"no DTD %1 declared"
-#endif
-);
-const MessageType1 ParserMessages::noLpdSubset(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-269
-#ifndef SP_NO_MESSAGE_TEXT
-,"LPD %1 has neither internal nor external subset"
-#endif
-);
-const MessageType0 ParserMessages::assocElementDifferentAtts(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-270
-#ifndef SP_NO_MESSAGE_TEXT
-,"element types have different link attribute definitions"
-#endif
-);
-const MessageType1 ParserMessages::duplicateLinkSet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-271
-#ifndef SP_NO_MESSAGE_TEXT
-,"link set %1 already defined"
-#endif
-);
-const MessageType0 ParserMessages::emptyResultAttributeSpec(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-272
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty result attribute specification"
-#endif
-);
-const MessageType1 ParserMessages::noSuchSourceElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-273
-#ifndef SP_NO_MESSAGE_TEXT
-,"no source element type %1"
-#endif
-);
-const MessageType1 ParserMessages::noSuchResultElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-274
-#ifndef SP_NO_MESSAGE_TEXT
-,"no result element type %1"
-#endif
-);
-const MessageType0 ParserMessages::documentEndLpdSubset(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-275
-#ifndef SP_NO_MESSAGE_TEXT
-,"end of document in LPD subset"
-#endif
-);
-const MessageType1 ParserMessages::lpdSubsetDeclaration(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-276
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 declaration not allowed in LPD subset"
-#endif
-);
-const MessageType0 ParserMessages::idlinkDeclSimple(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-277
-#ifndef SP_NO_MESSAGE_TEXT
-,"ID link set declaration not allowed in simple link declaration subset"
-#endif
-);
-const MessageType0 ParserMessages::linkDeclSimple(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-278
-#ifndef SP_NO_MESSAGE_TEXT
-,"link set declaration not allowed in simple link declaration subset"
-#endif
-);
-const MessageType1 ParserMessages::simpleLinkAttlistElement(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-279
-#ifndef SP_NO_MESSAGE_TEXT
-,"attributes can only be defined for base document element (not %1) in simple link declaration subset"
-#endif
-);
-const MessageType0 ParserMessages::shortrefOnlyInBaseDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-280
-#ifndef SP_NO_MESSAGE_TEXT
-,"a short reference mapping declaration is allowed only in the base DTD"
-#endif
-);
-const MessageType0 ParserMessages::usemapOnlyInBaseDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-281
-#ifndef SP_NO_MESSAGE_TEXT
-,"a short reference use declaration is allowed only in the base DTD"
-#endif
-);
-const MessageType0 ParserMessages::linkAttributeDefaultValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-282
-#ifndef SP_NO_MESSAGE_TEXT
-,"default value of link attribute cannot be CURRENT or CONREF"
-#endif
-);
-const MessageType0 ParserMessages::linkAttributeDeclaredValue(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-283
-#ifndef SP_NO_MESSAGE_TEXT
-,"declared value of link attribute cannot be ID, IDREF, IDREFS or NOTATION"
-#endif
-);
-const MessageType0 ParserMessages::simpleLinkFixedAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-284
-#ifndef SP_NO_MESSAGE_TEXT
-,"only fixed attributes can be defined in simple LPD"
-#endif
-);
-const MessageType0 ParserMessages::duplicateIdLinkSet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-285
-#ifndef SP_NO_MESSAGE_TEXT
-,"only one ID link set declaration allowed in an LPD subset"
-#endif
-);
-const MessageType1 ParserMessages::noInitialLinkSet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-286
-#ifndef SP_NO_MESSAGE_TEXT
-,"no initial link set defined for LPD %1"
-#endif
-);
-const MessageType1 ParserMessages::notationUndefinedSourceDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-287
-#ifndef SP_NO_MESSAGE_TEXT
-,"notation %1 not defined in source DTD"
-#endif
-);
-const MessageType0 ParserMessages::simpleLinkResultNotImplied(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-288
-#ifndef SP_NO_MESSAGE_TEXT
-,"result document type in simple link specification must be implied"
-#endif
-);
-const MessageType0 ParserMessages::simpleLinkFeature(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-289
-#ifndef SP_NO_MESSAGE_TEXT
-,"simple link requires SIMPLE YES"
-#endif
-);
-const MessageType0 ParserMessages::implicitLinkFeature(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-290
-#ifndef SP_NO_MESSAGE_TEXT
-,"implicit link requires IMPLICIT YES"
-#endif
-);
-const MessageType0 ParserMessages::explicitLinkFeature(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-291
-#ifndef SP_NO_MESSAGE_TEXT
-,"explicit link requires EXPLICIT YES"
-#endif
-);
-const MessageType0 ParserMessages::lpdBeforeBaseDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-292
-#ifndef SP_NO_MESSAGE_TEXT
-,"LPD not allowed before first DTD"
-#endif
-);
-const MessageType0 ParserMessages::dtdAfterLpd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-293
-#ifndef SP_NO_MESSAGE_TEXT
-,"DTD not allowed after an LPD"
-#endif
-);
-const MessageType1 ParserMessages::unstableLpdGeneralEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-294
-#ifndef SP_NO_MESSAGE_TEXT
-,"definition of general entity %1 is unstable"
-#endif
-);
-const MessageType1 ParserMessages::unstableLpdParameterEntity(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-295
-#ifndef SP_NO_MESSAGE_TEXT
-,"definition of parameter entity %1 is unstable"
-#endif
-);
-const MessageType1 ParserMessages::multipleIdLinkRuleAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-296
-#ifndef SP_NO_MESSAGE_TEXT
-,"multiple link rules for ID %1 but not all have link attribute specifications"
-#endif
-);
-const MessageType1 ParserMessages::multipleLinkRuleAttribute(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-297
-#ifndef SP_NO_MESSAGE_TEXT
-,"multiple link rules for element type %1 but not all have link attribute specifications"
-#endif
-);
-const MessageType2 ParserMessages::uselinkBadLinkSet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-298
-#ifndef SP_NO_MESSAGE_TEXT
-,"link type %1 does not have a link set %2"
-#endif
-);
-const MessageType1 ParserMessages::uselinkSimpleLpd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-299
-#ifndef SP_NO_MESSAGE_TEXT
-,"link set use declaration for simple link process"
-#endif
-);
-const MessageType1 ParserMessages::uselinkBadLinkType(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-300
-#ifndef SP_NO_MESSAGE_TEXT
-,"no link type %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateDtdLpd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-301
-#ifndef SP_NO_MESSAGE_TEXT
-,"both document type and link type %1"
-#endif
-);
-const MessageType1 ParserMessages::duplicateLpd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-302
-#ifndef SP_NO_MESSAGE_TEXT
-,"link type %1 already defined"
-#endif
-);
-const MessageType1 ParserMessages::duplicateDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-303
-#ifndef SP_NO_MESSAGE_TEXT
-,"document type %1 already defined"
-#endif
-);
-const MessageType1 ParserMessages::undefinedLinkSet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-304
-#ifndef SP_NO_MESSAGE_TEXT
-,"link set %1 used in LPD but not defined"
-#endif
-);
-const MessageType1 ParserMessages::duplicateImpliedResult(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-305
-#ifndef SP_NO_MESSAGE_TEXT
-,"#IMPLIED already linked to result element type %1"
-#endif
-);
-const MessageType1 ParserMessages::simpleLinkCount(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-306
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of active simple link processes exceeds quantity specified for SIMPLE parameter in SGML declaration (%1)"
-#endif
-);
-const MessageType0 ParserMessages::duplicateExplicitChain(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-307
-#ifndef SP_NO_MESSAGE_TEXT
-,"only one chain of explicit link processes can be active"
-#endif
-);
-const MessageType1 ParserMessages::explicit1RequiresSourceTypeBase(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-308
-#ifndef SP_NO_MESSAGE_TEXT
-,"source document type name for link type %1 must be base document type since EXPLICIT YES 1"
-#endif
-);
-const MessageType0 ParserMessages::oneImplicitLink(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-309
-#ifndef SP_NO_MESSAGE_TEXT
-,"one one implicit link process can be active"
-#endif
-);
-const MessageType1 ParserMessages::sorryLink(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-310
-#ifndef SP_NO_MESSAGE_TEXT
-,"sorry, link type %1 not activated: only one implicit or explicit link process can be active (with base document type as source document type)"
-#endif
-);
-const MessageType0 ParserMessages::entityReferenceMissingName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-311
-#ifndef SP_NO_MESSAGE_TEXT
-,"name missing after name group in entity reference"
-#endif
-);
-const MessageType1 ParserMessages::explicitNoRequiresSourceTypeBase(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-312
-#ifndef SP_NO_MESSAGE_TEXT
-,"source document type name for link type %1 must be base document type since EXPLICIT NO"
-#endif
-);
-const MessageType0 ParserMessages::linkActivateTooLate(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-313
-#ifndef SP_NO_MESSAGE_TEXT
-,"link process must be activated before base DTD"
-#endif
-);
-const MessageType0 ParserMessages::pass2Ee(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-314
-#ifndef SP_NO_MESSAGE_TEXT
-,"unexpected entity end while starting second pass"
-#endif
-);
-const MessageType2 ParserMessages::idlinkElementType(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-315
-#ifndef SP_NO_MESSAGE_TEXT
-,"type %1 of element with ID %2 not associated element type for applicable link rule in ID link set"
-#endif
-);
-const MessageType0 ParserMessages::datatagNotImplemented(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-316
-#ifndef SP_NO_MESSAGE_TEXT
-,"DATATAG feature not implemented"
-#endif
-);
-const MessageType0 ParserMessages::startTagMissingName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-317
-#ifndef SP_NO_MESSAGE_TEXT
-,"generic identifier specification missing after document type specification in start-tag"
-#endif
-);
-const MessageType0 ParserMessages::endTagMissingName(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-318
-#ifndef SP_NO_MESSAGE_TEXT
-,"generic identifier specification missing after document type specification in end-tag"
-#endif
-);
-const MessageType0 ParserMessages::startTagGroupNet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-319
-#ifndef SP_NO_MESSAGE_TEXT
-,"a net-enabling start-tag cannot include a document type specification"
-#endif
-);
-const MessageType0 ParserMessages::documentElementUndefined(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-320
-#ifndef SP_NO_MESSAGE_TEXT
-,"DTD did not contain element declaration for document type name"
-#endif
-);
-const MessageType0 ParserMessages::badDefaultSgmlDecl(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-321
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid default SGML declaration"
-#endif
-);
-const MessageType1L ParserMessages::nonExistentEntityRef(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-322
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to entity %1 for which no system identifier could be generated"
-,"entity was defined here"
-#endif
-);
-const MessageType0 ParserMessages::pcdataUnreachable(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-324
-#ifndef SP_NO_MESSAGE_TEXT
-,"content model is mixed but does not allow #PCDATA everywhere"
-#endif
-);
-const MessageType0 ParserMessages::sdRangeNotSingleChar(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-325
-#ifndef SP_NO_MESSAGE_TEXT
-,"start or end of range must specify a single character"
-#endif
-);
-const MessageType0 ParserMessages::sdInvalidRange(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-326
-#ifndef SP_NO_MESSAGE_TEXT
-,"number of first character in range must not exceed number of second character in range"
-#endif
-);
-const MessageType0 ParserMessages::sdEmptyDelimiter(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-327
-#ifndef SP_NO_MESSAGE_TEXT
-,"delimiter cannot be an empty string"
-#endif
-);
-const MessageType0 ParserMessages::tooManyCharsMinimumLiteral(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-328
-#ifndef SP_NO_MESSAGE_TEXT
-,"too many characters assigned same meaning with minimum literal"
-#endif
-);
-const MessageType1 ParserMessages::defaultedEntityDefined(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-329
-#ifndef SP_NO_MESSAGE_TEXT
-,"earlier reference to entity %1 used default entity"
-#endif
-);
-const MessageType0 ParserMessages::emptyStartTag(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-330
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty start-tag"
-#endif
-);
-const MessageType0 ParserMessages::emptyEndTag(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-331
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty end-tag"
-#endif
-);
-const MessageType1 ParserMessages::unusedMap(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-332
-#ifndef SP_NO_MESSAGE_TEXT
-,"unused short reference map %1"
-#endif
-);
-const MessageType1 ParserMessages::unusedParamEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-333
-#ifndef SP_NO_MESSAGE_TEXT
-,"unused parameter entity %1"
-#endif
-);
-const MessageType1 ParserMessages::cannotGenerateSystemIdPublic(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-334
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for public text %1"
-#endif
-);
-const MessageType1 ParserMessages::cannotGenerateSystemIdGeneral(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-335
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for general entity %1"
-#endif
-);
-const MessageType1 ParserMessages::cannotGenerateSystemIdParameter(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-336
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for parameter entity %1"
-#endif
-);
-const MessageType1 ParserMessages::cannotGenerateSystemIdDoctype(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-337
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for document type %1"
-#endif
-);
-const MessageType1 ParserMessages::cannotGenerateSystemIdLinktype(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-338
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for link type %1"
-#endif
-);
-const MessageType1 ParserMessages::cannotGenerateSystemIdNotation(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-339
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for notation %1"
-#endif
-);
-const MessageType1 ParserMessages::excludeIncludeSame(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-340
-#ifndef SP_NO_MESSAGE_TEXT
-,"element type %1 both included and excluded"
-#endif
-);
-const MessageType1 ParserMessages::implyingDtd(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-341
-#ifndef SP_NO_MESSAGE_TEXT
-,"no document type declaration; implying %1"
-#endif
-);
-const MessageType1 ParserMessages::afdrVersion(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-342
-#ifndef SP_NO_MESSAGE_TEXT
-,"minimum data of AFDR declaration must be \"ISO/IEC 10744:1997\" not %1"
-#endif
-);
-const MessageType0 ParserMessages::missingAfdrDecl(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-343
-#ifndef SP_NO_MESSAGE_TEXT
-,"AFDR declaration required before use of AFDR extensions"
-#endif
-);
-const MessageType0 ParserMessages::enrRequired(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-344
-#ifndef SP_NO_MESSAGE_TEXT
-,"ENR extensions were used but minimum literal was not \"ISO 8879:1986 (ENR)\" or \"ISO 8879:1986 (WWW)\""
-#endif
-);
-const MessageType1 ParserMessages::numericCharRefLiteralNonSgml(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-345
-#ifndef SP_NO_MESSAGE_TEXT
-,"illegal numeric character reference to non-SGML character %1 in literal"
-#endif
-);
-const MessageType2 ParserMessages::numericCharRefUnknownDesc(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-346
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot convert character reference to number %1 because description %2 unrecognized"
-#endif
-);
-const MessageType3 ParserMessages::numericCharRefUnknownBase(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-347
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot convert character reference to number %1 because character %2 from baseset %3 unknown"
-#endif
-);
-const MessageType1 ParserMessages::numericCharRefBadInternal(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-348
-#ifndef SP_NO_MESSAGE_TEXT
-,"character reference to number %1 cannot be converted because of problem with internal character set"
-#endif
-);
-const MessageType1 ParserMessages::numericCharRefNoInternal(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-349
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot convert character reference to number %1 because character not in internal character set"
-#endif
-);
-const MessageType0 ParserMessages::wwwRequired(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-350
-#ifndef SP_NO_MESSAGE_TEXT
-,"Web SGML adaptations were used but minimum literal was not \"ISO 8879:1986 (WWW)\""
-#endif
-);
-const MessageType1 ParserMessages::attributeTokenNotUnique(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-351
-#ifndef SP_NO_MESSAGE_TEXT
-,"token %1 can be value for more multiple attributes so attribute name required"
-#endif
-);
-const MessageType1 ParserMessages::hexNumberLength(
-MessageType::quantityError,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-352
-#ifndef SP_NO_MESSAGE_TEXT
-,"length of hex number must not exceed NAMELEN (%1)"
-#endif
-);
-const MessageType1 ParserMessages::entityNameSyntax(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-353
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid name in the declared concrete syntax"
-#endif
-);
-const MessageType0 ParserMessages::cdataContent(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-354
-#ifndef SP_NO_MESSAGE_TEXT
-,"CDATA declared content"
-#endif
-);
-const MessageType0 ParserMessages::rcdataContent(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-355
-#ifndef SP_NO_MESSAGE_TEXT
-,"RCDATA declared content"
-#endif
-);
-const MessageType0 ParserMessages::inclusion(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-356
-#ifndef SP_NO_MESSAGE_TEXT
-,"inclusion"
-#endif
-);
-const MessageType0 ParserMessages::exclusion(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-357
-#ifndef SP_NO_MESSAGE_TEXT
-,"exclusion"
-#endif
-);
-const MessageType0 ParserMessages::numberDeclaredValue(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-358
-#ifndef SP_NO_MESSAGE_TEXT
-,"NUMBER or NUMBERS declared value"
-#endif
-);
-const MessageType0 ParserMessages::nameDeclaredValue(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-359
-#ifndef SP_NO_MESSAGE_TEXT
-,"NAME or NAMES declared value"
-#endif
-);
-const MessageType0 ParserMessages::nutokenDeclaredValue(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-360
-#ifndef SP_NO_MESSAGE_TEXT
-,"NUTOKEN or NUTOKENS declared value"
-#endif
-);
-const MessageType0 ParserMessages::conrefAttribute(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-361
-#ifndef SP_NO_MESSAGE_TEXT
-,"conref attribute"
-#endif
-);
-const MessageType0 ParserMessages::currentAttribute(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-362
-#ifndef SP_NO_MESSAGE_TEXT
-,"current attribute"
-#endif
-);
-const MessageType0 ParserMessages::tempMarkedSection(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-363
-#ifndef SP_NO_MESSAGE_TEXT
-,"TEMP marked section"
-#endif
-);
-const MessageType0 ParserMessages::instanceIncludeMarkedSection(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-364
-#ifndef SP_NO_MESSAGE_TEXT
-,"included marked section in the instance"
-#endif
-);
-const MessageType0 ParserMessages::instanceIgnoreMarkedSection(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-365
-#ifndef SP_NO_MESSAGE_TEXT
-,"ignored marked section in the instance"
-#endif
-);
-const MessageType0 ParserMessages::rcdataMarkedSection(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-366
-#ifndef SP_NO_MESSAGE_TEXT
-,"RCDATA marked section"
-#endif
-);
-const MessageType0 ParserMessages::piEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-367
-#ifndef SP_NO_MESSAGE_TEXT
-,"processing instruction entity"
-#endif
-);
-const MessageType0 ParserMessages::bracketEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-368
-#ifndef SP_NO_MESSAGE_TEXT
-,"bracketed text entity"
-#endif
-);
-const MessageType0 ParserMessages::internalCdataEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-369
-#ifndef SP_NO_MESSAGE_TEXT
-,"internal CDATA entity"
-#endif
-);
-const MessageType0 ParserMessages::internalSdataEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-370
-#ifndef SP_NO_MESSAGE_TEXT
-,"internal SDATA entity"
-#endif
-);
-const MessageType0 ParserMessages::externalCdataEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-371
-#ifndef SP_NO_MESSAGE_TEXT
-,"external CDATA entity"
-#endif
-);
-const MessageType0 ParserMessages::externalSdataEntity(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-372
-#ifndef SP_NO_MESSAGE_TEXT
-,"external SDATA entity"
-#endif
-);
-const MessageType0 ParserMessages::dataAttributes(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-373
-#ifndef SP_NO_MESSAGE_TEXT
-,"attribute definition list declaration for notation"
-#endif
-);
-const MessageType0 ParserMessages::rank(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-374
-#ifndef SP_NO_MESSAGE_TEXT
-,"rank stem"
-#endif
-);
-const MessageType0 ParserMessages::missingSystemId(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-375
-#ifndef SP_NO_MESSAGE_TEXT
-,"no system id specified"
-#endif
-);
-const MessageType0 ParserMessages::psComment(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-376
-#ifndef SP_NO_MESSAGE_TEXT
-,"comment in parameter separator"
-#endif
-);
-const MessageType0 ParserMessages::namedCharRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-377
-#ifndef SP_NO_MESSAGE_TEXT
-,"named character reference"
-#endif
-);
-const MessageType0 ParserMessages::andGroup(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-378
-#ifndef SP_NO_MESSAGE_TEXT
-,"and group"
-#endif
-);
-const MessageType0 ParserMessages::attributeValueNotLiteral(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-379
-#ifndef SP_NO_MESSAGE_TEXT
-,"attribute value not a literal"
-#endif
-);
-const MessageType0 ParserMessages::missingAttributeName(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-380
-#ifndef SP_NO_MESSAGE_TEXT
-,"attribute name missing"
-#endif
-);
-const MessageType0 ParserMessages::elementGroupDecl(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-381
-#ifndef SP_NO_MESSAGE_TEXT
-,"element declaration for group of element types"
-#endif
-);
-const MessageType0 ParserMessages::attlistGroupDecl(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-382
-#ifndef SP_NO_MESSAGE_TEXT
-,"attribute definition list declaration for group of element types"
-#endif
-);
-const MessageType0 ParserMessages::emptyCommentDecl(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-383
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty comment declaration"
-#endif
-);
-const MessageType0 ParserMessages::commentDeclS(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-384
-#ifndef SP_NO_MESSAGE_TEXT
-,"s separator in comment declaration"
-#endif
-);
-const MessageType0 ParserMessages::commentDeclMultiple(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-385
-#ifndef SP_NO_MESSAGE_TEXT
-,"multiple comments in comment declaration"
-#endif
-);
-const MessageType0 ParserMessages::missingStatusKeyword(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-386
-#ifndef SP_NO_MESSAGE_TEXT
-,"no status keyword"
-#endif
-);
-const MessageType0 ParserMessages::multipleStatusKeyword(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-387
-#ifndef SP_NO_MESSAGE_TEXT
-,"multiple status keywords"
-#endif
-);
-const MessageType0 ParserMessages::instanceParamEntityRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-388
-#ifndef SP_NO_MESSAGE_TEXT
-,"parameter entity reference in document instance"
-#endif
-);
-const MessageType0 ParserMessages::current(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-389
-#ifndef SP_NO_MESSAGE_TEXT
-,"current attribute"
-#endif
-);
-const MessageType0 ParserMessages::minimizationParam(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-390
-#ifndef SP_NO_MESSAGE_TEXT
-,"element type minimization parameter"
-#endif
-);
-const MessageType0 ParserMessages::refc(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-391
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference not terminated by refc delimiter"
-#endif
-);
-const MessageType0 ParserMessages::pcdataNotFirstInGroup(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-392
-#ifndef SP_NO_MESSAGE_TEXT
-,"#PCDATA not first in model group"
-#endif
-);
-const MessageType0 ParserMessages::pcdataInSeqGroup(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-393
-#ifndef SP_NO_MESSAGE_TEXT
-,"#PCDATA in seq group"
-#endif
-);
-const MessageType0 ParserMessages::pcdataInNestedModelGroup(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-394
-#ifndef SP_NO_MESSAGE_TEXT
-,"#PCDATA in nested model group"
-#endif
-);
-const MessageType0 ParserMessages::pcdataGroupNotRep(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-395
-#ifndef SP_NO_MESSAGE_TEXT
-,"#PCDATA in model group that does not have rep occurrence indicator"
-#endif
-);
-const MessageType0 ParserMessages::nameGroupNotOr(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-396
-#ifndef SP_NO_MESSAGE_TEXT
-,"name group or name token group used connector other than OR"
-#endif
-);
-const MessageType0 ParserMessages::piMissingName(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-397
-#ifndef SP_NO_MESSAGE_TEXT
-,"processing instruction does not start with name"
-#endif
-);
-const MessageType0 ParserMessages::instanceStatusKeywordSpecS(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-398
-#ifndef SP_NO_MESSAGE_TEXT
-,"s separator in status keyword specification in document instance"
-#endif
-);
-const MessageType0 ParserMessages::externalDataEntityRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-399
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to external data entity"
-#endif
-);
-const MessageType0 ParserMessages::attributeValueExternalEntityRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-400
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to external entity in attribute value"
-#endif
-);
-const MessageType1 ParserMessages::dataCharDelim(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-401
-#ifndef SP_NO_MESSAGE_TEXT
-,"character %1 is the first character of a delimiter but occurred as data"
-#endif
-);
-const MessageType0 ParserMessages::explicitSgmlDecl(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-402
-#ifndef SP_NO_MESSAGE_TEXT
-,"SGML declaration was not implied"
-#endif
-);
-const MessageType0 ParserMessages::internalSubsetMarkedSection(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-403
-#ifndef SP_NO_MESSAGE_TEXT
-,"marked section in internal DTD subset"
-#endif
-);
-const MessageType0 ParserMessages::nestcWithoutNet(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-404
-#ifndef SP_NO_MESSAGE_TEXT
-,"net-enabling start-tag not immediately followed by null end-tag"
-#endif
-);
-const MessageType0 ParserMessages::contentAsyncEntityRef(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-405
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity end in different element from entity reference"
-#endif
-);
-const MessageType0 ParserMessages::immednetRequiresEmptynrm(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-406
-#ifndef SP_NO_MESSAGE_TEXT
-,"NETENABL IMMEDNET requires EMPTYNRM YES"
-#endif
-);
-const MessageType0 ParserMessages::nonSgmlCharRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-407
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to non-SGML character"
-#endif
-);
-const MessageType0 ParserMessages::defaultEntityDecl(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-408
-#ifndef SP_NO_MESSAGE_TEXT
-,"declaration of default entity"
-#endif
-);
-const MessageType0 ParserMessages::internalSubsetPsParamEntityRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-409
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to parameter entity in parameter separator in internal subset"
-#endif
-);
-const MessageType0 ParserMessages::internalSubsetTsParamEntityRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-410
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to parameter entity in token separator in internal subset"
-#endif
-);
-const MessageType0 ParserMessages::internalSubsetLiteralParamEntityRef(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-411
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference to parameter entity in parameter literal in internal subset"
-#endif
-);
-const MessageType0 ParserMessages::cannotGenerateSystemIdSgml(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-412
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot generate system identifier for SGML declaration reference"
-#endif
-);
-const MessageType1 ParserMessages::sdTextClass(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-413
-#ifndef SP_NO_MESSAGE_TEXT
-,"public text class of formal public identifier of SGML declaration must be SD"
-#endif
-);
-const MessageType0 ParserMessages::sgmlDeclRefRequiresWww(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-414
-#ifndef SP_NO_MESSAGE_TEXT
-,"SGML declaration reference was used but minimum literal was not \"ISO 8879:1986 (WWW)\""
-#endif
-);
-const MessageType0 ParserMessages::pcdataGroupMemberOccurrenceIndicator(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-415
-#ifndef SP_NO_MESSAGE_TEXT
-,"member of model group containing #PCDATA has occurrence indicator"
-#endif
-);
-const MessageType0 ParserMessages::pcdataGroupMemberModelGroup(
-MessageType::warning,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-416
-#ifndef SP_NO_MESSAGE_TEXT
-,"member of model group containing #PCDATA is a model group"
-#endif
-);
-const MessageFragment ParserMessages::delimStart(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1000
-#ifndef SP_NO_MESSAGE_TEXT
-,"delimiter "
-#endif
-);
-const MessageFragment ParserMessages::delimEnd(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1001
-#ifndef SP_NO_MESSAGE_TEXT
-,""
-#endif
-);
-const MessageFragment ParserMessages::digit(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1002
-#ifndef SP_NO_MESSAGE_TEXT
-,"digit"
-#endif
-);
-const MessageFragment ParserMessages::nameStartCharacter(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1003
-#ifndef SP_NO_MESSAGE_TEXT
-,"name start character"
-#endif
-);
-const MessageFragment ParserMessages::sepchar(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1004
-#ifndef SP_NO_MESSAGE_TEXT
-,"sepchar"
-#endif
-);
-const MessageFragment ParserMessages::separator(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1005
-#ifndef SP_NO_MESSAGE_TEXT
-,"separator"
-#endif
-);
-const MessageFragment ParserMessages::nameCharacter(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1006
-#ifndef SP_NO_MESSAGE_TEXT
-,"name character"
-#endif
-);
-const MessageFragment ParserMessages::dataCharacter(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1007
-#ifndef SP_NO_MESSAGE_TEXT
-,"data character"
-#endif
-);
-const MessageFragment ParserMessages::minimumDataCharacter(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1008
-#ifndef SP_NO_MESSAGE_TEXT
-,"minimum data character"
-#endif
-);
-const MessageFragment ParserMessages::significantCharacter(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1009
-#ifndef SP_NO_MESSAGE_TEXT
-,"significant character"
-#endif
-);
-const MessageFragment ParserMessages::recordEnd(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1010
-#ifndef SP_NO_MESSAGE_TEXT
-,"record end character"
-#endif
-);
-const MessageFragment ParserMessages::recordStart(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1011
-#ifndef SP_NO_MESSAGE_TEXT
-,"record start character"
-#endif
-);
-const MessageFragment ParserMessages::space(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1012
-#ifndef SP_NO_MESSAGE_TEXT
-,"space character"
-#endif
-);
-const MessageFragment ParserMessages::listSep(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1013
-#ifndef SP_NO_MESSAGE_TEXT
-,", "
-#endif
-);
-const MessageFragment ParserMessages::rangeSep(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1014
-#ifndef SP_NO_MESSAGE_TEXT
-,"-"
-#endif
-);
-const MessageFragment ParserMessages::parameterLiteral(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1015
-#ifndef SP_NO_MESSAGE_TEXT
-,"parameter literal"
-#endif
-);
-const MessageFragment ParserMessages::dataTagGroup(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1016
-#ifndef SP_NO_MESSAGE_TEXT
-,"data tag group"
-#endif
-);
-const MessageFragment ParserMessages::modelGroup(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1017
-#ifndef SP_NO_MESSAGE_TEXT
-,"model group"
-#endif
-);
-const MessageFragment ParserMessages::dataTagTemplateGroup(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1018
-#ifndef SP_NO_MESSAGE_TEXT
-,"data tag template group"
-#endif
-);
-const MessageFragment ParserMessages::name(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1019
-#ifndef SP_NO_MESSAGE_TEXT
-,"name"
-#endif
-);
-const MessageFragment ParserMessages::nameToken(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1020
-#ifndef SP_NO_MESSAGE_TEXT
-,"name token"
-#endif
-);
-const MessageFragment ParserMessages::elementToken(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1021
-#ifndef SP_NO_MESSAGE_TEXT
-,"element token"
-#endif
-);
-const MessageFragment ParserMessages::inclusions(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1022
-#ifndef SP_NO_MESSAGE_TEXT
-,"inclusions"
-#endif
-);
-const MessageFragment ParserMessages::exclusions(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1023
-#ifndef SP_NO_MESSAGE_TEXT
-,"exclusions"
-#endif
-);
-const MessageFragment ParserMessages::minimumLiteral(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1024
-#ifndef SP_NO_MESSAGE_TEXT
-,"minimum literal"
-#endif
-);
-const MessageFragment ParserMessages::attributeValueLiteral(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1025
-#ifndef SP_NO_MESSAGE_TEXT
-,"attribute value literal"
-#endif
-);
-const MessageFragment ParserMessages::systemIdentifier(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1026
-#ifndef SP_NO_MESSAGE_TEXT
-,"system identifier"
-#endif
-);
-const MessageFragment ParserMessages::number(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1027
-#ifndef SP_NO_MESSAGE_TEXT
-,"number"
-#endif
-);
-const MessageFragment ParserMessages::attributeValue(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1028
-#ifndef SP_NO_MESSAGE_TEXT
-,"attribute value"
-#endif
-);
-const MessageFragment ParserMessages::capacityName(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1029
-#ifndef SP_NO_MESSAGE_TEXT
-,"name of capacity"
-#endif
-);
-const MessageFragment ParserMessages::generalDelimiteRoleName(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1030
-#ifndef SP_NO_MESSAGE_TEXT
-,"name of general delimiter role"
-#endif
-);
-const MessageFragment ParserMessages::referenceReservedName(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1031
-#ifndef SP_NO_MESSAGE_TEXT
-,"reference reserved name"
-#endif
-);
-const MessageFragment ParserMessages::quantityName(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1032
-#ifndef SP_NO_MESSAGE_TEXT
-,"name of quantity"
-#endif
-);
-const MessageFragment ParserMessages::entityEnd(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1033
-#ifndef SP_NO_MESSAGE_TEXT
-,"entity end"
-#endif
-);
-const MessageFragment ParserMessages::shortrefDelim(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-1034
-#ifndef SP_NO_MESSAGE_TEXT
-,"short reference delimiter"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.h
deleted file mode 100644
index 0984bcf2ff..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserMessages.h
+++ /dev/null
@@ -1,907 +0,0 @@
-// This file was automatically generated from lib\ParserMessages.msg by msggen.pl.
-#ifndef ParserMessages_INCLUDED
-#define ParserMessages_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct ParserMessages {
- // 0
- static const MessageType1 nameLength;
- // 1
- static const MessageType1 parameterEntityNameLength;
- // 2
- static const MessageType1 numberLength;
- // 3
- static const MessageType1 attributeValueLength;
- // 4
- static const MessageType0 peroGrpoProlog;
- // 5
- static const MessageType0 groupLevel;
- // 6
- static const MessageType2 groupCharacter;
- // 7
- static const MessageType0 psRequired;
- // 8
- static const MessageType2 markupDeclarationCharacter;
- // 9
- static const MessageType0 declarationLevel;
- // 10
- static const MessageType0 groupEntityEnd;
- // 11
- static const MessageType1 invalidToken;
- // 12
- static const MessageType0 groupEntityReference;
- // 13
- static const MessageType1 duplicateGroupToken;
- // 14
- static const MessageType1 groupCount;
- // 15
- static const MessageType0 literalLevel;
- // 16
- static const MessageType1 literalMinimumData;
- // 17
- static const MessageType0 dataTagPatternNonSgml;
- // 18
- static const MessageType0 dataTagPatternFunction;
- // 19
- static const MessageType0 eroGrpoStartTag;
- // 20
- static const MessageType0 eroGrpoProlog;
- // 21
- static const MessageType1 functionName;
- // 22
- static const MessageType1 characterNumber;
- // 23
- static const MessageType1 parameterEntityUndefined;
- // 24
- static const MessageType1 entityUndefined;
- // 25
- static const MessageType0 rniNameStart;
- // 26
- static const MessageType0L commentEntityEnd;
- // 28
- static const MessageType0 mixedConnectors;
- // 29
- static const MessageType1 noSuchReservedName;
- // 30
- static const MessageType1 invalidReservedName;
- // 31
- static const MessageType1 minimumLiteralLength;
- // 32
- static const MessageType1 tokenizedAttributeValueLength;
- // 33
- static const MessageType1 systemIdentifierLength;
- // 34
- static const MessageType1 parameterLiteralLength;
- // 35
- static const MessageType1 dataTagPatternLiteralLength;
- // 36
- static const MessageType0 literalClosingDelimiter;
- // 37
- static const MessageType2 paramInvalidToken;
- // 38
- static const MessageType2 groupTokenInvalidToken;
- // 39
- static const MessageType2 connectorInvalidToken;
- // 40
- static const MessageType1 noSuchDeclarationType;
- // 41
- static const MessageType1 dtdSubsetDeclaration;
- // 42
- static const MessageType1 declSubsetCharacter;
- // 43
- static const MessageType0 documentEndDtdSubset;
- // 44
- static const MessageType1 prologCharacter;
- // 45
- static const MessageType0 documentEndProlog;
- // 46
- static const MessageType1 prologDeclaration;
- // 47
- static const MessageType1 rankStemGenericIdentifier;
- // 48
- static const MessageType0 missingTagMinimization;
- // 49
- static const MessageType1 duplicateElementDefinition;
- // 50
- static const MessageType0 entityApplicableDtd;
- // 51
- static const MessageType1L commentDeclInvalidToken;
- // 53
- static const MessageType1 instanceDeclaration;
- // 54
- static const MessageType0 contentNonSgml;
- // 55
- static const MessageType1 noCurrentRank;
- // 56
- static const MessageType1 duplicateAttlistNotation;
- // 57
- static const MessageType1 duplicateAttlistElement;
- // 58
- static const MessageType0 endTagEntityEnd;
- // 59
- static const MessageType1 endTagCharacter;
- // 60
- static const MessageType1 endTagInvalidToken;
- // 61
- static const MessageType0 pcdataNotAllowed;
- // 62
- static const MessageType1 elementNotAllowed;
- // 63
- static const MessageType2 missingElementMultiple;
- // 64
- static const MessageType2 missingElementInferred;
- // 65
- static const MessageType1 startTagEmptyElement;
- // 66
- static const MessageType1L omitEndTagDeclare;
- // 68
- static const MessageType1L omitEndTagOmittag;
- // 70
- static const MessageType1 omitStartTagDeclaredContent;
- // 71
- static const MessageType1 elementEndTagNotFinished;
- // 72
- static const MessageType1 omitStartTagDeclare;
- // 73
- static const MessageType1 taglvlOpenElements;
- // 74
- static const MessageType1 undefinedElement;
- // 75
- static const MessageType0 emptyEndTagNoOpenElements;
- // 76
- static const MessageType1 elementNotFinished;
- // 77
- static const MessageType1 elementNotOpen;
- // 78
- static const MessageType1 internalParameterDataEntity;
- // 79
- static const MessageType1 attributeSpecCharacter;
- // 80
- static const MessageType0 unquotedAttributeValue;
- // 81
- static const MessageType0 attributeSpecEntityEnd;
- // 82
- static const MessageType1 externalParameterDataSubdocEntity;
- // 83
- static const MessageType1 duplicateEntityDeclaration;
- // 84
- static const MessageType1 duplicateParameterEntityDeclaration;
- // 85
- static const MessageType0 piEntityReference;
- // 86
- static const MessageType0 internalDataEntityReference;
- // 87
- static const MessageType0 externalNonTextEntityReference;
- // 88
- static const MessageType0 externalNonTextEntityRcdata;
- // 89
- static const MessageType0 entlvl;
- // 90
- static const MessageType0 piEntityRcdata;
- // 91
- static const MessageType1 recursiveEntityReference;
- // 92
- static const MessageType1 undefinedShortrefMapInstance;
- // 93
- static const MessageType0 usemapAssociatedElementTypeDtd;
- // 94
- static const MessageType0 usemapAssociatedElementTypeInstance;
- // 95
- static const MessageType2 undefinedShortrefMapDtd;
- // 96
- static const MessageType1 unknownShortrefDelim;
- // 97
- static const MessageType1 delimDuplicateMap;
- // 98
- static const MessageType0 noDocumentElement;
- // 99
- static const MessageType0 processingInstructionEntityEnd;
- // 100
- static const MessageType1 processingInstructionLength;
- // 101
- static const MessageType0 processingInstructionClose;
- // 102
- static const MessageType0 attributeSpecNameTokenExpected;
- // 103
- static const MessageType1 noSuchAttributeToken;
- // 104
- static const MessageType0 attributeNameShorttag;
- // 105
- static const MessageType1 noSuchAttribute;
- // 106
- static const MessageType0 attributeValueExpected;
- // 107
- static const MessageType1 nameTokenLength;
- // 108
- static const MessageType0 attributeSpecLiteral;
- // 109
- static const MessageType1 duplicateAttributeSpec;
- // 110
- static const MessageType1 duplicateAttributeDef;
- // 111
- static const MessageType0 emptyDataAttributeSpec;
- // 112
- static const MessageType0 markedSectionEnd;
- // 113
- static const MessageType1 markedSectionLevel;
- // 114
- static const MessageType0L unclosedMarkedSection;
- // 116
- static const MessageType0 specialParseEntityEnd;
- // 117
- static const MessageType2 normalizedAttributeValueLength;
- // 118
- static const MessageType0 attributeValueSyntax;
- // 119
- static const MessageType2 attributeValueChar;
- // 120
- static const MessageType1 attributeValueMultiple;
- // 121
- static const MessageType2 attributeValueNumberToken;
- // 122
- static const MessageType2 attributeValueName;
- // 123
- static const MessageType1 attributeMissing;
- // 124
- static const MessageType1 requiredAttributeMissing;
- // 125
- static const MessageType1 currentAttributeMissing;
- // 126
- static const MessageType1 invalidNotationAttribute;
- // 127
- static const MessageType1 invalidEntityAttribute;
- // 128
- static const MessageType3 attributeValueNotInGroup;
- // 129
- static const MessageType1 notDataOrSubdocEntity;
- // 130
- static const MessageType3 ambiguousModelInitial;
- // 131
- static const MessageType5 ambiguousModel;
- // 132
- static const MessageType5 ambiguousModelSingleAnd;
- // 133
- static const MessageType6 ambiguousModelMultipleAnd;
- // 134
- static const MessageType1L commentDeclarationCharacter;
- // 136
- static const MessageType1 nonSgmlCharacter;
- // 137
- static const MessageType0 dataMarkedSectionDeclSubset;
- // 138
- static const MessageType1L duplicateId;
- // 140
- static const MessageType1 notFixedValue;
- // 141
- static const MessageType1 sdCommentSignificant;
- // 142
- static const MessageType1 standardVersion;
- // 143
- static const MessageType1 namingBeforeLcnmstrt;
- // 144
- static const MessageType1 sdEntityEnd;
- // 145
- static const MessageType2 sdInvalidNameToken;
- // 146
- static const MessageType1 numberTooBig;
- // 147
- static const MessageType1 sdLiteralSignificant;
- // 148
- static const MessageType1 syntaxCharacterNumber;
- // 149
- static const MessageType0 sdParameterEntity;
- // 150
- static const MessageType2 sdParamInvalidToken;
- // 151
- static const MessageType0 giveUp;
- // 152
- static const MessageType1 sdMissingCharacters;
- // 153
- static const MessageType1 missingMinimumChars;
- // 154
- static const MessageType1 duplicateCharNumbers;
- // 155
- static const MessageType1 codeSetHoles;
- // 156
- static const MessageType1 basesetCharsMissing;
- // 157
- static const MessageType1 documentCharMax;
- // 158
- static const MessageType1 fpiMissingField;
- // 159
- static const MessageType1 fpiMissingTextClassSpace;
- // 160
- static const MessageType1 fpiInvalidTextClass;
- // 161
- static const MessageType1 fpiInvalidLanguage;
- // 162
- static const MessageType1 fpiIllegalDisplayVersion;
- // 163
- static const MessageType1 fpiExtraField;
- // 164
- static const MessageType0 notationIdentifierTextClass;
- // 165
- static const MessageType1 unknownBaseset;
- // 166
- static const MessageType2 lexicalAmbiguity;
- // 167
- static const MessageType1 missingSignificant;
- // 168
- static const MessageType1 translateSyntaxCharDoc;
- // 169
- static const MessageType1 translateSyntaxCharInternal;
- // 170
- static const MessageType1 missingSyntaxChar;
- // 171
- static const MessageType1 unknownCapacitySet;
- // 172
- static const MessageType1 duplicateCapacity;
- // 173
- static const MessageType1 capacityExceedsTotalcap;
- // 174
- static const MessageType1 unknownPublicSyntax;
- // 175
- static const MessageType0 nmstrtLength;
- // 176
- static const MessageType0 nmcharLength;
- // 177
- static const MessageType1 subdocLevel;
- // 178
- static const MessageType1 subdocEntity;
- // 179
- static const MessageType0 parameterEntityNotEnded;
- // 180
- static const MessageType1 missingId;
- // 181
- static const MessageType1 dtdUndefinedElement;
- // 182
- static const MessageType1 elementNotFinishedDocumentEnd;
- // 183
- static const MessageType0 subdocGiveUp;
- // 184
- static const MessageType0 noDtd;
- // 185
- static const MessageType0 noDtdSubset;
- // 186
- static const MessageType0 notSgml;
- // 187
- static const MessageType1 taglen;
- // 188
- static const MessageType0 groupParameterEntityNotEnded;
- // 189
- static const MessageType1 invalidSgmlChar;
- // 190
- static const MessageType1 translateDocChar;
- // 191
- static const MessageType1 attributeValueLengthNeg;
- // 192
- static const MessageType1 tokenizedAttributeValueLengthNeg;
- // 193
- static const MessageType1 scopeInstanceQuantity;
- // 194
- static const MessageType1 basesetTextClass;
- // 195
- static const MessageType1 capacityTextClass;
- // 196
- static const MessageType1 syntaxTextClass;
- // 197
- static const MessageType0 msocharRequiresMsichar;
- // 198
- static const MessageType1 switchNotMarkup;
- // 199
- static const MessageType1 switchNotInCharset;
- // 200
- static const MessageType1 ambiguousDocCharacter;
- // 201
- static const MessageType1 oneFunction;
- // 202
- static const MessageType1 duplicateFunctionName;
- // 203
- static const MessageType1 missingSignificant646;
- // 204
- static const MessageType1 generalDelimAllFunction;
- // 205
- static const MessageType1 nmcharLetter;
- // 206
- static const MessageType1 nmcharDigit;
- // 207
- static const MessageType1 nmcharRe;
- // 208
- static const MessageType1 nmcharRs;
- // 209
- static const MessageType1 nmcharSpace;
- // 210
- static const MessageType1 nmcharSepchar;
- // 211
- static const MessageType1 switchLetterDigit;
- // 212
- static const MessageType0 zeroNumberOfCharacters;
- // 213
- static const MessageType1 nameReferenceReservedName;
- // 214
- static const MessageType1 ambiguousReservedName;
- // 215
- static const MessageType1 duplicateReservedName;
- // 216
- static const MessageType1 reservedNameSyntax;
- // 217
- static const MessageType1 multipleBSequence;
- // 218
- static const MessageType1 blankAdjacentBSequence;
- // 219
- static const MessageType2 delimiterLength;
- // 220
- static const MessageType2 reservedNameLength;
- // 221
- static const MessageType1 nmcharNmstrt;
- // 222
- static const MessageType0 scopeInstanceSyntaxCharset;
- // 223
- static const MessageType0 emptyOmitEndTag;
- // 224
- static const MessageType1 conrefOmitEndTag;
- // 225
- static const MessageType1 conrefEmpty;
- // 226
- static const MessageType1 notationEmpty;
- // 227
- static const MessageType0 dataAttributeDeclaredValue;
- // 228
- static const MessageType0 dataAttributeDefaultValue;
- // 229
- static const MessageType2 attcnt;
- // 230
- static const MessageType0 idDeclaredValue;
- // 231
- static const MessageType1 multipleIdAttributes;
- // 232
- static const MessageType1 multipleNotationAttributes;
- // 233
- static const MessageType1 duplicateAttributeToken;
- // 234
- static const MessageType1 notationNoAttributes;
- // 235
- static const MessageType2 entityNotationUndefined;
- // 236
- static const MessageType2 mapEntityUndefined;
- // 237
- static const MessageType1 attlistNotationUndefined;
- // 238
- static const MessageType1 bracketedLitlen;
- // 239
- static const MessageType1 genericIdentifierLength;
- // 240
- static const MessageType0 instanceStartOmittag;
- // 241
- static const MessageType1 grplvl;
- // 242
- static const MessageType1 grpgtcnt;
- // 243
- static const MessageType0 unclosedStartTagShorttag;
- // 244
- static const MessageType0 netEnablingStartTagShorttag;
- // 245
- static const MessageType0 unclosedEndTagShorttag;
- // 246
- static const MessageType0 multipleDtds;
- // 247
- static const MessageType0 afterDocumentElementEntityEnd;
- // 248
- static const MessageType1 declarationAfterDocumentElement;
- // 249
- static const MessageType0 characterReferenceAfterDocumentElement;
- // 250
- static const MessageType0 entityReferenceAfterDocumentElement;
- // 251
- static const MessageType0 markedSectionAfterDocumentElement;
- // 252
- static const MessageType3 requiredElementExcluded;
- // 253
- static const MessageType3 invalidExclusion;
- // 254
- static const MessageType0 attributeValueShorttag;
- // 255
- static const MessageType0 conrefNotation;
- // 256
- static const MessageType1 duplicateNotationDeclaration;
- // 257
- static const MessageType1L duplicateShortrefDeclaration;
- // 259
- static const MessageType1 duplicateDelimGeneral;
- // 260
- static const MessageType1 idrefGrpcnt;
- // 261
- static const MessageType1 entityNameGrpcnt;
- // 262
- static const MessageType2 attsplen;
- // 263
- static const MessageType1 duplicateDelimShortref;
- // 264
- static const MessageType1 duplicateDelimShortrefSet;
- // 265
- static const MessageType1 defaultEntityInAttribute;
- // 266
- static const MessageType1 defaultEntityReference;
- // 267
- static const MessageType2 mapDefaultEntity;
- // 268
- static const MessageType1 noSuchDtd;
- // 269
- static const MessageType1 noLpdSubset;
- // 270
- static const MessageType0 assocElementDifferentAtts;
- // 271
- static const MessageType1 duplicateLinkSet;
- // 272
- static const MessageType0 emptyResultAttributeSpec;
- // 273
- static const MessageType1 noSuchSourceElement;
- // 274
- static const MessageType1 noSuchResultElement;
- // 275
- static const MessageType0 documentEndLpdSubset;
- // 276
- static const MessageType1 lpdSubsetDeclaration;
- // 277
- static const MessageType0 idlinkDeclSimple;
- // 278
- static const MessageType0 linkDeclSimple;
- // 279
- static const MessageType1 simpleLinkAttlistElement;
- // 280
- static const MessageType0 shortrefOnlyInBaseDtd;
- // 281
- static const MessageType0 usemapOnlyInBaseDtd;
- // 282
- static const MessageType0 linkAttributeDefaultValue;
- // 283
- static const MessageType0 linkAttributeDeclaredValue;
- // 284
- static const MessageType0 simpleLinkFixedAttribute;
- // 285
- static const MessageType0 duplicateIdLinkSet;
- // 286
- static const MessageType1 noInitialLinkSet;
- // 287
- static const MessageType1 notationUndefinedSourceDtd;
- // 288
- static const MessageType0 simpleLinkResultNotImplied;
- // 289
- static const MessageType0 simpleLinkFeature;
- // 290
- static const MessageType0 implicitLinkFeature;
- // 291
- static const MessageType0 explicitLinkFeature;
- // 292
- static const MessageType0 lpdBeforeBaseDtd;
- // 293
- static const MessageType0 dtdAfterLpd;
- // 294
- static const MessageType1 unstableLpdGeneralEntity;
- // 295
- static const MessageType1 unstableLpdParameterEntity;
- // 296
- static const MessageType1 multipleIdLinkRuleAttribute;
- // 297
- static const MessageType1 multipleLinkRuleAttribute;
- // 298
- static const MessageType2 uselinkBadLinkSet;
- // 299
- static const MessageType1 uselinkSimpleLpd;
- // 300
- static const MessageType1 uselinkBadLinkType;
- // 301
- static const MessageType1 duplicateDtdLpd;
- // 302
- static const MessageType1 duplicateLpd;
- // 303
- static const MessageType1 duplicateDtd;
- // 304
- static const MessageType1 undefinedLinkSet;
- // 305
- static const MessageType1 duplicateImpliedResult;
- // 306
- static const MessageType1 simpleLinkCount;
- // 307
- static const MessageType0 duplicateExplicitChain;
- // 308
- static const MessageType1 explicit1RequiresSourceTypeBase;
- // 309
- static const MessageType0 oneImplicitLink;
- // 310
- static const MessageType1 sorryLink;
- // 311
- static const MessageType0 entityReferenceMissingName;
- // 312
- static const MessageType1 explicitNoRequiresSourceTypeBase;
- // 313
- static const MessageType0 linkActivateTooLate;
- // 314
- static const MessageType0 pass2Ee;
- // 315
- static const MessageType2 idlinkElementType;
- // 316
- static const MessageType0 datatagNotImplemented;
- // 317
- static const MessageType0 startTagMissingName;
- // 318
- static const MessageType0 endTagMissingName;
- // 319
- static const MessageType0 startTagGroupNet;
- // 320
- static const MessageType0 documentElementUndefined;
- // 321
- static const MessageType0 badDefaultSgmlDecl;
- // 322
- static const MessageType1L nonExistentEntityRef;
- // 324
- static const MessageType0 pcdataUnreachable;
- // 325
- static const MessageType0 sdRangeNotSingleChar;
- // 326
- static const MessageType0 sdInvalidRange;
- // 327
- static const MessageType0 sdEmptyDelimiter;
- // 328
- static const MessageType0 tooManyCharsMinimumLiteral;
- // 329
- static const MessageType1 defaultedEntityDefined;
- // 330
- static const MessageType0 emptyStartTag;
- // 331
- static const MessageType0 emptyEndTag;
- // 332
- static const MessageType1 unusedMap;
- // 333
- static const MessageType1 unusedParamEntity;
- // 334
- static const MessageType1 cannotGenerateSystemIdPublic;
- // 335
- static const MessageType1 cannotGenerateSystemIdGeneral;
- // 336
- static const MessageType1 cannotGenerateSystemIdParameter;
- // 337
- static const MessageType1 cannotGenerateSystemIdDoctype;
- // 338
- static const MessageType1 cannotGenerateSystemIdLinktype;
- // 339
- static const MessageType1 cannotGenerateSystemIdNotation;
- // 340
- static const MessageType1 excludeIncludeSame;
- // 341
- static const MessageType1 implyingDtd;
- // 342
- static const MessageType1 afdrVersion;
- // 343
- static const MessageType0 missingAfdrDecl;
- // 344
- static const MessageType0 enrRequired;
- // 345
- static const MessageType1 numericCharRefLiteralNonSgml;
- // 346
- static const MessageType2 numericCharRefUnknownDesc;
- // 347
- static const MessageType3 numericCharRefUnknownBase;
- // 348
- static const MessageType1 numericCharRefBadInternal;
- // 349
- static const MessageType1 numericCharRefNoInternal;
- // 350
- static const MessageType0 wwwRequired;
- // 351
- static const MessageType1 attributeTokenNotUnique;
- // 352
- static const MessageType1 hexNumberLength;
- // 353
- static const MessageType1 entityNameSyntax;
- // 354
- static const MessageType0 cdataContent;
- // 355
- static const MessageType0 rcdataContent;
- // 356
- static const MessageType0 inclusion;
- // 357
- static const MessageType0 exclusion;
- // 358
- static const MessageType0 numberDeclaredValue;
- // 359
- static const MessageType0 nameDeclaredValue;
- // 360
- static const MessageType0 nutokenDeclaredValue;
- // 361
- static const MessageType0 conrefAttribute;
- // 362
- static const MessageType0 currentAttribute;
- // 363
- static const MessageType0 tempMarkedSection;
- // 364
- static const MessageType0 instanceIncludeMarkedSection;
- // 365
- static const MessageType0 instanceIgnoreMarkedSection;
- // 366
- static const MessageType0 rcdataMarkedSection;
- // 367
- static const MessageType0 piEntity;
- // 368
- static const MessageType0 bracketEntity;
- // 369
- static const MessageType0 internalCdataEntity;
- // 370
- static const MessageType0 internalSdataEntity;
- // 371
- static const MessageType0 externalCdataEntity;
- // 372
- static const MessageType0 externalSdataEntity;
- // 373
- static const MessageType0 dataAttributes;
- // 374
- static const MessageType0 rank;
- // 375
- static const MessageType0 missingSystemId;
- // 376
- static const MessageType0 psComment;
- // 377
- static const MessageType0 namedCharRef;
- // 378
- static const MessageType0 andGroup;
- // 379
- static const MessageType0 attributeValueNotLiteral;
- // 380
- static const MessageType0 missingAttributeName;
- // 381
- static const MessageType0 elementGroupDecl;
- // 382
- static const MessageType0 attlistGroupDecl;
- // 383
- static const MessageType0 emptyCommentDecl;
- // 384
- static const MessageType0 commentDeclS;
- // 385
- static const MessageType0 commentDeclMultiple;
- // 386
- static const MessageType0 missingStatusKeyword;
- // 387
- static const MessageType0 multipleStatusKeyword;
- // 388
- static const MessageType0 instanceParamEntityRef;
- // 389
- static const MessageType0 current;
- // 390
- static const MessageType0 minimizationParam;
- // 391
- static const MessageType0 refc;
- // 392
- static const MessageType0 pcdataNotFirstInGroup;
- // 393
- static const MessageType0 pcdataInSeqGroup;
- // 394
- static const MessageType0 pcdataInNestedModelGroup;
- // 395
- static const MessageType0 pcdataGroupNotRep;
- // 396
- static const MessageType0 nameGroupNotOr;
- // 397
- static const MessageType0 piMissingName;
- // 398
- static const MessageType0 instanceStatusKeywordSpecS;
- // 399
- static const MessageType0 externalDataEntityRef;
- // 400
- static const MessageType0 attributeValueExternalEntityRef;
- // 401
- static const MessageType1 dataCharDelim;
- // 402
- static const MessageType0 explicitSgmlDecl;
- // 403
- static const MessageType0 internalSubsetMarkedSection;
- // 404
- static const MessageType0 nestcWithoutNet;
- // 405
- static const MessageType0 contentAsyncEntityRef;
- // 406
- static const MessageType0 immednetRequiresEmptynrm;
- // 407
- static const MessageType0 nonSgmlCharRef;
- // 408
- static const MessageType0 defaultEntityDecl;
- // 409
- static const MessageType0 internalSubsetPsParamEntityRef;
- // 410
- static const MessageType0 internalSubsetTsParamEntityRef;
- // 411
- static const MessageType0 internalSubsetLiteralParamEntityRef;
- // 412
- static const MessageType0 cannotGenerateSystemIdSgml;
- // 413
- static const MessageType1 sdTextClass;
- // 414
- static const MessageType0 sgmlDeclRefRequiresWww;
- // 415
- static const MessageType0 pcdataGroupMemberOccurrenceIndicator;
- // 416
- static const MessageType0 pcdataGroupMemberModelGroup;
- // 1000
- static const MessageFragment delimStart;
- // 1001
- static const MessageFragment delimEnd;
- // 1002
- static const MessageFragment digit;
- // 1003
- static const MessageFragment nameStartCharacter;
- // 1004
- static const MessageFragment sepchar;
- // 1005
- static const MessageFragment separator;
- // 1006
- static const MessageFragment nameCharacter;
- // 1007
- static const MessageFragment dataCharacter;
- // 1008
- static const MessageFragment minimumDataCharacter;
- // 1009
- static const MessageFragment significantCharacter;
- // 1010
- static const MessageFragment recordEnd;
- // 1011
- static const MessageFragment recordStart;
- // 1012
- static const MessageFragment space;
- // 1013
- static const MessageFragment listSep;
- // 1014
- static const MessageFragment rangeSep;
- // 1015
- static const MessageFragment parameterLiteral;
- // 1016
- static const MessageFragment dataTagGroup;
- // 1017
- static const MessageFragment modelGroup;
- // 1018
- static const MessageFragment dataTagTemplateGroup;
- // 1019
- static const MessageFragment name;
- // 1020
- static const MessageFragment nameToken;
- // 1021
- static const MessageFragment elementToken;
- // 1022
- static const MessageFragment inclusions;
- // 1023
- static const MessageFragment exclusions;
- // 1024
- static const MessageFragment minimumLiteral;
- // 1025
- static const MessageFragment attributeValueLiteral;
- // 1026
- static const MessageFragment systemIdentifier;
- // 1027
- static const MessageFragment number;
- // 1028
- static const MessageFragment attributeValue;
- // 1029
- static const MessageFragment capacityName;
- // 1030
- static const MessageFragment generalDelimiteRoleName;
- // 1031
- static const MessageFragment referenceReservedName;
- // 1032
- static const MessageFragment quantityName;
- // 1033
- static const MessageFragment entityEnd;
- // 1034
- static const MessageFragment shortrefDelim;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ParserMessages_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserOptions.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserOptions.cxx
deleted file mode 100644
index de2ac0c4b1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserOptions.cxx
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "ParserOptions.h"
-#include <string.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ParserOptions::ParserOptions()
-: datatag(0),
- omittag(1),
- rank(1),
- shorttag(1),
- emptynrm(0),
- linkSimple(1000),
- linkImplicit(1),
- linkExplicit(1),
- concur(0),
- subdoc(99999999),
- formal(1),
- typeValid(sgmlDeclTypeValid),
- shortref(1),
- errorIdref(1),
- errorSignificant(1),
- errorAfdr(1),
- noUnclosedTag(0),
- noNet(0)
-{
- for (int i = 0; i < nQuantity; i++)
- quantity[i] = 99999999;
- quantity[BSEQLEN] = 960;
- quantity[NORMSEP] = 2;
- quantity[LITLEN] = 24000;
- quantity[PILEN] = 24000;
- quantity[DTEMPLEN] = 24000;
-}
-
-Warnings::Warnings()
-{
- memset(this, 0, sizeof(Warnings));
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.cxx
deleted file mode 100644
index a64ec32fb5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.cxx
+++ /dev/null
@@ -1,828 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "ParserState.h"
-#include "InternalInputSource.h"
-#include "MessageArg.h"
-#include "macros.h"
-#include "SgmlParser.h"
-#include "IListIter.h"
-#include "ParserMessages.h"
-#include "Undo.h"
-#include "Trie.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const Location ParserState::nullLocation_;
-sig_atomic_t ParserState::dummyCancel_ = 0;
-
-static const size_t eventSizes[] = {
-#define EVENT(c, f) sizeof(c),
-#include "events.h"
-#undef EVENT
-};
-
-static const size_t internalSizes[] = {
- sizeof(InternalInputSource),
- sizeof(OpenElement),
- sizeof(UndoStartTag),
- sizeof(UndoEndTag),
- sizeof(UndoTransition)
-};
-
-static
-size_t maxSize(const size_t *v, size_t n, size_t max = 0)
-{
- for (size_t i = 0; i < n; i++) {
- if (v[i] > max)
- max = v[i];
- }
- return max;
-}
-
-ParserState::ParserState(const Ptr<EntityManager> &em,
- const ParserOptions &opt,
- unsigned subdocLevel,
- Phase finalPhase)
-: entityManager_(em),
- options_(opt),
- inInstance_(0),
- keepingMessages_(0),
- eventAllocator_(maxSize(eventSizes, SIZEOF(eventSizes)), 50),
- internalAllocator_(maxSize(internalSizes, SIZEOF(internalSizes), EntityOrigin::allocSize), 50),
- handler_(&eventQueue_),
- subdocLevel_(subdocLevel),
- inputLevel_(0),
- specialParseInputLevel_(0),
- markedSectionLevel_(0),
- markedSectionSpecialLevel_(0),
- currentMode_(proMode),
- hadLpd_(0),
- resultAttributeSpecMode_(0),
- pass2_(0),
- activeLinkTypesSubsted_(0),
- allowPass2_(0),
- hadPass2Start_(0),
- pcdataRecovering_(0),
- currentMarkup_(0),
- cancelPtr_(&dummyCancel_),
- finalPhase_(finalPhase),
- hadAfdrDecl_(0)
-{
-}
-
-void ParserState::inheritActiveLinkTypes(const ParserState &parent)
-{
- activeLinkTypes_ = parent.activeLinkTypes_;
- activeLinkTypesSubsted_ = parent.activeLinkTypesSubsted_;
-}
-
-void ParserState::allDone()
-{
- phase_ = noPhase;
-}
-
-void ParserState::setPass2Start()
-{
- ASSERT(inputLevel_ == 1);
- if (hadPass2Start_)
- return;
- hadPass2Start_ = 1;
- if (!pass2() && sd().link() && activeLinkTypes_.size() > 0) {
- allowPass2_ = 1;
- pass1Handler_.init(handler_);
- handler_ = &pass1Handler_;
- const InputSourceOrigin *p
- = currentLocation().origin()->asInputSourceOrigin();
- pass2StartOffset_= p->startOffset(currentLocation().index());
- }
- else {
- allowPass2_ = 0;
- currentInput()->willNotRewind();
- }
-}
-
-void ParserState::allLinkTypesActivated()
-{
- if (activeLinkTypes_.size() == 0 && inputLevel_ == 1)
- currentInput()->willNotRewind();
-}
-
-Boolean ParserState::maybeStartPass2()
-{
- if (pass2_ || !allowPass2_)
- return 0;
- handler_ = pass1Handler_.origHandler();
- if (!nActiveLink() || pass1Handler_.hadError()) {
- while (!pass1Handler_.empty()) {
- if (cancelled())
- return 0;
- pass1Handler_.get()->handle(*handler_);
- }
- InputSource *top = 0;
- for (IListIter<InputSource> iter(inputStack_);
- !iter.done();
- iter.next())
- top = iter.cur();
- if (top)
- top->willNotRewind();
- return 0;
- }
- pass1Handler_.clear();
- while (inputLevel_ > 1) {
- InputSource *p = inputStack_.get();
- inputLevel_--;
- delete p;
- }
- // Caller will call allDone() if inputLevel_ is 0.
- if (inputLevel_ == 0)
- return 0;
- if (!inputStack_.head()->rewind(*this)) {
- inputLevel_ = 0;
- delete inputStack_.get();
- return 0;
- }
- inputStack_.head()->willNotRewind();
- for (; pass2StartOffset_ > 0; pass2StartOffset_--)
- if (inputStack_.head()->get(messenger()) == InputSource::eE) {
- message(ParserMessages::pass2Ee);
- inputLevel_ = 0;
- delete inputStack_.get();
- return 0;
- }
- specialParseInputLevel_ = 0;
- markedSectionLevel_ = 0;
- markedSectionSpecialLevel_ = 0;
- currentMode_ = proMode;
- hadLpd_ = 0;
- allowPass2_ = 0;
- hadPass2Start_ = 0;
- currentMarkup_ = 0;
- inputLevel_ = 1;
- inInstance_ = 0;
- defDtd_.clear();
- defLpd_.clear();
- dtd_[0].swap(pass1Dtd_);
- dtd_.clear();
- dsEntity_.clear();
- currentDtd_.clear();
- currentDtdConst_.clear();
- phase_ = noPhase;
- pass2_ = 1;
- lpd_.clear();
- allLpd_.clear();
- return 1;
-}
-
-Boolean ParserState::referenceDsEntity(const Location &loc)
-{
- if (dsEntity_.isNull())
- return 0;
- Ptr<EntityOrigin> origin
- = EntityOrigin::make(internalAllocator(), dsEntity_, loc);
- dsEntity_->dsReference(*this, origin);
- dsEntity_.clear();
- return inputLevel() > 1;
-}
-
-void ParserState::startDtd(const StringC &name)
-{
- defDtd_ = new Dtd(name, dtd_.size() == 0);
- defLpd_.clear();
- for (size_t i = 0; i < options().includes.size(); i++) {
- StringC name = options().includes[i];
- const SubstTable<Char> *subst = syntax().entitySubstTable();
- for (size_t j = 0; j < name.size(); j++)
- subst->subst(name[j]);
- Text text;
- text.addChars(syntax().reservedName(Syntax::rINCLUDE), Location());
- Entity *entity
- = new InternalTextEntity(name,
- Entity::parameterEntity,
- Location(),
- text,
- InternalTextEntity::none);
- entity->setUsed();
- defDtd_->insertEntity(entity);
- }
- size_t nEntities = instanceSyntax_->nEntities();
- for (size_t i = 0; i < nEntities; i++) {
- Text text;
- text.addChar(instanceSyntax_->entityChar(i), Location());
- Entity *entity
- = new InternalCdataEntity(instanceSyntax_->entityName(i),
- Location(),
- text);
- defDtd_->insertEntity(entity);
- }
- currentDtd_ = defDtd_;
- currentDtdConst_ = defDtd_;
- currentMode_ = dsMode;
-}
-
-void ParserState::endDtd()
-{
- dtd_.push_back(defDtd_);
- defDtd_.clear();
- currentDtd_.clear();
- currentDtdConst_.clear();
- currentMode_ = proMode;
-}
-
-void ParserState::startLpd(Ptr<Lpd> &lpd)
-{
- defLpd_ = lpd;
- defDtd_ = defLpd_->sourceDtd();
- currentDtd_ = defLpd_->sourceDtd();
- currentDtdConst_ = defLpd_->sourceDtd();
- currentMode_ = dsMode;
-}
-
-void ParserState::endLpd()
-{
- hadLpd_ = 1;
- if (defLpd_->active())
- lpd_.push_back(defLpd_);
- allLpd_.push_back(defLpd_);
- defLpd_.clear();
- currentDtd_.clear();
- currentDtdConst_.clear();
- currentMode_ = proMode;
-}
-
-void ParserState::popInputStack()
-{
- ASSERT(inputLevel_ > 0);
- InputSource *p = inputStack_.get();
- inputLevel_--;
- delete p;
- if (specialParseInputLevel_ > 0 && inputLevel_ == specialParseInputLevel_)
- currentMode_ = specialParseMode_;
- if (currentMode_ == dsiMode
- && inputLevel_ == 1
- && markedSectionLevel_ == 0)
- currentMode_ = dsMode;
- if (inputLevelElementIndex_.size())
- inputLevelElementIndex_.resize(inputLevelElementIndex_.size() - 1);
-}
-
-void ParserState::setSd(ConstPtr<Sd> sd)
-{
- sd_ = sd;
- mayDefaultAttribute_ = (sd_->omittag() || sd_->attributeDefault());
- validate_ = sd_->typeValid();
- implydefElement_ = sd_->implydefElement();
- implydefAttlist_ = sd_->implydefAttlist();
-}
-
-void ParserState::setSyntax(ConstPtr<Syntax> syntax)
-{
- syntax_ = syntax;
- prologSyntax_ = syntax;
- instanceSyntax_ = syntax;
-}
-
-void ParserState::setSyntaxes(ConstPtr<Syntax> prologSyntax,
- ConstPtr<Syntax> instanceSyntax)
-{
- syntax_ = prologSyntax;
- prologSyntax_ = prologSyntax;
- instanceSyntax_ = instanceSyntax;
-}
-
-void ParserState::pushInput(InputSource *in)
-{
- if (!in)
- return;
- if (!syntax_.isNull() && syntax_->multicode())
- in->setMarkupScanTable(syntax_->markupScanTable());
- inputStack_.insert(in);
- inputLevel_++;
- if (specialParseInputLevel_ > 0 && inputLevel_ > specialParseInputLevel_)
- currentMode_ = rcconeMode; // mode for rcdata in an entity
- else if (currentMode_ == dsMode)
- currentMode_ = dsiMode;
- if (inInstance_ && sd().integrallyStored())
- inputLevelElementIndex_.push_back(tagLevel() ? currentElement().index() : 0);
-}
-
-void ParserState::startMarkedSection(const Location &loc)
-{
- markedSectionLevel_++;
- markedSectionStartLocation_.push_back(loc);
- if (currentMode_ == dsMode)
- currentMode_ = dsiMode;
- if (markedSectionSpecialLevel_)
- markedSectionSpecialLevel_++;
-}
-
-void ParserState::startSpecialMarkedSection(Mode mode, const Location &loc)
-{
- markedSectionLevel_++;
- markedSectionStartLocation_.push_back(loc);
- specialParseInputLevel_ = inputLevel_;
- markedSectionSpecialLevel_ = 1;
- specialParseMode_ = currentMode_ = mode;
-}
-
-void ParserState::endMarkedSection()
-{
- ASSERT(markedSectionLevel_ > 0);
- markedSectionLevel_--;
- markedSectionStartLocation_.resize(markedSectionStartLocation_.size()
- - 1);
- if (markedSectionSpecialLevel_ > 0) {
- markedSectionSpecialLevel_--;
- if (markedSectionSpecialLevel_ > 0)
- return; // remain in imsMode
- specialParseInputLevel_ = 0;
- if (inInstance_)
- currentMode_ = contentMode();
- else
- currentMode_ = dsiMode;
- }
- if (currentMode_ == dsiMode
- && inputLevel_ == 1
- && markedSectionLevel_ == 0)
- currentMode_ = dsMode;
-}
-
-void ParserState::pushElement(OpenElement *e)
-{
- ContentState::pushElement(e);
- pcdataRecovering_ = 0;
- // the start tag of this element may have been implied by data
- // inside a cdata or rcdata marked section
- if (markedSectionSpecialLevel_ == 0) {
- currentMode_ = contentMode();
- if (e->requiresSpecialParse()) {
- specialParseMode_ = currentMode_;
- specialParseInputLevel_ = inputLevel_;
- }
- }
-}
-
-// PCDATA was encountered somewhere where it was not allowed.
-// Change the current mode to improve recovery.
-
-void ParserState::pcdataRecover()
-{
- switch (currentMode_) {
- case econMode:
- currentMode_ = mconMode;
- break;
- case econnetMode:
- currentMode_ = mconnetMode;
- break;
- default:
- break;
- }
- pcdataRecovering_ = 1;
-}
-
-OpenElement *ParserState::popSaveElement()
-{
- OpenElement *e = ContentState::popSaveElement();
- // the end tag of this element may have been implied by data
- // inside a cdata or rcdata marked section
- if (markedSectionSpecialLevel_ == 0) {
- currentMode_ = contentMode();
- specialParseInputLevel_ = 0;
- }
- pcdataRecovering_ = 0;
- return e;
-}
-
-void ParserState::popElement()
-{
- delete popSaveElement();
-}
-
-Boolean ParserState::entityIsOpen(const Entity *entity) const
-{
- for (IListIter<InputSource> iter(inputStack_); !iter.done(); iter.next()) {
- const EntityOrigin *eo
- = iter.cur()->currentLocation().origin()->asEntityOrigin();
- if (eo && eo->entity() == entity)
- return 1;
- }
- return 0;
-}
-
-void ParserState::startInstance()
-{
- if (!instanceSyntax_.isNull())
- syntax_ = instanceSyntax_;
- currentMode_ = econMode;
- currentDtd_ = dtd_[0];
- currentDtdConst_ = dtd_[0];
- startContent(currentDtd());
- inInstance_ = 1;
- if (sd().rank())
- currentRank_.assign(currentDtd().nRankStem(), StringC());
- currentAttributes_.clear();
- currentAttributes_.resize(currentDtd().nCurrentAttribute());
- idTable_.clear();
-}
-
-Id *ParserState::lookupCreateId(const StringC &name)
-{
- Id *id = idTable_.lookup(name);
- if (!id) {
- id = new Id(name);
- idTable_.insert(id);
- }
- return id;
-}
-
-ConstPtr<Entity>
-ParserState::lookupEntity(Boolean isParameter,
- const StringC &name,
- const Location &useLocation,
- Boolean referenced)
-{
- Dtd *dtd;
- if (resultAttributeSpecMode_)
- dtd = defComplexLpd().resultDtd().pointer();
- else
- dtd = currentDtd_.pointer();
- if (dtd) {
- Ptr<Entity> entity(dtd->lookupEntity(isParameter, name));
- // Did we find it in pass1Dtd?
- // Did we look at the defaultEntity?
- if (!inInstance_ && pass2() && dtd->isBase()
- && !resultAttributeSpecMode_
- && (entity.isNull() || !entity->declInActiveLpd())) {
- ConstPtr<Entity> entity1
- = pass1Dtd_->lookupEntity(isParameter, name);
- if (!entity1.isNull() && entity1->declInActiveLpd()
- && !entity1->defaulted()) {
- if (referenced)
- noteReferencedEntity(entity1, 1, 0);
- return entity1;
- }
- else if (!entity.isNull()) {
- if (referenced)
- noteReferencedEntity(entity, 0, 0);
- entity->setUsed();
- return entity;
- }
- }
- else if (!entity.isNull()) {
- entity->setUsed();
- return entity;
- }
- if (!isParameter) {
- ConstPtr<Entity> entity(dtd->defaultEntity());
- Boolean note = 0;
- Boolean usedPass1 = 0;
- if (!inInstance_ && pass2() && dtd->isBase()
- && !resultAttributeSpecMode_
- && (entity.isNull() || !entity->declInActiveLpd())) {
- if (referenced)
- note = 1;
- ConstPtr<Entity> entity1 = pass1Dtd_->defaultEntity();
- if (!entity1.isNull() && entity1->declInActiveLpd()) {
- usedPass1 = 1;
- entity = entity1;
- }
- }
- if (!entity.isNull()) {
- Boolean mustCopy = 1;
- if (inInstance_) {
- ConstPtr<Entity> tem
- = instanceDefaultedEntityTable_.lookupConst(name);
- if (!tem.isNull()) {
- entity = tem;
- mustCopy = 0;
- }
- }
- if (mustCopy) {
- Ptr<Entity> p(entity->copy());
- p->setName(name);
- p->generateSystemId(*this);
- p->setDefaulted();
- entity = p;
- if (inInstance_) {
- instanceDefaultedEntityTable_.insert(p);
- eventHandler().entityDefaulted(new (eventAllocator())
- EntityDefaultedEvent(entity,
- useLocation));
- }
- else
- dtd->insertEntity(p);
- }
- if (note)
- noteReferencedEntity(entity, usedPass1, 1);
- }
- else
- entity = undefinedEntityTable_.lookupConst(name);
- return entity;
- }
- }
- return (Entity *)0;
-}
-
-ConstPtr<Entity> ParserState::createUndefinedEntity(const StringC &name, const Location &loc)
-{
- Text text;
- Ptr<Entity> entity(new InternalCdataEntity(name, loc, text));
- undefinedEntityTable_.insert(entity);
- return entity;
-}
-
-void ParserState::noteReferencedEntity(const ConstPtr<Entity> &entity,
- Boolean foundInPass1Dtd,
- Boolean lookedAtDefault)
-{
- LpdEntityRef ref;
- ref.entity = entity;
- ref.lookedAtDefault = lookedAtDefault;
- ref.foundInPass1Dtd = foundInPass1Dtd;
- LpdEntityRef *old = lpdEntityRefs_.lookup(ref);
- if (!old)
- lpdEntityRefs_.insert(new LpdEntityRef(ref));
-}
-
-// Compare entity definitions.
-// e1 is the original (will not be an external non-text entity).
-// FIXME should look at generated sysids as well.
-static
-Boolean sameEntityDef(const Entity *e1, const Entity *e2)
-{
- if (e1->dataType() != e2->dataType())
- return 0;
- const InternalEntity *i1 = e1->asInternalEntity();
- const InternalEntity *i2 = e2->asInternalEntity();
- if (i1) {
- if (!i2)
- return 0;
- if (i1->string() != i2->string())
- return 0;
- return 1;
- }
- else if (i2)
- return 0;
- const ExternalEntity *x1 = e1->asExternalEntity();
- const ExternalEntity *x2 = e2->asExternalEntity();
- const StringC *s1 = x1->externalId().systemIdString();
- const StringC *s2 = x2->externalId().systemIdString();
- if (s1) {
- if (!s2)
- return 0;
- if (*s1 != *s2)
- return 0;
- }
- else if (s2)
- return 0;
- s1 = x1->externalId().publicIdString();
- s2 = x2->externalId().publicIdString();
- if (s1) {
- if (!s2)
- return 0;
- if (*s1 != *s2)
- return 0;
- }
- else if (s2)
- return 0;
- return 1;
-}
-
-void ParserState::checkEntityStability()
-{
- LpdEntityRefSetIter iter(lpdEntityRefs_);
- LpdEntityRef *ref;
- while ((ref = iter.next()) != 0) {
- ConstPtr<Entity> entity
- = dtd_[0]->lookupEntity(ref->entity->declType()
- == Entity::parameterEntity,
- ref->entity->name());
- if (entity.isNull() && ref->lookedAtDefault)
- entity = dtd_[0]->defaultEntity();
- if (entity.isNull()
- ? ref->foundInPass1Dtd
- : !sameEntityDef(ref->entity.pointer(), entity.pointer()))
- message(((ref->entity->declType()
- == Entity::parameterEntity)
- ? ParserMessages::unstableLpdParameterEntity
- : ParserMessages::unstableLpdGeneralEntity),
- StringMessageArg(ref->entity->name()));
- }
- {
- // Ensure that the memory is released.
- LpdEntityRefSet tem;
- lpdEntityRefs_.swap(tem);
- }
-}
-
-Boolean ParserState::appendCurrentRank(StringC &str, const RankStem *stem)
- const
-{
- const StringC &suffix = currentRank_[stem->index()];
- if (suffix.size() > 0) {
- str += suffix;
- return 1;
- }
- return 0;
-}
-
-void ParserState::setCurrentRank(const RankStem *stem, const StringC &suffix)
-{
- currentRank_[stem->index()] = suffix;
-}
-
-void ParserState::getCurrentToken(const SubstTable<Char> *subst,
- StringC &str) const
-{
- InputSource *in = currentInput();
- const Char *p = in->currentTokenStart();
- size_t count = in->currentTokenLength();
- str.resize(count);
- StringC::iterator s = str.begin();
- for (; count > 0; --count)
- *s++ = (*subst)[*p++];
-}
-
-void ParserState::queueMessage(MessageEvent *event)
-{
- if (cancelled()) {
- delete event;
- return;
- }
- if (keepingMessages_)
- keptMessages_.append(event);
- else
- handler_->message(event);
-}
-
-void ParserState::releaseKeptMessages()
-{
- keepingMessages_ = 0;
- while (!keptMessages_.empty()) {
- if (cancelled()) {
- allDone();
- return;
- }
- handler_->message(keptMessages_.get());
- }
-}
-
-void ParserState::discardKeptMessages()
-{
- keepingMessages_ = 0;
- keptMessages_.clear();
-}
-
-void ParserState::initMessage(Message &msg)
-{
- if (inInstance()) {
- StringC rniPcdata = syntax().delimGeneral(Syntax::dRNI);
- rniPcdata += syntax().reservedName(Syntax::rPCDATA);
- getOpenElementInfo(msg.openElementInfo, rniPcdata);
- }
- msg.loc = currentLocation();
-}
-
-void ParserState::dispatchMessage(Message &msg)
-{
- queueMessage(new MessageEvent(msg));
-}
-
-void ParserState::dispatchMessage(const Message &msg)
-{
- queueMessage(new MessageEvent(msg));
-}
-
-AttributeList *
-ParserState::allocAttributeList(const ConstPtr<AttributeDefinitionList> &def,
- unsigned i)
-{
- if (i < attributeLists_.size())
- attributeLists_[i]->init(def);
- else {
- attributeLists_.resize(i + 1);
- attributeLists_[i] = new AttributeList(def);
- }
- return attributeLists_[i].pointer();
-}
-
-void ParserState::activateLinkType(const StringC &name)
-{
- if (!hadPass2Start_ && !pass2_)
- activeLinkTypes_.push_back(name);
- else
- message(ParserMessages::linkActivateTooLate);
-}
-
-Boolean ParserState::shouldActivateLink(const StringC &name) const
-{
- if (!activeLinkTypesSubsted_) {
- // FIXME use mutable
- ParserState *state = (ParserState *)this;
- for (size_t i = 0; i < activeLinkTypes_.size(); i++)
- for (size_t j = 0; j < activeLinkTypes_[i].size(); j++)
- syntax().generalSubstTable()->subst(state->activeLinkTypes_[i][j]);
- state->activeLinkTypesSubsted_ = 1;
- }
- for (size_t i = 0; i < activeLinkTypes_.size(); i++)
- if (name == activeLinkTypes_[i])
- return 1;
- return 0;
-}
-
-Ptr<Dtd> ParserState::lookupDtd(const StringC &name)
-{
- for (size_t i = 0; i < dtd_.size(); i++)
- if (dtd_[i]->name() == name)
- return dtd_[i];
- return Ptr<Dtd>();
-}
-
-ConstPtr<Lpd> ParserState::lookupLpd(const StringC &name) const
-{
- for (size_t i = 0; i < allLpd_.size(); i++)
- if (allLpd_[i]->name() == name)
- return allLpd_[i];
- return ConstPtr<Lpd>();
-}
-
-ConstPtr<Notation> ParserState::getAttributeNotation(const StringC &name,
- const Location &)
-{
- ConstPtr<Notation> notation;
- if (haveCurrentDtd())
- notation = currentDtd().lookupNotation(name);
- else if (resultAttributeSpecMode_) {
- const Dtd *resultDtd = defComplexLpd().resultDtd().pointer();
- if (!resultDtd)
- return 0;
- notation = resultDtd->lookupNotation(name);
- }
- return notation;
-}
-
-ConstPtr<Entity> ParserState::getAttributeEntity(const StringC &str,
- const Location &loc)
-{
- ConstPtr<Entity> entity = lookupEntity(0, str, loc, 0);
- if (!entity.isNull()
- && entity->defaulted()
- && options().warnDefaultEntityReference) {
- setNextLocation(loc);
- message(ParserMessages::defaultEntityInAttribute,
- StringMessageArg(str));
- }
- return entity;
-}
-
-Boolean ParserState::defineId(const StringC &str, const Location &loc,
- Location &prevLoc)
-{
- if (!inInstance() || !validate())
- return 1;
- Id *id = lookupCreateId(str);
- if (id->defined()) {
- prevLoc = id->defLocation();
- return 0;
- }
- id->define(loc);
- return 1;
-}
-
-void ParserState::noteIdref(const StringC &str, const Location &loc)
-{
- if (!inInstance() || !options().errorIdref || !validate())
- return;
- Id *id = lookupCreateId(str);
- if (!id->defined())
- id->addPendingRef(loc);
-}
-
-void ParserState::noteCurrentAttribute(size_t i, AttributeValue *value)
-{
- if (inInstance())
- currentAttributes_[i] = value;
-}
-
-ConstPtr<AttributeValue> ParserState::getCurrentAttribute(size_t i) const
-{
- if (!inInstance())
- return ConstPtr<AttributeValue>();
- return currentAttributes_[i];
-}
-
-const Syntax &ParserState::attributeSyntax() const
-{
- return syntax();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.h
deleted file mode 100644
index 4c0cef0872..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ParserState.h
+++ /dev/null
@@ -1,844 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef ParserState_INCLUDED
-#define ParserState_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <stddef.h>
-#include <signal.h>
-#include "Allocator.h"
-#include "Attribute.h"
-#include "Boolean.h"
-#include "Vector.h"
-#include "StringC.h"
-#include "Dtd.h"
-#include "Entity.h"
-#include "EntityCatalog.h"
-#include "EntityManager.h"
-#include "Event.h"
-#include "EventQueue.h"
-#include "Id.h"
-#include "InputSource.h"
-#include "IList.h"
-#include "IQueue.h"
-#include "Location.h"
-#include "Message.h"
-#include "Mode.h"
-#include "OpenElement.h"
-#include "OutputState.h"
-#include "ParserOptions.h"
-#include "Ptr.h"
-#include "Recognizer.h"
-#include "Sd.h"
-#include "Syntax.h"
-#include "NCVector.h"
-#include "Owner.h"
-#include "Lpd.h"
-#include "LpdEntityRef.h"
-#include "Markup.h"
-#include "ContentState.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ParserState : public ContentState, public AttributeContext {
-public:
- enum Phase {
- noPhase,
- initPhase,
- prologPhase,
- declSubsetPhase,
- instanceStartPhase,
- contentPhase
- };
- ParserState(const Ptr<EntityManager> &,
- const ParserOptions &,
- unsigned subdocLevel,
- Phase finalPhase);
- void setHandler(EventHandler *, const volatile sig_atomic_t *cancelPtr);
- void unsetHandler();
- Boolean inInstance() const;
- Boolean hadDtd() const;
- void allDone();
- void startDtd(const StringC &);
- void endDtd();
- void startInstance();
- unsigned subdocLevel() const;
- Boolean haveDefLpd() const;
- Dtd &defDtd();
- const Ptr<Dtd> &defDtdPointer() const;
- Boolean haveCurrentDtd() const;
- const Dtd &currentDtd() const;
- Dtd &currentDtdNonConst() const;
- const ConstPtr<Dtd> &currentDtdPointer() const;
- void startLpd(Ptr<Lpd> &lpd);
- void endLpd();
- Lpd &defLpd();
- Ptr<Lpd> &defLpdPointer();
- Ptr<ComplexLpd> defComplexLpdPointer();
- size_t nActiveLink() const;
- const Lpd &activeLpd(size_t i) const;
- ComplexLpd &defComplexLpd();
- Ptr<Dtd> lookupDtd(const StringC &name);
- Ptr<Dtd> baseDtd();
- void activateLinkType(const StringC &);
- void allLinkTypesActivated();
- void setResultAttributeSpecMode();
- void clearResultAttributeSpecMode();
- Boolean haveApplicableDtd() const;
- Boolean hadLpd() const;
- Boolean pass2() const;
- void setPass2Start();
- Boolean maybeStartPass2();
- void checkEntityStability();
- void noteReferencedEntity(const ConstPtr<Entity> &entity,
- Boolean, Boolean);
- ConstPtr<Lpd> lookupLpd(const StringC &name) const;
- Boolean shouldActivateLink(const StringC &) const;
- Char currentChar() const;
- const Location &currentLocation() const;
- InputSource *currentInput() const;
- EntityManager &entityManager() const;
- Ptr<EntityManager> entityManagerPtr() const;
- const EntityCatalog &entityCatalog() const;
- ConstPtr<EntityCatalog> entityCatalogPtr() const;
- void setEntityCatalog(const ConstPtr<EntityCatalog> &);
- void setSyntax(ConstPtr<Syntax>);
- void setSyntaxes(ConstPtr<Syntax>, ConstPtr<Syntax>);
- void setSd(ConstPtr<Sd>);
- const Syntax &syntax() const;
- const Syntax &instanceSyntax() const;
- const ConstPtr<Syntax> &syntaxPointer() const;
- const ConstPtr<Syntax> &prologSyntaxPointer() const;
- const ConstPtr<Syntax> &instanceSyntaxPointer() const;
- const Sd &sd() const;
- const ConstPtr<Sd> &sdPointer() const;
- void setPhase(Phase phase);
- Phase phase() const;
- Phase finalPhase() const;
- Mode currentMode() const;
- void setRecognizer(Mode, ConstPtr<Recognizer>);
- void setNormalMap(const XcharMap<PackedBoolean> &);
- const XcharMap<PackedBoolean> &normalMap() const;
- Xchar getChar();
- void skipChar();
- Token getToken(Mode mode);
- StringC currentToken() const;
- void getCurrentToken(StringC &) const;
- void getCurrentToken(const SubstTable<Char> *, StringC &) const;
- unsigned inputLevel() const;
- unsigned specialParseInputLevel() const;
- unsigned markedSectionLevel() const;
- unsigned markedSectionSpecialLevel() const;
- unsigned currentInputElementIndex() const;
- const Location &currentMarkedSectionStartLocation() const;
- Boolean entityIsOpen(const Entity *) const;
- void popInputStack();
- void pushInput(InputSource *);
- Boolean referenceDsEntity(const Location &);
- void setDsEntity(const ConstPtr<Entity> &);
- Boolean eventQueueEmpty() const;
- Event *eventQueueGet();
- EventHandler &eventHandler();
- void pushElement(OpenElement *);
- OpenElement *popSaveElement();
- void popElement();
- void pcdataRecover();
- Boolean pcdataRecovering() const;
- ConstPtr<Entity> lookupEntity(Boolean isParameter,
- const StringC &name,
- const Location &,
- Boolean referenced);
- ConstPtr<Entity> createUndefinedEntity(const StringC &,
- const Location &);
- Boolean appendCurrentRank(StringC &, const RankStem *) const;
- void setCurrentRank(const RankStem *, const StringC &);
- void startMarkedSection(const Location &);
- void startSpecialMarkedSection(Mode, const Location &);
- void endMarkedSection();
- void queueRe(const Location &);
- void noteMarkup();
- void noteData();
- void noteRs();
- void noteStartElement(Boolean included);
- void noteEndElement(Boolean included);
- // size of objects allocated with this must not exceed
- // sizeof(StartElementEvent)
- Allocator &eventAllocator();
- // size of objects allocated with this must not exceed
- // sizeof(OpenElement)
- Allocator &internalAllocator();
- AttributeList *allocAttributeList(const ConstPtr<AttributeDefinitionList> &,
- unsigned i);
-
- static void freeEvent(void *);
- Boolean wantMarkup() const;
- const EventsWanted &eventsWanted() const;
- StringC &nameBuffer();
- typedef NamedTableIter<Id> IdTableIter;
- IdTableIter idTableIter();
- const ParserOptions &options() const;
- void enableImplydef();
- Boolean implydefElement();
- Boolean implydefAttlist();
- void keepMessages();
- void releaseKeptMessages();
- void discardKeptMessages();
- Messenger &messenger();
-
- Markup *currentMarkup();
- const Location &markupLocation() const;
- Markup *startMarkup(Boolean, const Location &);
- void inheritActiveLinkTypes(const ParserState &parent);
- Boolean cancelled() const;
-
- // AFDR extensions
- void setHadAfdrDecl();
- Boolean hadAfdrDecl() const;
-
- // Implementation of AttributeContext.
- Boolean defineId(const StringC &, const Location &, Location &);
- void noteIdref(const StringC &, const Location &);
- void noteCurrentAttribute(size_t, AttributeValue *);
- ConstPtr<AttributeValue> getCurrentAttribute(size_t) const;
- ConstPtr<Entity> getAttributeEntity(const StringC &,
- const Location &);
- ConstPtr<Notation> getAttributeNotation(const StringC &,
- const Location &);
- const Syntax &attributeSyntax() const;
-
-private:
- ParserState(const ParserState &); // undefined
- void operator=(const ParserState &); // undefined
- void dispatchMessage(Message &);
- void dispatchMessage(const Message &);
- void initMessage(Message &);
- void queueMessage(MessageEvent *);
- Id *lookupCreateId(const StringC &);
-
- ParserOptions options_;
- EventHandler *handler_;
- Pass1EventHandler pass1Handler_;
- Boolean allowPass2_;
- Offset pass2StartOffset_;
- Boolean hadPass2Start_;
- EventQueue eventQueue_;
- OutputState outputState_;
- ConstPtr<Syntax> prologSyntax_;
- ConstPtr<Syntax> instanceSyntax_;
- ConstPtr<Sd> sd_;
- unsigned subdocLevel_;
- Ptr<EntityManager> entityManager_;
- ConstPtr<EntityCatalog> entityCatalog_;
- Phase phase_;
- Phase finalPhase_;
- Boolean inInstance_;
- Ptr<Dtd> defDtd_;
- Ptr<Lpd> defLpd_;
- Vector<ConstPtr<Lpd> > allLpd_;
- Vector<ConstPtr<Lpd> > lpd_; // active LPDs
- Vector<StringC> activeLinkTypes_;
- Boolean activeLinkTypesSubsted_;
- Boolean hadLpd_;
- Boolean resultAttributeSpecMode_;
- Boolean pass2_;
- typedef OwnerTable<LpdEntityRef, LpdEntityRef, LpdEntityRef, LpdEntityRef>
- LpdEntityRefSet;
- typedef OwnerTableIter<LpdEntityRef, LpdEntityRef, LpdEntityRef, LpdEntityRef>
- LpdEntityRefSetIter;
- LpdEntityRefSet lpdEntityRefs_;
- // external entity to be referenced at the end of the declaration subset
- ConstPtr<Entity> dsEntity_;
- Allocator eventAllocator_;
- Allocator internalAllocator_;
- NCVector<Owner<AttributeList> > attributeLists_;
- StringC nameBuffer_;
- Boolean keepingMessages_;
- IQueue<MessageEvent> keptMessages_;
- Mode currentMode_;
- Boolean pcdataRecovering_;
- // if in a special parse (cdata, rcdata, ignore), the input level
- // at which the special parse started.
- unsigned specialParseInputLevel_;
- Mode specialParseMode_;
- unsigned markedSectionLevel_;
- unsigned markedSectionSpecialLevel_;
- Vector<Location> markedSectionStartLocation_;
- ConstPtr<Recognizer> recognizers_[nModes];
- XcharMap<PackedBoolean> normalMap_;
- unsigned inputLevel_;
- IList<InputSource> inputStack_;
- Vector<unsigned> inputLevelElementIndex_;
- Ptr<Dtd> currentDtd_;
- ConstPtr<Dtd> currentDtdConst_;
- Vector<Ptr<Dtd> > dtd_;
- Ptr<Dtd> pass1Dtd_;
- ConstPtr<Syntax> syntax_;
- Vector<StringC> currentRank_;
- NamedTable<Id> idTable_;
- NamedResourceTable<Entity> instanceDefaultedEntityTable_;
- NamedResourceTable<Entity> undefinedEntityTable_;
- Vector<ConstPtr<AttributeValue> > currentAttributes_;
- Markup *currentMarkup_;
- Markup markup_;
- Location markupLocation_;
- Boolean hadAfdrDecl_;
- Boolean implydefElement_;
- Boolean implydefAttlist_;
- const volatile sig_atomic_t *cancelPtr_;
- static sig_atomic_t dummyCancel_;
- static const Location nullLocation_;
-};
-
-inline
-Messenger &ParserState::messenger()
-{
- return *this;
-}
-
-inline
-Boolean ParserState::wantMarkup() const
-{
- return (inInstance_
- ? options_.eventsWanted.wantInstanceMarkup()
- : options_.eventsWanted.wantPrologMarkup());
-}
-
-
-
-inline
-const EventsWanted &ParserState::eventsWanted() const
-{
- return options_.eventsWanted;
-}
-
-inline
-InputSource *ParserState::currentInput() const
-{
- return inputStack_.head();
-}
-
-inline
-const Location &ParserState::currentLocation() const
-{
- InputSource *in = currentInput();
- return in ? in->currentLocation() : nullLocation_;
-}
-
-inline
-Boolean ParserState::pcdataRecovering() const
-{
- return pcdataRecovering_;
-}
-
-inline
-unsigned ParserState::inputLevel() const
-{
- return inputLevel_;
-}
-
-inline
-unsigned ParserState::specialParseInputLevel() const
-{
- return specialParseInputLevel_;
-}
-
-inline
-unsigned ParserState::markedSectionLevel() const
-{
- return markedSectionLevel_;
-}
-
-inline
-unsigned ParserState::markedSectionSpecialLevel() const
-{
- return markedSectionSpecialLevel_;
-}
-
-inline
-const Location &ParserState::currentMarkedSectionStartLocation() const
-{
- return markedSectionStartLocation_.back();
-}
-
-inline
-unsigned ParserState::currentInputElementIndex() const
-{
- return inputLevelElementIndex_.back();
-}
-
-inline
-Char ParserState::currentChar() const
-{
- return currentInput()->currentTokenStart()[0];
-}
-
-inline
-StringC ParserState::currentToken() const
-{
- return StringC(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength());
-}
-
-inline
-void ParserState::getCurrentToken(StringC &str) const
-{
- InputSource *in = currentInput();
- str.assign(in->currentTokenStart(), in->currentTokenLength());
-}
-
-inline
-void ParserState::setRecognizer(Mode mode, ConstPtr<Recognizer> p)
-{
- recognizers_[mode] = p;
-}
-
-inline
-void ParserState::setNormalMap(const XcharMap<PackedBoolean> &map)
-{
- normalMap_ = map;
-}
-
-inline
-const XcharMap<PackedBoolean> &ParserState::normalMap() const
-{
- return normalMap_;
-}
-
-inline
-Boolean ParserState::haveDefLpd() const
-{
- return !defLpd_.isNull();
-}
-
-inline
-Boolean ParserState::haveCurrentDtd() const
-{
- return !currentDtd_.isNull();
-}
-
-inline
-Dtd &ParserState::defDtd()
-{
- return *defDtd_;
-}
-
-inline
-const Dtd &ParserState::currentDtd() const
-{
- return *currentDtd_;
-}
-
-inline
-Dtd &ParserState::currentDtdNonConst() const
-{
- return *currentDtd_;
-}
-
-inline
-const Ptr<Dtd> &ParserState::defDtdPointer() const
-{
- return defDtd_;
-}
-
-inline
-const ConstPtr<Dtd> &ParserState::currentDtdPointer() const
-{
- return currentDtdConst_;
-}
-
-inline
-Boolean ParserState::inInstance() const
-{
- return inInstance_;
-}
-
-inline
-const Syntax &ParserState::syntax() const
-{
- return *syntax_;
-}
-
-inline
-const Syntax &ParserState::instanceSyntax() const
-{
- return *instanceSyntax_;
-}
-
-inline
-const ConstPtr<Syntax> &ParserState::syntaxPointer() const
-{
- return syntax_;
-}
-
-inline
-const ConstPtr<Syntax> &ParserState::instanceSyntaxPointer() const
-{
- return instanceSyntax_;
-}
-
-inline
-const ConstPtr<Syntax> &ParserState::prologSyntaxPointer() const
-{
- return prologSyntax_;
-}
-
-inline
-const Sd &ParserState::sd() const
-{
- return *sd_;
-}
-
-inline
-const ConstPtr<Sd> &ParserState::sdPointer() const
-{
- return sd_;
-}
-
-inline
-void ParserState::setPhase(Phase phase)
-{
- phase_ = phase;
-}
-
-inline
-Mode ParserState::currentMode() const
-{
- return currentMode_;
-}
-
-inline
-Xchar ParserState::getChar()
-{
- return inputStack_.head()->get(messenger());
-}
-
-inline
-void ParserState::skipChar()
-{
- (void)getChar();
-}
-
-inline
-Token ParserState::getToken(Mode mode)
-{
- return recognizers_[mode]->recognize(inputStack_.head(), messenger());
-}
-
-inline
-Boolean ParserState::hadDtd() const
-{
- return dtd_.size() > 0;
-}
-
-inline
-Boolean ParserState::eventQueueEmpty() const
-{
- return eventQueue_.empty();
-}
-
-inline
-Event *ParserState::eventQueueGet()
-{
- return eventQueue_.get();
-}
-
-inline
-ParserState::Phase ParserState::phase() const
-{
- return phase_;
-}
-
-inline
-ParserState::Phase ParserState::finalPhase() const
-{
- return finalPhase_;
-}
-
-inline
-EntityManager &ParserState::entityManager() const
-{
- return *entityManager_;
-}
-
-inline
-Ptr<EntityManager> ParserState::entityManagerPtr() const
-{
- return entityManager_;
-}
-
-inline
-const EntityCatalog &ParserState::entityCatalog() const
-{
- return *entityCatalog_;
-}
-
-inline
-ConstPtr<EntityCatalog> ParserState::entityCatalogPtr() const
-{
- return entityCatalog_;
-}
-
-inline
-void ParserState::setEntityCatalog(const ConstPtr<EntityCatalog> &catalog)
-{
- entityCatalog_ = catalog;
-}
-
-inline
-void ParserState::setDsEntity(const ConstPtr<Entity> &entity)
-{
- dsEntity_ = entity;
-}
-
-inline
-Allocator &ParserState::eventAllocator()
-{
- return eventAllocator_;
-}
-
-inline
-Allocator &ParserState::internalAllocator()
-{
- return internalAllocator_;
-}
-
-inline
-StringC &ParserState::nameBuffer()
-{
- return nameBuffer_;
-}
-
-inline
-void ParserState::setHandler(EventHandler *handler,
- const volatile sig_atomic_t *cancelPtr)
-{
- handler_ = handler;
- cancelPtr_ = cancelPtr ? cancelPtr : &dummyCancel_;
-}
-
-inline
-void ParserState::unsetHandler()
-{
- handler_ = &eventQueue_;
- cancelPtr_ = &dummyCancel_;
-}
-
-inline
-void ParserState::queueRe(const Location &location)
-{
- outputState_.handleRe(*handler_, eventAllocator_, options_.eventsWanted,
- syntax().standardFunction(Syntax::fRE),
- location);
-}
-
-inline
-void ParserState::noteMarkup()
-{
- if (inInstance_)
- outputState_.noteMarkup(*handler_, eventAllocator_, options_.eventsWanted);
-}
-
-inline
-void ParserState::noteRs()
-{
- outputState_.noteRs(*handler_, eventAllocator_, options_.eventsWanted);
-}
-
-inline
-void ParserState::noteStartElement(Boolean included)
-{
- outputState_.noteStartElement(included, *handler_, eventAllocator_,
- options_.eventsWanted);
-}
-
-inline
-void ParserState::noteEndElement(Boolean included)
-{
- outputState_.noteEndElement(included, *handler_, eventAllocator_,
- options_.eventsWanted);
-}
-
-inline
-void ParserState::noteData()
-{
- outputState_.noteData(*handler_, eventAllocator_, options_.eventsWanted);
-}
-
-inline
-unsigned ParserState::subdocLevel() const
-{
- return subdocLevel_;
-}
-
-inline
-EventHandler &ParserState::eventHandler()
-{
- return *handler_;
-}
-
-inline
-ParserState::IdTableIter ParserState::idTableIter()
-{
- // Avoid use of typedef to work around MSVC 2.0 bug.
- return NamedTableIter<Id>(idTable_);
-}
-
-inline
-const ParserOptions &ParserState::options() const
-{
- return options_;
-}
-
-inline
-Boolean ParserState::implydefElement()
-{
- return implydefElement_;
-}
-
-inline
-Boolean ParserState::implydefAttlist()
-{
- return implydefAttlist_;
-}
-
-inline
-void ParserState::enableImplydef()
-{
- implydefElement_ = 1;
- implydefAttlist_ = 1;
-}
-
-inline
-void ParserState::keepMessages()
-{
- keepingMessages_ = 1;
-}
-
-inline
-Boolean ParserState::haveApplicableDtd() const
-{
- return !currentDtd_.isNull();
-}
-
-inline
-Boolean ParserState::hadLpd() const
-{
- return hadLpd_;
-}
-
-inline
-Boolean ParserState::pass2() const
-{
- return pass2_;
-}
-
-inline
-size_t ParserState::nActiveLink() const
-{
- return lpd_.size();
-}
-
-inline
-const Lpd &ParserState::activeLpd(size_t i) const
-{
- return *lpd_[i];
-}
-
-inline
-Lpd &ParserState::defLpd()
-{
- return *defLpd_;
-}
-
-inline
-Ptr<Lpd> &ParserState::defLpdPointer()
-{
- return defLpd_;
-}
-
-inline
-Ptr<ComplexLpd> ParserState::defComplexLpdPointer()
-{
- return (ComplexLpd *)defLpd_.pointer();
-}
-
-inline
-ComplexLpd &ParserState::defComplexLpd()
-{
- return (ComplexLpd &)defLpd();
-}
-
-inline
-Ptr<Dtd> ParserState::baseDtd()
-{
- if (dtd_.size() > 0)
- return dtd_[0];
- else
- return Ptr<Dtd>();
-}
-
-inline
-void ParserState::setResultAttributeSpecMode()
-{
- resultAttributeSpecMode_ = 1;
-}
-
-inline
-void ParserState::clearResultAttributeSpecMode()
-{
- resultAttributeSpecMode_ = 0;
-}
-
-inline
-Markup *ParserState::currentMarkup()
-{
- return currentMarkup_;
-}
-
-inline
-const Location &ParserState::markupLocation() const
-{
- return markupLocation_;
-}
-
-inline
-Markup *ParserState::startMarkup(Boolean storing, const Location &loc)
-{
- markupLocation_ = loc;
- if (storing) {
- markup_.clear();
- return currentMarkup_ = &markup_;
- }
- else
- return currentMarkup_ = 0;
-}
-
-inline
-Boolean ParserState::cancelled() const
-{
- return *cancelPtr_ != 0;
-}
-
-inline
-void ParserState::setHadAfdrDecl()
-{
- hadAfdrDecl_ = 1;
-}
-
-inline
-Boolean ParserState::hadAfdrDecl() const
-{
- return hadAfdrDecl_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not ParserState_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.cxx
deleted file mode 100644
index d87f20e69d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.cxx
+++ /dev/null
@@ -1,220 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Partition.h"
-#include "ISet.h"
-#include "ISetIter.h"
-#include "SubstTable.h"
-#include "Link.h"
-#include "IList.h"
-#include "IListIter.h"
-#include "Owner.h"
-#include "macros.h"
-#include "EquivClass.h"
-#include "constant.h"
-#include "StringC.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static void refineByChar(IList<EquivClass> *, Char);
-static void refineBySet(IList<EquivClass> *, const ISet<Char> &, unsigned);
-
-#if _MSC_VER == 900
-// Work around MSVC 2.0 bug.
-typedef SubstTable<Char> _msvc_dummy;
-#endif
-
-Partition::Partition(const ISet<Char> &chars,
- const ISet<Char> **sets,
- int nSets,
- const SubstTable<Char> &subst)
-: map_(0) // eE gets code 0
-{
- IList<EquivClass> classes;
- classes.insert(new EquivClass);
- classes.head()->set.addRange(0, charMax);
-
- {
- ISetIter<Char> iter(chars);
- Char min, max;
- while (iter.next(min, max)) {
- do {
- refineByChar(&classes, subst[min]);
- } while (min++ != max);
- }
- }
-
- int i;
- for (i = 0; i < nSets; i++)
- refineBySet(&classes, *sets[i], (1 << i));
-
- maxCode_ = 0;
-
- setCodes_.resize(nSets);
-
- for (IListIter<EquivClass> listIter(classes);
- !listIter.done();
- listIter.next()) {
- ++maxCode_;
- ASSERT(maxCode_ != 0);
- EquivClass *p = listIter.cur();
- for (i = 0; i < nSets; i++)
- if ((1 << i) & p->inSets)
- setCodes_[i] += maxCode_;
- ISetIter<Char> setIter(p->set);
- Char min, max;
- while (setIter.next(min, max))
- map_.setRange(min, max, maxCode_);
- }
-
- {
- ISetIter<Char> iter(chars);
- Char min, max;
- while (iter.next(min, max)) {
- do {
- StringC str(subst.inverse(min));
- EquivCode code = map_[min];
- for (size_t i = 0; i < str.size(); i++)
- map_.setChar(str[i], code);
- } while (min++ != max);
- }
- }
-}
-
-static
-void refineByChar(IList<EquivClass> *classes, Char c)
-{
- // Avoid modifying *classes, while there's an active iter on it.
- EquivClass *found = 0;
- {
- for (IListIter<EquivClass> iter(*classes); !iter.done(); iter.next()) {
- if (iter.cur()->set.contains(c)) {
- found = iter.cur();
- break;
- }
- }
- }
- if (found && !found->set.isSingleton()) {
- found->set.remove(c);
- classes->insert(new EquivClass(found->inSets));
- classes->head()->set.add(c);
- }
-}
-
-static
-void addUpTo(ISet<Char> *to, Char limit, const ISet<Char> &from)
-{
- ISetIter<Char> iter(from);
- Char min, max;
- while (iter.next(min, max) && min < limit)
- to->addRange(min, max >= limit ? limit - 1 : max);
-}
-
-enum RefineResult { allIn, allOut, someInSomeOut };
-
-static
-RefineResult refine(const ISet<Char> &set, const ISet<Char> &refiner,
- ISet<Char> *inp, ISet<Char> *outp)
-{
- Char setMin, setMax, refMin, refMax;
- ISetIter<Char> refIter(refiner);
- ISetIter<Char> setIter(set);
- Boolean oneIn = 0;
- Boolean oneOut = 0;
-
- if (!refIter.next(refMin, refMax))
- return allOut;
- while (setIter.next(setMin, setMax)) {
- while (setMin <= setMax) {
- while (refMax < setMin && refIter.next(refMin, refMax))
- ;
- if (refMax < setMin || setMin < refMin) {
- if (!oneOut) {
- if (oneIn)
- addUpTo(inp, setMin, set);
- oneOut = 1;
- }
- if (refMax < setMin || refMin > setMax) {
- if (oneIn)
- outp->addRange(setMin, setMax);
- break;
- }
- else {
- if (oneIn)
- outp->addRange(setMin, refMin - 1);
- setMin = refMin;
- }
- }
- else {
- if (!oneIn) {
- if (oneOut)
- addUpTo(outp, setMin, set);
- oneIn = 1;
- }
- if (setMax <= refMax) {
- if (oneOut)
- inp->addRange(setMin, setMax);
- break;
- }
- else {
- // refMax < setMax
- if (oneOut)
- inp->addRange(setMin, refMax);
- // avoid wrapping round
- if (refMax == charMax)
- break;
- setMin = refMax + 1;
- }
- }
- }
- }
- if (oneIn)
- return oneOut ? someInSomeOut : allIn;
- else
- return allOut;
-}
-
-static
-void refineBySet(IList<EquivClass> *classes, const ISet<Char> &set,
- unsigned setFlag)
-{
- Owner<EquivClass> in(new EquivClass), out(new EquivClass);
- IList<EquivClass> newClasses;
- for (;;) {
- EquivClass *p = classes->head();
- if (!p)
- break;
- if (!out)
- out = new EquivClass;
- switch (refine(p->set, set, &in->set, &out->set)) {
- case someInSomeOut:
- in->inSets = p->inSets | setFlag;
- newClasses.insert(in.extract());
- out->inSets = p->inSets;
- newClasses.insert(out.extract());
- in = classes->get();
- in->set.clear();
- in->inSets = 0;
- break;
- case allIn:
- p->inSets |= setFlag;
- newClasses.insert(classes->get());
- break;
- case allOut:
- newClasses.insert(classes->get());
- break;
- }
- }
- classes->swap(newClasses);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.h
deleted file mode 100644
index 5d1a46d212..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Partition.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Partition_INCLUDED
-#define Partition_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "SubstTable.h"
-#include "StringOf.h"
-#include "ISet.h"
-#include "XcharMap.h"
-#include "Vector.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Partition {
-public:
- Partition(const ISet<Char> &chars,
- const ISet<Char> **sets,
- int nSets,
- const SubstTable<Char> &subst);
- EquivCode maxCode() const;
- EquivCode charCode(Char c) const;
- EquivCode eECode() const;
- const String<EquivCode> &setCodes(int i) const;
- const XcharMap<EquivCode> &map() const;
-private:
- Partition(const Partition &); // undefined
- void operator=(const Partition &); // undefined
- EquivCode maxCode_;
- Vector<String<EquivCode> > setCodes_;
- XcharMap<EquivCode> map_;
-};
-
-inline
-EquivCode Partition::maxCode() const
-{
- return maxCode_;
-}
-
-inline
-EquivCode Partition::charCode(Char c) const
-{
- return map_[c];
-}
-
-inline
-EquivCode Partition::eECode() const
-{
- return 0;
-}
-
-inline
-const String<EquivCode> &Partition::setCodes(int i) const
-{
- return setCodes_[i];
-}
-
-inline
-const XcharMap<EquivCode> &Partition::map() const
-{
- return map_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Partition_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorage.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorage.cxx
deleted file mode 100644
index 18f6c7aff8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorage.cxx
+++ /dev/null
@@ -1,718 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "PosixStorage.h"
-#include "RewindStorageObject.h"
-#include "StorageManager.h"
-#include "DescriptorManager.h"
-#include "MessageArg.h"
-#include "ErrnoMessageArg.h"
-#include "SearchResultMessageArg.h"
-#include "Message.h"
-#include "StringC.h"
-#include "StringOf.h"
-#include "CharsetInfo.h"
-#include "CodingSystem.h"
-#include "macros.h"
-#include "PosixStorageMessages.h"
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef SP_INCLUDE_IO_H
-#include <io.h> // for open, fstat, lseek, read prototypes
-#endif
-
-#ifdef SP_INCLUDE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef SP_INCLUDE_OSFCN_H
-#include <osfcn.h>
-#endif
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stddef.h>
-
-#ifndef S_ISREG
-#ifndef S_IFREG
-#define S_IFREG _S_IFREG
-#endif
-#ifndef S_IFMT
-#define S_IFMT _S_IFMT
-#endif
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif /* not S_ISREG */
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-#ifdef SP_WIDE_SYSTEM
-#include <windows.h>
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-#ifdef SP_WIDE_SYSTEM
-typedef wchar_t FChar;
-#else
-typedef char FChar;
-#endif
-
-class PosixBaseStorageObject : public RewindStorageObject {
-public:
- PosixBaseStorageObject(int fd, Boolean mayRewind);
- size_t getBlockSize() const;
-protected:
- enum { defaultBlockSize = 8192 };
- int fd_;
- PackedBoolean eof_;
-
- Boolean seekToStart(Messenger &);
- virtual Boolean seek(off_t, Messenger &) = 0;
- static int xclose(int fd);
-private:
- Boolean canSeek(int fd);
- off_t startOffset_;
-};
-
-PosixBaseStorageObject::PosixBaseStorageObject(int fd, Boolean mayRewind)
-: fd_(fd), eof_(0),
- RewindStorageObject(mayRewind, mayRewind && canSeek(fd))
-{
-}
-
-Boolean PosixBaseStorageObject::canSeek(int fd)
-{
- struct stat sb;
- if (fstat(fd, &sb) < 0 || !S_ISREG(sb.st_mode)
- || (startOffset_ = lseek(fd, off_t(0), SEEK_CUR)) < 0)
- return 0;
- else
- return 1;
-}
-
-Boolean PosixBaseStorageObject::seekToStart(Messenger &mgr)
-{
- eof_ = 0;
- return seek(startOffset_, mgr);
-}
-
-int PosixBaseStorageObject::xclose(int fd)
-{
- int ret;
- do {
- ret = ::close(fd);
- } while (ret < 0 && errno == EINTR);
- return ret;
-}
-
-class PosixStorageObject : public PosixBaseStorageObject, private DescriptorUser {
-public:
- PosixStorageObject(int fd,
- const StringC &,
- const String<FChar> &,
- Boolean mayRewind,
- DescriptorManager *);
- ~PosixStorageObject();
- Boolean read(char *buf, size_t bufSize, Messenger &mgr, size_t &nread);
- Boolean suspend();
- Boolean seek(off_t, Messenger &);
- void willNotRewind();
-private:
- void resume(Messenger &);
-
- PackedBoolean suspended_;
- off_t suspendPos_;
- const MessageType2 *suspendFailedMessage_;
- int suspendErrno_;
- StringC filename_;
- String<FChar> cfilename_;
-
- void systemError(Messenger &, const MessageType2 &, int);
-};
-
-inline int openFile(const FChar *s) {
-#ifdef SP_WIDE_SYSTEM
- int fd = _wopen(s, O_RDONLY|O_BINARY);
- if (fd < 0 && errno != ENOENT) {
- String<char> buf;
- int len = WideCharToMultiByte(CP_ACP, 0, s, -1, 0, 0, 0, 0);
- buf.resize(len + 1);
- WideCharToMultiByte(CP_ACP, 0, s, -1, buf.begin(), len, 0, 0);
- buf[len] = '\0';
- return ::open(buf.data(), O_RDONLY|O_BINARY);
- }
- return fd;
-#else
- return ::open(s, O_RDONLY|O_BINARY);
-#endif
- }
-
-PosixStorageManager::PosixStorageManager(const char *type,
- const CharsetInfo *filenameCharset,
-#ifndef SP_WIDE_SYSTEM
- const OutputCodingSystem *filenameCodingSystem,
-#endif
- int maxFDs)
-: IdStorageManager(filenameCharset),
- type_(type),
-#ifndef SP_WIDE_SYSTEM
- filenameCodingSystem_(filenameCodingSystem),
-#endif
- descriptorManager_(maxFDs)
-{
- Char newline = idCharset()->execToDesc('\n');
- reString_.assign(&newline, 1);
-}
-
-const char *PosixStorageManager::type() const
-{
- return type_;
-}
-
-void PosixStorageManager::addSearchDir(const StringC &str)
-{
- searchDirs_.push_back(str);
-}
-
-#ifdef SP_POSIX_FILENAMES
-
-#define FILENAME_TYPE_DEFINED
-
-// FIXME should use idCharset.
-
-Boolean PosixStorageManager::isAbsolute(const StringC &file) const
-{
- return file.size() > 0 && file[0] == '/';
-}
-
-StringC PosixStorageManager::extractDir(const StringC &str) const
-{
- for (size_t i = str.size(); i > 0; i--)
- if (str[i - 1] == '/')
- return StringC(str.data(), i); // include slash for root case
- return StringC();
-}
-
-StringC PosixStorageManager::combineDir(const StringC &dir,
- const StringC &base) const
-{
- StringC result(dir);
- if (dir.size() > 0 && dir[dir.size() - 1] != '/')
- result += '/';
- result += base;
- return result;
-}
-
-Boolean PosixStorageManager::transformNeutral(StringC &str, Boolean fold,
- Messenger &) const
-{
- if (fold)
- for (size_t i = 0; i < str.size(); i++) {
- Char c = str[i];
- if (c <= (unsigned char)-1)
- str[i] = tolower(str[i]);
- }
- return 1;
-}
-
-#endif /* SP_POSIX_FILENAMES */
-
-#ifdef SP_MSDOS_FILENAMES
-
-#define FILENAME_TYPE_DEFINED
-
-Boolean PosixStorageManager::isAbsolute(const StringC &s) const
-{
- if (s.size() == 0)
- return 0;
- return s[0] == '/' || s[0] == '\\' || (s.size() > 1 && s[1] == ':');
-}
-
-StringC PosixStorageManager::extractDir(const StringC &str) const
-{
- for (size_t i = str.size(); i > 0; i--)
- if (str[i - 1] == '/' || str[i - 1] == '\\'
- || (i == 2 && str[i - 1] == ':'))
- return StringC(str.data(), i); // include separator
- return StringC();
-}
-
-StringC PosixStorageManager::combineDir(const StringC &dir,
- const StringC &base) const
-{
- StringC result(dir);
- if (dir.size() > 0) {
- Char lastChar = dir[dir.size() - 1];
- if (lastChar != '/' && lastChar != '\\'
- && !(dir.size() == 2 && lastChar == ':'))
- result += '\\';
- }
- result += base;
- return result;
-}
-
-Boolean PosixStorageManager::transformNeutral(StringC &str, Boolean,
- Messenger &) const
-{
- for (size_t i = 0; i < str.size(); i++)
- if (str[i] == '/')
- str[i] = '\\';
- return 1;
-}
-
-#endif /* SP_MSDOS_FILENAMES */
-
-#ifdef SP_MAC_FILENAMES
-// Colons separate directory names
-// relative path-names start with a colon, or have no colons
-// absolute path-names don't start with a colon and have at least one colon
-#define FILENAME_TYPE_DEFINED
-
-Boolean PosixStorageManager::isAbsolute(const StringC &s) const
-{
- if (s.size() == 0)
- return 0;
- if (s[0] == ':')
- return 0; // starts with a colon => relative
- size_t ss = s.size();
- for (size_t i = 0; i < ss; i++)
- if (s[i] == ':')
- return 1; // absolute
- return 0; // no colons => relative
-}
-
-StringC PosixStorageManager::extractDir(const StringC &str) const
-{
- for (size_t i = str.size(); i > 0; i--)
- if (str[i - 1] == ':')
- return StringC(str.data(), i); // include separator
- return StringC();
-}
-
-StringC PosixStorageManager::combineDir(const StringC &dir,
- const StringC &base) const
-{
- StringC result(dir);
- if (dir.size() > 0) {
- Char lastChar = dir[dir.size() - 1];
- if (lastChar != ':')
- result += ':';
- }
- if (base[0] == ':') {
- StringC newbase(base.data() + 1,base.size() - 1);
- result += newbase;
- }
- else result += base;
- return result;
-}
-
-Boolean PosixStorageManager::transformNeutral(StringC &str, Boolean,
- Messenger &) const
-{
- if (str[0] == '/') { // absolute
- StringC nstr(str.data() + 1,str.size()-1);
- str = nstr;
- }
- else { // relative
- Char cc = ':';
- StringC colon(&cc,1);
- str.insert(0,colon);
- }
- for (size_t i = 0; i < str.size(); i++)
- if (str[i] == '/')
- str[i] = ':';
- return 1;
-}
-
-#endif /* SP_MAC_FILENAMES */
-
-#ifndef FILENAME_TYPE_DEFINED
-
-Boolean PosixStorageManager::isAbsolute(const StringC &) const
-{
- return 1;
-}
-
-StringC PosixStorageManager::extractDir(const StringC &) const
-{
- return StringC();
-}
-
-StringC PosixStorageManager::combineDir(const StringC &,
- const StringC &base) const
-{
- return base;
-}
-
-Boolean PosixStorageManager::transformNeutral(StringC &, Boolean,
- Messenger &) const
-{
- return 1;
-}
-
-#endif /* not FILENAME_TYPE_DEFINED */
-
-Boolean PosixStorageManager::resolveRelative(const StringC &baseId,
- StringC &specId,
- Boolean search) const
-{
- if (isAbsolute(specId))
- return 1;
- if (!search || searchDirs_.size() == 0) {
- specId = combineDir(extractDir(baseId), specId);
- return 1;
- }
- return 0;
-}
-
-StorageObject *
-PosixStorageManager::makeStorageObject(const StringC &spec,
- const StringC &base,
- Boolean search,
- Boolean mayRewind,
- Messenger &mgr,
- StringC &found)
-{
- if (spec.size() == 0) {
- mgr.message(PosixStorageMessages::invalidFilename,
- StringMessageArg(spec));
- return 0;
- }
- descriptorManager_.acquireD();
- Boolean absolute = isAbsolute(spec);
- SearchResultMessageArg sr;
- for (size_t i = 0; i < searchDirs_.size() + 1; i++) {
- StringC filename;
- if (absolute)
- filename = spec;
- else if (i == 0)
- filename = combineDir(extractDir(base), spec);
- else
- filename = combineDir(searchDirs_[i - 1], spec);
-#ifdef SP_WIDE_SYSTEM
- String<FChar> cfilename(filename);
- cfilename += FChar(0);
-#else
- String<FChar> cfilename = filenameCodingSystem_->convertOut(filename);
-#endif
- int fd;
- do {
- fd = openFile(cfilename.data());
- } while (fd < 0 && errno == EINTR);
- if (fd >= 0) {
- found = filename;
- return new PosixStorageObject(fd,
- filename,
- cfilename,
- mayRewind,
- &descriptorManager_);
- }
- int savedErrno = errno;
- if (absolute || !search || searchDirs_.size() == 0) {
- ParentLocationMessenger(mgr).message(PosixStorageMessages::openSystemCall,
- StringMessageArg(filename),
- ErrnoMessageArg(savedErrno));
- descriptorManager_.releaseD();
- return 0;
- }
- sr.add(filename, savedErrno);
- }
- descriptorManager_.releaseD();
- ParentLocationMessenger(mgr).message(PosixStorageMessages::cannotFind,
- StringMessageArg(spec), sr);
- return 0;
-}
-
-PosixStorageObject::PosixStorageObject(int fd,
- const StringC &filename,
- const String<FChar> &cfilename,
- Boolean mayRewind,
- DescriptorManager *manager)
-: DescriptorUser(manager),
- PosixBaseStorageObject(fd, mayRewind),
- suspended_(0),
- filename_(filename),
- cfilename_(cfilename)
-{
-}
-
-PosixStorageObject::~PosixStorageObject()
-{
- if (fd_ >= 0) {
- (void)xclose(fd_);
- releaseD();
- }
-}
-
-Boolean PosixStorageObject::seek(off_t off, Messenger &mgr)
-{
- if (lseek(fd_, off, SEEK_SET) < 0) {
- fd_ = -1;
- systemError(mgr, PosixStorageMessages::lseekSystemCall, errno);
- return 0;
- }
- else
- return 1;
-}
-
-Boolean PosixStorageObject::read(char *buf, size_t bufSize, Messenger &mgr,
- size_t &nread)
-{
- if (readSaved(buf, bufSize, nread))
- return 1;
- if (suspended_)
- resume(mgr);
- if (fd_ < 0 || eof_)
- return 0;
- long n;
- do {
- n = ::read(fd_, buf, bufSize);
- } while (n < 0 && errno == EINTR);
- if (n > 0) {
- nread = size_t(n);
- saveBytes(buf, nread);
- return 1;
- }
- if (n < 0) {
- int saveErrno = errno;
- releaseD();
- (void)xclose(fd_);
- systemError(mgr, PosixStorageMessages::readSystemCall, saveErrno);
- fd_ = -1;
- }
- else {
- eof_ = 1;
- // n == 0, so end of file
- if (!mayRewind_) {
- releaseD();
- if (xclose(fd_) < 0)
- systemError(mgr, PosixStorageMessages::closeSystemCall, errno);
- fd_ = -1;
- }
-
- }
- return 0;
-}
-
-void PosixStorageObject::willNotRewind()
-{
- RewindStorageObject::willNotRewind();
- if (eof_ && fd_ >= 0) {
- releaseD();
- (void)xclose(fd_);
- fd_ = -1;
- }
-}
-
-Boolean PosixStorageObject::suspend()
-{
- if (fd_ < 0 || suspended_)
- return 0;
- struct stat sb;
- if (fstat(fd_, &sb) < 0 || !S_ISREG(sb.st_mode))
- return 0;
- suspendFailedMessage_ = 0;
- suspendPos_ = lseek(fd_, 0, SEEK_CUR);
- if (suspendPos_ == (off_t)-1) {
- suspendFailedMessage_ = &PosixStorageMessages::lseekSystemCall;
- suspendErrno_ = errno;
- }
- if (xclose(fd_) < 0 && !suspendFailedMessage_) {
- suspendFailedMessage_ = &PosixStorageMessages::closeSystemCall;
- suspendErrno_ = errno;
- }
- fd_ = -1;
- suspended_ = 1;
- releaseD();
- return 1;
-}
-
-void PosixStorageObject::resume(Messenger &mgr)
-{
- ASSERT(suspended_);
- if (suspendFailedMessage_) {
- systemError(mgr, *suspendFailedMessage_, suspendErrno_);
- suspended_ = 0;
- return;
- }
- acquireD();
- // suspended_ must be 1 until after acquireD() is called,
- // so that we don't try to suspend this one before it is resumed.
- suspended_ = 0;
- do {
- fd_ = openFile(cfilename_.data());
- } while (fd_ < 0 && errno == EINTR);
- if (fd_ < 0) {
- releaseD();
- systemError(mgr, PosixStorageMessages::openSystemCall, errno);
- return;
- }
- if (lseek(fd_, suspendPos_, SEEK_SET) < 0) {
- systemError(mgr, PosixStorageMessages::lseekSystemCall, errno);
- (void)xclose(fd_);
- fd_ = -1;
- releaseD();
- }
-}
-
-#ifdef SP_STAT_BLKSIZE
-
-size_t PosixBaseStorageObject::getBlockSize() const
-{
- struct stat sb;
- long sz;
- if (fstat(fd_, &sb) < 0)
- return defaultBlockSize;
- if (!S_ISREG(sb.st_mode))
- return defaultBlockSize;
- if ((unsigned long)sb.st_blksize > size_t(-1))
- sz = size_t(-1);
- else
- sz = sb.st_blksize;
- return sz;
-}
-
-#else /* not SP_STAT_BLKSIZE */
-
-size_t PosixBaseStorageObject::getBlockSize() const
-{
- return defaultBlockSize;
-}
-
-#endif /* not SP_STAT_BLKSIZE */
-
-void PosixStorageObject::systemError(Messenger &mgr,
- const MessageType2 &msg,
- int err)
-{
- ParentLocationMessenger(mgr).message(msg,
- StringMessageArg(filename_),
- ErrnoMessageArg(err));
-}
-
-class PosixFdStorageObject : public PosixBaseStorageObject {
-public:
- PosixFdStorageObject(int, Boolean mayRewind);
- Boolean read(char *buf, size_t bufSize, Messenger &mgr, size_t &nread);
- Boolean seek(off_t, Messenger &);
- enum {
- noError,
- readError,
- invalidNumberError,
- lseekError
- };
-private:
- int origFd_;
-};
-
-PosixFdStorageManager::PosixFdStorageManager(const char *type,
- const CharsetInfo *idCharset)
-: IdStorageManager(idCharset), type_(type)
-{
-}
-
-Boolean PosixFdStorageManager::inheritable() const
-{
- return 0;
-}
-
-StorageObject *PosixFdStorageManager::makeStorageObject(const StringC &id,
- const StringC &,
- Boolean,
- Boolean mayRewind,
- Messenger &mgr,
- StringC &foundId)
-{
- int n = 0;
- size_t i;
- for (i = 0; i < id.size(); i++) {
- UnivChar ch;
- if (!idCharset()->descToUniv(id[i], ch))
- break;
- if (ch < UnivCharsetDesc::zero || ch > UnivCharsetDesc::zero + 9)
- break;
- int digit = ch - UnivCharsetDesc::zero;
- // Allow the division to be done at compile-time.
- if (n > INT_MAX/10)
- break;
- n *= 10;
- if (n > INT_MAX - digit)
- break;
- n += digit;
- }
- if (i < id.size() || i == 0) {
- mgr.message(PosixStorageMessages::invalidNumber,
- StringMessageArg(id));
- return 0;
- }
- foundId = id;
- // Could check access mode with fcntl(n, F_GETFL).
- return new PosixFdStorageObject(n, mayRewind);
-}
-
-PosixFdStorageObject::PosixFdStorageObject(int fd, Boolean mayRewind)
-: PosixBaseStorageObject(fd, mayRewind), origFd_(fd)
-{
-}
-
-const char *PosixFdStorageManager::type() const
-{
- return type_;
-}
-
-Boolean PosixFdStorageObject::read(char *buf, size_t bufSize, Messenger &mgr,
- size_t &nread)
-{
- if (readSaved(buf, bufSize, nread))
- return 1;
- if (fd_ < 0 || eof_)
- return 0;
- long n;
- do {
- n = ::read(fd_, buf, bufSize);
- } while (n < 0 && errno == EINTR);
- if (n > 0) {
- nread = size_t(n);
- saveBytes(buf, nread);
- return 1;
- }
- if (n < 0) {
- ParentLocationMessenger(mgr).message(PosixStorageMessages::fdRead,
- NumberMessageArg(fd_),
- ErrnoMessageArg(errno));
- fd_ = -1;
- }
- else
- eof_ = 1;
- return 0;
-}
-
-Boolean PosixFdStorageObject::seek(off_t off, Messenger &mgr)
-{
- if (lseek(fd_, off, SEEK_SET) < 0) {
- ParentLocationMessenger(mgr).message(PosixStorageMessages::fdLseek,
- NumberMessageArg(fd_),
- ErrnoMessageArg(errno));
- return 0;
- }
- else
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorageMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorageMessages.h
deleted file mode 100644
index 505e9dfc7d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/PosixStorageMessages.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// This file was automatically generated from lib\PosixStorageMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct PosixStorageMessages {
- // 2200
- static const MessageType2 readSystemCall;
- // 2201
- static const MessageType2 openSystemCall;
- // 2202
- static const MessageType2 closeSystemCall;
- // 2203
- static const MessageType2 lseekSystemCall;
- // 2204
- static const MessageType1 invalidFilename;
- // 2205
- static const MessageType2 fdRead;
- // 2206
- static const MessageType2 fdLseek;
- // 2207
- static const MessageType1 invalidNumber;
- // 2208
- static const MessageType2 cannotFind;
-};
-const MessageType2 PosixStorageMessages::readSystemCall(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2200
-#ifndef SP_NO_MESSAGE_TEXT
-,"error reading %1 (%2)"
-#endif
-);
-const MessageType2 PosixStorageMessages::openSystemCall(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2201
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot open %1 (%2)"
-#endif
-);
-const MessageType2 PosixStorageMessages::closeSystemCall(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2202
-#ifndef SP_NO_MESSAGE_TEXT
-,"error closing %1 (%2)"
-#endif
-);
-const MessageType2 PosixStorageMessages::lseekSystemCall(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2203
-#ifndef SP_NO_MESSAGE_TEXT
-,"error seeking on %1 (%2)"
-#endif
-);
-const MessageType1 PosixStorageMessages::invalidFilename(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2204
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid filename %1"
-#endif
-);
-const MessageType2 PosixStorageMessages::fdRead(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2205
-#ifndef SP_NO_MESSAGE_TEXT
-,"error reading file descriptor %1 (%2)"
-#endif
-);
-const MessageType2 PosixStorageMessages::fdLseek(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2206
-#ifndef SP_NO_MESSAGE_TEXT
-,"error seeking on file descriptor %1 (%2)"
-#endif
-);
-const MessageType1 PosixStorageMessages::invalidNumber(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2207
-#ifndef SP_NO_MESSAGE_TEXT
-,"%1 is not a valid file descriptor number"
-#endif
-);
-const MessageType2 PosixStorageMessages::cannotFind(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2208
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot find %1; tried %2"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Priority.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Priority.h
deleted file mode 100644
index 86ad059bb3..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Priority.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Priority_INCLUDED
-#define Priority_INCLUDED 1
-
-#include <limits.h>
-#include "Boolean.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Priority {
-public:
- typedef unsigned char Type;
- enum {
- data = 0,
- dataDelim = 1,
- function = 2,
- delim = UCHAR_MAX
- };
- static inline Type blank(int n) {
- // `Priority::' works round gcc 2.5.5 bug
- return Priority::Type(n + function);
- }
- static inline Boolean isBlank(Type t) {
- return function < t && t < delim;
- }
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Priority_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.cxx
deleted file mode 100644
index b78119394d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Resource.h"
-#include "Trie.h"
-#include "Owner.h"
-#include "XcharMap.h"
-#include "Recognizer.h"
-#include "InputSource.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Recognizer::Recognizer(Trie *trie, const XcharMap<EquivCode> &map)
-: trie_(trie), map_(map), multicode_(0)
-{
-}
-
-Recognizer::Recognizer(Trie *trie, const XcharMap<EquivCode> &map,
- Vector<Token> &suppressTokens)
-: trie_(trie), map_(map), multicode_(1)
-{
- suppressTokens.swap(suppressTokens_);
-}
-
-Token Recognizer::recognize(InputSource *in, Messenger &mgr) const
-{
- if (multicode_) {
- in->startToken();
- if (in->scanSuppress())
- return suppressTokens_[map_[in->tokenChar(mgr)]];
- }
- else
- in->startTokenNoMulticode();
- register const Trie *pos = trie_.pointer();
- do {
- pos = pos->next(map_[in->tokenChar(mgr)]);
- } while (pos->hasNext());
- if (!pos->blank()) {
- in->endToken(pos->tokenLength());
- return pos->token();
- }
- const BlankTrie *b = pos->blank();
- const Trie *newPos = b;
- size_t maxBlanks = b->maxBlanksToScan();
- size_t nBlanks;
- for (nBlanks = 0; nBlanks < maxBlanks; nBlanks++) {
- EquivCode code = map_[in->tokenChar(mgr)];
- if (!b->codeIsBlank(code)) {
- if (newPos->hasNext())
- newPos = newPos->next(code);
- break;
- }
- }
- while (newPos->hasNext())
- newPos = newPos->next(map_[in->tokenChar(mgr)]);
- if (newPos->token() != 0) {
- in->endToken(newPos->tokenLength() + b->additionalLength() + nBlanks);
- return newPos->token();
- }
- else {
- in->endToken(pos->tokenLength() + (pos->includeBlanks() ? nBlanks : 0));
- return pos->token();
- }
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.h
deleted file mode 100644
index dc0e5725fa..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Recognizer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Recognizer_INCLUDED
-#define Recognizer_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Resource.h"
-#include "Owner.h"
-#include "XcharMap.h"
-#include "types.h"
-#include "Vector.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class Messenger;
-class InputSource;
-class Trie;
-
-class Recognizer : public Resource {
-public:
- Recognizer(Trie *, const XcharMap<EquivCode> &);
- Recognizer(Trie *, const XcharMap<EquivCode> &, Vector<Token> &);
- Token recognize(InputSource *, Messenger &) const;
-private:
- Recognizer(const Recognizer &); // undefined
- void operator=(const Recognizer &); // undefined
- Boolean multicode_;
- Owner<Trie> trie_;
- XcharMap<EquivCode> map_;
- Vector<Token> suppressTokens_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Recognizer_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/RewindStorageObject.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/RewindStorageObject.cxx
deleted file mode 100644
index b59685eb7e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/RewindStorageObject.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "RewindStorageObject.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-RewindStorageObject::RewindStorageObject(Boolean mayRewind, Boolean canSeek)
-: mayRewind_(mayRewind), canSeek_(canSeek),
- savingBytes_(mayRewind && !canSeek), readingSaved_(0)
-{
-}
-
-Boolean RewindStorageObject::rewind(Messenger &mgr)
-{
- ASSERT(mayRewind_);
- if (canSeek_)
- return seekToStart(mgr);
- else {
- readingSaved_ = 1;
- nBytesRead_ = 0;
- return 1;
- }
-}
-
-void RewindStorageObject::unread(const char *s, size_t n)
-{
- savedBytes_.append(s, n);
- if (!readingSaved_) {
- readingSaved_ = 1;
- nBytesRead_ = 0;
- }
-}
-
-void RewindStorageObject::willNotRewind()
-{
- mayRewind_ = 0;
- savingBytes_ = 0;
- if (!readingSaved_) {
- // Ensure that memory is released now.
- String<char> tem;
- tem.swap(savedBytes_);
- }
-}
-
-Boolean RewindStorageObject::readSaved(char *buf, size_t bufSize,
- size_t &nread)
-{
- if (!readingSaved_)
- return 0;
- if (nBytesRead_ >= savedBytes_.size()) {
- if (!mayRewind_) {
- // Ensure that memory is released now.
- String<char> tem;
- tem.swap(savedBytes_);
- }
- readingSaved_ = 0;
- return 0;
- }
- nread = savedBytes_.size() - nBytesRead_;
- if (nread > bufSize)
- nread = bufSize;
- memcpy(buf, savedBytes_.data() + nBytesRead_, nread);
- nBytesRead_ += nread;
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SGMLApplication.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/SGMLApplication.cxx
deleted file mode 100644
index f4073b88a2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SGMLApplication.cxx
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "Boolean.h"
-#include "SGMLApplication.h"
-
-SGMLApplication::~SGMLApplication()
-{
-}
-
-void SGMLApplication::appinfo(const AppinfoEvent &)
-{
-}
-
-void SGMLApplication::startDtd(const StartDtdEvent &)
-{
-}
-
-void SGMLApplication::endDtd(const EndDtdEvent &)
-{
-}
-
-void SGMLApplication::endProlog(const EndPrologEvent &)
-{
-}
-
-void SGMLApplication::startElement(const StartElementEvent &)
-{
-}
-
-void SGMLApplication::endElement(const EndElementEvent &)
-{
-}
-
-void SGMLApplication::data(const DataEvent &)
-{
-}
-
-void SGMLApplication::sdata(const SdataEvent &)
-{
-}
-
-void SGMLApplication::pi(const PiEvent &)
-{
-}
-
-void SGMLApplication::externalDataEntityRef(const ExternalDataEntityRefEvent &)
-{
-}
-
-void SGMLApplication::subdocEntityRef(const SubdocEntityRefEvent &)
-{
-}
-
-void SGMLApplication::nonSgmlChar(const NonSgmlCharEvent &)
-{
-}
-
-void SGMLApplication::commentDecl(const CommentDeclEvent &)
-{
-}
-
-void SGMLApplication::markedSectionStart(const MarkedSectionStartEvent &)
-{
-}
-
-void SGMLApplication::markedSectionEnd(const MarkedSectionEndEvent &)
-{
-}
-
-void SGMLApplication::ignoredChars(const IgnoredCharsEvent &)
-{
-}
-
-void SGMLApplication::generalEntity(const GeneralEntityEvent &)
-{
-}
-
-void SGMLApplication::error(const ErrorEvent &)
-{
-}
-
-void SGMLApplication::openEntityChange(const OpenEntityPtr &)
-{
-}
-
-
-SGMLApplication::OpenEntity::OpenEntity()
-: count_(0)
-{
-}
-
-SGMLApplication::OpenEntity::~OpenEntity()
-{
-}
-
-SGMLApplication::OpenEntityPtr::OpenEntityPtr()
-: ptr_(0)
-{
-}
-
-SGMLApplication::OpenEntityPtr::OpenEntityPtr(const OpenEntityPtr &ptr)
-: ptr_(ptr.ptr_)
-{
- if (ptr_)
- ptr_->count_ += 1;
-}
-
-SGMLApplication::OpenEntityPtr::~OpenEntityPtr()
-{
- if (ptr_) {
- ptr_->count_ -= 1;
- if (ptr_->count_ == 0)
- delete ptr_;
- }
-}
-
-void SGMLApplication::OpenEntityPtr::operator=(OpenEntity *p)
-{
- if (p)
- p->count_ += 1;
- if (ptr_) {
- ptr_->count_ -= 1;
- if (ptr_->count_ == 0)
- delete ptr_;
- }
- ptr_ = p;
-}
-
-SGMLApplication::Location::Location()
-{
- init();
-}
-
-SGMLApplication::Location::Location(const OpenEntityPtr &ptr, Position pos)
-{
- if (ptr)
- *this = ptr->location(pos);
- else
- init();
-}
-
-void SGMLApplication::Location::init()
-{
- entityName.ptr = 0;
- entityName.len = 0;
- filename.ptr = 0;
- filename.len = 0;
- lineNumber = (unsigned long)-1;
- columnNumber = (unsigned long)-1;
- byteOffset = (unsigned long)-1;
- entityOffset = (unsigned long)-1;
- other = 0;
-}
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SJISCodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/SJISCodingSystem.cxx
deleted file mode 100644
index d06aff4fab..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SJISCodingSystem.cxx
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "SJISCodingSystem.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SJISDecoder : public Decoder {
-public:
- SJISDecoder();
- size_t decode(Char *, const char *, size_t, const char **);
-private:
-};
-
-class SJISEncoder : public RecoveringEncoder {
-public:
- SJISEncoder();
- void output(const Char *, size_t, OutputByteStream *);
- void output(Char *tmp_char, size_t tmp_size_t, OutputByteStream *tmp_obs) {
- output((const Char *)tmp_char, (size_t) tmp_size_t, (OutputByteStream *)tmp_obs);
- }
-
-};
-
-Decoder *SJISCodingSystem::makeDecoder() const
-{
- return new SJISDecoder;
-}
-
-Encoder *SJISCodingSystem::makeEncoder() const
-{
- return new SJISEncoder;
-}
-
-
-SJISDecoder::SJISDecoder()
-{
-}
-
-size_t SJISDecoder::decode(Char *to, const char *s,
- size_t slen, const char **rest)
-{
- Char *start = to;
- while (slen > 0) {
- unsigned char c = *(unsigned char *)s;
- if (!(c & 0x80)) {
- *to++ = c;
- s++;
- slen--;
- }
- else if (129 <= c && c <= 159) {
- if (slen < 2)
- break;
- s++;
- slen -= 2;
- unsigned char c2 = *(unsigned char *)s++;
- unsigned short n = ((c - 112) << 9) | c2;
- if (64 <= c2 && c2 <= 127)
- n -= 31 + (1 << 8);
- else if (c2 <= 158)
- n -= 32 + (1 << 8);
- else if (c2 <= 252)
- n -= 126;
- else
- continue;
- n |= 0x8080;
- *to++ = n;
- }
- else if (224 <= c && c <= 239) {
- if (slen < 2)
- break;
- s++;
- slen -= 2;
- unsigned char c2 = *(unsigned char *)s++;
- unsigned short n = ((c - 176) << 9) | c2;
- if (64 <= c2 && c2 <= 127)
- n -= 31 + (1 << 8);
- else if (c2 <= 158)
- n -= 32 + (1 << 8);
- else if (c2 <= 252)
- n -= 126;
- else
- continue;
- n |= 0x8080;
- *to++ = n;
- }
- else if (161 <= c && c <= 223) {
- slen--;
- s++;
- *to++ = c;
- }
- else {
- // 128, 160, 240-255
- slen--;
- s++;
- }
- }
- *rest = s;
- return to - start;
-}
-
-SJISEncoder::SJISEncoder()
-{
-}
-
-void SJISEncoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- for (; n > 0; s++, n--) {
- Char c = *s;
- unsigned short mask = (unsigned short)(c & 0x8080);
- if (mask == 0)
- sb->sputc((unsigned char)(c & 0xff));
- else if (mask == 0x8080) {
- unsigned char c1 = (c >> 8) & 0x7f;
- unsigned char c2 = c & 0x7f;
- unsigned char out1;
- if (c1 < 33)
- out1 = 0;
- else if (c1 < 95)
- out1 = ((c1 + 1) >> 1) + 112;
- else if (c1 < 127)
- out1 = ((c1 + 1) >> 1) + 176;
- else
- out1 = 0;
- if (out1) {
- unsigned char out2;
- if (c1 & 1) {
- if (c2 < 33)
- out2 = 0;
- else if (c2 <= 95)
- out2 = c2 + 31;
- else if (c2 <= 126)
- out2 = c2 + 32;
- else
- out2 = 0;
- }
- else {
- if (33 <= c2 && c2 <= 126)
- out2 = c2 + 126;
- else
- out2 = 0;
- }
- if (out2) {
- sb->sputc(out1);
- sb->sputc(out2);
- }
- else
- handleUnencodable(c, sb);
- }
- else
- handleUnencodable(c, sb);
- }
- else if (mask == 0x0080) {
- if (161 <= c && c <= 223)
- sb->sputc((unsigned char)(c & 0xff));
- else
- handleUnencodable(c, sb);
- }
- else
- handleUnencodable(c, sb);
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SOEntityCatalog.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/SOEntityCatalog.cxx
deleted file mode 100644
index 01da10c70b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SOEntityCatalog.cxx
+++ /dev/null
@@ -1,1149 +0,0 @@
-// Copyright (c) 1994, 1995, 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "CharsetInfo.h"
-#include "MessageArg.h"
-#include "CatalogMessages.h"
-#include "SOEntityCatalog.h"
-#include "EntityDecl.h"
-#include "EntityCatalog.h"
-#include "Message.h"
-#include "StringC.h"
-#include "types.h"
-#include "HashTable.h"
-#include "InputSource.h"
-#include "Boolean.h"
-#include "SubstTable.h"
-#include "CatalogEntry.h"
-#include "Vector.h"
-#include "StorageManager.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class CatalogParser;
-class SOEntityCatalog;
-
-class SOCatalogManagerImpl : public SOCatalogManager {
-public:
- SOCatalogManagerImpl(const Vector<StringC> &sysids,
- size_t nSysidsMustExist,
- const CharsetInfo *sysidCharset,
- const CharsetInfo *catalogCharset,
- Boolean useDocCatalog);
- ConstPtr<EntityCatalog> makeCatalog(StringC &systemId,
- const CharsetInfo &charset,
- ExtendEntityManager *,
- Messenger &) const;
- Boolean mapCatalog(ParsedSystemId &systemId,
- ExtendEntityManager *em,
- Messenger &mgr) const;
-private:
- void addCatalogsForDocument(CatalogParser &parser,
- StringC &sysid,
- SOEntityCatalog *,
- const CharsetInfo &charset,
- Messenger &mgr) const;
- size_t nSystemCatalogsMustExist_;
- Vector<StringC> systemCatalogs_;
- const CharsetInfo *sysidCharset_;
- const CharsetInfo *catalogCharset_;
- Boolean useDocCatalog_;
-};
-
-class SOEntityCatalog : public EntityCatalog {
-public:
- SOEntityCatalog(Ptr<ExtendEntityManager> em);
- typedef EntityDecl::DeclType DeclType;
- Boolean document(const CharsetInfo &, Messenger &, StringC &) const;
- Boolean sgmlDecl(const CharsetInfo &, Messenger &, StringC &) const;
- Boolean lookup(const EntityDecl &entity,
- const Syntax &,
- const CharsetInfo &,
- Messenger &,
- StringC &) const;
- Boolean lookupPublic(const StringC &,
- const CharsetInfo &,
- Messenger &,
- StringC &) const;
- Boolean lookupChar(const StringC &,
- const CharsetInfo &,
- Messenger &,
- UnivChar &) const;
- void addPublicId(StringC &publicId, StringC &systemId, const Location &,
- Boolean override);
- void addDelegate(StringC &prefix, StringC &systemId, const Location &,
- Boolean override);
- void addSystemId(StringC &systemId, StringC &replSystemId, const Location &);
- void addName(StringC &name, DeclType, StringC &systemId, const Location &,
- Boolean override);
- void setSgmlDecl(StringC &str, const Location &loc);
- void setDocument(StringC &str, const Location &loc);
- void setBase(const Location &loc);
- void endCatalog();
- const Ptr<ExtendEntityManager> &entityManager() {
- return em_;
- }
-private:
- SOEntityCatalog(const SOEntityCatalog &); // undefined
- void operator=(const SOEntityCatalog &); // undefined
-
- Boolean expandCatalogSystemId(const StringC &str,
- const Location &loc,
- size_t baseNumber,
- Boolean isNdata,
- const CharsetInfo &charset,
- const StringC *lookupPublicId,
- Messenger &mgr,
- StringC &result) const;
- const CatalogEntry *
- findBestPublicEntry(const StringC &publicId, Boolean overrideOnly,
- const CharsetInfo &charset, Boolean &delegated) const;
-
- class Table {
- public:
- Table();
- const CatalogEntry *lookup(const StringC &, Boolean overrideOnly) const;
- const CatalogEntry *lookup(const StringC &key,
- const SubstTable<Char> &substTable,
- Boolean overrideOnly) const;
- void insert(const StringC &, const CatalogEntry &, Boolean override);
- size_t count() const;
- private:
- Table(const Table &); // undefined
- void operator=(const Table &); // undefined
- // These are entries that are applicable when an explicit system id
- // was specified in the external identifier.
- HashTable<StringC,CatalogEntry> overrideEntries_;
- // This specifies the entries that should substitute for the
- // overrideEntries_ when an explicit system identifier was not specified.
- HashTable<StringC,CatalogEntry> normalEntries_;
- };
-
- Table publicIds_;
- Table delegates_;
- HashTable<StringC,CatalogEntry> systemIds_;
- Table names_[5];
- size_t catalogNumber_;
- Boolean haveSgmlDecl_;
- StringC sgmlDecl_;
- Location sgmlDeclLoc_;
- size_t sgmlDeclBaseNumber_;
- StringC document_;
- Boolean haveDocument_;
- Location documentLoc_;
- size_t documentBaseNumber_;
- Boolean haveCurrentBase_;
- Vector<Location> base_;
- Ptr<ExtendEntityManager> em_;
-};
-
-class CatalogParser : private Messenger {
-public:
- CatalogParser(const CharsetInfo &);
- void parseCatalog(const StringC &sysid,
- Boolean mustExist,
- const CharsetInfo &sysidCharset,
- const CharsetInfo &catalogCharset,
- InputSourceOrigin *origin,
- SOEntityCatalog *catalog,
- Messenger &mgr);
-public:
- // Since it's a return type, it has to be public to keep some
- // (broken) compilers happy.
- enum Param {
- eofParam,
- literalParam,
- nameParam,
- percentParam
- };
-private:
- enum {
- data,
- eof,
- nul,
- lit,
- lita,
- minus,
- s,
- min // other minimum data characters
- };
- enum { minimumLiteral = 01 };
-
- Messenger &messenger() { return *this; }
- void dispatchMessage(Message &);
- void dispatchMessage(const Message &);
- void initMessage(Message &);
- void parsePublic();
- void parseDelegate();
- void parseDtddecl();
- void parseSystem();
- void parseNameMap(EntityDecl::DeclType declType);
- void parseOverride();
- Param parseParam(unsigned flags = 0);
- Boolean parseArg();
- void parseLiteral(Char delim, unsigned flags);
- void parseName();
- void skipComment();
- void upcase(StringC &);
- Boolean inLoop(const Location &loc);
- Boolean isMinimumData(Xchar c) {
- int cat = categoryTable_[c];
- return (cat == min || (cat == s && c != tab_)
- || cat == minus || cat == lita);
- }
- Xchar get() { return in_->get(messenger()); }
- void unget() { in_->ungetToken(); }
- Messenger *mgr_;
- InputSource *in_;
- SOEntityCatalog *catalog_;
- StringC param_;
- Location paramLoc_;
- Char minus_;
- Char tab_;
- Char rs_;
- Char re_;
- Char space_;
- StringC publicKey_;
- StringC systemKey_;
- StringC entityKey_;
- StringC doctypeKey_;
- StringC linktypeKey_;
- StringC notationKey_;
- StringC overrideKey_;
- StringC sgmlDeclKey_;
- StringC documentKey_;
- StringC catalogKey_;
- StringC yesKey_;
- StringC noKey_;
- StringC baseKey_;
- StringC delegateKey_;
- StringC dtddeclKey_;
- StringC sgmlKey_;
- XcharMap<unsigned char> categoryTable_;
- SubstTable<Char> substTable_;
- Boolean override_;
-};
-
-ExtendEntityManager::CatalogManager *
-SOCatalogManager::make(const Vector<StringC> &sysids,
- size_t nSysidsMustExist,
- const CharsetInfo *sysidCharset,
- const CharsetInfo *catalogCharset,
- Boolean useDocCatalog)
-{
- return new SOCatalogManagerImpl(sysids,
- nSysidsMustExist,
- sysidCharset,
- catalogCharset,
- useDocCatalog);
-}
-
-SOCatalogManagerImpl::SOCatalogManagerImpl(const Vector<StringC> &systemCatalogs,
- size_t nSystemCatalogsMustExist,
- const CharsetInfo *sysidCharset,
- const CharsetInfo *catalogCharset,
- Boolean useDocCatalog)
-: systemCatalogs_(systemCatalogs),
- nSystemCatalogsMustExist_(nSystemCatalogsMustExist),
- sysidCharset_(sysidCharset),
- catalogCharset_(catalogCharset),
- useDocCatalog_(useDocCatalog)
-{
-}
-
-Boolean SOCatalogManagerImpl::mapCatalog(ParsedSystemId &systemId,
- ExtendEntityManager *em,
- Messenger &mgr) const
-{
- Vector<ParsedSystemId::Map> maps;
- systemId.maps.swap(maps);
- while (maps.size() > 0) {
- StringC catalogSystemId;
- systemId.unparse(*sysidCharset_, 0, catalogSystemId);
- SOEntityCatalog *catalog = new SOEntityCatalog(em);
- ConstPtr<EntityCatalog> deleter(catalog);
- CatalogParser parser(*catalogCharset_);
- parser.parseCatalog(catalogSystemId, 1, *sysidCharset_, *catalogCharset_,
- InputSourceOrigin::make(), catalog, mgr);
- // FIXME do catalog caching here
- StringC s;
- if (maps.back().type == ParsedSystemId::Map::catalogDocument) {
- if (!catalog->document(*sysidCharset_, mgr, s)) {
- mgr.message(CatalogMessages::noDocumentEntry,
- StringMessageArg(catalogSystemId));
- return 0;
- }
- }
- else {
- ASSERT(maps.back().type == ParsedSystemId::Map::catalogPublic);
- if (!catalog->lookupPublic(maps.back().publicId, *sysidCharset_, mgr,
- s)) {
- mgr.message(CatalogMessages::noPublicEntry,
- StringMessageArg(maps.back().publicId),
- StringMessageArg(catalogSystemId));
- return 0;
- }
- }
- ParsedSystemId tem;
- if (!em->parseSystemId(s, *sysidCharset_, 0, 0, mgr, tem))
- return 0;
- systemId = tem;
- maps.resize(maps.size() - 1);
- for (size_t i = 0; i < systemId.maps.size(); i++)
- maps.push_back(systemId.maps[i]);
- systemId.maps.clear();
- }
- return 1;
-}
-
-ConstPtr<EntityCatalog>
-SOCatalogManagerImpl::makeCatalog(StringC &systemId,
- const CharsetInfo &charset,
- ExtendEntityManager *em,
- Messenger &mgr) const
-{
- SOEntityCatalog *entityCatalog = new SOEntityCatalog(em);
- CatalogParser parser(*catalogCharset_);
- size_t i;
- for (i = 0; i < nSystemCatalogsMustExist_; i++)
- parser.parseCatalog(systemCatalogs_[i], 1,
- *sysidCharset_, *catalogCharset_,
- InputSourceOrigin::make(), entityCatalog,
- mgr);
- if (useDocCatalog_)
- addCatalogsForDocument(parser, systemId, entityCatalog, charset, mgr);
- for (i = nSystemCatalogsMustExist_; i < systemCatalogs_.size(); i++)
- parser.parseCatalog(systemCatalogs_[i], 0,
- *sysidCharset_, *catalogCharset_,
- InputSourceOrigin::make(), entityCatalog,
- mgr);
-
- return entityCatalog;
-}
-
-
-void SOCatalogManagerImpl::addCatalogsForDocument(CatalogParser &parser,
- StringC &sysid,
- SOEntityCatalog *impl,
- const CharsetInfo &charset,
- Messenger &mgr) const
-{
- ParsedSystemId v;
- if (!impl->entityManager()->parseSystemId(sysid, charset, 0, 0, mgr, v))
- return;
- if (v.maps.size() > 0) {
- if (v.maps[0].type == ParsedSystemId::Map::catalogDocument) {
- v.maps.erase(v.maps.begin(), v.maps.begin() + 1);
- StringC tem;
- v.unparse(charset, 0, tem);
- parser.parseCatalog(tem, 1, charset, *catalogCharset_,
- InputSourceOrigin::make(), impl, mgr);
- if (!impl->document(charset, mgr, sysid)) {
- mgr.message(CatalogMessages::noDocumentEntry, StringMessageArg(tem));
- sysid.resize(0);
- }
- }
- return;
- }
- Vector<StringC> catalogs;
- size_t i;
- for (i = 0; i < v.size(); i++)
- if (v[i].storageManager->inheritable()) {
- ParsedSystemId catalogId;
- catalogId.resize(1);
- StorageObjectSpec &spec = catalogId.back();
- spec.storageManager = v[i].storageManager;
- spec.codingSystemType = v[i].codingSystemType;
- spec.codingSystemName = v[i].codingSystemName;
- spec.specId = spec.storageManager->idCharset()->execToDesc("catalog");
- spec.storageManager->resolveRelative(v[i].specId, spec.specId, 0);
- spec.baseId = v[i].baseId;
- spec.records = v[i].records;
- StringC tem;
- catalogId.unparse(charset, 0, tem);
- for (size_t j = 0; j < catalogs.size(); j++)
- if (tem == catalogs[j]) {
- tem.resize(0);
- break;
- }
- if (tem.size() > 0) {
- catalogs.resize(catalogs.size() + 1);
- tem.swap(catalogs.back());
- }
- }
- for (i = 0; i < catalogs.size(); i++)
- parser.parseCatalog(catalogs[i], 0, charset,
- *catalogCharset_, InputSourceOrigin::make(), impl,
- mgr);
-}
-
-SOEntityCatalog::SOEntityCatalog(Ptr<ExtendEntityManager> em)
-: em_(em), catalogNumber_(0), haveSgmlDecl_(0), haveDocument_(0),
- haveCurrentBase_(0)
-{
-}
-
-void SOEntityCatalog::endCatalog()
-{
- catalogNumber_++;
- haveCurrentBase_ = 0;
-}
-
-Boolean SOEntityCatalog::expandCatalogSystemId(const StringC &str,
- const Location &loc,
- size_t baseNumber,
- Boolean isNdata,
- const CharsetInfo &charset,
- const StringC *lookupPublicId,
- Messenger &mgr,
- StringC &result) const
-{
- return em_->expandSystemId(str,
- (baseNumber ? base_[baseNumber - 1] : loc),
- isNdata,
- charset,
- lookupPublicId,
- mgr,
- result);
-}
-
-Boolean SOEntityCatalog::lookup(const EntityDecl &entity,
- const Syntax &syntax,
- const CharsetInfo &charset,
- Messenger &mgr,
- StringC &result) const
-{
- const CatalogEntry *entry = 0;
- const CatalogEntry *delegatedEntry = 0;
- if (entity.systemIdPointer())
- entry = systemIds_.lookup(*entity.systemIdPointer());
- if (entity.publicIdPointer()) {
- const CatalogEntry *publicEntry;
- Boolean delegated;
- publicEntry = findBestPublicEntry(*entity.publicIdPointer(),
- entity.systemIdPointer() != 0,
- charset,
- delegated);
- if (publicEntry && delegated)
- delegatedEntry = publicEntry;
- // match for system id has priority over match for public id in same
- // catalog
- if (publicEntry
- && (!entry || publicEntry->catalogNumber < entry->catalogNumber))
- entry = publicEntry;
- }
- if (entity.name().size() > 0
- && (!entry || entry->catalogNumber > 0)) {
- const CatalogEntry *entityEntry;
- int tableIndex = (entity.declType() >= EntityDecl::parameterEntity
- ? int(entity.declType()) - 1
- : int(entity.declType()));
- StringC name(entity.name());
- Boolean subst;
- switch (entity.declType()) {
- case EntityDecl::parameterEntity:
- {
- StringC tem(name);
- name = syntax.peroDelim();
- name += tem;
- }
- // fall through
- case EntityDecl::generalEntity:
- subst = syntax.namecaseEntity();
- break;
- default:
- subst = syntax.namecaseGeneral();
- break;
- }
- if (!subst)
- entityEntry = names_[tableIndex].lookup(name,
- entity.systemIdPointer() != 0);
- else
- entityEntry = names_[tableIndex].lookup(entity.name(),
- syntax.upperSubstTable(),
- entity.systemIdPointer() != 0);
- // match for public id has priority over match for entity in same
- // catalog
- if (entityEntry
- && (!entry || entityEntry->catalogNumber < entry->catalogNumber))
- entry = entityEntry;
- }
- if (entry)
- return expandCatalogSystemId(entry->to,
- entry->loc,
- entry->baseNumber,
- entity.dataType() == EntityDecl::ndata,
- charset,
- entry == delegatedEntry
- ? entity.publicIdPointer()
- : 0,
- mgr,
- result);
- if (entity.systemIdPointer())
- return em_->expandSystemId(*entity.systemIdPointer(),
- entity.defLocation(),
- entity.dataType() == EntityDecl::ndata,
- charset,
- 0,
- mgr,
- result);
- return 0;
-}
-
-Boolean SOEntityCatalog::lookupPublic(const StringC &publicId,
- const CharsetInfo &charset,
- Messenger &mgr,
- StringC &result) const
-{
- Boolean delegated;
- const CatalogEntry *entry = findBestPublicEntry(publicId, 0, charset,
- delegated);
- return (entry
- && expandCatalogSystemId(entry->to, entry->loc, entry->baseNumber,
- 0, charset, delegated ? &publicId : 0,
- mgr, result));
-
-}
-
-Boolean SOEntityCatalog::lookupChar(const StringC &name,
- const CharsetInfo &charset,
- Messenger &mgr,
- UnivChar &result) const
-{
- Boolean delegated;
- const CatalogEntry *entry = findBestPublicEntry(name, 0, charset,
- delegated);
- if (!entry)
- return 0;
- if (delegated)
- return 0; // FIXME
- const StringC &number = entry->to;
- if (number.size() == 0)
- return 0;
- UnivChar n = 0;
- for (size_t i = 0; i < number.size(); i++) {
- int d = charset.digitWeight(number[i]);
- if (d < 0)
- return 0;
- if (n <= UnivChar(-1)/10 && (n *= 10) <= UnivChar(-1) - d)
- n += d;
- }
- result = n;
- return 1;
-}
-
-const CatalogEntry *
-SOEntityCatalog::findBestPublicEntry(const StringC &publicId,
- Boolean overrideOnly,
- const CharsetInfo &charset,
- Boolean &delegated) const
-{
- Char slash = charset.execToDesc('/');
- Char colon = charset.execToDesc(':');
- const CatalogEntry *bestEntry = 0;
- for (size_t i = 0; i <= publicId.size(); i++) {
- if ((i + 1 < publicId.size()
- && (publicId[i] == slash || publicId[i] == colon)
- && publicId[i + 1] == publicId[i])
- || (i >= 2
- && (publicId[i - 1] == slash || publicId[i - 1] == colon)
- && publicId[i - 2] == publicId[i - 1])) {
- StringC tem(publicId.data(), i);
- const CatalogEntry *entry = delegates_.lookup(tem, overrideOnly);
- if (entry
- && (!bestEntry
- || entry->catalogNumber <= bestEntry->catalogNumber)) {
- bestEntry = entry;
- delegated = 1;
- }
- }
- }
- const CatalogEntry *entry = publicIds_.lookup(publicId, overrideOnly);
- if (entry
- && (!bestEntry || entry->catalogNumber <= bestEntry->catalogNumber)) {
- bestEntry = entry;
- delegated = 0;
- }
- return bestEntry;
-}
-
-Boolean SOEntityCatalog::sgmlDecl(const CharsetInfo &charset,
- Messenger &mgr,
- StringC &result) const
-
-{
- return haveSgmlDecl_ && expandCatalogSystemId(sgmlDecl_, sgmlDeclLoc_,
- sgmlDeclBaseNumber_,
- 0, charset, 0, mgr, result);
-}
-
-Boolean SOEntityCatalog::document(const CharsetInfo &charset,
- Messenger &mgr,
- StringC &result) const
-
-{
- return haveDocument_ && expandCatalogSystemId(document_, documentLoc_,
- documentBaseNumber_,
- 0, charset, 0, mgr, result);
-}
-
-void SOEntityCatalog::addPublicId(StringC &publicId, StringC &systemId,
- const Location &loc, Boolean override)
-{
- CatalogEntry entry;
- entry.loc = loc;
- entry.catalogNumber = catalogNumber_;
- entry.baseNumber = haveCurrentBase_ ? base_.size() : 0;
- systemId.swap(entry.to);
- publicIds_.insert(publicId, entry, override);
-}
-
-void SOEntityCatalog::addDelegate(StringC &prefix, StringC &systemId,
- const Location &loc, Boolean override)
-{
- CatalogEntry entry;
- entry.loc = loc;
- entry.catalogNumber = catalogNumber_;
- entry.baseNumber = haveCurrentBase_ ? base_.size() : 0;
- systemId.swap(entry.to);
- delegates_.insert(prefix, entry, override);
-}
-
-void SOEntityCatalog::addSystemId(StringC &systemId, StringC &toSystemId,
- const Location &loc)
-{
- CatalogEntry entry;
- entry.loc = loc;
- entry.catalogNumber = catalogNumber_;
- entry.baseNumber = haveCurrentBase_ ? base_.size() : 0;
- toSystemId.swap(entry.to);
- systemIds_.insert(systemId, entry, false);
-}
-
-void SOEntityCatalog::addName(StringC &name, DeclType declType,
- StringC &systemId, const Location &loc,
- Boolean override)
-{
- CatalogEntry entry;
- entry.loc = loc;
- entry.catalogNumber = catalogNumber_;
- entry.baseNumber = haveCurrentBase_ ? base_.size() : 0;
- int tableIndex = (declType >= EntityDecl::parameterEntity
- ? int(declType) - 1
- : int(declType));
- entry.serial = names_[tableIndex].count();
- systemId.swap(entry.to);
- names_[tableIndex].insert(name, entry, override);
-}
-
-void SOEntityCatalog::setSgmlDecl(StringC &str, const Location &loc)
-{
- if (!haveSgmlDecl_) {
- haveSgmlDecl_ = true;
- str.swap(sgmlDecl_);
- sgmlDeclLoc_ = loc;
- sgmlDeclBaseNumber_ = haveCurrentBase_ ? base_.size() : 0;
-
- }
-}
-
-void SOEntityCatalog::setDocument(StringC &str, const Location &loc)
-{
- if (!haveDocument_) {
- haveDocument_ = true;
- str.swap(document_);
- documentLoc_ = loc;
- documentBaseNumber_ = haveCurrentBase_ ? base_.size() : 0;
- }
-}
-
-void SOEntityCatalog::setBase(const Location &loc)
-{
- if (loc.origin().isNull())
- haveCurrentBase_ = 0;
- else {
- haveCurrentBase_ = 1;
- base_.push_back(loc);
- }
-}
-
-SOEntityCatalog::Table::Table()
-{
-}
-
-void SOEntityCatalog::Table::insert(const StringC &key,
- const CatalogEntry &entry,
- Boolean override)
-{
- if (override)
- overrideEntries_.insert(key, entry, false);
- else {
- const CatalogEntry *e = overrideEntries_.lookup(key);
- if (!e)
- normalEntries_.insert(key, entry, false);
- }
-}
-
-const CatalogEntry *SOEntityCatalog::Table::lookup(const StringC &key,
- Boolean overrideOnly) const
-{
- if (!overrideOnly) {
- const CatalogEntry *e = normalEntries_.lookup(key);
- if (e)
- return e;
- }
- return overrideEntries_.lookup(key);
-}
-
-const CatalogEntry *
-SOEntityCatalog::Table::lookup(const StringC &name,
- const SubstTable<Char> &substTable,
- Boolean overrideOnly) const
-{
- HashTableIter<StringC,CatalogEntry> iter1(overrideEntries_);
- HashTableIter<StringC,CatalogEntry> iter2(normalEntries_);
- HashTableIter<StringC,CatalogEntry> *iters[2];
- int nIter = 0;
- iters[nIter++] = &iter1;
- if (!overrideOnly)
- iters[nIter++] = &iter2;
- const CatalogEntry *entry = 0;
- for (int i = 0; i < nIter; i++) {
- HashTableIter<StringC,CatalogEntry> &iter = *iters[i];
- const StringC *key;
- const CatalogEntry *value;
- StringC buffer;
- while (iter.next(key, value)) {
- buffer = *key;
- for (size_t j = 0; j < buffer.size(); j++)
- substTable.subst(buffer[j]);
- if (buffer == name) {
- if (!entry || value->serial < entry->serial)
- entry = value;
- }
- }
- }
- return entry;
-}
-
-size_t SOEntityCatalog::Table::count() const
-{
- return normalEntries_.count() + overrideEntries_.count();
-}
-
-CatalogParser::CatalogParser(const CharsetInfo &charset)
-: categoryTable_(data),
- entityKey_(charset.execToDesc("ENTITY")),
- publicKey_(charset.execToDesc("PUBLIC")),
- systemKey_(charset.execToDesc("SYSTEM")),
- doctypeKey_(charset.execToDesc("DOCTYPE")),
- linktypeKey_(charset.execToDesc("LINKTYPE")),
- notationKey_(charset.execToDesc("NOTATION")),
- overrideKey_(charset.execToDesc("OVERRIDE")),
- sgmlDeclKey_(charset.execToDesc("SGMLDECL")),
- documentKey_(charset.execToDesc("DOCUMENT")),
- catalogKey_(charset.execToDesc("CATALOG")),
- yesKey_(charset.execToDesc("YES")),
- noKey_(charset.execToDesc("NO")),
- baseKey_(charset.execToDesc("BASE")),
- delegateKey_(charset.execToDesc("DELEGATE")),
- dtddeclKey_(charset.execToDesc("DTDDECL")),
- sgmlKey_(charset.execToDesc("SGML"))
-{
- static const char lcletters[] = "abcdefghijklmnopqrstuvwxyz";
- static const char ucletters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- // minimum data other than lcletter, ucletter
- static const char minChars[] = "0123456789-.'()+,/:=?";
- static const char sChars[] = " \n\r\t";
- categoryTable_.setChar(0, nul);
- const char *p;
- const char *q;
- for (p = lcletters, q = ucletters; *p; p++, q++) {
- Char lc = charset.execToDesc(*p);
- Char uc = charset.execToDesc(*q);
- substTable_.addSubst(lc, uc);
- categoryTable_.setChar(lc, min);
- categoryTable_.setChar(uc, min);
- }
- for (p = sChars; *p; p++)
- categoryTable_.setChar(charset.execToDesc(*p), s);
- for (p = minChars; *p; p++)
- categoryTable_.setChar(charset.execToDesc(*p), min);
- categoryTable_.setChar(charset.execToDesc('\''), lita);
- categoryTable_.setChar(charset.execToDesc('"'), lit);
- minus_ = charset.execToDesc('-');
- categoryTable_.setChar(minus_, minus);
- tab_ = charset.execToDesc('\t');
- re_ = charset.execToDesc('\r');
- rs_ = charset.execToDesc('\n');
- space_ = charset.execToDesc(' ');
- categoryTable_.setEe(eof);
-}
-
-void CatalogParser::parseCatalog(const StringC &sysid,
- Boolean mustExist,
- const CharsetInfo &sysidCharset,
- const CharsetInfo &catalogCharset,
- InputSourceOrigin *origin,
- SOEntityCatalog *catalog,
- Messenger &mgr)
-{
- const Ptr<ExtendEntityManager> &em = catalog->entityManager();
- in_ = em->open(sysid, sysidCharset, origin,
- mustExist ? 0 : ExtendEntityManager::mayNotExist, mgr);
- if (!in_)
- return;
- catalog_ = catalog;
- mgr_ = &mgr;
- override_ = 0;
- Boolean recovering = false;
- Vector<StringC> subSysids;
- Vector<Location> subSysidLocs;
- for (;;) {
- Param parm = parseParam();
- if (parm == nameParam) {
- upcase(param_);
- Boolean wasRecovering = recovering;
- recovering = false;
- if (param_ == publicKey_)
- parsePublic();
- else if (param_ == systemKey_)
- parseSystem();
- else if (param_ == entityKey_)
- parseNameMap(EntityDecl::generalEntity);
- else if (param_ == doctypeKey_)
- parseNameMap(EntityDecl::doctype);
- else if (param_ == linktypeKey_)
- parseNameMap(EntityDecl::linktype);
- else if (param_ == notationKey_)
- parseNameMap(EntityDecl::notation);
- else if (param_ == sgmlKey_)
- parseNameMap(EntityDecl::sgml);
- else if (param_ == sgmlDeclKey_) {
- if (parseArg())
- catalog_->setSgmlDecl(param_, paramLoc_);
- }
- else if (param_ == documentKey_) {
- if (parseArg())
- catalog_->setDocument(param_, paramLoc_);
- }
- else if (param_ == overrideKey_)
- parseOverride();
- else if (param_ == catalogKey_) {
- if (parseArg()) {
- if (inLoop(paramLoc_))
- break;
- subSysids.resize(subSysids.size() + 1);
- param_.swap(subSysids.back());
- subSysidLocs.push_back(paramLoc_);
- }
- }
- else if (param_ == baseKey_) {
- if (parseArg()) {
- StringC tem;
- if (em->expandSystemId(param_,
- paramLoc_,
- 0,
- catalogCharset,
- 0,
- mgr,
- tem)) {
- InputSource *in = em->open(tem,
- catalogCharset,
- InputSourceOrigin::make(paramLoc_),
- 0,
- mgr);
- if (in && (in->get(mgr) != InputSource::eE || !in->accessError()))
- catalog->setBase(in->currentLocation());
- }
- }
- }
- else if (param_ == delegateKey_)
- parseDelegate();
- else if (param_ == dtddeclKey_)
- parseDtddecl();
- else {
- if (!wasRecovering && parseParam() == eofParam)
- break;
- recovering = true;
- }
- }
- else if (parm == eofParam)
- break;
- else if (!recovering) {
- recovering = true;
- message(CatalogMessages::nameExpected);
- }
- }
- delete in_;
- catalog->endCatalog();
- for (size_t i = 0; i < subSysids.size(); i++) {
- StringC tem;
- if (em->expandSystemId(subSysids[i], subSysidLocs[i], 0, catalogCharset,
- 0, mgr, tem))
- parseCatalog(tem, 1, catalogCharset, catalogCharset,
- InputSourceOrigin::make(subSysidLocs[i]), catalog, mgr);
- }
-}
-
-Boolean CatalogParser::inLoop(const Location &loc)
-{
- const InputSourceOrigin *origin = paramLoc_.origin()->asInputSourceOrigin();
- if (!origin)
- return 0;
- const ExternalInfo *info = origin->externalInfo();
- if (!info)
- return 0;
- StorageObjectLocation soLoc;
- if (!ExtendEntityManager::externalize(info,
- origin->startOffset(paramLoc_.index()),
- soLoc))
- return 0;
- for (;;) {
- const Location &parent = origin->parent();
- if (parent.origin().isNull())
- break;
- origin = parent.origin()->asInputSourceOrigin();
- if (!origin)
- break;
- const ExternalInfo *info1 = origin->externalInfo();
- if (info1) {
- StorageObjectLocation soLoc1;
- if (ExtendEntityManager::externalize(info1,
- origin->startOffset(parent.index()),
- soLoc1)) {
- if (soLoc.storageObjectSpec->storageManager
- == soLoc1.storageObjectSpec->storageManager
- && soLoc.actualStorageId == soLoc1.actualStorageId) {
- setNextLocation(loc.origin()->parent());
- message(CatalogMessages::inLoop);
- return 1;
- }
- }
- }
- }
- return 0;
-}
-
-void CatalogParser::parseOverride()
-{
- if (parseParam() != nameParam) {
- message(CatalogMessages::overrideYesOrNo);
- return;
- }
- upcase(param_);
- if (param_ == yesKey_)
- override_ = 1;
- else if (param_ == noKey_)
- override_ = 0;
- else
- message(CatalogMessages::overrideYesOrNo);
-}
-
-void CatalogParser::parsePublic()
-{
- if (parseParam(minimumLiteral) != literalParam) {
- message(CatalogMessages::literalExpected);
- return;
- }
- StringC publicId;
- param_.swap(publicId);
- if (!parseArg())
- return;
- catalog_->addPublicId(publicId, param_, paramLoc_, override_);
-}
-
-void CatalogParser::parseDelegate()
-{
- if (parseParam(minimumLiteral) != literalParam) {
- message(CatalogMessages::literalExpected);
- return;
- }
- StringC publicId;
- param_.swap(publicId);
- if (!parseArg())
- return;
- catalog_->addDelegate(publicId, param_, paramLoc_, override_);
-}
-
-void CatalogParser::parseDtddecl()
-{
- message(CatalogMessages::dtddeclNotSupported);
- if (parseParam(minimumLiteral) != literalParam) {
- message(CatalogMessages::literalExpected);
- return;
- }
- if (!parseArg())
- return;
-}
-
-void CatalogParser::parseSystem()
-{
- if (!parseArg())
- return;
- StringC systemId;
- param_.swap(systemId);
- Param parm = parseParam();
- if (parm == nameParam)
- message(CatalogMessages::systemShouldQuote);
- else if (parm != literalParam) {
- message(CatalogMessages::literalExpected);
- return;
- }
- catalog_->addSystemId(systemId, param_, paramLoc_);
-}
-
-void CatalogParser::parseNameMap(EntityDecl::DeclType declType)
-{
- if (!parseArg())
- return;
- StringC name;
- param_.swap(name);
- if (!parseArg())
- return;
- catalog_->addName(name, declType, param_, paramLoc_, override_);
-}
-
-Boolean CatalogParser::parseArg()
-{
- Param parm = parseParam();
- if (parm != nameParam && parm != literalParam) {
- message(CatalogMessages::nameOrLiteralExpected);
- return false;
- }
- return true;
-}
-
-CatalogParser::Param CatalogParser::parseParam(unsigned flags)
-{
- for (;;) {
- Xchar c = get();
- switch (categoryTable_[c]) {
- case eof:
- return eofParam;
- case lit:
- case lita:
- parseLiteral(c, flags);
- return literalParam;
- case s:
- break;
- case nul:
- message(CatalogMessages::nulChar);
- break;
- case minus:
- c = get();
- if (c == minus_) {
- skipComment();
- break;
- }
- unget();
- // fall through
- default:
- parseName();
- return nameParam;
- }
- }
-}
-
-void CatalogParser::skipComment()
-{
- for (;;) {
- Xchar c = get();
- if (c == minus_) {
- c = get();
- if (c == minus_)
- break;
- }
- if (c == InputSource::eE) {
- message(CatalogMessages::eofInComment);
- break;
- }
- }
-}
-
-void CatalogParser::parseLiteral(Char delim, unsigned flags)
-{
- paramLoc_ = in_->currentLocation();
- enum { no, yesBegin, yesMiddle } skipping = yesBegin;
- param_.resize(0);
- for (;;) {
- Xchar c = get();
- if (c == InputSource::eE) {
- message(CatalogMessages::eofInLiteral);
- break;
- }
- if (Char(c) == delim)
- break;
- if (flags & minimumLiteral) {
- if (!isMinimumData(c))
- message(CatalogMessages::minimumData);
- if (c == rs_)
- ;
- else if (c == space_ || c == re_) {
- if (skipping == no) {
- param_ += space_;
- skipping = yesMiddle;
- }
- }
- else {
- skipping = no;
- param_ += Char(c);
- }
- }
- else
- param_ += Char(c);
- }
- if (skipping == yesMiddle)
- param_.resize(param_.size() - 1);
-}
-
-void CatalogParser::parseName()
-{
- paramLoc_ = in_->currentLocation();
- size_t length;
- for (length = 1;; length++) {
- Xchar c = in_->tokenChar(messenger());
- int cat = categoryTable_[c];
- if (cat == eof || cat == s)
- break;
- // FIXME maybe check for LIT or LITA
- if (cat == nul)
- message(CatalogMessages::nulChar);
- }
- in_->endToken(length);
- param_.assign(in_->currentTokenStart(), in_->currentTokenLength());
-}
-
-void CatalogParser::upcase(StringC &str)
-{
- for (size_t i = 0; i < str.size(); i++)
- substTable_.subst(str[i]);
-}
-
-void CatalogParser::dispatchMessage(const Message &msg)
-{
- mgr_->dispatchMessage(msg);
-}
-
-void CatalogParser::dispatchMessage(Message &msg)
-{
- mgr_->dispatchMessage(msg);
-}
-
-void CatalogParser::initMessage(Message &msg)
-{
- msg.loc = in_->currentLocation();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Sd.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Sd.cxx
deleted file mode 100644
index 829cbbaa51..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Sd.cxx
+++ /dev/null
@@ -1,274 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Sd.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Sd::Sd(const Ptr<EntityManager> &entityManager)
-: entityManager_(entityManager),
- internalCharsetIsDocCharset_(entityManager->internalCharsetIsDocCharset()),
- docCharset_(entityManager->charset()),
- scopeInstance_(0),
- www_(0),
- netEnable_(netEnableNo),
- entityRef_(entityRefAny),
- typeValid_(1),
- integrallyStored_(0)
-{
- int i;
- for (i = 0; i < nBooleanFeature; i++)
- booleanFeature_[i] = 0;
- for (i = 0; i < nNumberFeature; i++)
- numberFeature_[i] = 0;
- for (i = 0; i < nCapacity; i++)
- capacity_[i] = 35000;
- if (internalCharsetIsDocCharset_)
- internalCharsetPtr_ = 0;
- else
- internalCharsetPtr_ = &entityManager->charset();
-}
-
-void Sd::setDocCharsetDesc(const UnivCharsetDesc &desc)
-{
- docCharset_.set(desc);
-}
-
-const char *const Sd::reservedName_[] = {
- "ALL",
- "ANY",
- "APPINFO",
- "ATTLIST",
- "ATTRIB",
- "BASESET",
- "CAPACITY",
- "CHARSET",
- "CONCUR",
- "CONTROLS",
- "DATATAG",
- "DEFAULT",
- "DELIM",
- "DESCSET",
- "DOCTYPE",
- "DOCUMENT",
- "ELEMENT",
- "EMPTY",
- "EMPTYNRM",
- "ENDTAG",
- "ENTITIES",
- "ENTITY",
- "EXPLICIT",
- "FEATURES",
- "FORMAL",
- "FUNCHAR",
- "FUNCTION",
- "GENERAL",
- "IMMEDNET",
- "IMPLICIT",
- "IMPLYDEF",
- "INSTANCE",
- "INTEGRAL",
- "INTERNAL",
- "KEEPRSRE",
- "LCNMCHAR",
- "LCNMSTRT",
- "LINK",
- "MINIMIZE",
- "MSICHAR",
- "MSOCHAR",
- "MSSCHAR",
- "NAMECASE",
- "NAMECHAR",
- "NAMES",
- "NAMESTRT",
- "NAMING",
- "NETENABL",
- "NO",
- "NOASSERT",
- "NONE",
- "NOTATION",
- "OMITNAME",
- "OMITTAG",
- "OTHER",
- "PUBLIC",
- "QUANTITY",
- "RANK",
- "RE",
- "REF",
- "RS",
- "SCOPE",
- "SEEALSO",
- "SEPCHAR",
- "SGML",
- "SGMLREF",
- "SHORTREF",
- "SHORTTAG",
- "SHUNCHAR",
- "SIMPLE",
- "SPACE",
- "STARTTAG",
- "SUBDOC",
- "SWITCHES",
- "SYNTAX",
- "SYSTEM",
- "TYPE",
- "UCNMCHAR",
- "UCNMSTRT",
- "UNCLOSED",
- "UNUSED",
- "URN",
- "VALIDITY",
- "VALUE",
- "YES"
-};
-
-const char *const Sd::capacityName_[] = {
- "TOTALCAP",
- "ENTCAP",
- "ENTCHCAP",
- "ELEMCAP",
- "GRPCAP",
- "EXGRPCAP",
- "EXNMCAP",
- "ATTCAP",
- "ATTCHCAP",
- "AVGRPCAP",
- "NOTCAP",
- "NOTCHCAP",
- "IDCAP",
- "IDREFCAP",
- "MAPCAP",
- "LKSETCAP",
- "LKNMCAP"
-};
-
-
-const char *const Sd::quantityName_[] = {
- "ATTCNT",
- "ATTSPLEN",
- "BSEQLEN",
- "DTAGLEN",
- "DTEMPLEN",
- "ENTLVL",
- "GRPCNT",
- "GRPGTCNT",
- "GRPLVL",
- "LITLEN",
- "NAMELEN",
- "NORMSEP",
- "PILEN",
- "TAGLEN",
- "TAGLVL"
-};
-
-const char *const Sd::generalDelimiterName_[] = {
- "AND",
- "COM",
- "CRO",
- "DSC",
- "DSO",
- "DTGC",
- "DTGO",
- "ERO",
- "ETAGO",
- "GRPC",
- "GRPO",
- "HCRO",
- "LIT",
- "LITA",
- "MDC",
- "MDO",
- "MINUS",
- "MSC",
- "NET",
- "NESTC",
- "OPT",
- "OR",
- "PERO",
- "PIC",
- "PIO",
- "PLUS",
- "REFC",
- "REP",
- "RNI",
- "SEQ",
- "STAGO",
- "TAGC",
- "VI"
-};
-
-Boolean Sd::lookupQuantityName(const StringC &name, Syntax::Quantity &quantity)
- const
-{
- for (size_t i = 0; i < SIZEOF(quantityName_); i++)
- if (execToInternal(quantityName_[i]) == name) {
- quantity = Syntax::Quantity(i);
- return 1;
- }
- return 0;
-}
-
-Boolean Sd::lookupCapacityName(const StringC &name, Sd::Capacity &capacity)
- const
-{
- for (size_t i = 0; i < SIZEOF(capacityName_); i++)
- if (execToInternal(capacityName_[i]) == name) {
- capacity = Sd::Capacity(i);
- return 1;
- }
- return 0;
-}
-
-Boolean Sd::lookupGeneralDelimiterName(const StringC &name,
- Syntax::DelimGeneral &delimGeneral)
- const
-{
- for (size_t i = 0; i < SIZEOF(generalDelimiterName_); i++)
- if (execToInternal(generalDelimiterName_[i]) == name) {
- delimGeneral = Syntax::DelimGeneral(i);
- return 1;
- }
- return 0;
-}
-
-StringC Sd::quantityName(Syntax::Quantity q) const
-{
- return execToInternal(quantityName_[q]);
-}
-
-StringC Sd::generalDelimiterName(Syntax::DelimGeneral d) const
-{
- return execToInternal(generalDelimiterName_[d]);
-}
-
-UnivChar Sd::nameToUniv(const StringC &name)
-{
- const int *p = namedCharTable_.lookup(name);
- int n;
- if (p)
- n = *p;
- else {
- n = int(namedCharTable_.count());
- namedCharTable_.insert(name, n);
- }
- return n + 0x60000000; // 10646 private use group
-}
-
-void Sd::setShorttag(Boolean b)
-{
- for (int i = fSHORTTAG_FIRST; i <= fSHORTTAG_LAST; i++)
- booleanFeature_[i] = b;
- netEnable_ = netEnableAll;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SdFormalError.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/SdFormalError.h
deleted file mode 100644
index 6575eb5639..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SdFormalError.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SdFormalError_INCLUDED
-#define SdFormalError_INCLUDED 1
-
-#include "Link.h"
-#include "StringC.h"
-#include "Message.h"
-#include "Location.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ParserState;
-
-class SdFormalError : public Link {
-public:
- SdFormalError(const Location &, const MessageType1 &, const StringC &);
- void send(ParserState &);
-private:
- const MessageType1 *message_;
- Location location_;
- StringC id_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SdFormalError_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SdText.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/SdText.cxx
deleted file mode 100644
index 98bbeb59f9..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SdText.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "SdText.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-SdText::SdText()
-{
-}
-
-SdText::SdText(const Location &loc, Boolean lita)
-: lita_(lita)
-{
- items_.resize(items_.size() + 1);
- items_.back().loc = loc;
- items_.back().index = 0;
-}
-
-void SdText::addChar(SyntaxChar c, const Location &loc)
-{
- if (items_.size() == 0
- || loc.origin().pointer() != items_.back().loc.origin().pointer()
- || loc.index() != (items_.back().loc.index()
- + (chars_.size() - items_.back().index))) {
- items_.resize(items_.size() + 1);
- items_.back().loc = loc;
- items_.back().index = chars_.size();
- }
- chars_ += c;
-}
-
-void SdText::swap(SdText &to)
-{
- items_.swap(to.items_);
- chars_.swap(to.chars_);
- {
- Boolean tem = to.lita_;
- to.lita_ = lita_;
- lita_ = tem;
- }
-}
-
-Location SdText::endDelimLocation() const
-{
- Location loc(items_.back().loc);
- loc += chars_.size() - items_.back().index;
- return loc;
-}
-
-SdTextItem::SdTextItem()
-{
-}
-
-SdTextIter::SdTextIter(const SdText &text)
-: ptr_(&text),
- itemIndex_(0)
-{
-}
-
-Boolean SdTextIter::next(const SyntaxChar *&ptr, size_t &length, Location &loc)
-{
- const Vector<SdTextItem> &items = ptr_->items_;
- if (itemIndex_ >= items.size())
- return 0;
- loc = items[itemIndex_].loc;
- const String<SyntaxChar> &chars = ptr_->chars_;
- size_t charsIndex = items[itemIndex_].index;
- ptr = chars.data() + charsIndex;
- if (itemIndex_ + 1 < items.size())
- length = items[itemIndex_ + 1].index - charsIndex;
- else
- length = chars.size() - charsIndex;
- itemIndex_++;
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SearchResultMessageArg.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/SearchResultMessageArg.cxx
deleted file mode 100644
index 04bec15000..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SearchResultMessageArg.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "SearchResultMessageArg.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-RTTI_DEF1(SearchResultMessageArg, OtherMessageArg);
-
-SearchResultMessageArg::SearchResultMessageArg()
-{
-}
-
-MessageArg *SearchResultMessageArg::copy() const
-{
- return new SearchResultMessageArg(*this);
-}
-
-void SearchResultMessageArg::add(StringC &str, int n)
-{
- filename_.resize(filename_.size() + 1);
- str.swap(filename_.back());
- errno_.push_back(n);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SgmlParser.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/SgmlParser.cxx
deleted file mode 100644
index ee529a95bf..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SgmlParser.cxx
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "SgmlParser.h"
-#include "Parser.h"
-#include "Trie.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-SgmlParser::SgmlParser()
-: parser_(0)
-{
-}
-
-SgmlParser::SgmlParser(const Params &params)
-: parser_(new Parser(params))
-{
-}
-
-void SgmlParser::init(const Params &params)
-{
- delete parser_;
- parser_ = new Parser(params);
-}
-
-SgmlParser::~SgmlParser()
-{
- delete parser_;
-}
-
-Event *SgmlParser::nextEvent()
-{
- return parser_->nextEvent();
-}
-
-void SgmlParser::parseAll(EventHandler &handler,
- const volatile sig_atomic_t *cancelPtr)
-{
- parser_->parseAll(handler, cancelPtr);
-}
-
-ConstPtr<Sd> SgmlParser::sd() const
-{
- return parser_->sdPointer();
-}
-
-ConstPtr<Syntax> SgmlParser::instanceSyntax() const
-{
- return parser_->instanceSyntaxPointer();
-}
-
-ConstPtr<Syntax> SgmlParser::prologSyntax() const
-{
- return parser_->prologSyntaxPointer();
-}
-
-EntityManager &SgmlParser::entityManager() const
-{
- return parser_->entityManager();
-}
-
-const EntityCatalog &SgmlParser::entityCatalog() const
-{
- return parser_->entityCatalog();
-}
-
-void SgmlParser::activateLinkType(const StringC &name)
-{
- parser_->activateLinkType(name);
-}
-
-void SgmlParser::allLinkTypesActivated()
-{
- parser_->allLinkTypesActivated();
-}
-
-void SgmlParser::swap(SgmlParser &s)
-{
- Parser *tem = parser_;
- parser_ = s.parser_;
- s.parser_ = tem;
-}
-
-Ptr<Dtd> SgmlParser::baseDtd()
-{
- return parser_->baseDtd();
-}
-
-const ParserOptions &SgmlParser::options() const
-{
- return parser_->options();
-}
-
-SgmlParser::Params::Params()
-: entityType(document),
- parent(0),
- options(0),
- subdocInheritActiveLinkTypes(0),
- subdocReferenced(0),
- subdocLevel(0)
-{
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ShortReferenceMap.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/ShortReferenceMap.cxx
deleted file mode 100644
index 1c5c72d482..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ShortReferenceMap.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "ShortReferenceMap.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-ShortReferenceMap::ShortReferenceMap()
-: Named(StringC()), used_(0)
-{
-}
-
-ShortReferenceMap::ShortReferenceMap(const StringC &name)
-: Named(name)
-{
-}
-
-void ShortReferenceMap::setNameMap(Vector<StringC> &map)
-{
- map.swap(nameMap_);
- // Make sure we know it's defined.
- if (nameMap_.size() == 0)
- nameMap_.resize(1);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/SrInfo.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/SrInfo.h
deleted file mode 100644
index b418f9b781..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/SrInfo.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SrInfo_INCLUDED
-#define SrInfo_INCLUDED
-
-#include "types.h"
-#include "StringOf.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct SrInfo {
- String<EquivCode> chars;
- int bSequenceLength;
- String<EquivCode> chars2;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SrInfo_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorage.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorage.cxx
deleted file mode 100644
index 7872ce53ea..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorage.cxx
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-#include "StdioStorage.h"
-#include "Message.h"
-#include "types.h"
-#include "ErrnoMessageArg.h"
-#include "StringOf.h"
-#include "StringC.h"
-#include "CodingSystem.h"
-
-#include "StdioStorageMessages.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stddef.h>
-#include <errno.h>
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class StdioStorageObject : public StorageObject {
-public:
- StdioStorageObject(FILE *fp, const StringC &filename);
- ~StdioStorageObject();
- Boolean read(char *buf, size_t bufSize, Messenger &mgr, size_t &nread);
- Boolean rewind(Messenger &mgr);
- size_t getBlockSize() const;
-private:
- enum ErrorIndex {
- invalidErrorIndex,
- fopenFailed,
- readError,
- seekError
- };
- void error(Messenger &mgr, const MessageType2 &, int err);
-
- FILE *fp_;
- StringC filename_;
- String<char> filenameBytes_;
-};
-
-StdioStorageManager::StdioStorageManager(const char *type,
- const CharsetInfo *filenameCharset,
- const OutputCodingSystem *filenameCodingSystem)
-: IdStorageManager(filenameCharset),
- type_(type),
- filenameCodingSystem_(filenameCodingSystem)
-{
-}
-
-StorageObject *StdioStorageManager::makeStorageObject(const StringC &str,
- const StringC &,
- Boolean,
- Boolean,
- Messenger &mgr,
- StringC &filename)
-{
- filename = str;
- String<char> filenameBytes = filenameCodingSystem_->convertOut(filename);
- errno = 0;
- FILE *fp = fopen(filenameBytes.data(), "r");
- if (!fp) {
- ParentLocationMessenger(mgr).message(StdioStorageMessages::openFailed,
- StringMessageArg(filename),
- ErrnoMessageArg(errno));
-
- return 0;
- }
- return new StdioStorageObject(fp, filename);
-}
-
-const char *StdioStorageManager::type() const
-{
- return type_;
-}
-
-StdioStorageObject::StdioStorageObject(FILE *fp, const StringC &filename)
-: fp_(fp), filename_(filename)
-{
-}
-
-StdioStorageObject::~StdioStorageObject()
-{
- if (fp_) {
- fclose(fp_);
- fp_ = 0;
- }
-}
-
-Boolean StdioStorageObject::rewind(Messenger &mgr)
-{
- if (fp_) {
- errno = 0;
- if (fseek(fp_, 0L, SEEK_SET) < 0) {
- error(mgr, StdioStorageMessages::seekFailed, errno);
- return 0;
- }
- return 1;
- }
- return 1;
-}
-
-size_t StdioStorageObject::getBlockSize() const
-{
- return BUFSIZ;
-}
-
-Boolean StdioStorageObject::read(char *buf, size_t bufSize, Messenger &mgr,
- size_t &nread)
-{
- if (!fp_)
- return 0;
- errno = 0;
- size_t n = 0;
- FILE *fp = fp_;
- while (n < bufSize) {
- int c = getc(fp);
- if (c == EOF) {
- if (ferror(fp)) {
- error(mgr, StdioStorageMessages::readFailed, errno);
- (void)fclose(fp);
- return 0;
- }
- fclose(fp);
- fp_ = 0;
- break;
- }
- buf[n++] = c;
- }
- nread = n;
- return n > 0;
-}
-
-void StdioStorageObject::error(Messenger &mgr,
- const MessageType2 &msg,
- int err)
-{
- ParentLocationMessenger(mgr).message(msg,
- StringMessageArg(filename_),
- ErrnoMessageArg(err));
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorageMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorageMessages.h
deleted file mode 100644
index 61f0b3149b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/StdioStorageMessages.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// This file was automatically generated from lib\StdioStorageMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct StdioStorageMessages {
- // 2400
- static const MessageType2 openFailed;
- // 2401
- static const MessageType2 readFailed;
- // 2402
- static const MessageType2 seekFailed;
-};
-const MessageType2 StdioStorageMessages::openFailed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2400
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot open %1 (%2)"
-#endif
-);
-const MessageType2 StdioStorageMessages::readFailed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2401
-#ifndef SP_NO_MESSAGE_TEXT
-,"\"error reading %1 (%2)"
-#endif
-);
-const MessageType2 StdioStorageMessages::seekFailed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2402
-#ifndef SP_NO_MESSAGE_TEXT
-,"error seeking %1 (%2)"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/StorageManager.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/StorageManager.cxx
deleted file mode 100644
index d1c5b343f5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/StorageManager.cxx
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "StorageManager.h"
-#define DEFAULT_BLOCK_SIZE 1024
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-StorageObject::StorageObject()
-{
-}
-
-StorageObject::~StorageObject()
-{
-}
-
-void StorageObject::willNotRewind()
-{
-}
-
-size_t StorageObject::getBlockSize() const
-{
- return DEFAULT_BLOCK_SIZE;
-}
-
-StorageManager::StorageManager()
-{
-}
-
-StorageManager::~StorageManager()
-{
-}
-
-Boolean StorageManager::inheritable() const
-{
- return 1;
-}
-
-Boolean StorageManager::resolveRelative(const StringC &, StringC &,
- Boolean) const
-{
- return 1;
-}
-
-Boolean StorageManager::guessIsId(const StringC &, const CharsetInfo &) const
-{
- return 0;
-}
-
-Boolean StorageManager::transformNeutral(StringC &, Boolean, Messenger &) const
-{
- return 0;
-}
-
-const InputCodingSystem *StorageManager::requiredCodingSystem() const
-{
- return 0;
-}
-
-Boolean StorageManager::requiresCr() const
-{
- return 0;
-}
-
-const CharsetInfo *StorageManager::idCharset() const
-{
- return 0;
-}
-
-const StringC *StorageManager::reString() const
-{
- return 0;
-}
-
-IdStorageManager::IdStorageManager(const CharsetInfo *idCharset)
-: idCharset_(idCharset)
-{
-}
-
-const CharsetInfo *IdStorageManager::idCharset() const
-{
- return idCharset_;
-}
-
-const StringC *IdStorageManager::reString() const
-{
- return &reString_;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/StorageObjectPosition.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/StorageObjectPosition.h
deleted file mode 100644
index ded91f17aa..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/StorageObjectPosition.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StorageObjectPosition_INCLUDED
-#define StorageObjectPosition_INCLUDED 1
-
-#include "Boolean.h"
-#include "types.h"
-#include "Owner.h"
-#include "CodingSystem.h"
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct StorageObjectPosition {
- StorageObjectPosition();
- // the number of RSs preceding line 1 of this storage object
- // or -1 if this hasn't been computed yet.
- size_t line1RS;
- Owner<Decoder> decoder;
- // Does the storage object start with an RS?
- PackedBoolean startsWithRS;
- // Were the RSs other than the first in the storage object inserted?
- PackedBoolean insertedRSs;
- Offset endOffset;
- StringC id;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StorageObjectPosition_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.cxx
deleted file mode 100644
index 43d648f9a5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "StringVectorMessageArg.h"
-#include "MessageBuilder.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-StringVectorMessageArg::StringVectorMessageArg(const Vector<StringC> &v)
-: v_(v)
-{
-}
-
-MessageArg *StringVectorMessageArg::copy() const
-{
- return new StringVectorMessageArg(*this);
-}
-
-void StringVectorMessageArg::append(MessageBuilder &builder) const
-{
- for (size_t i = 0; i < v_.size(); i++) {
- if (i > 0)
- builder.appendFragment(ParserMessages::listSep);
- builder.appendChars(v_[i].data(), v_[i].size());
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.h
deleted file mode 100644
index 3cb86ed5ff..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/StringVectorMessageArg.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StringVectorMessageArg_INCLUDED
-#define StringVectorMessageArg_INCLUDED 1
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "MessageArg.h"
-#include "StringC.h"
-#include "Vector.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class StringVectorMessageArg : public MessageArg {
-public:
- StringVectorMessageArg(const Vector<StringC> &);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- Vector<StringC> v_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StringVectorMessageArg_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Syntax.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Syntax.cxx
deleted file mode 100644
index 211586142c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Syntax.cxx
+++ /dev/null
@@ -1,452 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Syntax.h"
-#include "Sd.h"
-#include "CharsetInfo.h"
-#include "ISetIter.h"
-#include "macros.h"
-#include "MarkupScan.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const int Syntax::referenceQuantity_[] = {
- 40,
- 960,
- 960,
- 16,
- 16,
- 16,
- 32,
- 96,
- 16,
- 240,
- 8,
- 2,
- 240,
- 960,
- 24
-};
-
-Syntax::Syntax(const Sd &sd)
-: generalSubst_(0),
- entitySubst_(0),
- categoryTable_(otherCategory),
- shuncharControls_(0),
- multicode_(0),
- markupScanTable_(MarkupScan::normal)
-{
- static const char lcletter[] = "abcdefghijklmnopqrstuvwxyz";
- static const char ucletter[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- int i;
- for (i = 0; i < 26; i++) {
- Char lc = sd.execToInternal(lcletter[i]);
- Char uc = sd.execToInternal(ucletter[i]);
- set_[nameStart] += lc;
- set_[nameStart] += uc;
- set_[minimumData] += lc;
- set_[minimumData] += uc;
- set_[significant] += lc;
- set_[significant] += uc;
- if (i < 6) {
- set_[hexDigit] += lc;
- set_[hexDigit] += uc;
- }
- categoryTable_.setChar(lc, nameStartCategory);
- categoryTable_.setChar(uc, nameStartCategory);
- subst(lc, uc);
- }
- static const char digits[] = "0123456789";
- for (i = 0; i < 10; i++) {
- Char c = sd.execToInternal(digits[i]);
- set_[digit] += c;
- set_[hexDigit] += c;
- set_[minimumData] += c;
- set_[significant] += c;
- categoryTable_.setChar(c, digitCategory);
- }
- static const char special[] = "'()+,-./:=?";
- for (i = 0; special[i] != '\0'; i++) {
- Char c = sd.execToInternal(special[i]);
- set_[minimumData] += c;
- set_[significant] += c;
- }
-
- if (sd.www()) {
- static const char wwwSpecial[] = { 33, 35, 36, 37, 42, 59, 64, 95, 0 };
- for (i = 0; wwwSpecial[i] != '\0'; i++) {
- const CharsetInfo &charset = sd.internalCharset();
- WideChar c;
- ISet<WideChar> set;
- if (charset.univToDesc(wwwSpecial[i], c, set) > 0 && c <= Char(-1)) {
- set_[minimumData] += Char(c);
- set_[significant] += c;
- }
- }
- }
-
- for (i = 0; i < nQuantity; i++)
- quantity_[i] = referenceQuantity_[i];
- for (i = 0; i < 3; i++)
- standardFunctionValid_[i] = 0;
-}
-
-void Syntax::addNameCharacters(const ISet<Char> &set)
-{
- ISetIter<Char> iter(set);
- Char min, max;
- while (iter.next(min, max)) {
- set_[nmchar].addRange(min, max);
- set_[significant].addRange(min, max);
- categoryTable_.setRange(min, max, otherNameCategory);
- }
-}
-
-void Syntax::addNameStartCharacters(const ISet<Char> &set)
-{
- ISetIter<Char> iter(set);
- Char min, max;
- while (iter.next(min, max)) {
- set_[nameStart].addRange(min, max);
- set_[significant].addRange(min, max);
- categoryTable_.setRange(min, max, nameStartCategory);
- }
-}
-
-void Syntax::addSubst(Char lc, Char uc)
-{
- subst(lc, uc);
-}
-
-void Syntax::setStandardFunction(StandardFunction f, Char c)
-{
- standardFunction_[f] = c;
- standardFunctionValid_[f] = 1;
- set_[minimumData] += c;
- set_[s] += c;
- categoryTable_.setChar(c, sCategory);
- set_[functionChar] += c;
- set_[significant] += c;
- switch (f) {
- case fSPACE:
- set_[blank] += c;
- break;
- case fRE:
- case fRS:
- break;
- }
-}
-
-void Syntax::enterStandardFunctionNames()
-{
- static Syntax::ReservedName name[3] = {
- rRE, rRS, rSPACE
- };
- for (int i = 0; i < 3; i++)
- if (standardFunctionValid_[i])
- functionTable_.insert(reservedName(name[i]), standardFunction_[i]);
-}
-
-void Syntax::setDelimGeneral(int i, const StringC &str)
-{
- delimGeneral_[i] = str;
- for (size_t j = 0; j < str.size(); j++)
- set_[significant] += str[j];
-}
-
-void Syntax::addDelimShortref(const StringC &str, const CharsetInfo &charset)
-{
- if (str.size() == 1 && str[0] != charset.execToDesc('B') && !isB(str[0]))
- delimShortrefSimple_.add(str[0]);
- else
- delimShortrefComplex_.push_back(str);
- for (size_t i = 0; i < str.size(); i++)
- set_[significant] += str[i];
-}
-
-void Syntax::addDelimShortrefs(const ISet<Char> &shortrefChars,
- const CharsetInfo &charset)
-{
- ISetIter<Char> blankIter(set_[blank]);
- Char min, max;
- StringC specialChars;
- while (blankIter.next(min, max)) {
- do {
- specialChars += min;
- } while (min++ != max);
- }
- specialChars += charset.execToDesc('B');
- const ISet<Char> *simpleCharsPtr = &shortrefChars;
- ISet<Char> simpleChars;
- for (size_t i = 0; i < specialChars.size(); i++)
- if (shortrefChars.contains(specialChars[i])) {
- if (simpleCharsPtr != &simpleChars) {
- simpleChars = shortrefChars;
- simpleCharsPtr = &simpleChars;
- }
- simpleChars.remove(specialChars[i]);
- }
- ISetIter<Char> iter(*simpleCharsPtr);
- while (iter.next(min, max)) {
- delimShortrefSimple_.addRange(min, max);
- set_[significant].addRange(min, max);
- }
-}
-
-void Syntax::addFunctionChar(const StringC &str, FunctionClass fun, Char c)
-{
- switch (fun) {
- case cFUNCHAR:
- break;
- case cSEPCHAR:
- set_[s] += c;
- categoryTable_.setChar(c, sCategory);
- set_[blank] += c;
- set_[sepchar] += c;
- break;
- case cMSOCHAR:
- multicode_ = 1;
- markupScanTable_.setChar(c, MarkupScan::out);
- break;
- case cMSICHAR:
- // don't need to do anything special if we just have MSICHARs
- markupScanTable_.setChar(c, MarkupScan::in);
- break;
- case cMSSCHAR:
- multicode_ = 1;
- markupScanTable_.setChar(c, MarkupScan::suppress);
- break;
- }
- set_[functionChar] += c;
- set_[significant] += c;
- functionTable_.insert(str, c);
-}
-
-void Syntax::setName(int i, const StringC &str)
-{
- names_[i] = str;
- nameTable_.insert(str, i);
-}
-
-void Syntax::setNamecaseGeneral(Boolean b)
-{
- namecaseGeneral_ = b;
- generalSubst_ = b ? &upperSubst_ : &identitySubst_;
-}
-
-void Syntax::setNamecaseEntity(Boolean b)
-{
- namecaseEntity_ = b;
- entitySubst_ = b ? &upperSubst_ : &identitySubst_;
-}
-
-void Syntax::subst(Char from, Char to)
-{
- upperSubst_.addSubst(from, to);
-}
-
-void Syntax::addShunchar(Char c)
-{
- shunchar_.add(c);
-}
-
-Boolean Syntax::lookupReservedName(const StringC &str,
- ReservedName *result) const
-{
- const int *tem = nameTable_.lookup(str);
- if (tem) {
- *result = ReservedName(*tem);
- return 1;
- }
- else
- return 0;
-}
-
-Boolean Syntax::lookupFunctionChar(const StringC &name, Char *result) const
-{
- const Char *p = functionTable_.lookup(name);
- if (p) {
- *result = *p;
- return 1;
- }
- else
- return 0;
-}
-
-#ifdef __GNUG__
-typedef HashTableIter<StringC,Char> Dummy_HashTableIter_StringC_Char;
-#endif
-
-Boolean Syntax::charFunctionName(Char c, const StringC *&name) const
-{
- HashTableIter<StringC,Char> iter(functionTable_);
- const Char *cp;
- while (iter.next(name, cp))
- if (*cp == c)
- return 1;
- return 0;
-}
-
-Boolean Syntax::isValidShortref(const StringC &str) const
-{
- if (str.size() == 1 && delimShortrefSimple_.contains(str[0]))
- return 1;
- for (size_t i = 0; i < delimShortrefComplex_.size(); i++)
- if (str == delimShortrefComplex_[i])
- return 1;
- return 0;
-}
-
-void Syntax::implySgmlChar(const Sd &sd)
-
-{
- const CharsetInfo &internalCharset = sd.internalCharset();
- internalCharset.getDescSet(set_[sgmlChar]);
- ISet<WideChar> invalid;
- checkSgmlChar(sd, 0, 0, invalid);
- ISetIter<WideChar> iter(invalid);
- WideChar min, max;
- while (iter.next(min, max)) {
- do {
- if (min <= charMax)
- set_[sgmlChar].remove(Char(min));
- } while (min++ != max);
- }
-}
-
-void Syntax::checkSgmlChar(const Sd &sd,
- const ::SP_NAMESPACE_SCOPE Syntax *otherSyntax,
- Boolean invalidUseDocumentCharset,
- ISet<WideChar> &invalid) const
-{
- ISetIter<Char> iter(shunchar_);
- Char min, max;
- while (iter.next(min, max)) {
- if (min <= max) {
- do {
- Char c;
- if (!sd.internalCharsetIsDocCharset()) {
- UnivChar univ;
- WideChar tem;
- ISet<WideChar> set;
- if (sd.docCharset().descToUniv(min, univ)
- && sd.internalCharset().univToDesc(univ, tem, set)
- && tem <= charMax)
- c = Char(tem);
- else {
- const PublicId *base;
- StringC lit;
- Number n;
- CharsetDeclRange::Type type;
- // If it's a declared but unknown character,
- // then it can't be significant,
- if (invalidUseDocumentCharset
- && sd.docCharsetDecl().getCharInfo(min,
- base,
- type,
- n,
- lit)
- && type != CharsetDeclRange::unused)
- invalid += min;
- continue;
- }
- }
- else
- c = min;
- if (!set_[significant].contains(c)
- && (!otherSyntax || !otherSyntax->set_[significant].contains(c))
- && set_[sgmlChar].contains(c))
- invalid += invalidUseDocumentCharset ? min : c;
- } while (min++ != max);
- }
- }
- if (shuncharControls_) {
- UnivChar i;
- const CharsetInfo &charset = invalidUseDocumentCharset ? sd.docCharset() : sd.internalCharset();
- for (i = 0; i < 32; i++)
- checkUnivControlChar(i, charset, otherSyntax, invalid);
- for (i = 127; i < 160; i++)
- checkUnivControlChar(i, charset, otherSyntax, invalid);
- }
-}
-
-void Syntax::checkUnivControlChar(UnivChar univChar,
- const CharsetInfo &internalCharset,
- const ::SP_NAMESPACE_SCOPE Syntax *otherSyntax,
- ISet<WideChar> &invalid) const
-{
- WideChar c;
- ISet<WideChar> set;
- switch (internalCharset.univToDesc(univChar, c, set)) {
- case 0:
- break;
- case 1:
- set += c;
- // fall through
- default:
- {
- ISetIter<WideChar> iter(set);
- WideChar min, max;
- while (iter.next(min, max)) {
- do {
- if (min > charMax)
- break;
- Char ch = Char(min);
- if (!set_[significant].contains(ch)
- && (!otherSyntax
- || !otherSyntax->set_[significant].contains(ch))
- && set_[sgmlChar].contains(ch))
- invalid += ch;
- } while (min++ != max);
- }
- }
- }
-}
-
-StringC Syntax::rniReservedName(ReservedName i) const
-{
- StringC result = delimGeneral(dRNI);
- result += reservedName(i);
- return result;
-}
-
-const SubstTable<Char> &Syntax::upperSubstTable() const
-{
- return upperSubst_;
-}
-
-const StringC &Syntax::peroDelim() const
-{
- return delimGeneral(dPERO);
-}
-
-Boolean Syntax::isHexDigit(Xchar c) const
-{
- switch (categoryTable_[c]) {
- case digitCategory:
- return 1;
- case nameStartCategory:
- break;
- default:
- return 0;
- }
- return set_[hexDigit].contains(Char(c));
-}
-
-void Syntax::addEntity(const StringC &name, Char c)
-{
- entityNames_.push_back(name);
- entityChars_ += c;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Text.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Text.cxx
deleted file mode 100644
index 078c10b7b4..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Text.cxx
+++ /dev/null
@@ -1,408 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Text.h"
-#include "Entity.h"
-// for memcmp()
-#include <string.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Text::Text()
-{
-}
-
-void Text::addChar(Char c, const Location &loc)
-{
- if (items_.size() == 0
- || items_.back().type != TextItem::data
- || loc.origin().pointer() != items_.back().loc.origin().pointer()
- || loc.index() != (items_.back().loc.index()
- + (chars_.size() - items_.back().index))) {
- items_.resize(items_.size() + 1);
- items_.back().loc = loc;
- items_.back().type = TextItem::data;
- items_.back().index = chars_.size();
- }
- chars_ += c;
-}
-
-void Text::addChars(const Char *p, size_t length, const Location &loc)
-{
- if (items_.size() == 0
- || items_.back().type != TextItem::data
- || loc.origin().pointer() != items_.back().loc.origin().pointer()
- || loc.index() != (items_.back().loc.index()
- + (chars_.size() - items_.back().index))) {
- items_.resize(items_.size() + 1);
- items_.back().loc = loc;
- items_.back().type = TextItem::data;
- items_.back().index = chars_.size();
- }
- chars_.append(p, length);
-}
-
-void Text::addCdata(const InternalEntity *entity,
- const ConstPtr<Origin> &origin)
-{
- addSimple(TextItem::cdata, Location(origin, 0));
- chars_.append(entity->string().data(), entity->string().size());
-}
-
-void Text::addSdata(const InternalEntity *entity,
- const ConstPtr<Origin> &origin)
-{
- addSimple(TextItem::sdata, Location(origin, 0));
- chars_.append(entity->string().data(), entity->string().size());
-}
-
-void Text::addNonSgmlChar(Char c, const Location &loc)
-{
- addSimple(TextItem::nonSgml, loc);
- chars_ += c;
-}
-
-void Text::addCharsTokenize(const Char *str, size_t n, const Location &loc,
- Char space)
-{
- Location loci(loc);
- // FIXME speed this up
- for (size_t i = 0; i < n; loci += 1, i++) {
- if (str[i] == space && (size() == 0 || lastChar() == space))
- ignoreChar(str[i], loci);
- else
- addChar(str[i], loci);
- }
-}
-
-void Text::tokenize(Char space, Text &text) const
-{
- TextIter iter(*this);
- TextItem::Type type;
- const Char *p;
- size_t n;
- const Location *loc;
- while (iter.next(type, p, n, loc)) {
- switch (type) {
- case TextItem::data:
- text.addCharsTokenize(p, n, *loc, space);
- break;
- case TextItem::sdata:
- case TextItem::cdata:
- {
- text.addEntityStart(*loc);
- text.addCharsTokenize(p, n, *loc, space);
- Location tem(*loc);
- tem += n;
- text.addEntityEnd(tem);
- }
- break;
- case TextItem::ignore:
- text.ignoreChar(*p, *loc);
- break;
- default:
- text.addSimple(type, *loc);
- break;
- }
- }
- if (text.size() > 0 && text.lastChar() == space)
- text.ignoreLastChar();
-}
-
-void Text::addSimple(TextItem::Type type, const Location &loc)
-{
- items_.resize(items_.size() + 1);
- items_.back().loc = loc;
- items_.back().type = type;
- items_.back().index = chars_.size();
-}
-
-void Text::ignoreChar(Char c, const Location &loc)
-{
- items_.resize(items_.size() + 1);
- items_.back().loc = loc;
- items_.back().type = TextItem::ignore;
- items_.back().c = c;
- items_.back().index = chars_.size();
-}
-
-void Text::ignoreLastChar()
-{
- size_t lastIndex = chars_.size() - 1;
- size_t i;
- for (i = items_.size() - 1; items_[i].index > lastIndex; i--)
- ;
- // lastIndex >= items_[i].index
- if (items_[i].index != lastIndex) {
- items_.resize(items_.size() + 1);
- i++;
- for (size_t j = items_.size() - 1; j > i; j--)
- items_[j] = items_[j - 1];
- items_[i].index = lastIndex;
- items_[i].loc = items_[i - 1].loc;
- items_[i].loc += lastIndex - items_[i - 1].index;
- }
-
- items_[i].c = chars_[chars_.size() - 1];
- items_[i].type = TextItem::ignore;
- for (size_t j = i + 1; j < items_.size(); j++)
- items_[j].index = lastIndex;
- chars_.resize(chars_.size() - 1);
-}
-
-// All characters other than spaces are substed.
-
-void Text::subst(const SubstTable<Char> &table, Char space)
-{
- for (size_t i = 0; i < items_.size(); i++)
- if (items_[i].type == TextItem::data) {
- size_t lim = (i + 1 < items_.size()
- ? items_[i + 1].index
- : chars_.size());
- size_t j;
- for (j = items_[i].index; j < lim; j++) {
- Char c = chars_[j];
- if (c != space && c != table[c])
- break;
- }
- if (j < lim) {
- size_t start = items_[i].index;
- StringC origChars(chars_.data() + start, lim - start);
- for (; j < lim; j++)
- if (chars_[j] != space)
- table.subst(chars_[j]);
- items_[i].loc = Location(new MultiReplacementOrigin(items_[i].loc,
- origChars),
- 0);
- }
- }
-}
-
-void Text::clear()
-{
- chars_.resize(0);
- items_.clear();
-}
-
-Boolean Text::startDelimLocation(Location &loc) const
-{
- if (items_.size() == 0 || items_[0].type != TextItem::startDelim)
- return 0;
- loc = items_[0].loc;
- return 1;
-}
-
-Boolean Text::endDelimLocation(Location &loc) const
-{
- if (items_.size() == 0)
- return 0;
- switch (items_.back().type) {
- case TextItem::endDelim:
- case TextItem::endDelimA:
- break;
- default:
- return 0;
- }
- loc = items_.back().loc;
- return 1;
-}
-
-Boolean Text::delimType(Boolean &lita) const
-{
- if (items_.size() == 0)
- return 0;
- switch (items_.back().type) {
- case TextItem::endDelim:
- lita = 0;
- return 1;
- case TextItem::endDelimA:
- lita = 1;
- return 1;
- default:
- break;
- }
- return 0;
-}
-
-TextItem::TextItem()
-{
-}
-
-void Text::swap(Text &to)
-{
- items_.swap(to.items_);
- chars_.swap(to.chars_);
-}
-
-TextIter::TextIter(const Text &text)
-: ptr_(text.items_.begin()), text_(&text)
-{
-}
-
-const Char *TextIter::chars(size_t &length) const
-{
- if (ptr_->type == TextItem::ignore) {
- length = 1;
- return &ptr_->c;
- }
- else {
- const StringC &chars = text_->chars_;
- size_t charsIndex = ptr_->index;
- if (ptr_ + 1 != text_->items_.begin() + text_->items_.size())
- length = ptr_[1].index - charsIndex;
- else
- length = chars.size() - charsIndex;
- return chars.data() + charsIndex;
- }
-}
-
-Boolean TextIter::next(TextItem::Type &type, const Char *&str, size_t &length,
- const Location *&loc)
-{
- const TextItem *end = text_->items_.begin() + text_->items_.size();
- if (ptr_ == end)
- return 0;
- type = ptr_->type;
- loc = &ptr_->loc;
- if (type == TextItem::ignore) {
- str = &ptr_->c;
- length = 1;
- }
- else {
- const StringC &chars = text_->chars_;
- size_t charsIndex = ptr_->index;
- str = chars.data() + charsIndex;
- if (ptr_ + 1 != end)
- length = ptr_[1].index - charsIndex;
- else
- length = chars.size() - charsIndex;
- }
- ptr_++;
- return 1;
-}
-
-void Text::insertChars(const StringC &s, const Location &loc)
-{
- chars_.insert(0, s);
- items_.resize(items_.size() + 1);
- for (size_t i = items_.size() - 1; i > 0; i--) {
- items_[i] = items_[i - 1];
- items_[i].index += s.size();
- }
- items_[0].loc = loc;
- items_[0].type = TextItem::data;
- items_[0].index = 0;
-}
-
-size_t Text::normalizedLength(size_t normsep) const
-{
- size_t n = size();
- n += normsep;
- for (size_t i = 0; i < items_.size(); i++)
- switch (items_[i].type) {
- case TextItem::sdata:
- case TextItem::cdata:
- n += normsep;
- break;
- default:
- break;
- }
- return n;
-}
-
-// This is used to determine for a FIXED CDATA attribute
-// whether a specified value if equal to the default value.
-
-Boolean Text::fixedEqual(const Text &text) const
-{
- if (string() != text.string())
- return 0;
- size_t j = 0;
- for (size_t i = 0; i < items_.size(); i++)
- switch (items_[i].type) {
- case TextItem::cdata:
- case TextItem::sdata:
- for (;;) {
- if (j >= text.items_.size())
- return 0;
- if (text.items_[j].type == TextItem::nonSgml)
- return 0;
- if (text.items_[j].type == TextItem::cdata
- || text.items_[j].type == TextItem::sdata)
- break;
- j++;
- }
- if (text.items_[j].index != items_[i].index
- || (text.items_[j].loc.origin()->asEntityOrigin()->entity()
- != items_[i].loc.origin()->asEntityOrigin()->entity()))
- return 0;
- break;
- case TextItem::nonSgml:
- for (;;) {
- if (j >= text.items_.size())
- return 0;
- if (text.items_[j].type == TextItem::cdata
- || text.items_[j].type == TextItem::sdata)
- return 0;
- if (text.items_[j].type == TextItem::nonSgml)
- break;
- j++;
- }
- if (text.items_[j].index != items_[i].index)
- return 0;
- break;
- default:
- break;
- }
- for (; j < text.items_.size(); j++)
- switch (text.items_[j].type) {
- case TextItem::cdata:
- case TextItem::sdata:
- case TextItem::nonSgml:
- return 0;
- default:
- break;
- }
- return 1;
-}
-
-Boolean Text::charLocation(size_t ind, const ConstPtr<Origin> *&origin, Index &index) const
-{
- // Find the last item whose index <= ind.
- // Invariant:
- // indexes < i implies index <= ind
- // indexes >= lim implies index > ind
- // The first item will always have index 0.
- size_t i = 1;
- size_t lim = items_.size();
- while (i < lim) {
- size_t mid = i + (lim - i)/2;
- if (items_[mid].index > ind)
- lim = mid;
- else
- i = mid + 1;
- }
-#if 0
- for (size_t i = 1; i < items_.size(); i++)
- if (items_[i].index > ind)
- break;
-#endif
- i--;
- // If items_.size() == 0, then i == lim.
- if (i < lim) {
- origin = &items_[i].loc.origin();
- index = items_[i].loc.index() + (ind - items_[i].index);
- }
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.cxx
deleted file mode 100644
index 03ec194d71..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.cxx
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "TokenMessageArg.h"
-#include "MessageBuilder.h"
-#include "token.h"
-#include "ParserMessages.h"
-#include "Mode.h"
-#include "ModeInfo.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-TokenMessageArg::TokenMessageArg(Token token, Mode mode,
- const ConstPtr<Syntax> &syntax,
- const ConstPtr<Sd> &sd)
-: token_(token), mode_(mode), syntax_(syntax), sd_(sd)
-{
-}
-
-MessageArg *TokenMessageArg::copy() const
-{
- return new TokenMessageArg(*this);
-}
-
-void TokenMessageArg::append(MessageBuilder &builder) const
-{
- // FIXME translate function characters in delimiters into
- // &#NAME; form.
- if (token_ >= tokenFirstShortref) {
- builder.appendFragment(ParserMessages::shortrefDelim);
- return;
- }
- if (token_ == tokenEe) {
- builder.appendFragment(ParserMessages::entityEnd);
- return;
- }
- ModeInfo iter(mode_, *sd_);
- TokenInfo info;
- const MessageFragment *fragment = 0;
- while (iter.nextToken(&info))
- if (info.token == token_) {
- switch (info.type) {
- case TokenInfo::delimType:
- case TokenInfo::delimDelimType:
- case TokenInfo::delimSetType:
- {
- const StringC &delim = syntax_->delimGeneral(info.delim1);
- builder.appendFragment(ParserMessages::delimStart);
- builder.appendChars(delim.data(), delim.size());
- fragment = &ParserMessages::delimEnd;
- }
- break;
- case TokenInfo::setType:
- switch (info.set) {
- case Syntax::digit:
- fragment = &ParserMessages::digit;
- break;
- case Syntax::nameStart:
- fragment = &ParserMessages::nameStartCharacter;
- break;
- case Syntax::sepchar:
- fragment = &ParserMessages::sepchar;
- break;
- case Syntax::s:
- fragment = &ParserMessages::separator;
- break;
- case Syntax::nmchar:
- fragment = &ParserMessages::nameCharacter;
- break;
- case Syntax::sgmlChar:
- fragment = &ParserMessages::dataCharacter;
- break;
- case Syntax::minimumData:
- fragment = &ParserMessages::minimumDataCharacter;
- break;
- case Syntax::significant:
- fragment = &ParserMessages::significantCharacter;
- break;
- default:
- CANNOT_HAPPEN();
- }
- break;
- case TokenInfo::functionType:
- switch (info.function) {
- case Syntax::fRE:
- fragment = &ParserMessages::recordEnd;
- break;
- case Syntax::fRS:
- fragment = &ParserMessages::recordStart;
- break;
- case Syntax::fSPACE:
- fragment = &ParserMessages::space;
- break;
- }
- break;
- }
- break;
- }
- if (fragment)
- builder.appendFragment(*fragment);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.h
deleted file mode 100644
index 1b314a77cd..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/TokenMessageArg.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef TokenMessageArg_INCLUDED
-#define TokenMessageArg_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "MessageArg.h"
-#include "types.h"
-#include "Mode.h"
-#include "Syntax.h"
-#include "Sd.h"
-#include "Ptr.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class TokenMessageArg : public MessageArg {
-public:
- TokenMessageArg(Token token, Mode mode,
- const ConstPtr<Syntax> &syntax,
- const ConstPtr<Sd> &sd);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- Token token_;
- Mode mode_;
- ConstPtr<Syntax> syntax_;
- ConstPtr<Sd> sd_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not TokenMessageArg_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/TranslateCodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/TranslateCodingSystem.cxx
deleted file mode 100644
index e71638eea5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/TranslateCodingSystem.cxx
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#include "TranslateCodingSystem.h"
-#include "types.h"
-#include "Owner.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class TranslateDecoder : public Decoder {
-public:
- TranslateDecoder(Decoder *, const ConstPtr<CharMapResource<Char> > &);
- size_t decode(Char *, const char *, size_t, const char **);
- Boolean convertOffset(unsigned long &offset) const;
-private:
- Owner<Decoder> decoder_;
- ConstPtr<CharMapResource<Char> > map_;
-};
-
-TranslateDecoder::TranslateDecoder(Decoder *decoder,
- const ConstPtr<CharMapResource<Char> > &map)
-: Decoder(decoder->minBytesPerChar()), decoder_(decoder), map_(map)
-{
-}
-
-
-Boolean TranslateDecoder::convertOffset(unsigned long &offset) const
-{
- return decoder_->convertOffset(offset);
-}
-
-size_t TranslateDecoder::decode(Char *to, const char *s,
- size_t slen, const char **rest)
-{
- size_t n = decoder_->decode(to, s, slen, rest);
- for (size_t i = 0; i < n; i++)
- to[i] = (*map_)[to[i]];
- return n;
-}
-
-// FIXME set unencodeable handler for underlying encoder
-
-class TranslateEncoder : public RecoveringEncoder {
-public:
- TranslateEncoder(Encoder *, const ConstPtr<CharMapResource<Char> > &map,
- Char illegalChar);
- void output(const Char *, size_t, OutputByteStream *);
- void output(Char *, size_t, OutputByteStream *);
- void startFile(OutputByteStream *);
-private:
- Owner<Encoder> encoder_;
- ConstPtr<CharMapResource<Char> > map_;
- Char illegalChar_;
- enum { bufSize = 256 };
- Char buf_[bufSize];
-};
-
-TranslateEncoder::TranslateEncoder(Encoder *encoder,
- const ConstPtr<CharMapResource<Char> > &map,
- Char illegalChar)
-: encoder_(encoder), map_(map), illegalChar_(illegalChar)
-{
-}
-
-void TranslateEncoder::startFile(OutputByteStream *sbuf)
-{
- encoder_->startFile(sbuf);
-}
-
-void TranslateEncoder::output(const Char *s, size_t n, OutputByteStream *sbuf)
-{
- size_t j = 0;
- for (; n > 0; s++, n--) {
- Char c = (*map_)[*s];
- if (c == illegalChar_) {
- if (j > 0) {
- encoder_->output(buf_, j, sbuf);
- j = 0;
- }
- handleUnencodable(*s, sbuf);
- }
- else {
- if (j >= bufSize) {
- encoder_->output(buf_, j, sbuf);
- j = 0;
- }
- buf_[j++] = c;
- }
- }
- if (j > 0)
- encoder_->output(buf_, j, sbuf);
-}
-
-void TranslateEncoder::output(Char *s, size_t n, OutputByteStream *sbuf)
-{
- size_t i = 0;
- for (;;) {
- if (i == n) {
- if (n > 0)
- encoder_->output(s, n, sbuf);
- break;
- }
- Char c = (*map_)[s[i]];
- if (c == illegalChar_) {
- if (i > 0)
- encoder_->output(s, i, sbuf);
- handleUnencodable(s[i], sbuf);
- i++;
- s += i;
- n -= i;
- i = 0;
- }
- else
- s[i++] = c;
- }
-}
-
-TranslateCodingSystem::TranslateCodingSystem(const CodingSystem *sub,
- const Desc *desc,
- const CharsetInfo *charset,
- Char illegalChar,
- Char replacementChar)
-: sub_(sub),
- desc_(desc),
- charset_(charset),
- illegalChar_(illegalChar),
- replacementChar_(replacementChar)
-{
-}
-
-Decoder *TranslateCodingSystem::makeDecoder() const
-{
- if (decodeMap_.isNull()) {
- CharMapResource<Char> *map = new CharMapResource<Char>(replacementChar_);
- *(ConstPtr<CharMapResource<Char> > *)&decodeMap_ = map;
- for (const Desc *d = desc_; d->number != CharsetRegistry::UNREGISTERED; d++) {
- Owner<CharsetRegistry::Iter> iter(CharsetRegistry::makeIter(d->number));
- if (iter) {
- WideChar min;
- WideChar max;
- UnivChar univ;
- while (iter->next(min, max, univ)) {
- do {
- ISet<WideChar> set;
- WideChar sysChar;
- WideChar count;
- int n = charset_->univToDesc(univ, sysChar, set, count);
- if (count > (max - min) + 1)
- count = (max - min) + 1;
- if (n) {
- for (WideChar i = 0; i < count; i++)
- map->setChar(min + d->add + i, sysChar + i);
- }
- min += count - 1;
- univ += count;
- } while (min++ != max);
- }
- }
- }
- }
- return new TranslateDecoder(sub_->makeDecoder(), decodeMap_);
-}
-
-Encoder *TranslateCodingSystem::makeEncoder() const
-{
- if (encodeMap_.isNull()) {
- CharMapResource<Char> *map = new CharMapResource<Char>(illegalChar_);
- *(ConstPtr<CharMapResource<Char> > *)&encodeMap_ = map;
- for (const Desc *d = desc_; d->number != CharsetRegistry::UNREGISTERED; d++) {
- Owner<CharsetRegistry::Iter> iter(CharsetRegistry::makeIter(d->number));
- if (iter) {
- WideChar min;
- WideChar max;
- UnivChar univ;
- while (iter->next(min, max, univ)) {
- do {
- ISet<WideChar> set;
- WideChar sysChar;
- WideChar count;
- int n = charset_->univToDesc(univ, sysChar, set, count);
- if (count > (max - min) + 1)
- count = (max - min) + 1;
- if (n) {
- for (WideChar i = 0; i < count; i++)
- map->setChar(sysChar + i, min + d->add + i);
- }
- min += count - 1;
- univ += count;
- } while (min++ != max);
- }
- }
- }
- }
- return new TranslateEncoder(sub_->makeEncoder(), encodeMap_, illegalChar_);
-}
-
-unsigned TranslateCodingSystem::fixedBytesPerChar() const
-{
- return sub_->fixedBytesPerChar();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Trie.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Trie.h
deleted file mode 100644
index 3286ef2fcf..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Trie.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _TRIE_H
-#define _TRIE_H
-
-#ifndef Trie_INCLUDED
-#define Trie_INCLUDED 1
-
-#include <limits.h>
-#include "types.h"
-#include "Boolean.h"
-#include "Vector.h"
-#include "CopyOwner.h"
-#include "Priority.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class BlankTrie;
-
-class Trie {
-public:
- Trie() : next_(0), nCodes_(0) { }
- Trie(const Trie &);
- ~Trie();
- Trie &operator = (const Trie &);
- const Trie *next(int i) const { return &next_[i]; }
- Boolean hasNext() const { return next_ != 0; }
- Token token() const { return token_; }
- int tokenLength() const { return tokenLength_; }
- const BlankTrie *blank() const;
- Boolean includeBlanks() const {
- return (Priority::isBlank(priority_));
- }
- friend class TrieBuilder;
-private:
- Trie *next_;
- int nCodes_;
- unsigned short token_;
- unsigned char tokenLength_;
- Priority::Type priority_;
- CopyOwner < BlankTrie > blank_;
-};
-
-class BlankTrie : public Trie {
-public:
- BlankTrie() { }
- Boolean codeIsBlank(EquivCode c) const { return codeIsBlank_[c]; }
- // maximum number of blanks to scan (minimum is 0)
- size_t maxBlanksToScan() const { return maxBlanksToScan_; }
- // length to add to tokenLengths in this trie (for those > 0).
- int additionalLength() const { return additionalLength_; }
- BlankTrie *copy() const { return new BlankTrie(*this); }
-private:
- unsigned char additionalLength_;
- size_t maxBlanksToScan_;
- Vector < PackedBoolean > codeIsBlank_;
- friend class TrieBuilder;
-};
-
-inline
-const BlankTrie *Trie::blank() const
-{
- return (blank_.pointer());
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Trie_INCLUDED */
-
-#endif /* _TRIE_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.cxx
deleted file mode 100644
index ed0c68ac03..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.cxx
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "types.h"
-#include "macros.h"
-#include "StringOf.h"
-#include "Trie.h"
-#include "TrieBuilder.h"
-#include "Priority.h"
-#include <stdlib.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Trie::~Trie()
-{
- if (next_)
- delete [] next_;
-}
-
-Trie::Trie(const Trie &t)
-: nCodes_(t.nCodes_),
- token_(t.token_),
- tokenLength_(t.tokenLength_),
- priority_(t.priority_),
- blank_(t.blank_)
-{
- if (t.next_) {
- next_ = new Trie[nCodes_];
- for (int i = 0; i < nCodes_; i++)
- next_[i] = t.next_[i];
- }
- else
- next_ = 0;
-}
-
-Trie &Trie::operator=(const Trie &t)
-{
- if (next_)
- delete [] next_;
- nCodes_ = t.nCodes_;
- token_ = t.token_;
- tokenLength_ = t.tokenLength_;
- priority_ = t.priority_;
- blank_ = t.blank_;
- if (t.next_) {
- next_ = new Trie[nCodes_];
- for (int i = 0; i < nCodes_; i++)
- next_[i] = t.next_[i];
- }
- else
- next_ = 0;
- return *this;
-}
-
-TrieBuilder::TrieBuilder(int nCodes)
-: nCodes_(nCodes), root_(new Trie)
-{
- root_->token_ = 0;
- root_->tokenLength_ = 0;
- root_->priority_ = Priority::data;
- root_->nCodes_ = nCodes;
-}
-
-void TrieBuilder::recognize(const String<EquivCode> &chars,
- Token t,
- Priority::Type priority,
- TokenVector &ambiguities)
-{
- setToken(extendTrie(root_.pointer(), chars), chars.size(), t, priority,
- ambiguities);
-}
-
-void TrieBuilder::recognize(const String<EquivCode> &chars,
- const String<EquivCode> &set,
- Token t,
- Priority::Type priority,
- TokenVector &ambiguities)
-{
- Trie *trie = extendTrie(root_.pointer(), chars);
-
- for (size_t i = 0; i < set.size(); i++)
- setToken(forceNext(trie, set[i]), chars.size() + 1, t, priority,
- ambiguities);
-}
-
-void TrieBuilder::recognizeB(const String<EquivCode> &chars,
- int bSequenceLength,
- size_t maxBlankSequence,
- const String<EquivCode> &blankCodes,
- const String<EquivCode> &chars2,
- Token token,
- TokenVector &ambiguities)
-{
- doB(extendTrie(root_.pointer(), chars),
- chars.size(),
- bSequenceLength,
- maxBlankSequence,
- blankCodes,
- chars2,
- token,
- Priority::blank(bSequenceLength),
- ambiguities);
-}
-
-void TrieBuilder::recognizeEE(EquivCode code, Token t)
-{
- Trie *trie = forceNext(root_.pointer(), code);
- trie->tokenLength_ = 0; // it has length 0 in the buffer
- trie->token_ = t;
- trie->priority_ = Priority::data;
-}
-
-void TrieBuilder::doB(Trie *trie,
- int tokenLength,
- int minBLength,
- size_t maxLength,
- const String<EquivCode> &blankCodes,
- const String<EquivCode> &chars2,
- Token token,
- Priority::Type pri,
- TokenVector &ambiguities)
-{
- if (minBLength == 0 && trie->next_ == 0) {
- if (!trie->blank_) {
- BlankTrie *b = new BlankTrie;
- trie->blank_ = b;
- b->maxBlanksToScan_ = maxLength;
- b->additionalLength_ = tokenLength;
- b->codeIsBlank_.assign(nCodes_, 0);
- for (size_t i = 0; i < blankCodes.size(); i++)
- b->codeIsBlank_[blankCodes[i]] = 1;
- b->tokenLength_ = 0;
- b->token_ = 0;
- b->priority_ = Priority::data;
- b->nCodes_ = nCodes_;
- }
- else {
- // A B sequence is not allowed to be adjacent to a character
- // that can occur in a blank sequence, so maxLength will be
- // the same at a node, no matter how we got there.
- ASSERT(trie->blank_->maxBlanksToScan_ == maxLength);
- ASSERT(trie->blank_->additionalLength_ == tokenLength);
- }
- if (chars2.size() == 0)
- setToken(trie, tokenLength, token, pri, ambiguities);
- else
- setToken(extendTrie(trie->blank_.pointer(), chars2),
- chars2.size(),
- token,
- pri,
- ambiguities);
- }
- else {
- if (minBLength == 0)
- setToken(extendTrie(trie, chars2), tokenLength + chars2.size(),
- token, pri, ambiguities);
- for (size_t i = 0; i < blankCodes.size(); i++)
- doB(forceNext(trie, blankCodes[i]),
- tokenLength + 1,
- minBLength == 0 ? 0 : minBLength - 1,
- maxLength - 1,
- blankCodes,
- chars2,
- token,
- pri,
- ambiguities);
- }
-}
-
-Trie *TrieBuilder::extendTrie(Trie *trie, const String<EquivCode> &s)
-{
- for (size_t i = 0; i < s.size(); i++)
- trie = forceNext(trie, s[i]);
- return trie;
-}
-
-void TrieBuilder::setToken(Trie *trie,
- int tokenLength,
- Token token,
- Priority::Type pri,
- TokenVector &ambiguities)
-{
- if (tokenLength > trie->tokenLength_
- || (tokenLength == trie->tokenLength_
- && pri > trie->priority_)) {
- trie->tokenLength_ = tokenLength;
- trie->token_ = token;
- trie->priority_ = pri;
- }
- else if (trie->tokenLength_ == tokenLength
- && trie->priority_ == pri
- && trie->token_ != token
- && trie->token_ != 0) {
- ambiguities.push_back(Token(trie->token_));
- ambiguities.push_back(token);
- }
- if (trie->hasNext()) {
- for (int i = 0; i < nCodes_; i++)
- setToken(&trie->next_[i], tokenLength, token, pri, ambiguities);
- }
-}
-
-void TrieBuilder::copyInto(Trie *into, const Trie *from, int additionalLength)
-{
- if (from->token_ != 0) {
- TokenVector ambiguities;
- setToken(into, from->tokenLength_ + additionalLength, from->token_,
- from->priority_, ambiguities);
- ASSERT(ambiguities.size() == 0);
- }
- if (from->hasNext())
- for (int i = 0; i < nCodes_; i++)
- copyInto(forceNext(into, i), &from->next_[i], additionalLength);
-}
-
-Trie *TrieBuilder::forceNext(Trie *trie, EquivCode c)
-{
- if (!trie->hasNext()) {
- trie->next_ = new Trie[nCodes_];
- if (trie->blank_) {
- trie->blank_->additionalLength_ += 1;
- trie->blank_->maxBlanksToScan_ -= 1;
- }
- Owner<BlankTrie> blankOwner(trie->blank_.extract());
- const BlankTrie *b = blankOwner.pointer();
- for (int i = 0; i < nCodes_; i++) {
- Trie *p = &trie->next_[i];
- if (b && b->codeIsBlank(i))
- trie->next_[i].blank_ = (blankOwner
- ? blankOwner.extract()
- : new BlankTrie(*b));
- p->token_ = trie->token_;
- p->tokenLength_ = trie->tokenLength_;
- p->priority_ = trie->priority_;
- p->nCodes_ = nCodes_;
- }
- if (b)
- // -1 because 1 was added above
- copyInto(trie, b, b->additionalLength_ - 1);
- }
- return &trie->next_[c];
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.h
deleted file mode 100644
index 582efc3e84..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/TrieBuilder.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef TrieBuilder_INCLUDED
-#define TrieBuilder_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "types.h"
-#include "StringOf.h"
-#include "Owner.h"
-#include "Trie.h"
-#include "Vector.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class TrieBuilder {
-public:
- typedef Vector<Token> TokenVector;
- TrieBuilder(int nCodes);
- void recognize(const String<EquivCode> &chars,
- Token t,
- Priority::Type pri,
- TokenVector &ambiguities);
- void recognize(const String<EquivCode> &chars,
- const String<EquivCode> &set,
- Token t,
- Priority::Type pri,
- TokenVector &ambiguities);
- // recognize a delimiter with a blank sequence
- void recognizeB(const String<EquivCode> &chars,
- int bSequenceLength, // >= 1
- size_t maxBlankSequenceLength,
- const String<EquivCode> &blankCodes,
- const String<EquivCode> &chars2,
- Token t,
- TokenVector &ambiguities);
- void recognizeEE(EquivCode code, Token t);
- Trie *extractTrie() { return root_.extract(); }
-private:
- TrieBuilder(const TrieBuilder &); // undefined
- void operator=(const TrieBuilder &); // undefined
- void doB(Trie *trie,
- int tokenLength,
- int minBLength,
- size_t maxLength,
- const String<EquivCode> &blankCodes,
- const String<EquivCode> &chars2,
- Token token,
- Priority::Type pri,
- TokenVector &ambiguities);
- Trie *extendTrie(Trie *, const String<EquivCode> &);
- void setToken(Trie *trie, int tokenLength, Token token, Priority::Type pri,
- TokenVector &ambiguities);
-
- Trie *forceNext(Trie *trie, EquivCode);
- void copyInto(Trie *, const Trie *, int);
-
- int nCodes_;
- Owner<Trie> root_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not TrieBuilder_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/TypeId.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/TypeId.cxx
deleted file mode 100644
index 0c3fddfd22..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/TypeId.cxx
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "TypeId.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-int TypeId::isA(TypeId ti) const
-{
- if (*this == ti)
- return 1;
- for (const void *const *p = bases_; *p; p++)
- if (TypeId((const void *const *)*p).isA(ti))
- return 1;
- return 0;
-}
-
-int TypeId::canCast(TypeId to, TypeId from) const
-{
- return isA(to) && to.isA(from);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorage.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorage.cxx
deleted file mode 100644
index 6265516bda..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorage.cxx
+++ /dev/null
@@ -1,685 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-// FIXME This implementation won't work on an EBCDIC machine.
-
-#include "splib.h"
-#ifdef WINSOCK
-#include <winsock.h>
-#define readsocket(s, p, n) ::recv(s, p, n, 0)
-#define writesocket(s, p, n) ::send(s, p, n, 0)
-#define errnosocket (WSAGetLastError())
-#define SocketMessageArg(n) WinsockMessageArg(n)
-#define SOCKET_EINTR (WSAEINTR)
-#define SP_HAVE_SOCKET
-#else
-#ifdef SP_HAVE_SOCKET
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#ifdef SP_INCLUDE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef SP_INCLUDE_OSFCN_H
-#include <osfcn.h>
-#endif
-
-#ifdef SP_DECLARE_H_ERRNO
-extern int h_errno;
-#endif
-
-typedef int SOCKET;
-#define SOCKET_ERROR (-1)
-#define INVALID_SOCKET (-1)
-#define SOCKET_EINTR (EINTR)
-#define closesocket(s) close(s)
-#define writesocket(fd, p, n) ::write(fd, p, n)
-#define readsocket(s, p, n) ::read(s, p, n)
-#define errnosocket (errno)
-#define SocketMessageArg(n) ErrnoMessageArg(n)
-#include "ErrnoMessageArg.h"
-
-#endif /* SP_HAVE_SOCKET */
-
-#endif /* not WINSOCK */
-
-#include "URLStorage.h"
-#include "URLStorageMessages.h"
-#include "RewindStorageObject.h"
-#include "UnivCharsetDesc.h"
-#include "MessageArg.h"
-#include "MessageBuilder.h"
-#include "macros.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stddef.h>
-#include <ctype.h>
-#include <stdio.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static UnivCharsetDesc::Range range = { 0, 128, 0 };
-static CharsetInfo iso646Charset(UnivCharsetDesc(&range, 1));
-
-#ifdef SP_HAVE_SOCKET
-
-class HttpSocketStorageObject : public RewindStorageObject {
-public:
- HttpSocketStorageObject(SOCKET fd, Boolean mayRewind, const StringC &hostStr);
- ~HttpSocketStorageObject();
- Boolean open(const String<char> &path, Messenger &);
- Boolean read(char *buf, size_t bufSize, Messenger &mgr, size_t &nread);
- Boolean seekToStart(Messenger &);
- static SOCKET openHttp(const String<char> &host,
- unsigned short port,
- const StringC &hostStr,
- Messenger &mgr);
-private:
- HttpSocketStorageObject(const HttpSocketStorageObject &); // undefined
- void operator=(const HttpSocketStorageObject &); // undefined
- Boolean readHeader(Messenger &);
- Boolean readLine(Messenger &mgr, String<char> &line, String<char> &leftOver);
- static Boolean parseStatus(const char *&ptr, int &val);
- StringC hostStr_;
- String<char> path_;
- Boolean eof_;
- SOCKET fd_;
-};
-
-#ifdef WINSOCK
-
-class WinsockMessageArg : public MessageArg {
-public:
- WinsockMessageArg(int n) : n_(n) { }
- MessageArg *copy() const { return new WinsockMessageArg(*this); }
- void append(MessageBuilder &) const;
-private:
- int n_;
-};
-
-void WinsockMessageArg::append(MessageBuilder &builder) const
-{
- // I can't figure out how to get a string associated
- // with this error number. FormatMessage() doesn't seem
- // to work.
- builder.appendFragment(URLStorageMessages::winsockErrorNumber);
- builder.appendNumber(n_);
-}
-
-class WinsockIniter {
-public:
- WinsockIniter();
- ~WinsockIniter();
- Boolean init(Messenger &mgr);
-private:
- Boolean inited_;
- Boolean initSuccess_;
-};
-
-static WinsockIniter winsockIniter;
-
-WinsockIniter::WinsockIniter()
-: inited_(0)
-{
-}
-
-WinsockIniter::~WinsockIniter()
-{
- if (inited_ && initSuccess_)
- (void)WSACleanup();
-}
-
-Boolean WinsockIniter::init(Messenger &mgr)
-{
- if (!inited_) {
- inited_ = 1;
- initSuccess_ = 0;
- WORD version = MAKEWORD(1, 1);
- WSADATA wsaData;
- int err = WSAStartup(version, &wsaData);
- if (err)
- mgr.message(URLStorageMessages::winsockInitialize,
- WinsockMessageArg(err));
- else if (LOBYTE(wsaData.wVersion) != 1
- || HIBYTE(wsaData.wVersion) != 1) {
- mgr.message(URLStorageMessages::winsockVersion);
- WSACleanup();
- }
- else
- initSuccess_ = 1;
- }
- return initSuccess_;
-}
-
-#endif /* WINSOCK */
-
-#endif /* SP_HAVE_SOCKET */
-
-URLStorageManager::URLStorageManager(const char *type)
-: type_(type), IdStorageManager(&iso646Charset)
-{
-}
-
-const char *URLStorageManager::type() const
-{
- return type_;
-}
-
-Boolean URLStorageManager::guessIsId(const StringC &id,
- const CharsetInfo &charset) const
-{
- if (id.size() < 8)
- return 0;
- size_t i = 0;
- for (const char *s = "http://"; *s; s++, i++)
- if (id[i] != charset.execToDesc(*s)
- && (!islower(*s) || id[i] != charset.execToDesc(toupper(*s))))
- return 0;
- return 1;
-}
-
-StorageObject *URLStorageManager::makeStorageObject(const StringC &specId,
- const StringC &baseId,
- Boolean,
- Boolean mayRewind,
- Messenger &mgr,
- StringC &id)
-{
-#ifdef SP_HAVE_SOCKET
- id = specId;
- resolveRelative(baseId, id, 0);
- if (id.size() < 5
- || (id[0] != 'h' && id[0] != 'H')
- || (id[1] != 't' && id[1] != 'T')
- || (id[2] != 't' && id[2] != 'T')
- || (id[3] != 'p' && id[3] != 'P')
- || id[4] != ':') {
- mgr.message(URLStorageMessages::onlyHTTP);
- return 0;
- }
- if (id.size() < 7 || id[5] != '/' || id[6] != '/') {
- mgr.message(URLStorageMessages::badRelative,
- StringMessageArg(id));
- return 0;
- }
- size_t i = 7;
- String<char> host;
- while (i < id.size()) {
- if (id[i] == '/')
- break;
- if (id[i] == ':')
- break;
- host += char(id[i]);
- i++;
- }
- if (host.size() == 0) {
- mgr.message(URLStorageMessages::emptyHost,
- StringMessageArg(id));
- return 0;
- }
- unsigned short port;
- if (i < id.size() && id[i] == ':') {
- i++;
- String<char> digits;
- while (i < id.size() && id[i] != '/') {
- digits += char(id[i]);
- i++;
- }
- if (digits.size() == 0) {
- mgr.message(URLStorageMessages::emptyPort,
- StringMessageArg(id));
- return 0;
- }
- digits += '\0';
- char *endptr;
- long n = strtol(digits.data(), &endptr, 10);
- if (endptr != digits.data() + digits.size() - 1
- || n < 0
- || n > 65535L) {
- mgr.message(URLStorageMessages::invalidPort,
- StringMessageArg(id));
- return 0;
- }
- port = (unsigned short)n;
- }
- else
- port = 80;
- String<char> path;
- if (i < id.size()) {
- while (i < id.size() && id[i] != '#') {
- path += char(id[i]);
- i++;
- }
- }
- if (path.size() == 0)
- path += '/';
-
- StringC hostStr;
- for (i = 0; i < host.size(); i++)
- hostStr += host[i];
- host += '\0';
- SOCKET fd = HttpSocketStorageObject::openHttp(host, port, hostStr, mgr);
- if (fd == INVALID_SOCKET)
- return 0;
- HttpSocketStorageObject *p
- = new HttpSocketStorageObject(fd, mayRewind, hostStr);
- if (!p->open(path, mgr)) {
- delete p;
- return 0;
- }
- return p;
-#else /* not SP_HAVE_SOCKET */
- ParentLocationMessenger(mgr).message(URLStorageMessages::notSupported);
- return 0;
-#endif /* not SP_HAVE_SOCKET */
-}
-
-Boolean URLStorageManager::resolveRelative(const StringC &baseId,
- StringC &id,
- Boolean) const
-{
- static const char schemeChars[] =
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "01234567879"
- "+-.";
- size_t i;
- // If it has a scheme, it is absolute.
- for (i = 0; i < id.size(); i++) {
- if (id[i] == ':') {
- if (i == 0)
- break;
- else
- return 1;
- }
- else if (!strchr(schemeChars, id[i]))
- break;
- }
- for (i = 0; i < id.size(); i++) {
- if (id[i] != '/')
- break;
- }
- size_t slashCount = i;
- if (slashCount > 0) {
- Boolean foundSameSlash = 0;
- size_t sameSlashPos;
- for (size_t j = 0; j < baseId.size(); j++) {
- size_t thisSlashCount = 0;
- for (size_t k = j; k < baseId.size() && baseId[k] == '/'; k++)
- thisSlashCount++;
- if (thisSlashCount == slashCount && !foundSameSlash) {
- foundSameSlash = 1;
- sameSlashPos = j;
- }
- else if (thisSlashCount > slashCount)
- foundSameSlash = 0;
- }
- if (foundSameSlash) {
- StringC tem(baseId.data(), sameSlashPos);
- tem += id;
- tem.swap(id);
- }
- }
- else {
- size_t j;
- for (j = baseId.size(); j > 0; j--)
- if (baseId[j - 1] == '/')
- break;
- if (j > 0) {
- StringC tem(baseId.data(), j);
- tem += id;
- tem.swap(id);
- }
- }
- // FIXME remove xxx/../, and /.
- return 1;
-}
-
-Boolean URLStorageManager::transformNeutral(StringC &str, Boolean fold,
- Messenger &) const
-{
- if (fold)
- for (size_t i = 0; i < str.size(); i++) {
- Char c = str[i];
- if (c <= (unsigned char)-1)
- str[i] = tolower(str[i]);
- }
- return 1;
-}
-
-#ifdef SP_HAVE_SOCKET
-
-SOCKET HttpSocketStorageObject::openHttp(const String<char> &host,
- unsigned short port,
- const StringC &hostStr,
- Messenger &mgr)
-{
-#ifdef WINSOCK
- if (!winsockIniter.init(mgr))
- return INVALID_SOCKET;
-#endif
- struct sockaddr_in sock;
- sock.sin_family = AF_INET;
- sock.sin_port = htons(port);
- if (isdigit((unsigned char)host[0])) {
- unsigned long n = inet_addr(host.data());
- if (n == (unsigned long)-1) {
- ParentLocationMessenger(mgr).message(URLStorageMessages::invalidHostNumber,
- StringMessageArg(hostStr));
- return INVALID_SOCKET;
- }
- sock.sin_addr.s_addr = n;
- }
- else {
- struct hostent *hp = gethostbyname(host.data());
- if (!hp) {
- const MessageType1 *message;
- switch (h_errno) {
- case HOST_NOT_FOUND:
- message = &URLStorageMessages::hostNotFound;
- break;
- case TRY_AGAIN:
- message = &URLStorageMessages::hostTryAgain;
- break;
- case NO_RECOVERY:
- message = &URLStorageMessages::hostNoRecovery;
- break;
- case NO_DATA:
-#ifdef NO_ADDRESS
-#if NO_ADDRESS != NO_DATA
- case NO_ADDRESS:
-#endif
-#endif
- message = &URLStorageMessages::hostNoData;
- break;
- default:
-#ifdef WINSOCK
- ParentLocationMessenger(mgr).message(URLStorageMessages::hostOtherError,
- StringMessageArg(hostStr),
- WinsockMessageArg(h_errno));
- return INVALID_SOCKET;
-#else
- message = &URLStorageMessages::hostUnknownError;
- break;
-#endif
- }
- ParentLocationMessenger(mgr).message(*message,
- StringMessageArg(hostStr));
- return INVALID_SOCKET;
- }
- memcpy(&sock.sin_addr, hp->h_addr, hp->h_length);
- }
- SOCKET fd = socket(PF_INET, SOCK_STREAM, 0);
- if (fd == INVALID_SOCKET) {
- ParentLocationMessenger(mgr).message(URLStorageMessages::cannotCreateSocket,
- SocketMessageArg(errnosocket));
- return INVALID_SOCKET;
- }
- if (connect(fd, (struct sockaddr *)&sock, sizeof(sock)) == SOCKET_ERROR) {
- ParentLocationMessenger(mgr).message(URLStorageMessages::cannotConnect,
- StringMessageArg(hostStr),
- SocketMessageArg(errnosocket));
- (void)closesocket(fd);
- return INVALID_SOCKET;
- }
- return fd;
-}
-
-HttpSocketStorageObject::HttpSocketStorageObject(SOCKET fd,
- Boolean mayRewind,
- const StringC &hostStr)
-
-: RewindStorageObject(mayRewind, 0), hostStr_(hostStr), fd_(fd), eof_(0)
-{
-}
-
-HttpSocketStorageObject::~HttpSocketStorageObject()
-{
- if (fd_ != INVALID_SOCKET)
- (void)closesocket(fd_);
-}
-
-Boolean HttpSocketStorageObject::open(const String<char> &path, Messenger &mgr)
-{
- path_ = path;
- String<char> request;
- request.append("GET ", 4);
- request += path_;
- request += ' ';
- request.append("HTTP/1.0\r\n", 10);
- request.append("Accept: */*\r\n", 13);
- request.append("\r\n", 2);
- // FIXME check length of write
- if (writesocket(fd_, request.data(), request.size()) == SOCKET_ERROR) {
- ParentLocationMessenger(mgr).message(URLStorageMessages::writeError,
- StringMessageArg(hostStr_),
- SocketMessageArg(errnosocket));
- (void)closesocket(fd_);
- fd_ = INVALID_SOCKET;
- return 0;
- }
- if (!readHeader(mgr)) {
- (void)closesocket(fd_);
- fd_ = INVALID_SOCKET;
- return 0;
- }
- return 1;
-}
-
-Boolean HttpSocketStorageObject::readHeader(Messenger &mgr)
-{
- String<char> buf;
- String<char> leftOver;
- if (!readLine(mgr, buf, leftOver))
- return 0;
- buf += '\0';
- const char *ptr = &buf[0];
- int val;
- if (!parseStatus(ptr, val)) {
- if (buf.size() > 0)
- unread(buf.data(), buf.size() - 1);
- return 1;
- }
- if (val < 200 || val >= 300) {
- StringC reason;
- while (*ptr && *ptr != '\n' && *ptr != '\r') {
- reason += Char(*ptr);
- ptr++;
- }
- StringC pathStr;
- for (size_t i = 0; i < path_.size(); i++)
- pathStr += path_[i];
- ParentLocationMessenger(mgr).message(URLStorageMessages::getFailed,
- StringMessageArg(hostStr_),
- StringMessageArg(pathStr),
- StringMessageArg(reason));
- return 0;
- }
-
- for (;;) {
- if (!readLine(mgr, buf, leftOver))
- return 0;
- if (buf.size() == 0 || buf[0] == '\r' || buf[0] == '\n')
- break;
- }
- if (leftOver.size())
- unread(leftOver.data(), leftOver.size());
- return 1;
-}
-
-// Status line must start with: "HTTP/" 1*DIGIT "." 1*DIGIT SP 3DIGIT SP
-
-Boolean HttpSocketStorageObject::parseStatus(const char *&ptr, int &val)
-{
- static const char ver[] = "HTTP/";
- for (const char *v = ver; *v; v++, ptr++)
- if (*v != *ptr)
- return 0;
- if (!isdigit((unsigned char)*ptr))
- return 0;
- do {
- ++ptr;
- } while (isdigit((unsigned char)*ptr));
- if (*ptr != '.')
- return 0;
- ptr++;
- if (!isdigit((unsigned char)*ptr))
- return 0;
- do {
- ++ptr;
- } while (isdigit((unsigned char)*ptr));
- if (*ptr != ' ')
- return 0;
- ptr++;
- val = 0;
- for (int i = 0; i < 3; i++, ptr++) {
- if (!isdigit((unsigned char)*ptr))
- return 0;
- val = val*10 + *ptr - '0';
- }
- if (*ptr != ' ')
- return 0;
- ptr++;
- return 1;
-}
-
-// True will be returned for an empty line.
-
-Boolean HttpSocketStorageObject::readLine(Messenger &mgr,
- String<char> &line,
- String<char> &leftOver)
-{
- line.resize(0);
- Boolean hadCr = 0;
- Boolean gotLine = 0;
- size_t li;
- for (li = 0; li < leftOver.size(); li++) {
- if (leftOver[li] == '\r') {
- if (hadCr) {
- gotLine = 1;
- break;
- }
- line += '\r';
- hadCr = 1;
- }
- else if (leftOver[li] == '\n') {
- line += '\n';
- li++;
- gotLine = 1;
- break;
- }
- else if (hadCr) {
- gotLine = 1;
- break;
- }
- else
- line += leftOver[li];
- }
- if (gotLine) {
- for (size_t i = li; i < leftOver.size(); i++)
- leftOver[i - li] = leftOver[i];
- leftOver.resize(leftOver.size() - li);
- return 1;
- }
- leftOver.resize(0);
- if (eof_)
- return 1;
- for (;;) {
- char c;
- long n;
- do {
- n = readsocket(fd_, &c, 1);
- } while (n < 0 && errnosocket == SOCKET_EINTR);
- if (n == 0) {
- (void)closesocket(fd_);
- eof_ = 1;
- return 1;
- }
- if (n < 0) {
- ParentLocationMessenger(mgr).message(URLStorageMessages::readError,
- StringMessageArg(hostStr_),
- SocketMessageArg(errnosocket));
- (void)closesocket(fd_);
- fd_ = INVALID_SOCKET;
- return 0;
- }
- switch (c) {
- case '\r':
- if (hadCr) {
- leftOver += c;
- return 1;
- }
- hadCr = 1;
- line += c;
- break;
- case '\n':
- line += c;
- return 1;
- default:
- if (hadCr) {
- leftOver += c;
- return 1;
- }
- line += c;
- break;
- }
- }
- return 0; // not reached
-}
-
-Boolean HttpSocketStorageObject::read(char *buf, size_t bufSize, Messenger &mgr,
- size_t &nread)
-{
- if (readSaved(buf, bufSize, nread))
- return 1;
- if (fd_ == INVALID_SOCKET || eof_)
- return 0;
- long n;
- do {
- n = readsocket(fd_, buf, bufSize);
- } while (n < 0 && errnosocket == SOCKET_EINTR);
- if (n > 0) {
- nread = size_t(n);
- saveBytes(buf, nread);
- return 1;
- }
- if (n < 0) {
- ParentLocationMessenger(mgr).message(URLStorageMessages::readError,
- StringMessageArg(hostStr_),
- SocketMessageArg(errnosocket));
- fd_ = INVALID_SOCKET;
- }
- else {
- eof_ = 1;
- if (closesocket(fd_) == SOCKET_ERROR)
- ParentLocationMessenger(mgr).message(URLStorageMessages::closeError,
- StringMessageArg(hostStr_),
- SocketMessageArg(errnosocket));
- fd_ = INVALID_SOCKET;
- }
- return 0;
-}
-
-Boolean HttpSocketStorageObject::seekToStart(Messenger &)
-{
- CANNOT_HAPPEN();
- return 0;
-}
-
-#endif /* SP_HAVE_SOCKET */
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorageMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorageMessages.h
deleted file mode 100644
index 28527d5e81..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/URLStorageMessages.h
+++ /dev/null
@@ -1,319 +0,0 @@
-// This file was automatically generated from lib\URLStorageMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct URLStorageMessages {
- // 2300
- static const MessageType1 emptyHost;
- // 2301
- static const MessageType1 badRelative;
- // 2302
- static const MessageType1 emptyPort;
- // 2303
- static const MessageType1 invalidPort;
- // 2304
- static const MessageType1 hostNotFound;
- // 2305
- static const MessageType1 hostTryAgain;
- // 2306
- static const MessageType1 hostNoRecovery;
- // 2307
- static const MessageType1 hostNoData;
- // 2308
- static const MessageType2 hostOtherError;
- // 2309
- static const MessageType1 hostUnknownError;
- // 2310
- static const MessageType1 cannotCreateSocket;
- // 2311
- static const MessageType2 cannotConnect;
- // 2312
- static const MessageType2 writeError;
- // 2313
- static const MessageType2 readError;
- // 2314
- static const MessageType2 closeError;
- // 2315
- static const MessageType1 invalidHostNumber;
- // 2316
- static const MessageType3 getFailed;
- // 2317
- static const MessageType0 notSupported;
- // 2318
- static const MessageType0 onlyHTTP;
- // 2319
- static const MessageType1 winsockInitialize;
- // 2320
- static const MessageType0 winsockVersion;
- // 2321
- static const MessageFragment winsockErrorNumber;
-};
-const MessageType1 URLStorageMessages::emptyHost(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2300
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty host in HTTP URL %1"
-#endif
-);
-const MessageType1 URLStorageMessages::badRelative(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2301
-#ifndef SP_NO_MESSAGE_TEXT
-,"uncompletable relative HTTP URL %1"
-#endif
-);
-const MessageType1 URLStorageMessages::emptyPort(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2302
-#ifndef SP_NO_MESSAGE_TEXT
-,"empty port number in HTTP URL %1"
-#endif
-);
-const MessageType1 URLStorageMessages::invalidPort(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2303
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid port number in HTTP URL %1"
-#endif
-);
-const MessageType1 URLStorageMessages::hostNotFound(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2304
-#ifndef SP_NO_MESSAGE_TEXT
-,"host %1 not found"
-#endif
-);
-const MessageType1 URLStorageMessages::hostTryAgain(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2305
-#ifndef SP_NO_MESSAGE_TEXT
-,"could not resolve host %1 (try again later)"
-#endif
-);
-const MessageType1 URLStorageMessages::hostNoRecovery(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2306
-#ifndef SP_NO_MESSAGE_TEXT
-,"could not resolve host %1 (unrecoverable error)"
-#endif
-);
-const MessageType1 URLStorageMessages::hostNoData(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2307
-#ifndef SP_NO_MESSAGE_TEXT
-,"no address record for host name %1"
-#endif
-);
-const MessageType2 URLStorageMessages::hostOtherError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2308
-#ifndef SP_NO_MESSAGE_TEXT
-,"could not resolve host %1 (%2)"
-#endif
-);
-const MessageType1 URLStorageMessages::hostUnknownError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2309
-#ifndef SP_NO_MESSAGE_TEXT
-,"could not resolve host %1 (unknown error)"
-#endif
-);
-const MessageType1 URLStorageMessages::cannotCreateSocket(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2310
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot create socket (%1)"
-#endif
-);
-const MessageType2 URLStorageMessages::cannotConnect(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2311
-#ifndef SP_NO_MESSAGE_TEXT
-,"error connecting to %1 (%2)"
-#endif
-);
-const MessageType2 URLStorageMessages::writeError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2312
-#ifndef SP_NO_MESSAGE_TEXT
-,"error sending request to %1 (%2)"
-#endif
-);
-const MessageType2 URLStorageMessages::readError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2313
-#ifndef SP_NO_MESSAGE_TEXT
-,"error receiving from host %1 (%2)"
-#endif
-);
-const MessageType2 URLStorageMessages::closeError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2314
-#ifndef SP_NO_MESSAGE_TEXT
-,"error closing connection to host %1 (%2)"
-#endif
-);
-const MessageType1 URLStorageMessages::invalidHostNumber(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2315
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid host number %1"
-#endif
-);
-const MessageType3 URLStorageMessages::getFailed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2316
-#ifndef SP_NO_MESSAGE_TEXT
-,"could not get %2 from %1 (reason given was %3)"
-#endif
-);
-const MessageType0 URLStorageMessages::notSupported(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2317
-#ifndef SP_NO_MESSAGE_TEXT
-,"URL not supported by this version"
-#endif
-);
-const MessageType0 URLStorageMessages::onlyHTTP(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2318
-#ifndef SP_NO_MESSAGE_TEXT
-,"only HTTP scheme supported"
-#endif
-);
-const MessageType1 URLStorageMessages::winsockInitialize(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2319
-#ifndef SP_NO_MESSAGE_TEXT
-,"could not initialize Windows Sockets (%1)"
-#endif
-);
-const MessageType0 URLStorageMessages::winsockVersion(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2320
-#ifndef SP_NO_MESSAGE_TEXT
-,"incompatible Windows Sockets version"
-#endif
-);
-const MessageFragment URLStorageMessages::winsockErrorNumber(
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2321
-#ifndef SP_NO_MESSAGE_TEXT
-,"error number "
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/UTF8CodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/UTF8CodingSystem.cxx
deleted file mode 100644
index ad18bcb7c0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/UTF8CodingSystem.cxx
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "UTF8CodingSystem.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-enum {
- // cmaskN is mask for first byte to test for N byte sequence
- cmask1 = 0x80,
- cmask2 = 0xe0,
- cmask3 = 0xf0,
- cmask4 = 0xf8,
- cmask5 = 0xfc,
- cmask6 = 0xfe,
- // cvalN is value of masked first byte of N byte sequence
- cval1 = 0x00,
- cval2 = 0xc0,
- cval3 = 0xe0,
- cval4 = 0xf0,
- cval5 = 0xf8,
- cval6 = 0xfc,
- // vmaskN is mask to get value from first byte in N byte sequence
- vmask2 = 0x1f,
- vmask3 = 0xf,
- vmask4 = 0x7,
- vmask5 = 0x3,
- vmask6 = 0x1,
- // minN is minimum legal resulting value for N byte sequence
- min2 = 0x80,
- min3 = 0x800,
- min4 = 0x10000,
- min5 = 0x200000,
- min6 = 0x4000000,
- max6 = 0x7fffffff
-};
-
-class UTF8Decoder : public Decoder {
-public:
- UTF8Decoder();
- size_t decode(Char *, const char *, size_t, const char **);
-private:
- // value for encoding error
- enum { invalid = 0xfffd };
- Boolean recovering_;
-};
-
-class UTF8Encoder : public Encoder {
-public:
- UTF8Encoder();
- void output(const Char *, size_t, OutputByteStream *);
- void output(Char *tmp_char, size_t tmp_size_t,
- OutputByteStream *tmp_obs) {
- output((const Char *)tmp_char, (size_t)tmp_size_t,
- (OutputByteStream *)tmp_obs);
- }
-};
-
-Decoder *UTF8CodingSystem::makeDecoder() const
-{
- return (new UTF8Decoder);
-}
-
-Encoder *UTF8CodingSystem::makeEncoder() const
-{
- return (new UTF8Encoder);
-}
-
-
-UTF8Decoder::UTF8Decoder()
-: recovering_(0)
-{
-}
-
-size_t UTF8Decoder::decode(Char *to, const char *s,
- size_t slen, const char **result)
-{
- Char *start = to;
- const unsigned char *us = (const unsigned char *)s;
- if (recovering_) {
- recovering_ = 0;
- goto recover;
- }
- while (slen > 0) {
- unsigned c0;
- c0 = us[0];
- if ((c0 & cmask1) == cval1) {
- *to++ = c0;
- us++;
- slen--;
- } else if ((c0 & cmask2) == cval2) {
- if (slen < 2)
- goto done;
- unsigned c1 = us[1] ^ 0x80;
- if (c1 & 0xc0)
- goto error;
- unsigned c = ((c0 & vmask2) << 6) | c1;
- if (c < min2)
- c = invalid;
- *to++ = c;
- slen -= 2;
- us += 2;
- } else if ((c0 & cmask3) == cval3) {
- if (slen < 3)
- goto done;
- unsigned c1 = us[1] ^ 0x80;
- unsigned c2 = us[2] ^ 0x80;
- if ((c1 | c2) & 0xc0)
- goto error;
- unsigned c = ((((c0 & vmask3) << 6) | c1) << 6) | c2;
- if (c < min3)
- c = invalid;
- *to++ = c;
- slen -= 3;
- us += 3;
- } else if ((c0 & cmask4) == cval4) {
- if (slen < 4)
- goto done;
- unsigned c1 = us[1] ^ 0x80;
- unsigned c2 = us[2] ^ 0x80;
- unsigned c3 = us[3] ^ 0x80;
- if ((c1 | c2 | c3) & 0xc0)
- goto error;
- if (charMax < min5 - 1)
- *to++ = invalid;
- else {
- unsigned long c = ((((c0 & vmask4) << 6) |
- c1) << 6) | c2;
- c = (c << 6) | c3;
- if (c < min4)
- c = invalid;
- *to++ = c;
- }
- slen -= 4;
- us += 4;
- } else if ((c0 & cmask5) == cval5) {
- if (slen < 5)
- goto done;
- unsigned c1 = us[1] ^ 0x80;
- unsigned c2 = us[2] ^ 0x80;
- unsigned c3 = us[3] ^ 0x80;
- unsigned c4 = us[4] ^ 0x80;
- if ((c1 | c2 | c3 | c4) & 0xc0)
- goto error;
- if (charMax < min6 - 1)
- *to++ = invalid;
- else {
- unsigned long c = ((((c0 & vmask5) << 6) |
- c1) << 6) | c2;
- c = (((c << 6) | c3) << 6) | c4;
- if (c < min5)
- c = invalid;
- *to++ = c;
- }
- slen -= 5;
- us += 5;
- } else if ((c0 & cmask6) == cval6) {
- if (slen < 6)
- goto done;
- unsigned c1 = us[1] ^ 0x80;
- unsigned c2 = us[2] ^ 0x80;
- unsigned c3 = us[3] ^ 0x80;
- unsigned c4 = us[4] ^ 0x80;
- unsigned c5 = us[5] ^ 0x80;
- if ((c1 | c2 | c3 | c4 | c5) & 0xc0)
- goto error;
- if (charMax < max6)
- *to++ = invalid;
- else {
- unsigned long c = ((((c0 & vmask6) << 6) |
- c1) << 6) | c2;
- c = (((((c << 6) | c3) << 6) | c4) << 6) | c5;
- if (c < min6)
- c = invalid;
- *to++ = c;
- }
- slen -= 6;
- us += 6;
- } else {
- error:
- us++;
- slen--;
- *to++ = invalid;
- recover:
- for (;;) {
- if (slen == 0) {
- recovering_ = 1;
- goto done;
- }
- if ((*us & 0xc0) != 0x80)
- break;
- us++;
- slen--;
- }
- }
- }
- done:
- *result = (char *)us;
- return (to - start);
-}
-
-UTF8Encoder::UTF8Encoder()
-{
-}
-
-void UTF8Encoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- for (; n > 0; s++, n--) {
- unsigned int c = *s;
- if (c < min2)
- sb->sputc((unsigned char)c);
- else
- if (c < min3) {
- sb->sputc((c >> 6) | cval2);
- sb->sputc((c & 0x3f) | 0x80);
- }
- else
- if (c < min4) {
- sb->sputc((c >> 12) | cval3);
- sb->sputc(((c >> 6) & 0x3f) | 0x80);
- sb->sputc((c & 0x3f) | 0x80);
- }
- else
- if (c < min5) {
- sb->sputc((c >> 18) | cval4);
- sb->sputc(((c >> 12) & 0x3f) | 0x80);
- sb->sputc(((c >> 6) & 0x3f) | 0x80);
- sb->sputc((c & 0x3f) | 0x80);
- }
- else
- if (c < min6) {
- sb->sputc((c >> 24) | cval5);
- sb->sputc(((c >> 18) & 0x3f) | 0x80);
- sb->sputc(((c >> 12) & 0x3f) | 0x80);
- sb->sputc(((c >> 6) & 0x3f) | 0x80);
- sb->sputc((c & 0x3f) | 0x80);
- }
- else
- if (c <= max6) {
- sb->sputc((c >> 30) | cval6);
- sb->sputc(((c >> 24) & 0x3f) | 0x80);
- sb->sputc(((c >> 18) & 0x3f) | 0x80);
- sb->sputc(((c >> 12) & 0x3f) | 0x80);
- sb->sputc(((c >> 6) & 0x3f) | 0x80);
- sb->sputc((c & 0x3f) | 0x80);
- }
- }
-}
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.cxx
deleted file mode 100644
index fd854b80e8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.cxx
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "Undo.h"
-#include "ParserState.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Undo::Undo()
-{
-}
-
-Undo::~Undo()
-{
-}
-
-UndoTransition::UndoTransition(const MatchState &state)
-: state_(state)
-{
-}
-
-void UndoTransition::undo(ParserState *parser)
-{
- parser->currentElement().setMatchState(state_);
-}
-
-UndoStartTag::UndoStartTag()
-{
-}
-
-void UndoStartTag::undo(ParserState *parser)
-{
- parser->popElement();
-}
-
-UndoEndTag::UndoEndTag(OpenElement *e)
-: element_(e)
-{
-}
-
-void UndoEndTag::undo(ParserState *parser)
-{
- parser->pushElement(element_.extract());
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.h
deleted file mode 100644
index bfbdba8ea8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Undo.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef Undo_INCLUDED
-#define Undo_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Link.h"
-#include "ContentToken.h"
-#include "OpenElement.h"
-#include "Allocator.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class ParserState;
-class Event;
-
-class Undo : public Link {
-public:
- void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
- void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
- void operator delete(void *p) { Allocator::free(p); }
- Undo();
- virtual ~Undo();
- virtual void undo(ParserState *) = 0;
-private:
- Undo(const Undo &); // undefined
- void operator=(const Undo &); // undefined
-};
-
-class UndoTransition : public Undo {
-public:
- UndoTransition(const MatchState &);
- void undo(ParserState *);
-private:
- UndoTransition(const UndoTransition &); // undefined
- void operator=(const UndoTransition &); // undefined
- MatchState state_;
-};
-
-class UndoStartTag : public Undo {
-public:
- UndoStartTag();
- void undo(ParserState *);
-private:
- UndoStartTag(const UndoStartTag &); // undefined
- void operator=(const UndoStartTag &); // undefined
-};
-
-class UndoEndTag : public Undo {
-public:
- UndoEndTag(OpenElement *);
- void undo(ParserState *);
-private:
- UndoEndTag(const UndoEndTag &); // undefined
- void operator=(const UndoEndTag &); // undefined
- Owner<OpenElement> element_;
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not Undo_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/UnicodeCodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/UnicodeCodingSystem.cxx
deleted file mode 100644
index 39c78cf599..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/UnicodeCodingSystem.cxx
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "UnicodeCodingSystem.h"
-#include "macros.h"
-#include "Owner.h"
-
-#include <stddef.h>
-#include <string.h>
-#ifdef DECLARE_MEMMOVE
-extern "C" {
- void *memmove(void *, const void *, size_t);
-}
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const unsigned short byteOrderMark = 0xfeff;
-const unsigned short swappedByteOrderMark = 0xfffe;
-
-class UnicodeDecoder : public Decoder {
-public:
- UnicodeDecoder(const InputCodingSystem *sub);
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
- Boolean convertOffset(unsigned long &offset) const;
-private:
- PackedBoolean hadFirstChar_;
- PackedBoolean hadByteOrderMark_;
- PackedBoolean swapBytes_;
- Owner<Decoder> subDecoder_;
- const InputCodingSystem *subCodingSystem_;
-};
-
-class UnicodeEncoder : public Encoder {
-public:
- UnicodeEncoder();
- ~UnicodeEncoder();
- void output(Char *, size_t, OutputByteStream *);
- void output(const Char *, size_t, OutputByteStream *);
- void startFile(OutputByteStream *);
-private:
- void allocBuf(size_t);
- unsigned short *buf_;
- size_t bufSize_;
-};
-
-UnicodeCodingSystem::UnicodeCodingSystem(const InputCodingSystem *sub)
-: sub_(sub)
-{
-}
-
-Decoder *UnicodeCodingSystem::makeDecoder() const
-{
- return new UnicodeDecoder(sub_);
-}
-
-Encoder *UnicodeCodingSystem::makeEncoder() const
-{
- return new UnicodeEncoder;
-}
-
-unsigned UnicodeCodingSystem::fixedBytesPerChar() const
-{
- return 2;
-}
-
-UnicodeDecoder::UnicodeDecoder(const InputCodingSystem *subCodingSystem)
-: Decoder(subCodingSystem ? 1 : 2), subCodingSystem_(subCodingSystem),
- hadByteOrderMark_(0), hadFirstChar_(0), swapBytes_(0)
-{
-}
-
-
-size_t UnicodeDecoder::decode(Char *to, const char *from, size_t fromLen,
- const char **rest)
-{
- union U {
- unsigned short word;
- char bytes[2];
- };
-
- if (subDecoder_)
- return subDecoder_->decode(to, from, fromLen, rest);
- if (!hadFirstChar_) {
- if (fromLen < 2) {
- *rest = from;
- return 0;
- }
- hadFirstChar_ = 1;
- minBytesPerChar_ = 2;
- U u;
- u.bytes[0] = from[0];
- u.bytes[1] = from[1];
- if (u.word == byteOrderMark) {
- hadByteOrderMark_ = 1;
- from += 2;
- fromLen -= 2;
- }
- else if (u.word == swappedByteOrderMark) {
- hadByteOrderMark_ = 1;
- from += 2;
- fromLen -= 2;
- swapBytes_ = 1;
- }
- else if (subCodingSystem_) {
- subDecoder_ = subCodingSystem_->makeDecoder();
- minBytesPerChar_ = subDecoder_->minBytesPerChar();
- return subDecoder_->decode(to, from, fromLen, rest);
- }
- }
- fromLen &= ~1;
- *rest = from + fromLen;
- if (sizeof(Char) == 2) {
- if (!swapBytes_) {
- if (from != (char *)to)
- memmove(to, from, fromLen);
- return fromLen/2;
- }
- }
- if (swapBytes_) {
- for (size_t n = fromLen; n > 0; n -= 2) {
- U u;
- u.bytes[1] = *from++;
- u.bytes[0] = *from++;
- *to++ = u.word;
- }
- }
- else {
- for (size_t n = fromLen; n > 0; n -= 2) {
- U u;
- u.bytes[0] = *from++;
- u.bytes[1] = *from++;
- *to++ = u.word;
- }
- }
- return fromLen/2;
-}
-
-Boolean UnicodeDecoder::convertOffset(unsigned long &n) const
-{
- if (subDecoder_)
- return subDecoder_->convertOffset(n);
- if (hadByteOrderMark_)
- n += 1;
- n *= 2;
- return true;
-}
-
-UnicodeEncoder::UnicodeEncoder()
-: buf_(0), bufSize_(0)
-{
-}
-
-UnicodeEncoder::~UnicodeEncoder()
-{
- delete [] buf_;
-}
-
-void UnicodeEncoder::allocBuf(size_t n)
-{
- if (bufSize_ < n) {
- delete [] buf_;
- buf_ = new unsigned short[bufSize_ = n];
- }
-}
-
-void UnicodeEncoder::startFile(OutputByteStream *sb)
-{
- const unsigned short n = byteOrderMark;
- sb->sputn((char *)&n, 2);
-}
-
-void UnicodeEncoder::output(Char *s, size_t n, OutputByteStream *sb)
-{
- if (sizeof(Char) == 2) {
- sb->sputn((char *)s, n*2);
- return;
- }
- ASSERT(sizeof(Char) >= 2);
- unsigned short *p = (unsigned short *)s;
- for (size_t i = 0; i < n; i++)
- p[i] = s[i] & 0xffff;
- sb->sputn((char *)s, n*2);
-}
-
-void UnicodeEncoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- if (sizeof(Char) == 2) {
- sb->sputn((char *)s, n*2);
- return;
- }
- allocBuf(n);
- for (size_t i = 0; i < n; i++)
- buf_[i] = s[i] & 0xffff;
- sb->sputn((char *)buf_, n*2);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/UnivCharsetDesc.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/UnivCharsetDesc.cxx
deleted file mode 100644
index 07ff4e9ba6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/UnivCharsetDesc.cxx
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-#include "UnivCharsetDesc.h"
-#include "macros.h"
-#include "constant.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-UnivCharsetDesc::UnivCharsetDesc()
-: charMap_(unsigned(1) << 31)
-{
-}
-
-UnivCharsetDesc::UnivCharsetDesc(const Range *p, size_t n)
-: charMap_(unsigned(1) << 31)
-{
- set(p, n);
-}
-
-void UnivCharsetDesc::set(const Range *p, size_t n)
-{
- for (size_t i = 0; i < n; i++) {
- const Range &r = p[i];
- Char max;
- if (r.count > charMax || r.descMin > charMax - r.count)
- max = charMax;
- else
- max = r.descMin + (r.count - 1);
- if (max - r.descMin > univCharMax
- || r.univMin > univCharMax - (max - r.descMin))
- max = r.descMin + (univCharMax - r.univMin);
- addRange(r.descMin, max, r.univMin);
- }
-}
-
-void UnivCharsetDesc::addRange(WideChar descMin,
- WideChar descMax,
- UnivChar univMin)
-{
- if (descMin <= charMax) {
- Char max = descMax > charMax ? charMax : descMax;
- charMap_.setRange(descMin, max, wrapChar(univMin, descMin));
- }
- if (descMax > charMax) {
- if (descMin > charMax)
- rangeMap_.addRange(descMin, descMax, univMin);
- else
- rangeMap_.addRange(charMax, descMax, univMin + (charMax - descMin));
- }
-}
-
-void UnivCharsetDesc::addBaseRange(const UnivCharsetDesc &baseSet,
- WideChar descMin,
- WideChar descMax,
- WideChar baseMin,
- ISet<WideChar> &baseMissing)
-{
- UnivCharsetDescIter iter(baseSet);
- iter.skipTo(baseMin);
- WideChar baseMax = baseMin + (descMax - descMin);
- WideChar iDescMin, iDescMax;
- UnivChar iBaseMin;
- WideChar missingBaseMin = baseMin;
- Boolean usedAll = 0;
- while (iter.next(iDescMin, iDescMax, iBaseMin) && iDescMin <= baseMax) {
- // baseMin baseMax
- // iDescMin iDescMax
- if (iDescMax >= baseMin) {
- WideChar min = baseMin > iDescMin ? baseMin : iDescMin;
- if (min > missingBaseMin)
- baseMissing.addRange(missingBaseMin, min - 1);
- WideChar max = baseMax < iDescMax ? baseMax : iDescMax;
- missingBaseMin = max + 1;
- if (missingBaseMin == 0)
- usedAll = 1;
- ASSERT(min <= max);
- addRange(descMin + (min - baseMin),
- descMin + (max - baseMin),
- iBaseMin + (min - iDescMin));
- }
- }
- if (!usedAll && baseMax >= missingBaseMin)
- baseMissing.addRange(missingBaseMin, baseMax);
-}
-
-unsigned UnivCharsetDesc::univToDesc(UnivChar to, WideChar &from,
- ISet<WideChar> &fromSet,
- WideChar &count) const
-{
- unsigned ret = rangeMap_.inverseMap(to, from, fromSet, count);
- Char min = 0;
- do {
- Char max;
- Unsigned32 tem = charMap_.getRange(min, max);
- if (!noDesc(tem)) {
- UnivChar toMin = extractChar(tem, min);
- if (toMin <= to && to <= toMin + (max - min)) {
- Char n = min + (to - toMin);
- WideChar thisCount = max - n + 1;
- if (ret > 1) {
- fromSet.add(n);
- if (thisCount < count)
- count = thisCount;
- if (n < from)
- from = n;
- }
- else if (ret == 1) {
- fromSet.add(from);
- fromSet.add(n);
- ret = 2;
- if (thisCount < count)
- count = thisCount;
- if (n < from)
- from = n;
- }
- else {
- count = thisCount;
- from = n;
- ret = 1;
- }
- }
- else if (ret == 0 && toMin > to && toMin - to < count)
- count = toMin - to;
- }
- min = max;
- } while (min++ != Char(-1));
- return ret;
-}
-
-UnivCharsetDescIter::UnivCharsetDescIter(const UnivCharsetDesc &desc)
-: charMap_(&desc.charMap_), doneCharMap_(0), nextChar_(0),
- rangeMapIter_(desc.rangeMap_)
-{
-}
-
-Boolean UnivCharsetDescIter::next(WideChar &descMin,
- WideChar &descMax,
- UnivChar &univMin)
-{
- while (!doneCharMap_) {
- Char ch = nextChar_;
- Unsigned32 tem = charMap_->getRange(nextChar_, nextChar_);
- descMax = nextChar_;
- if (!UnivCharsetDesc::noDesc(tem)) {
- descMin = ch;
- descMax = nextChar_;
- univMin = UnivCharsetDesc::extractChar(tem, ch);
- if (nextChar_ == Char(-1))
- doneCharMap_ = 1;
- else
- nextChar_++;
- return 1;
- }
- if (nextChar_ == Char(-1))
- doneCharMap_ = 1;
- else
- nextChar_++;
- }
- return rangeMapIter_.next(descMin, descMax, univMin);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/Win32CodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/Win32CodingSystem.cxx
deleted file mode 100644
index c473830677..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/Win32CodingSystem.cxx
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include <windows.h>
-#include <io.h>
-#include "Win32CodingSystem.h"
-#include "Boolean.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SingleByteWin32Decoder : public Decoder {
-public:
- SingleByteWin32Decoder(unsigned int codePage, Char defaultChar);
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
- Boolean convertOffset(unsigned long &offset) const;
-private:
- Char map_[256];
-};
-
-class MultiByteWin32Decoder : public Decoder {
-public:
- MultiByteWin32Decoder(unsigned int codePage, Char defaultChar,
- unsigned char *leadByte);
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
-private:
- unsigned int codePage_;
- Char defaultChar_;
- PackedBoolean isLeadByte_[256];
-};
-
-class Win32Encoder : public Encoder {
-public:
- Win32Encoder(unsigned int codePage);
- ~Win32Encoder();
- void output(const Char *, size_t, OutputByteStream *);
-private:
- char *buf_;
- size_t bufLen_;
- unsigned int codePage_;
-};
-
-Win32CodingSystem::Win32CodingSystem(unsigned int codePage, Char defaultChar)
-: codePage_(codePage), defaultChar_(defaultChar)
-{
-}
-
-Win32CodingSystem::Win32CodingSystem(SpecialCodePage codePage,
- Char defaultChar)
-: defaultChar_(defaultChar)
-{
- if (codePage == codePageAnsi)
- codePage_ = GetACP();
- else
- codePage_ = GetOEMCP();
-}
-
-Boolean Win32CodingSystem::isValid() const
-{
- return IsValidCodePage(codePage_);
-}
-
-Encoder *Win32CodingSystem::makeEncoder() const
-{
- return new Win32Encoder(codePage_);
-}
-
-Decoder *Win32CodingSystem::makeDecoder() const
-{
- CPINFO info;
- if (GetCPInfo(codePage_, &info) && info.MaxCharSize > 1)
- return new MultiByteWin32Decoder(codePage_, defaultChar_, info.LeadByte);
- else
- return new SingleByteWin32Decoder(codePage_, defaultChar_);
-}
-
-SingleByteWin32Decoder::SingleByteWin32Decoder(unsigned int codePage,
- Char defaultChar)
-{
- for (int i = 0; i < 256; i++) {
- char c = i;
- if (MultiByteToWideChar(codePage, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS,
- &c, 1, map_ + i, 1) == 0)
- map_[i] = defaultChar;
- }
-}
-
-size_t SingleByteWin32Decoder::decode(Char *to, const char *from,
- size_t fromLen, const char **rest)
-{
- for (size_t n = fromLen; n > 0; n--)
- *to++ = map_[(unsigned char)*from++]; // zero extend
- *rest = from;
- return fromLen;
-}
-
-Boolean SingleByteWin32Decoder::convertOffset(unsigned long &) const
-{
- return 1;
-}
-
-MultiByteWin32Decoder::MultiByteWin32Decoder(unsigned int codePage,
- Char defaultChar,
- unsigned char *leadByte)
-: defaultChar_(defaultChar), codePage_(codePage)
-{
- for (int i = 0; i < 256; i++)
- isLeadByte_[i] = 0;
- for (int i = 0; i < MAX_LEADBYTES; i += 2) {
- if (leadByte[i] == 0 && leadByte[i + 1] == 0)
- break;
- int lim = leadByte[i + 1];
- for (int j = leadByte[i]; j < lim; j++)
- isLeadByte_[j] = 1;
- }
-}
-
-size_t MultiByteWin32Decoder::decode(Char *to, const char *from,
- size_t fromLen, const char **rest)
-{
- size_t i;
- for (i = fromLen; i > 0; i--)
- if (!isLeadByte_[(unsigned char)from[i - 1]])
- break;
- if ((fromLen - i) & 1)
- fromLen--;
-
- int count = MultiByteToWideChar(codePage_,
- MB_PRECOMPOSED|MB_ERR_INVALID_CHARS,
- from, fromLen, to, fromLen);
- if (count) {
- *rest = from + fromLen;
- return count;
- }
- Char *start = to;
- // Try it character by character.
- while (fromLen > 0) {
- int nBytes = 1 + isLeadByte_[(unsigned char)*from];
- ASSERT(nBytes <= fromLen);
- if (MultiByteToWideChar(codePage_, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS,
- from, nBytes, to, 1) != 1)
- *to = defaultChar_;
- from += nBytes;
- fromLen -= nBytes;
- to++;
- }
- *rest = from;
- return to - start;
-}
-
-Win32Encoder::Win32Encoder(unsigned int codePage)
-: codePage_(codePage), buf_(0), bufLen_(0)
-{
-}
-
-Win32Encoder::~Win32Encoder()
-{
- delete [] buf_;
-}
-
-void Win32Encoder::output(const Char *s, size_t n, OutputByteStream *sb)
-{
- if (n == 0)
- return;
- if (n*2 > bufLen_) {
- delete [] buf_;
- bufLen_ = n*2;
- buf_ = new char[bufLen_];
- }
- int nBytes = WideCharToMultiByte(codePage_,
- 0,
- s,
- n,
- buf_,
- bufLen_,
- 0,
- 0);
- if (nBytes)
- sb->sputn(buf_, nBytes);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/WinApp.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/WinApp.cxx
deleted file mode 100644
index 2524b7cf4e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/WinApp.cxx
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright (c) 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_WIDE_SYSTEM
-
-#include "WinApp.h"
-#include "CodingSystemKit.h"
-#include "Ptr.h"
-#include "ExtendEntityManager.h"
-#include "SOEntityCatalog.h"
-#include "SgmlParser.h"
-#include "PosixStorage.h"
-#include "LiteralStorage.h"
-#ifdef SP_WININET
-#include "WinInetStorage.h"
-#else
-#include "URLStorage.h"
-#endif
-#define STRICT
-#include <windows.h>
-#include "macros.h"
-
-#ifndef SP_DEFAULT_ENCODING
-#define SP_DEFAULT_ENCODING "WINDOWS"
-#endif
-
-#ifndef SP_REGISTRY_KEY
-#define SP_REGISTRY_KEY "Software\\James Clark\\SP"
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static
-StringC asStringC(const char *s)
-{
- StringC tem;
- if (s) {
- while (*s)
- tem += (unsigned char)*s++;
- }
- return tem;
-}
-
-WinApp::WinApp()
-{
- getRegistry("Catalogs", defaultCatalogs_);
- getRegistry("Directories", defaultDirectories_);
- getRegistry("Encoding", defaultEncoding_);
- if (defaultEncoding_.size() == 0 || !getCodingSystem(defaultEncoding_)) {
- defaultEncoding_ = asStringC(SP_DEFAULT_ENCODING);
- }
-}
-
-const InputCodingSystem *
-WinApp::getCodingSystem(const StringC &name)
-{
- if (name.size() == 0)
- return 0;
- if (codingSystemKit_.isNull())
- codingSystemKit_ = CodingSystemKit::make(0);
- const char *tem;
- return codingSystemKit_->makeInputCodingSystem(name,
- codingSystemKit_->systemCharset(),
- 0,
- tem);
-}
-
-static
-void split(const StringC &str, Char sep, Vector<StringC> &result)
-{
- Boolean started = 0;
- for (size_t i = 0; i < str.size(); i++) {
- if (str[i] == sep)
- started = 0;
- else {
- if (!started) {
- result.resize(result.size() + 1);
- started = 1;
- }
- result.back() += str[i];
- }
- }
-}
-
-void WinApp::initParser(const StringC &sysid, SgmlParser &parser)
-{
- Ptr<EntityManager> em;
- initParser(sysid, parser, em);
-}
-
-void WinApp::initParser(const StringC &sysid, SgmlParser &parser,
- Ptr<EntityManager> &em)
-{
- const InputCodingSystem *codingSystem = getCodingSystem(encoding_);
- if (!codingSystem)
- codingSystem = getCodingSystem(defaultEncoding_);
- ConstPtr<InputCodingSystemKit> icsk;
- icsk.swap(codingSystemKit_);
- const CharsetInfo *systemCharset = &icsk->systemCharset();
-
- PosixStorageManager *sm
- = new PosixStorageManager("OSFILE",
- systemCharset,
- 5);
- {
- Vector<StringC> dirs;
- split(extraDirectories_, ';', dirs);
- split(defaultDirectories_, ';', dirs);
- for (size_t i = 0; i < dirs.size(); i++)
- sm->addSearchDir(dirs[i]);
- }
- ExtendEntityManager *xem
- = ExtendEntityManager::make(sm,
- codingSystem,
- icsk,
- 0);
- em = xem;
- xem
- ->registerStorageManager(new PosixFdStorageManager("OSFD",
- systemCharset));
-#ifdef SP_WININET
- xem->registerStorageManager(new WinInetStorageManager("URL"));
-#else
- xem->registerStorageManager(new URLStorageManager("URL"));
-#endif
- xem->registerStorageManager(new LiteralStorageManager("LITERAL"));
- Vector<StringC> catalogSysids;
- split(extraCatalogs_, ';', catalogSysids);
- size_t nExtra = catalogSysids.size();
- split(defaultCatalogs_, ';', catalogSysids);
- xem->setCatalogManager(SOCatalogManager::make(catalogSysids,
- nExtra,
- systemCharset,
- systemCharset,
- 1));
- SgmlParser::Params params;
- params.sysid = sysid;
- params.entityManager = em.pointer();
- params.options = &options;
- parser.init(params);
-}
-
-void WinApp::setDefaultCatalogs(StringC &tem)
-{
- if (tem != defaultCatalogs_) {
- tem.swap(defaultCatalogs_);
- setRegistry("Catalogs", defaultCatalogs_);
- }
-}
-
-void WinApp::setDefaultDirectories(StringC &tem)
-{
- if (tem != defaultDirectories_) {
- tem.swap(defaultDirectories_);
- setRegistry("Directories", defaultDirectories_);
- }
-}
-
-Boolean WinApp::setEncoding(StringC &str)
-{
- if (!getCodingSystem(str))
- return 0;
- str.swap(encoding_);
- return 1;
-}
-
-Boolean WinApp::setDefaultEncoding(StringC &str)
-{
- if (!getCodingSystem(str))
- return 0;
- str.swap(defaultEncoding_);
- setRegistry("Encoding", defaultEncoding_);
- return 1;
-}
-
-void WinApp::setRegistry(const char *name, const StringC &value)
-{
- HKEY hk;
- if (RegCreateKeyA(HKEY_CURRENT_USER, SP_REGISTRY_KEY, &hk) != ERROR_SUCCESS)
- return;
- String<char> buf;
- int len = WideCharToMultiByte(CP_ACP, 0, value.data(), value.size(), 0, 0, 0, 0);
- buf.resize(len + 1);
- WideCharToMultiByte(CP_ACP, 0, value.data(), value.size(), buf.begin(), len, 0, 0);
- buf[len] = '\0';
- RegSetValue(hk, name, REG_SZ, buf.data(), len);
- RegCloseKey(hk);
-}
-
-Boolean WinApp::getRegistry(const char *name, StringC &value)
-{
- HKEY hk;
- if (RegOpenKeyA(HKEY_CURRENT_USER, SP_REGISTRY_KEY, &hk) != ERROR_SUCCESS)
- return 0;
- String<char> buf;
- long size;
- Boolean retval = 0;
- if (RegQueryValueA(hk, name, 0, &size) == ERROR_SUCCESS) {
- buf.resize(size);
- if (RegQueryValueA(hk, name, &buf[0], &size) == ERROR_SUCCESS) {
- int nChars = MultiByteToWideChar(CP_ACP, 0, buf.data(), size - 1, 0, 0);
- if (nChars || GetLastError() == ERROR_SUCCESS) {
- value.resize(nChars);
- if (MultiByteToWideChar(CP_ACP, 0, buf.data(), size - 1, &value[0], nChars) == nChars)
- retval = 1;
- else
- value.resize(0);
- }
- }
- }
- RegCloseKey(hk);
- return retval;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_WIDE_SYSTEM */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorage.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorage.cxx
deleted file mode 100644
index 1d440796d5..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorage.cxx
+++ /dev/null
@@ -1,235 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_WININET
-
-#include "WinInetStorage.h"
-#include "WinInetStorageMessages.h"
-#include "RewindStorageObject.h"
-#include "UnivCharsetDesc.h"
-#include "MessageArg.h"
-#include "MessageBuilder.h"
-#include "macros.h"
-
-#define STRICT
-#include <windows.h>
-#include <wininet.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static UnivCharsetDesc::Range range = { 0, 128, 0 };
-static CharsetInfo iso646Charset(UnivCharsetDesc(&range, 1));
-
-String<char> toAscii(const StringC &buf)
-{
- String<char> s;
- for (size_t i = 0; i < buf.size(); i++)
- s += buf[i];
- s += '\0';
- return s;
-}
-class Win32MessageArg : public MessageArg {
-public:
- Win32MessageArg(DWORD n) : n_(n) { }
- MessageArg *copy() const { return new Win32MessageArg(*this); }
- void append(MessageBuilder &) const;
-private:
- DWORD n_;
-};
-
-void Win32MessageArg::append(MessageBuilder &builder) const
-{
- void *msg;
- if (!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
- |FORMAT_MESSAGE_ALLOCATE_BUFFER,
- 0,
- n_,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR)&msg,
- 0,
- 0)) {
- // FIXME interpret common internet messages here
- builder.appendNumber(n_);
- return;
- }
- String<Char> s;
- for (char *tem = (char *)msg; *tem; tem++)
- s += *tem;
- LocalFree(msg);
- builder.appendChars(s.data(), s.size());
-}
-
-class WinInetStorageObject : public RewindStorageObject {
-public:
- WinInetStorageObject(HINTERNET fd, Boolean mayRewind, const StringC &url);
- ~WinInetStorageObject();
- Boolean read(char *buf, size_t bufSize, Messenger &mgr, size_t &nread);
- Boolean seekToStart(Messenger &);
-private:
- WinInetStorageObject(const WinInetStorageObject &); // undefined
- void operator=(const WinInetStorageObject &); // undefined
- Boolean eof_;
- HINTERNET fd_;
- StringC url_;
-};
-
-WinInetStorageManager::WinInetStorageManager(const char *type)
-: type_(type), IdStorageManager(&iso646Charset), session_(0)
-{
-}
-
-WinInetStorageManager::~WinInetStorageManager()
-{
- if (session_) {
- InternetCloseHandle(session_);
- session_ = 0;
- }
-}
-
-const char *WinInetStorageManager::type() const
-{
- return type_;
-}
-
-Boolean WinInetStorageManager::initSession()
-{
- if (!session_) {
- session_ = InternetOpenA("SP",
- INTERNET_OPEN_TYPE_PRECONFIG,
- 0,
- 0,
- 0);
- }
- return 1;
-}
-
-Boolean WinInetStorageManager::guessIsId(const StringC &id,
- const CharsetInfo &charset) const
-{
- if (id.size() < 8)
- return 0;
- size_t i = 0;
- // guess other schemes supported by download protocols
- for (const char *s = "http://"; *s; s++, i++)
- if (id[i] != charset.execToDesc(*s)
- && (!islower(*s) || id[i] != charset.execToDesc(toupper(*s))))
- return 0;
- return 1;
-}
-
-StorageObject *WinInetStorageManager::makeStorageObject(const StringC &specId,
- const StringC &baseId,
- Boolean,
- Boolean mayRewind,
- Messenger &mgr,
- StringC &id)
-{
- if (!initSession())
- return 0;
- id = specId;
- resolveRelative(baseId, id, 0);
- String<char> tem(toAscii(id));
- HINTERNET fd = InternetOpenUrlA(session_, tem.data(), 0, 0, 0, 0);
- if (!fd) {
- DWORD err = GetLastError();
- mgr.message(WinInetStorageMessages::cannotOpen,
- StringMessageArg(id),
- Win32MessageArg(err));
- return 0;
- }
- // FIXME report an error
- return new WinInetStorageObject(fd, mayRewind, id);
-}
-
-Boolean WinInetStorageManager::resolveRelative(const StringC &baseId,
- StringC &id,
- Boolean) const
-{
- DWORD bufSize = baseId.size() + id.size() + 1;
- char *buf = new char[bufSize];
- String<char> baseIdA (toAscii(baseId));
- String<char> idA(toAscii(id));
- if (InternetCombineUrlA(baseIdA.data(),
- idA.data(),
- buf,
- &bufSize,
- 0)) {
- id.resize(0);
- for (size_t i = 0; i < bufSize; i++)
- id += buf[i];
- delete [] buf;
- return 1;
- }
- delete [] buf;
- return 0;
-}
-
-Boolean WinInetStorageManager::transformNeutral(StringC &str, Boolean fold,
- Messenger &) const
-{
- if (fold)
- for (size_t i = 0; i < str.size(); i++) {
- Char c = str[i];
- if (c <= (unsigned char)-1)
- str[i] = tolower(str[i]);
- }
- return 1;
-}
-
-
-WinInetStorageObject::WinInetStorageObject(HINTERNET fd,
- Boolean mayRewind,
- const StringC &url)
-: RewindStorageObject(mayRewind, 0), fd_(fd), url_(url), eof_(0)
-{
-}
-
-WinInetStorageObject::~WinInetStorageObject()
-{
- if (fd_ != 0) {
- (void)InternetCloseHandle(fd_);
- fd_ = 0;
- }
-}
-
-Boolean WinInetStorageObject::read(char *buf, size_t bufSize, Messenger &mgr,
- size_t &nread)
-{
- if (readSaved(buf, bufSize, nread))
- return 1;
- if (fd_ == 0 || eof_)
- return 0;
- DWORD n;
- if (!InternetReadFile(fd_, buf, bufSize, &n)) {
- DWORD err = GetLastError();
- mgr.message(WinInetStorageMessages::readFailed,
- StringMessageArg(url_),
- Win32MessageArg(err));
- return 0;
- }
- if (n) {
- nread = n;
- return 1;
- }
- eof_ = 1;
- InternetCloseHandle(fd_);
- fd_ = 0;
- return 0;
-}
-
-Boolean WinInetStorageObject::seekToStart(Messenger &)
-{
- CANNOT_HAPPEN();
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_WININET */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorageMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorageMessages.h
deleted file mode 100644
index d811c6ea3f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/WinInetStorageMessages.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This file was automatically generated from lib\WinInetStorageMessages.msg by msggen.pl.
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct WinInetStorageMessages {
- // 2500
- static const MessageType2 cannotOpen;
- // 2501
- static const MessageType2 readFailed;
-};
-const MessageType2 WinInetStorageMessages::cannotOpen(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2500
-#ifndef SP_NO_MESSAGE_TEXT
-,"cannot open URL %1 (%2)"
-#endif
-);
-const MessageType2 WinInetStorageMessages::readFailed(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-2501
-#ifndef SP_NO_MESSAGE_TEXT
-,"error reading URL %1 (%2)"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/XMLCodingSystem.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/XMLCodingSystem.cxx
deleted file mode 100644
index 463751478e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/XMLCodingSystem.cxx
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright (c) 1994, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include "splib.h"
-
-#ifdef SP_MULTI_BYTE
-
-#include "XMLCodingSystem.h"
-#include "UTF8CodingSystem.h"
-#include "CodingSystemKit.h"
-#include "Boolean.h"
-#include "Owner.h"
-#include "macros.h"
-#include <stddef.h>
-#include <string.h>
-
-#ifdef SP_DECLARE_MEMMOVE
-extern "C" {
- void *memmove(void *, const void *, size_t);
-}
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const Char ISO646_TAB = 0x9;
-const Char ISO646_LF = 0xA;
-const Char ISO646_CR = 0xD;
-const Char ISO646_SPACE = 0x20;
-const Char ISO646_QUOT = 0x22;
-const Char ISO646_APOS = 0x27;
-const Char ISO646_LT = 0x3C;
-const Char ISO646_EQUAL = 0x3D;
-const Char ISO646_GT = 0x3E;
-const Char ISO646_QUEST = 0x3F;
-const Char ISO646_LETTER_a = 0x61;
-const Char ISO646_LETTER_c = 0x63;
-const Char ISO646_LETTER_d = 0x64;
-const Char ISO646_LETTER_e = 0x65;
-const Char ISO646_LETTER_g = 0x67;
-const Char ISO646_LETTER_i = 0x69;
-const Char ISO646_LETTER_l = 0x6C;
-const Char ISO646_LETTER_m = 0x6D;
-const Char ISO646_LETTER_n = 0x6E;
-const Char ISO646_LETTER_o = 0x6F;
-const Char ISO646_LETTER_x = 0x78;
-
-class XMLDecoder : public Decoder {
-public:
- XMLDecoder(const InputCodingSystemKit *);
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
- Boolean convertOffset(unsigned long &offset) const;
-private:
-
- class UCS2 : public Decoder {
- public:
- UCS2(Boolean swapBytes);
- size_t decode(Char *to, const char *from, size_t fromLen,
- const char **rest);
- Boolean convertOffset(unsigned long &offset) const;
- private:
- Boolean swapBytes_;
- };
- // Don't keep parsing a PI longer than this.
- // We want to avoid reading some enormous file into memory just because
- // some quote was left off.
- enum { piMaxSize = 1024*32 };
-
- void initDecoderDefault();
- void initDecoderPI();
- Boolean extractEncoding(StringC &name);
- static Boolean isWS(Char);
-
- enum DetectPhase {
- phaseInit,
- phasePI,
- phaseFinish
- };
- DetectPhase phase_;
- Boolean byteOrderMark_;
- Boolean lsbFirst_;
- int guessBytesPerChar_;
- Owner<Decoder> subDecoder_;
- // Contains all the characters passed to caller that were
- // not produced by subDecoder_.
- StringC pi_;
- Char piLiteral_;
- const InputCodingSystemKit *kit_;
-};
-
-XMLCodingSystem::XMLCodingSystem(const InputCodingSystemKit *kit)
-: kit_(kit)
-{
-}
-
-Decoder *XMLCodingSystem::makeDecoder() const
-{
- return new XMLDecoder(kit_);
-}
-
-Encoder *XMLCodingSystem::makeEncoder() const
-{
- UTF8CodingSystem utf8;
- return utf8.makeEncoder();
-}
-
-XMLDecoder::XMLDecoder(const InputCodingSystemKit *kit)
-: Decoder(1),
- kit_(kit),
- phase_(phaseInit),
- byteOrderMark_(0),
- lsbFirst_(0),
- guessBytesPerChar_(1),
- piLiteral_(0)
-{
-}
-
-size_t XMLDecoder::decode(Char *to, const char *from, size_t fromLen,
- const char **rest)
-{
- if (phase_ == phaseFinish)
- return subDecoder_->decode(to, from, fromLen, rest);
- if (phase_ == phaseInit) {
- if (fromLen == 0) {
- *rest = from;
- return 0;
- }
- switch ((unsigned char)*from) {
- case 0x00:
- case 0x3C:
- case 0xFF:
- case 0xFE:
- if (fromLen < 2) {
- *rest = from;
- return 0;
- }
- switch (((unsigned char)from[0] << 8) | (unsigned char)from[1]) {
- case 0xFEFF:
- phase_ = phasePI;
- byteOrderMark_ = 1;
- guessBytesPerChar_ = 2;
- from += 2;
- fromLen -= 2;
- break;
- case 0xFFFE:
- lsbFirst_ = 1;
- phase_ = phasePI;
- byteOrderMark_ = 1;
- guessBytesPerChar_ = 2;
- from += 2;
- fromLen -= 2;
- break;
- case 0x3C3F:
- phase_ = phasePI;
- break;
- case 0x3C00:
- lsbFirst_ = 1;
- phase_ = phasePI;
- guessBytesPerChar_ = 2;
- break;
- case 0x003C:
- phase_ = phasePI;
- guessBytesPerChar_ = 2;
- break;
- default:
- break;
- }
- if (phase_ == phasePI)
- break;
- // fall through
- default:
- phase_ = phaseFinish;
- guessBytesPerChar_ = 1;
- initDecoderDefault();
- return subDecoder_->decode(to, from, fromLen, rest);
- }
- }
- ASSERT(phase_ == phasePI);
- Char *p = to;
- for (; fromLen > guessBytesPerChar_;
- fromLen -= guessBytesPerChar_, from += guessBytesPerChar_) {
- if (!piLiteral_ && pi_.size() > 0 && pi_[pi_.size() - 1] == ISO646_GT) {
- initDecoderPI();
- phase_ = phaseFinish;
- return (p - to) + subDecoder_->decode(p, from, fromLen, rest);
- }
- Char c = (unsigned char)from[0];
- if (guessBytesPerChar_ > 1) {
- if (lsbFirst_)
- c |= (unsigned char)from[1] << 8;
- else {
- c <<= 8;
- c |= (unsigned char)from[1];
- }
- }
- static const Char startBytes[] = {
- ISO646_LT, ISO646_QUEST, ISO646_LETTER_x, ISO646_LETTER_m, ISO646_LETTER_l
- };
- // Stop accumulating the PI if we get characters that are illegal in the PI.
- if (c == 0
- || c >= 0x7F
- || (pi_.size() > 0 && c == ISO646_LT)
- || pi_.size() > piMaxSize
- || (pi_.size() < 5 && c != startBytes[pi_.size()])
- || (pi_.size() == 5 && !isWS(c))) {
- initDecoderDefault();
- phase_ = phaseFinish;
- break;
- }
- *p++ = c;
- pi_ += c;
- if (piLiteral_) {
- if (c == piLiteral_)
- piLiteral_ = 0;
- }
- else if (c == ISO646_QUOT || c == ISO646_APOS)
- piLiteral_ = c;
- }
- size_t n = p - to;
- if (phase_ == phaseFinish && fromLen > 0)
- n += subDecoder_->decode(p, from, fromLen, rest);
- return n;
-}
-
-Boolean XMLDecoder::convertOffset(unsigned long &n) const
-{
- if (n <= pi_.size())
- n *= guessBytesPerChar_;
- else {
- if (!subDecoder_)
- return 0;
- unsigned long tem = n - pi_.size();
- if (!subDecoder_->convertOffset(tem))
- return 0;
- n = tem + pi_.size() * guessBytesPerChar_;
- }
- if (byteOrderMark_)
- n += 2;
- return 1;
-}
-
-void XMLDecoder::initDecoderDefault()
-{
- if (guessBytesPerChar_ == 1) {
- UTF8CodingSystem utf8;
- subDecoder_ = utf8.makeDecoder();
- }
- else {
- unsigned short n = 0x1;
- minBytesPerChar_ = 2;
- subDecoder_ = new UCS2((*(char *)&n == 0x1) != lsbFirst_);
- }
-}
-
-void XMLDecoder::initDecoderPI()
-{
- StringC name;
- if (!extractEncoding(name))
- initDecoderDefault();
- const char *dummy;
- static const UnivCharsetDesc::Range range = { 0, 128, 0 };
- CharsetInfo piCharset(UnivCharsetDesc(&range, 1));
- const InputCodingSystem *ics
- = kit_->makeInputCodingSystem(name,
- piCharset,
- 0,
- dummy);
- if (ics) {
- subDecoder_ = ics->makeDecoder();
- minBytesPerChar_ = subDecoder_->minBytesPerChar();
- }
- if (!subDecoder_)
- initDecoderDefault();
-}
-
-Boolean XMLDecoder::isWS(Char c)
-{
- switch (c) {
- case ISO646_CR:
- case ISO646_LF:
- case ISO646_SPACE:
- case ISO646_TAB:
- return 1;
- }
- return 0;
-}
-
-Boolean XMLDecoder::extractEncoding(StringC &name)
-{
- Char lit = 0;
- for (size_t i = 5; i < pi_.size(); i++) {
- if (!lit) {
- if (pi_[i] == ISO646_APOS || pi_[i] == ISO646_QUOT)
- lit = pi_[i];
- else if (pi_[i] == ISO646_EQUAL) {
- size_t j = i;
- for (; j > 0; j--) {
- if (!isWS(pi_[j - 1]))
- break;
- }
- size_t nameEnd = j;
- for (; j > 0; j--) {
- if (isWS(pi_[j - 1]) || pi_[j - 1] == ISO646_QUOT || pi_[j - 1] == ISO646_APOS)
- break;
- }
- static const Char encodingName[] = {
- ISO646_LETTER_e, ISO646_LETTER_n, ISO646_LETTER_c, ISO646_LETTER_o,
- ISO646_LETTER_d, ISO646_LETTER_i, ISO646_LETTER_n, ISO646_LETTER_g,
- 0
- };
- const Char *s = encodingName;
- for (; *s && j < nameEnd; j++, s++)
- if (pi_[j] != *s)
- break;
- if (j == nameEnd && *s == 0) {
- size_t j = i + 1;
- for (; j < pi_.size(); j++) {
- if (!isWS(pi_[j]))
- break;
- }
- if (pi_[j] == ISO646_QUOT || pi_[j] == ISO646_APOS) {
- Char lit = pi_[j];
- size_t nameStart = j + 1;
- for (++j; j < pi_.size(); j++) {
- if (pi_[j] == lit) {
- if (j > nameStart) {
- name.assign(&pi_[nameStart], j - nameStart);
- return 1;
- }
- break;
- }
- }
- }
- return 0;
- }
- }
- }
- else if (pi_[i] == lit)
- lit = 0;
- }
- return 0;
-}
-
-XMLDecoder::UCS2::UCS2(Boolean swapBytes)
-: swapBytes_(swapBytes)
-{
-}
-
-size_t XMLDecoder::UCS2::decode(Char *to, const char *from, size_t fromLen,
- const char **rest)
-{
- union U {
- unsigned short word;
- char bytes[2];
- };
- fromLen &= ~1;
- *rest = from + fromLen;
- if (sizeof(Char) == 2) {
- if (!swapBytes_) {
- if (from != (char *)to)
- memmove(to, from, fromLen);
- return fromLen/2;
- }
- }
- if (swapBytes_) {
- for (size_t n = fromLen; n > 0; n -= 2) {
- U u;
- u.bytes[1] = *from++;
- u.bytes[0] = *from++;
- *to++ = u.word;
- }
- }
- else {
- for (size_t n = fromLen; n > 0; n -= 2) {
- U u;
- u.bytes[0] = *from++;
- u.bytes[1] = *from++;
- *to++ = u.word;
- }
- }
- return fromLen/2;
-}
-
-Boolean XMLDecoder::UCS2::convertOffset(unsigned long &n) const
-{
- n *= 2;
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#else /* not SP_MULTI_BYTE */
-
-#ifndef __GNUG__
-static char non_empty_translation_unit; // sigh
-#endif
-
-#endif /* not SP_MULTI_BYTE */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/app_inst.m4 b/usr/src/cmd/man/src/util/nsgmls.src/lib/app_inst.m4
deleted file mode 100644
index 9d0ba89f35..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/app_inst.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-
-#include "splib.h"
-
-#ifdef SP_MANUAL_INST
-
-#define SP_DEFINE_TEMPLATES
-#include "Vector.h"
-#include "Owner.h"
-#include "Options.h"
-#undef SP_DEFINE_TEMPLATES
-
-#include <stddef.h>
-#include "CodingSystem.h"
-#include "CmdLineApp.h"
-#include "Event.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-__instantiate(Vector<const CmdLineApp::AppChar *>)
-__instantiate(Owner<Encoder>)
-__instantiate(Options<CmdLineApp::AppChar>)
-__instantiate(Owner<EventHandler>)
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MANUAL_INST */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/arc_inst.m4 b/usr/src/cmd/man/src/util/nsgmls.src/lib/arc_inst.m4
deleted file mode 100644
index c7d58a2695..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/arc_inst.m4
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-
-#include "splib.h"
-
-#ifdef SP_MANUAL_INST
-
-#define SP_DEFINE_TEMPLATES
-#include "Vector.h"
-#include "NCVector.h"
-#include "Owner.h"
-#undef SP_DEFINE_TEMPLATES
-
-#include "ArcProcessor.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-__instantiate(NCVector<ArcProcessor>)
-__instantiate(Owner<ArcProcessor::MetaMapCache>)
-__instantiate(NCVector<Owner<ArcProcessor::MetaMapCache> >)
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MANUAL_INST */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/assert.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/assert.cxx
deleted file mode 100644
index 3d2781c73b..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/assert.cxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include <stdlib.h>
-#include "macros.h"
-
-#ifdef __GNUG__
-void exit(int) __attribute__((noreturn));
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-void assertionFailed(const char *, const char *, int)
-{
- abort();
- exit(1);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/big5.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/big5.h
deleted file mode 100644
index e230d82ca0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/big5.h
+++ /dev/null
@@ -1,1895 +0,0 @@
-/* Mapping from Big 5 to Unicode. */
-/* This is the same as MS code page 950, with 0xA2CC, 0xA2CE,
-0xF9DD-0xF9FE removed (because they are duplicates). */
-63, 0xa140,
-0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2027, 0xff1b, 0xff1a,
-0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xfe51, 0xfe52,
-0x00b7, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xff5c, 0x2013, 0xfe31,
-0x2014, 0xfe33, 0x2574, 0xfe34, 0xfe4f, 0xff08, 0xff09, 0xfe35,
-0xfe36, 0xff5b, 0xff5d, 0xfe37, 0xfe38, 0x3014, 0x3015, 0xfe39,
-0xfe3a, 0x3010, 0x3011, 0xfe3b, 0xfe3c, 0x300a, 0x300b, 0xfe3d,
-0xfe3e, 0x3008, 0x3009, 0xfe3f, 0xfe40, 0x300c, 0x300d, 0xfe41,
-0xfe42, 0x300e, 0x300f, 0xfe43, 0xfe44, 0xfe59, 0xfe5a,
-94, 0xa1a1,
-0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0x2018, 0x2019, 0x201c, 0x201d,
-0x301d, 0x301e, 0x2035, 0x2032, 0xff03, 0xff06, 0xff0a, 0x203b,
-0x00a7, 0x3003, 0x25cb, 0x25cf, 0x25b3, 0x25b2, 0x25ce, 0x2606,
-0x2605, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25bd, 0x25bc, 0x32a3,
-0x2105, 0x00af, 0xffe3, 0xff3f, 0x02cd, 0xfe49, 0xfe4a, 0xfe4d,
-0xfe4e, 0xfe4b, 0xfe4c, 0xfe5f, 0xfe60, 0xfe61, 0xff0b, 0xff0d,
-0x00d7, 0x00f7, 0x00b1, 0x221a, 0xff1c, 0xff1e, 0xff1d, 0x2266,
-0x2267, 0x2260, 0x221e, 0x2252, 0x2261, 0xfe62, 0xfe63, 0xfe64,
-0xfe65, 0xfe66, 0xff5e, 0x2229, 0x222a, 0x22a5, 0x2220, 0x221f,
-0x22bf, 0x33d2, 0x33d1, 0x222b, 0x222e, 0x2235, 0x2234, 0x2640,
-0x2642, 0x2295, 0x2299, 0x2191, 0x2193, 0x2190, 0x2192, 0x2196,
-0x2197, 0x2199, 0x2198, 0x2225, 0x2223, 0xff0f,
-63, 0xa240,
-0xff3c, 0x2215, 0xfe68, 0xff04, 0xffe5, 0x3012, 0xffe0, 0xffe1,
-0xff05, 0xff20, 0x2103, 0x2109, 0xfe69, 0xfe6a, 0xfe6b, 0x33d5,
-0x339c, 0x339d, 0x339e, 0x33ce, 0x33a1, 0x338e, 0x338f, 0x33c4,
-0x00b0, 0x5159, 0x515b, 0x515e, 0x515d, 0x5161, 0x5163, 0x55e7,
-0x74e9, 0x7cce, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586,
-0x2587, 0x2588, 0x258f, 0x258e, 0x258d, 0x258c, 0x258b, 0x258a,
-0x2589, 0x253c, 0x2534, 0x252c, 0x2524, 0x251c, 0x2594, 0x2500,
-0x2502, 0x2595, 0x250c, 0x2510, 0x2514, 0x2518, 0x256d,
-43, 0xa2a1,
-0x256e, 0x2570, 0x256f, 0x2550, 0x255e, 0x256a, 0x2561, 0x25e2,
-0x25e3, 0x25e5, 0x25e4, 0x2571, 0x2572, 0x2573, 0xff10, 0xff11,
-0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19,
-0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167,
-0x2168, 0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026,
-0x3027, 0x3028, 0x3029,
-1, 0xa2cd,
-0x5344,
-48, 0xa2cf,
-0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28,
-0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30,
-0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38,
-0xff39, 0xff3a, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46,
-0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e,
-0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56,
-63, 0xa340,
-0xff57, 0xff58, 0xff59, 0xff5a, 0x0391, 0x0392, 0x0393, 0x0394,
-0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c,
-0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5,
-0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, 0x03b3, 0x03b4,
-0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc,
-0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5,
-0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x3105, 0x3106, 0x3107, 0x3108,
-0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f,
-31, 0xa3a1,
-0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117,
-0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f,
-0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127,
-0x3128, 0x3129, 0x02d9, 0x02c9, 0x02ca, 0x02c7, 0x02cb,
-63, 0xa440,
-0x4e00, 0x4e59, 0x4e01, 0x4e03, 0x4e43, 0x4e5d, 0x4e86, 0x4e8c,
-0x4eba, 0x513f, 0x5165, 0x516b, 0x51e0, 0x5200, 0x5201, 0x529b,
-0x5315, 0x5341, 0x535c, 0x53c8, 0x4e09, 0x4e0b, 0x4e08, 0x4e0a,
-0x4e2b, 0x4e38, 0x51e1, 0x4e45, 0x4e48, 0x4e5f, 0x4e5e, 0x4e8e,
-0x4ea1, 0x5140, 0x5203, 0x52fa, 0x5343, 0x53c9, 0x53e3, 0x571f,
-0x58eb, 0x5915, 0x5927, 0x5973, 0x5b50, 0x5b51, 0x5b53, 0x5bf8,
-0x5c0f, 0x5c22, 0x5c38, 0x5c71, 0x5ddd, 0x5de5, 0x5df1, 0x5df2,
-0x5df3, 0x5dfe, 0x5e72, 0x5efe, 0x5f0b, 0x5f13, 0x624d,
-94, 0xa4a1,
-0x4e11, 0x4e10, 0x4e0d, 0x4e2d, 0x4e30, 0x4e39, 0x4e4b, 0x5c39,
-0x4e88, 0x4e91, 0x4e95, 0x4e92, 0x4e94, 0x4ea2, 0x4ec1, 0x4ec0,
-0x4ec3, 0x4ec6, 0x4ec7, 0x4ecd, 0x4eca, 0x4ecb, 0x4ec4, 0x5143,
-0x5141, 0x5167, 0x516d, 0x516e, 0x516c, 0x5197, 0x51f6, 0x5206,
-0x5207, 0x5208, 0x52fb, 0x52fe, 0x52ff, 0x5316, 0x5339, 0x5348,
-0x5347, 0x5345, 0x535e, 0x5384, 0x53cb, 0x53ca, 0x53cd, 0x58ec,
-0x5929, 0x592b, 0x592a, 0x592d, 0x5b54, 0x5c11, 0x5c24, 0x5c3a,
-0x5c6f, 0x5df4, 0x5e7b, 0x5eff, 0x5f14, 0x5f15, 0x5fc3, 0x6208,
-0x6236, 0x624b, 0x624e, 0x652f, 0x6587, 0x6597, 0x65a4, 0x65b9,
-0x65e5, 0x66f0, 0x6708, 0x6728, 0x6b20, 0x6b62, 0x6b79, 0x6bcb,
-0x6bd4, 0x6bdb, 0x6c0f, 0x6c34, 0x706b, 0x722a, 0x7236, 0x723b,
-0x7247, 0x7259, 0x725b, 0x72ac, 0x738b, 0x4e19,
-63, 0xa540,
-0x4e16, 0x4e15, 0x4e14, 0x4e18, 0x4e3b, 0x4e4d, 0x4e4f, 0x4e4e,
-0x4ee5, 0x4ed8, 0x4ed4, 0x4ed5, 0x4ed6, 0x4ed7, 0x4ee3, 0x4ee4,
-0x4ed9, 0x4ede, 0x5145, 0x5144, 0x5189, 0x518a, 0x51ac, 0x51f9,
-0x51fa, 0x51f8, 0x520a, 0x52a0, 0x529f, 0x5305, 0x5306, 0x5317,
-0x531d, 0x4edf, 0x534a, 0x5349, 0x5361, 0x5360, 0x536f, 0x536e,
-0x53bb, 0x53ef, 0x53e4, 0x53f3, 0x53ec, 0x53ee, 0x53e9, 0x53e8,
-0x53fc, 0x53f8, 0x53f5, 0x53eb, 0x53e6, 0x53ea, 0x53f2, 0x53f1,
-0x53f0, 0x53e5, 0x53ed, 0x53fb, 0x56db, 0x56da, 0x5916,
-94, 0xa5a1,
-0x592e, 0x5931, 0x5974, 0x5976, 0x5b55, 0x5b83, 0x5c3c, 0x5de8,
-0x5de7, 0x5de6, 0x5e02, 0x5e03, 0x5e73, 0x5e7c, 0x5f01, 0x5f18,
-0x5f17, 0x5fc5, 0x620a, 0x6253, 0x6254, 0x6252, 0x6251, 0x65a5,
-0x65e6, 0x672e, 0x672c, 0x672a, 0x672b, 0x672d, 0x6b63, 0x6bcd,
-0x6c11, 0x6c10, 0x6c38, 0x6c41, 0x6c40, 0x6c3e, 0x72af, 0x7384,
-0x7389, 0x74dc, 0x74e6, 0x7518, 0x751f, 0x7528, 0x7529, 0x7530,
-0x7531, 0x7532, 0x7533, 0x758b, 0x767d, 0x76ae, 0x76bf, 0x76ee,
-0x77db, 0x77e2, 0x77f3, 0x793a, 0x79be, 0x7a74, 0x7acb, 0x4e1e,
-0x4e1f, 0x4e52, 0x4e53, 0x4e69, 0x4e99, 0x4ea4, 0x4ea6, 0x4ea5,
-0x4eff, 0x4f09, 0x4f19, 0x4f0a, 0x4f15, 0x4f0d, 0x4f10, 0x4f11,
-0x4f0f, 0x4ef2, 0x4ef6, 0x4efb, 0x4ef0, 0x4ef3, 0x4efd, 0x4f01,
-0x4f0b, 0x5149, 0x5147, 0x5146, 0x5148, 0x5168,
-63, 0xa640,
-0x5171, 0x518d, 0x51b0, 0x5217, 0x5211, 0x5212, 0x520e, 0x5216,
-0x52a3, 0x5308, 0x5321, 0x5320, 0x5370, 0x5371, 0x5409, 0x540f,
-0x540c, 0x540a, 0x5410, 0x5401, 0x540b, 0x5404, 0x5411, 0x540d,
-0x5408, 0x5403, 0x540e, 0x5406, 0x5412, 0x56e0, 0x56de, 0x56dd,
-0x5733, 0x5730, 0x5728, 0x572d, 0x572c, 0x572f, 0x5729, 0x5919,
-0x591a, 0x5937, 0x5938, 0x5984, 0x5978, 0x5983, 0x597d, 0x5979,
-0x5982, 0x5981, 0x5b57, 0x5b58, 0x5b87, 0x5b88, 0x5b85, 0x5b89,
-0x5bfa, 0x5c16, 0x5c79, 0x5dde, 0x5e06, 0x5e76, 0x5e74,
-94, 0xa6a1,
-0x5f0f, 0x5f1b, 0x5fd9, 0x5fd6, 0x620e, 0x620c, 0x620d, 0x6210,
-0x6263, 0x625b, 0x6258, 0x6536, 0x65e9, 0x65e8, 0x65ec, 0x65ed,
-0x66f2, 0x66f3, 0x6709, 0x673d, 0x6734, 0x6731, 0x6735, 0x6b21,
-0x6b64, 0x6b7b, 0x6c16, 0x6c5d, 0x6c57, 0x6c59, 0x6c5f, 0x6c60,
-0x6c50, 0x6c55, 0x6c61, 0x6c5b, 0x6c4d, 0x6c4e, 0x7070, 0x725f,
-0x725d, 0x767e, 0x7af9, 0x7c73, 0x7cf8, 0x7f36, 0x7f8a, 0x7fbd,
-0x8001, 0x8003, 0x800c, 0x8012, 0x8033, 0x807f, 0x8089, 0x808b,
-0x808c, 0x81e3, 0x81ea, 0x81f3, 0x81fc, 0x820c, 0x821b, 0x821f,
-0x826e, 0x8272, 0x827e, 0x866b, 0x8840, 0x884c, 0x8863, 0x897f,
-0x9621, 0x4e32, 0x4ea8, 0x4f4d, 0x4f4f, 0x4f47, 0x4f57, 0x4f5e,
-0x4f34, 0x4f5b, 0x4f55, 0x4f30, 0x4f50, 0x4f51, 0x4f3d, 0x4f3a,
-0x4f38, 0x4f43, 0x4f54, 0x4f3c, 0x4f46, 0x4f63,
-63, 0xa740,
-0x4f5c, 0x4f60, 0x4f2f, 0x4f4e, 0x4f36, 0x4f59, 0x4f5d, 0x4f48,
-0x4f5a, 0x514c, 0x514b, 0x514d, 0x5175, 0x51b6, 0x51b7, 0x5225,
-0x5224, 0x5229, 0x522a, 0x5228, 0x52ab, 0x52a9, 0x52aa, 0x52ac,
-0x5323, 0x5373, 0x5375, 0x541d, 0x542d, 0x541e, 0x543e, 0x5426,
-0x544e, 0x5427, 0x5446, 0x5443, 0x5433, 0x5448, 0x5442, 0x541b,
-0x5429, 0x544a, 0x5439, 0x543b, 0x5438, 0x542e, 0x5435, 0x5436,
-0x5420, 0x543c, 0x5440, 0x5431, 0x542b, 0x541f, 0x542c, 0x56ea,
-0x56f0, 0x56e4, 0x56eb, 0x574a, 0x5751, 0x5740, 0x574d,
-94, 0xa7a1,
-0x5747, 0x574e, 0x573e, 0x5750, 0x574f, 0x573b, 0x58ef, 0x593e,
-0x599d, 0x5992, 0x59a8, 0x599e, 0x59a3, 0x5999, 0x5996, 0x598d,
-0x59a4, 0x5993, 0x598a, 0x59a5, 0x5b5d, 0x5b5c, 0x5b5a, 0x5b5b,
-0x5b8c, 0x5b8b, 0x5b8f, 0x5c2c, 0x5c40, 0x5c41, 0x5c3f, 0x5c3e,
-0x5c90, 0x5c91, 0x5c94, 0x5c8c, 0x5deb, 0x5e0c, 0x5e8f, 0x5e87,
-0x5e8a, 0x5ef7, 0x5f04, 0x5f1f, 0x5f64, 0x5f62, 0x5f77, 0x5f79,
-0x5fd8, 0x5fcc, 0x5fd7, 0x5fcd, 0x5ff1, 0x5feb, 0x5ff8, 0x5fea,
-0x6212, 0x6211, 0x6284, 0x6297, 0x6296, 0x6280, 0x6276, 0x6289,
-0x626d, 0x628a, 0x627c, 0x627e, 0x6279, 0x6273, 0x6292, 0x626f,
-0x6298, 0x626e, 0x6295, 0x6293, 0x6291, 0x6286, 0x6539, 0x653b,
-0x6538, 0x65f1, 0x66f4, 0x675f, 0x674e, 0x674f, 0x6750, 0x6751,
-0x675c, 0x6756, 0x675e, 0x6749, 0x6746, 0x6760,
-63, 0xa840,
-0x6753, 0x6757, 0x6b65, 0x6bcf, 0x6c42, 0x6c5e, 0x6c99, 0x6c81,
-0x6c88, 0x6c89, 0x6c85, 0x6c9b, 0x6c6a, 0x6c7a, 0x6c90, 0x6c70,
-0x6c8c, 0x6c68, 0x6c96, 0x6c92, 0x6c7d, 0x6c83, 0x6c72, 0x6c7e,
-0x6c74, 0x6c86, 0x6c76, 0x6c8d, 0x6c94, 0x6c98, 0x6c82, 0x7076,
-0x707c, 0x707d, 0x7078, 0x7262, 0x7261, 0x7260, 0x72c4, 0x72c2,
-0x7396, 0x752c, 0x752b, 0x7537, 0x7538, 0x7682, 0x76ef, 0x77e3,
-0x79c1, 0x79c0, 0x79bf, 0x7a76, 0x7cfb, 0x7f55, 0x8096, 0x8093,
-0x809d, 0x8098, 0x809b, 0x809a, 0x80b2, 0x826f, 0x8292,
-94, 0xa8a1,
-0x828b, 0x828d, 0x898b, 0x89d2, 0x8a00, 0x8c37, 0x8c46, 0x8c55,
-0x8c9d, 0x8d64, 0x8d70, 0x8db3, 0x8eab, 0x8eca, 0x8f9b, 0x8fb0,
-0x8fc2, 0x8fc6, 0x8fc5, 0x8fc4, 0x5de1, 0x9091, 0x90a2, 0x90aa,
-0x90a6, 0x90a3, 0x9149, 0x91c6, 0x91cc, 0x9632, 0x962e, 0x9631,
-0x962a, 0x962c, 0x4e26, 0x4e56, 0x4e73, 0x4e8b, 0x4e9b, 0x4e9e,
-0x4eab, 0x4eac, 0x4f6f, 0x4f9d, 0x4f8d, 0x4f73, 0x4f7f, 0x4f6c,
-0x4f9b, 0x4f8b, 0x4f86, 0x4f83, 0x4f70, 0x4f75, 0x4f88, 0x4f69,
-0x4f7b, 0x4f96, 0x4f7e, 0x4f8f, 0x4f91, 0x4f7a, 0x5154, 0x5152,
-0x5155, 0x5169, 0x5177, 0x5176, 0x5178, 0x51bd, 0x51fd, 0x523b,
-0x5238, 0x5237, 0x523a, 0x5230, 0x522e, 0x5236, 0x5241, 0x52be,
-0x52bb, 0x5352, 0x5354, 0x5353, 0x5351, 0x5366, 0x5377, 0x5378,
-0x5379, 0x53d6, 0x53d4, 0x53d7, 0x5473, 0x5475,
-63, 0xa940,
-0x5496, 0x5478, 0x5495, 0x5480, 0x547b, 0x5477, 0x5484, 0x5492,
-0x5486, 0x547c, 0x5490, 0x5471, 0x5476, 0x548c, 0x549a, 0x5462,
-0x5468, 0x548b, 0x547d, 0x548e, 0x56fa, 0x5783, 0x5777, 0x576a,
-0x5769, 0x5761, 0x5766, 0x5764, 0x577c, 0x591c, 0x5949, 0x5947,
-0x5948, 0x5944, 0x5954, 0x59be, 0x59bb, 0x59d4, 0x59b9, 0x59ae,
-0x59d1, 0x59c6, 0x59d0, 0x59cd, 0x59cb, 0x59d3, 0x59ca, 0x59af,
-0x59b3, 0x59d2, 0x59c5, 0x5b5f, 0x5b64, 0x5b63, 0x5b97, 0x5b9a,
-0x5b98, 0x5b9c, 0x5b99, 0x5b9b, 0x5c1a, 0x5c48, 0x5c45,
-94, 0xa9a1,
-0x5c46, 0x5cb7, 0x5ca1, 0x5cb8, 0x5ca9, 0x5cab, 0x5cb1, 0x5cb3,
-0x5e18, 0x5e1a, 0x5e16, 0x5e15, 0x5e1b, 0x5e11, 0x5e78, 0x5e9a,
-0x5e97, 0x5e9c, 0x5e95, 0x5e96, 0x5ef6, 0x5f26, 0x5f27, 0x5f29,
-0x5f80, 0x5f81, 0x5f7f, 0x5f7c, 0x5fdd, 0x5fe0, 0x5ffd, 0x5ff5,
-0x5fff, 0x600f, 0x6014, 0x602f, 0x6035, 0x6016, 0x602a, 0x6015,
-0x6021, 0x6027, 0x6029, 0x602b, 0x601b, 0x6216, 0x6215, 0x623f,
-0x623e, 0x6240, 0x627f, 0x62c9, 0x62cc, 0x62c4, 0x62bf, 0x62c2,
-0x62b9, 0x62d2, 0x62db, 0x62ab, 0x62d3, 0x62d4, 0x62cb, 0x62c8,
-0x62a8, 0x62bd, 0x62bc, 0x62d0, 0x62d9, 0x62c7, 0x62cd, 0x62b5,
-0x62da, 0x62b1, 0x62d8, 0x62d6, 0x62d7, 0x62c6, 0x62ac, 0x62ce,
-0x653e, 0x65a7, 0x65bc, 0x65fa, 0x6614, 0x6613, 0x660c, 0x6606,
-0x6602, 0x660e, 0x6600, 0x660f, 0x6615, 0x660a,
-63, 0xaa40,
-0x6607, 0x670d, 0x670b, 0x676d, 0x678b, 0x6795, 0x6771, 0x679c,
-0x6773, 0x6777, 0x6787, 0x679d, 0x6797, 0x676f, 0x6770, 0x677f,
-0x6789, 0x677e, 0x6790, 0x6775, 0x679a, 0x6793, 0x677c, 0x676a,
-0x6772, 0x6b23, 0x6b66, 0x6b67, 0x6b7f, 0x6c13, 0x6c1b, 0x6ce3,
-0x6ce8, 0x6cf3, 0x6cb1, 0x6ccc, 0x6ce5, 0x6cb3, 0x6cbd, 0x6cbe,
-0x6cbc, 0x6ce2, 0x6cab, 0x6cd5, 0x6cd3, 0x6cb8, 0x6cc4, 0x6cb9,
-0x6cc1, 0x6cae, 0x6cd7, 0x6cc5, 0x6cf1, 0x6cbf, 0x6cbb, 0x6ce1,
-0x6cdb, 0x6cca, 0x6cac, 0x6cef, 0x6cdc, 0x6cd6, 0x6ce0,
-94, 0xaaa1,
-0x7095, 0x708e, 0x7092, 0x708a, 0x7099, 0x722c, 0x722d, 0x7238,
-0x7248, 0x7267, 0x7269, 0x72c0, 0x72ce, 0x72d9, 0x72d7, 0x72d0,
-0x73a9, 0x73a8, 0x739f, 0x73ab, 0x73a5, 0x753d, 0x759d, 0x7599,
-0x759a, 0x7684, 0x76c2, 0x76f2, 0x76f4, 0x77e5, 0x77fd, 0x793e,
-0x7940, 0x7941, 0x79c9, 0x79c8, 0x7a7a, 0x7a79, 0x7afa, 0x7cfe,
-0x7f54, 0x7f8c, 0x7f8b, 0x8005, 0x80ba, 0x80a5, 0x80a2, 0x80b1,
-0x80a1, 0x80ab, 0x80a9, 0x80b4, 0x80aa, 0x80af, 0x81e5, 0x81fe,
-0x820d, 0x82b3, 0x829d, 0x8299, 0x82ad, 0x82bd, 0x829f, 0x82b9,
-0x82b1, 0x82ac, 0x82a5, 0x82af, 0x82b8, 0x82a3, 0x82b0, 0x82be,
-0x82b7, 0x864e, 0x8671, 0x521d, 0x8868, 0x8ecb, 0x8fce, 0x8fd4,
-0x8fd1, 0x90b5, 0x90b8, 0x90b1, 0x90b6, 0x91c7, 0x91d1, 0x9577,
-0x9580, 0x961c, 0x9640, 0x963f, 0x963b, 0x9644,
-63, 0xab40,
-0x9642, 0x96b9, 0x96e8, 0x9752, 0x975e, 0x4e9f, 0x4ead, 0x4eae,
-0x4fe1, 0x4fb5, 0x4faf, 0x4fbf, 0x4fe0, 0x4fd1, 0x4fcf, 0x4fdd,
-0x4fc3, 0x4fb6, 0x4fd8, 0x4fdf, 0x4fca, 0x4fd7, 0x4fae, 0x4fd0,
-0x4fc4, 0x4fc2, 0x4fda, 0x4fce, 0x4fde, 0x4fb7, 0x5157, 0x5192,
-0x5191, 0x51a0, 0x524e, 0x5243, 0x524a, 0x524d, 0x524c, 0x524b,
-0x5247, 0x52c7, 0x52c9, 0x52c3, 0x52c1, 0x530d, 0x5357, 0x537b,
-0x539a, 0x53db, 0x54ac, 0x54c0, 0x54a8, 0x54ce, 0x54c9, 0x54b8,
-0x54a6, 0x54b3, 0x54c7, 0x54c2, 0x54bd, 0x54aa, 0x54c1,
-94, 0xaba1,
-0x54c4, 0x54c8, 0x54af, 0x54ab, 0x54b1, 0x54bb, 0x54a9, 0x54a7,
-0x54bf, 0x56ff, 0x5782, 0x578b, 0x57a0, 0x57a3, 0x57a2, 0x57ce,
-0x57ae, 0x5793, 0x5955, 0x5951, 0x594f, 0x594e, 0x5950, 0x59dc,
-0x59d8, 0x59ff, 0x59e3, 0x59e8, 0x5a03, 0x59e5, 0x59ea, 0x59da,
-0x59e6, 0x5a01, 0x59fb, 0x5b69, 0x5ba3, 0x5ba6, 0x5ba4, 0x5ba2,
-0x5ba5, 0x5c01, 0x5c4e, 0x5c4f, 0x5c4d, 0x5c4b, 0x5cd9, 0x5cd2,
-0x5df7, 0x5e1d, 0x5e25, 0x5e1f, 0x5e7d, 0x5ea0, 0x5ea6, 0x5efa,
-0x5f08, 0x5f2d, 0x5f65, 0x5f88, 0x5f85, 0x5f8a, 0x5f8b, 0x5f87,
-0x5f8c, 0x5f89, 0x6012, 0x601d, 0x6020, 0x6025, 0x600e, 0x6028,
-0x604d, 0x6070, 0x6068, 0x6062, 0x6046, 0x6043, 0x606c, 0x606b,
-0x606a, 0x6064, 0x6241, 0x62dc, 0x6316, 0x6309, 0x62fc, 0x62ed,
-0x6301, 0x62ee, 0x62fd, 0x6307, 0x62f1, 0x62f7,
-63, 0xac40,
-0x62ef, 0x62ec, 0x62fe, 0x62f4, 0x6311, 0x6302, 0x653f, 0x6545,
-0x65ab, 0x65bd, 0x65e2, 0x6625, 0x662d, 0x6620, 0x6627, 0x662f,
-0x661f, 0x6628, 0x6631, 0x6624, 0x66f7, 0x67ff, 0x67d3, 0x67f1,
-0x67d4, 0x67d0, 0x67ec, 0x67b6, 0x67af, 0x67f5, 0x67e9, 0x67ef,
-0x67c4, 0x67d1, 0x67b4, 0x67da, 0x67e5, 0x67b8, 0x67cf, 0x67de,
-0x67f3, 0x67b0, 0x67d9, 0x67e2, 0x67dd, 0x67d2, 0x6b6a, 0x6b83,
-0x6b86, 0x6bb5, 0x6bd2, 0x6bd7, 0x6c1f, 0x6cc9, 0x6d0b, 0x6d32,
-0x6d2a, 0x6d41, 0x6d25, 0x6d0c, 0x6d31, 0x6d1e, 0x6d17,
-94, 0xaca1,
-0x6d3b, 0x6d3d, 0x6d3e, 0x6d36, 0x6d1b, 0x6cf5, 0x6d39, 0x6d27,
-0x6d38, 0x6d29, 0x6d2e, 0x6d35, 0x6d0e, 0x6d2b, 0x70ab, 0x70ba,
-0x70b3, 0x70ac, 0x70af, 0x70ad, 0x70b8, 0x70ae, 0x70a4, 0x7230,
-0x7272, 0x726f, 0x7274, 0x72e9, 0x72e0, 0x72e1, 0x73b7, 0x73ca,
-0x73bb, 0x73b2, 0x73cd, 0x73c0, 0x73b3, 0x751a, 0x752d, 0x754f,
-0x754c, 0x754e, 0x754b, 0x75ab, 0x75a4, 0x75a5, 0x75a2, 0x75a3,
-0x7678, 0x7686, 0x7687, 0x7688, 0x76c8, 0x76c6, 0x76c3, 0x76c5,
-0x7701, 0x76f9, 0x76f8, 0x7709, 0x770b, 0x76fe, 0x76fc, 0x7707,
-0x77dc, 0x7802, 0x7814, 0x780c, 0x780d, 0x7946, 0x7949, 0x7948,
-0x7947, 0x79b9, 0x79ba, 0x79d1, 0x79d2, 0x79cb, 0x7a7f, 0x7a81,
-0x7aff, 0x7afd, 0x7c7d, 0x7d02, 0x7d05, 0x7d00, 0x7d09, 0x7d07,
-0x7d04, 0x7d06, 0x7f38, 0x7f8e, 0x7fbf, 0x8004,
-63, 0xad40,
-0x8010, 0x800d, 0x8011, 0x8036, 0x80d6, 0x80e5, 0x80da, 0x80c3,
-0x80c4, 0x80cc, 0x80e1, 0x80db, 0x80ce, 0x80de, 0x80e4, 0x80dd,
-0x81f4, 0x8222, 0x82e7, 0x8303, 0x8305, 0x82e3, 0x82db, 0x82e6,
-0x8304, 0x82e5, 0x8302, 0x8309, 0x82d2, 0x82d7, 0x82f1, 0x8301,
-0x82dc, 0x82d4, 0x82d1, 0x82de, 0x82d3, 0x82df, 0x82ef, 0x8306,
-0x8650, 0x8679, 0x867b, 0x867a, 0x884d, 0x886b, 0x8981, 0x89d4,
-0x8a08, 0x8a02, 0x8a03, 0x8c9e, 0x8ca0, 0x8d74, 0x8d73, 0x8db4,
-0x8ecd, 0x8ecc, 0x8ff0, 0x8fe6, 0x8fe2, 0x8fea, 0x8fe5,
-94, 0xada1,
-0x8fed, 0x8feb, 0x8fe4, 0x8fe8, 0x90ca, 0x90ce, 0x90c1, 0x90c3,
-0x914b, 0x914a, 0x91cd, 0x9582, 0x9650, 0x964b, 0x964c, 0x964d,
-0x9762, 0x9769, 0x97cb, 0x97ed, 0x97f3, 0x9801, 0x98a8, 0x98db,
-0x98df, 0x9996, 0x9999, 0x4e58, 0x4eb3, 0x500c, 0x500d, 0x5023,
-0x4fef, 0x5026, 0x5025, 0x4ff8, 0x5029, 0x5016, 0x5006, 0x503c,
-0x501f, 0x501a, 0x5012, 0x5011, 0x4ffa, 0x5000, 0x5014, 0x5028,
-0x4ff1, 0x5021, 0x500b, 0x5019, 0x5018, 0x4ff3, 0x4fee, 0x502d,
-0x502a, 0x4ffe, 0x502b, 0x5009, 0x517c, 0x51a4, 0x51a5, 0x51a2,
-0x51cd, 0x51cc, 0x51c6, 0x51cb, 0x5256, 0x525c, 0x5254, 0x525b,
-0x525d, 0x532a, 0x537f, 0x539f, 0x539d, 0x53df, 0x54e8, 0x5510,
-0x5501, 0x5537, 0x54fc, 0x54e5, 0x54f2, 0x5506, 0x54fa, 0x5514,
-0x54e9, 0x54ed, 0x54e1, 0x5509, 0x54ee, 0x54ea,
-63, 0xae40,
-0x54e6, 0x5527, 0x5507, 0x54fd, 0x550f, 0x5703, 0x5704, 0x57c2,
-0x57d4, 0x57cb, 0x57c3, 0x5809, 0x590f, 0x5957, 0x5958, 0x595a,
-0x5a11, 0x5a18, 0x5a1c, 0x5a1f, 0x5a1b, 0x5a13, 0x59ec, 0x5a20,
-0x5a23, 0x5a29, 0x5a25, 0x5a0c, 0x5a09, 0x5b6b, 0x5c58, 0x5bb0,
-0x5bb3, 0x5bb6, 0x5bb4, 0x5bae, 0x5bb5, 0x5bb9, 0x5bb8, 0x5c04,
-0x5c51, 0x5c55, 0x5c50, 0x5ced, 0x5cfd, 0x5cfb, 0x5cea, 0x5ce8,
-0x5cf0, 0x5cf6, 0x5d01, 0x5cf4, 0x5dee, 0x5e2d, 0x5e2b, 0x5eab,
-0x5ead, 0x5ea7, 0x5f31, 0x5f92, 0x5f91, 0x5f90, 0x6059,
-94, 0xaea1,
-0x6063, 0x6065, 0x6050, 0x6055, 0x606d, 0x6069, 0x606f, 0x6084,
-0x609f, 0x609a, 0x608d, 0x6094, 0x608c, 0x6085, 0x6096, 0x6247,
-0x62f3, 0x6308, 0x62ff, 0x634e, 0x633e, 0x632f, 0x6355, 0x6342,
-0x6346, 0x634f, 0x6349, 0x633a, 0x6350, 0x633d, 0x632a, 0x632b,
-0x6328, 0x634d, 0x634c, 0x6548, 0x6549, 0x6599, 0x65c1, 0x65c5,
-0x6642, 0x6649, 0x664f, 0x6643, 0x6652, 0x664c, 0x6645, 0x6641,
-0x66f8, 0x6714, 0x6715, 0x6717, 0x6821, 0x6838, 0x6848, 0x6846,
-0x6853, 0x6839, 0x6842, 0x6854, 0x6829, 0x68b3, 0x6817, 0x684c,
-0x6851, 0x683d, 0x67f4, 0x6850, 0x6840, 0x683c, 0x6843, 0x682a,
-0x6845, 0x6813, 0x6818, 0x6841, 0x6b8a, 0x6b89, 0x6bb7, 0x6c23,
-0x6c27, 0x6c28, 0x6c26, 0x6c24, 0x6cf0, 0x6d6a, 0x6d95, 0x6d88,
-0x6d87, 0x6d66, 0x6d78, 0x6d77, 0x6d59, 0x6d93,
-63, 0xaf40,
-0x6d6c, 0x6d89, 0x6d6e, 0x6d5a, 0x6d74, 0x6d69, 0x6d8c, 0x6d8a,
-0x6d79, 0x6d85, 0x6d65, 0x6d94, 0x70ca, 0x70d8, 0x70e4, 0x70d9,
-0x70c8, 0x70cf, 0x7239, 0x7279, 0x72fc, 0x72f9, 0x72fd, 0x72f8,
-0x72f7, 0x7386, 0x73ed, 0x7409, 0x73ee, 0x73e0, 0x73ea, 0x73de,
-0x7554, 0x755d, 0x755c, 0x755a, 0x7559, 0x75be, 0x75c5, 0x75c7,
-0x75b2, 0x75b3, 0x75bd, 0x75bc, 0x75b9, 0x75c2, 0x75b8, 0x768b,
-0x76b0, 0x76ca, 0x76cd, 0x76ce, 0x7729, 0x771f, 0x7720, 0x7728,
-0x77e9, 0x7830, 0x7827, 0x7838, 0x781d, 0x7834, 0x7837,
-94, 0xafa1,
-0x7825, 0x782d, 0x7820, 0x781f, 0x7832, 0x7955, 0x7950, 0x7960,
-0x795f, 0x7956, 0x795e, 0x795d, 0x7957, 0x795a, 0x79e4, 0x79e3,
-0x79e7, 0x79df, 0x79e6, 0x79e9, 0x79d8, 0x7a84, 0x7a88, 0x7ad9,
-0x7b06, 0x7b11, 0x7c89, 0x7d21, 0x7d17, 0x7d0b, 0x7d0a, 0x7d20,
-0x7d22, 0x7d14, 0x7d10, 0x7d15, 0x7d1a, 0x7d1c, 0x7d0d, 0x7d19,
-0x7d1b, 0x7f3a, 0x7f5f, 0x7f94, 0x7fc5, 0x7fc1, 0x8006, 0x8018,
-0x8015, 0x8019, 0x8017, 0x803d, 0x803f, 0x80f1, 0x8102, 0x80f0,
-0x8105, 0x80ed, 0x80f4, 0x8106, 0x80f8, 0x80f3, 0x8108, 0x80fd,
-0x810a, 0x80fc, 0x80ef, 0x81ed, 0x81ec, 0x8200, 0x8210, 0x822a,
-0x822b, 0x8228, 0x822c, 0x82bb, 0x832b, 0x8352, 0x8354, 0x834a,
-0x8338, 0x8350, 0x8349, 0x8335, 0x8334, 0x834f, 0x8332, 0x8339,
-0x8336, 0x8317, 0x8340, 0x8331, 0x8328, 0x8343,
-63, 0xb040,
-0x8654, 0x868a, 0x86aa, 0x8693, 0x86a4, 0x86a9, 0x868c, 0x86a3,
-0x869c, 0x8870, 0x8877, 0x8881, 0x8882, 0x887d, 0x8879, 0x8a18,
-0x8a10, 0x8a0e, 0x8a0c, 0x8a15, 0x8a0a, 0x8a17, 0x8a13, 0x8a16,
-0x8a0f, 0x8a11, 0x8c48, 0x8c7a, 0x8c79, 0x8ca1, 0x8ca2, 0x8d77,
-0x8eac, 0x8ed2, 0x8ed4, 0x8ecf, 0x8fb1, 0x9001, 0x9006, 0x8ff7,
-0x9000, 0x8ffa, 0x8ff4, 0x9003, 0x8ffd, 0x9005, 0x8ff8, 0x9095,
-0x90e1, 0x90dd, 0x90e2, 0x9152, 0x914d, 0x914c, 0x91d8, 0x91dd,
-0x91d7, 0x91dc, 0x91d9, 0x9583, 0x9662, 0x9663, 0x9661,
-94, 0xb0a1,
-0x965b, 0x965d, 0x9664, 0x9658, 0x965e, 0x96bb, 0x98e2, 0x99ac,
-0x9aa8, 0x9ad8, 0x9b25, 0x9b32, 0x9b3c, 0x4e7e, 0x507a, 0x507d,
-0x505c, 0x5047, 0x5043, 0x504c, 0x505a, 0x5049, 0x5065, 0x5076,
-0x504e, 0x5055, 0x5075, 0x5074, 0x5077, 0x504f, 0x500f, 0x506f,
-0x506d, 0x515c, 0x5195, 0x51f0, 0x526a, 0x526f, 0x52d2, 0x52d9,
-0x52d8, 0x52d5, 0x5310, 0x530f, 0x5319, 0x533f, 0x5340, 0x533e,
-0x53c3, 0x66fc, 0x5546, 0x556a, 0x5566, 0x5544, 0x555e, 0x5561,
-0x5543, 0x554a, 0x5531, 0x5556, 0x554f, 0x5555, 0x552f, 0x5564,
-0x5538, 0x552e, 0x555c, 0x552c, 0x5563, 0x5533, 0x5541, 0x5557,
-0x5708, 0x570b, 0x5709, 0x57df, 0x5805, 0x580a, 0x5806, 0x57e0,
-0x57e4, 0x57fa, 0x5802, 0x5835, 0x57f7, 0x57f9, 0x5920, 0x5962,
-0x5a36, 0x5a41, 0x5a49, 0x5a66, 0x5a6a, 0x5a40,
-63, 0xb140,
-0x5a3c, 0x5a62, 0x5a5a, 0x5a46, 0x5a4a, 0x5b70, 0x5bc7, 0x5bc5,
-0x5bc4, 0x5bc2, 0x5bbf, 0x5bc6, 0x5c09, 0x5c08, 0x5c07, 0x5c60,
-0x5c5c, 0x5c5d, 0x5d07, 0x5d06, 0x5d0e, 0x5d1b, 0x5d16, 0x5d22,
-0x5d11, 0x5d29, 0x5d14, 0x5d19, 0x5d24, 0x5d27, 0x5d17, 0x5de2,
-0x5e38, 0x5e36, 0x5e33, 0x5e37, 0x5eb7, 0x5eb8, 0x5eb6, 0x5eb5,
-0x5ebe, 0x5f35, 0x5f37, 0x5f57, 0x5f6c, 0x5f69, 0x5f6b, 0x5f97,
-0x5f99, 0x5f9e, 0x5f98, 0x5fa1, 0x5fa0, 0x5f9c, 0x607f, 0x60a3,
-0x6089, 0x60a0, 0x60a8, 0x60cb, 0x60b4, 0x60e6, 0x60bd,
-94, 0xb1a1,
-0x60c5, 0x60bb, 0x60b5, 0x60dc, 0x60bc, 0x60d8, 0x60d5, 0x60c6,
-0x60df, 0x60b8, 0x60da, 0x60c7, 0x621a, 0x621b, 0x6248, 0x63a0,
-0x63a7, 0x6372, 0x6396, 0x63a2, 0x63a5, 0x6377, 0x6367, 0x6398,
-0x63aa, 0x6371, 0x63a9, 0x6389, 0x6383, 0x639b, 0x636b, 0x63a8,
-0x6384, 0x6388, 0x6399, 0x63a1, 0x63ac, 0x6392, 0x638f, 0x6380,
-0x637b, 0x6369, 0x6368, 0x637a, 0x655d, 0x6556, 0x6551, 0x6559,
-0x6557, 0x555f, 0x654f, 0x6558, 0x6555, 0x6554, 0x659c, 0x659b,
-0x65ac, 0x65cf, 0x65cb, 0x65cc, 0x65ce, 0x665d, 0x665a, 0x6664,
-0x6668, 0x6666, 0x665e, 0x66f9, 0x52d7, 0x671b, 0x6881, 0x68af,
-0x68a2, 0x6893, 0x68b5, 0x687f, 0x6876, 0x68b1, 0x68a7, 0x6897,
-0x68b0, 0x6883, 0x68c4, 0x68ad, 0x6886, 0x6885, 0x6894, 0x689d,
-0x68a8, 0x689f, 0x68a1, 0x6882, 0x6b32, 0x6bba,
-63, 0xb240,
-0x6beb, 0x6bec, 0x6c2b, 0x6d8e, 0x6dbc, 0x6df3, 0x6dd9, 0x6db2,
-0x6de1, 0x6dcc, 0x6de4, 0x6dfb, 0x6dfa, 0x6e05, 0x6dc7, 0x6dcb,
-0x6daf, 0x6dd1, 0x6dae, 0x6dde, 0x6df9, 0x6db8, 0x6df7, 0x6df5,
-0x6dc5, 0x6dd2, 0x6e1a, 0x6db5, 0x6dda, 0x6deb, 0x6dd8, 0x6dea,
-0x6df1, 0x6dee, 0x6de8, 0x6dc6, 0x6dc4, 0x6daa, 0x6dec, 0x6dbf,
-0x6de6, 0x70f9, 0x7109, 0x710a, 0x70fd, 0x70ef, 0x723d, 0x727d,
-0x7281, 0x731c, 0x731b, 0x7316, 0x7313, 0x7319, 0x7387, 0x7405,
-0x740a, 0x7403, 0x7406, 0x73fe, 0x740d, 0x74e0, 0x74f6,
-94, 0xb2a1,
-0x74f7, 0x751c, 0x7522, 0x7565, 0x7566, 0x7562, 0x7570, 0x758f,
-0x75d4, 0x75d5, 0x75b5, 0x75ca, 0x75cd, 0x768e, 0x76d4, 0x76d2,
-0x76db, 0x7737, 0x773e, 0x773c, 0x7736, 0x7738, 0x773a, 0x786b,
-0x7843, 0x784e, 0x7965, 0x7968, 0x796d, 0x79fb, 0x7a92, 0x7a95,
-0x7b20, 0x7b28, 0x7b1b, 0x7b2c, 0x7b26, 0x7b19, 0x7b1e, 0x7b2e,
-0x7c92, 0x7c97, 0x7c95, 0x7d46, 0x7d43, 0x7d71, 0x7d2e, 0x7d39,
-0x7d3c, 0x7d40, 0x7d30, 0x7d33, 0x7d44, 0x7d2f, 0x7d42, 0x7d32,
-0x7d31, 0x7f3d, 0x7f9e, 0x7f9a, 0x7fcc, 0x7fce, 0x7fd2, 0x801c,
-0x804a, 0x8046, 0x812f, 0x8116, 0x8123, 0x812b, 0x8129, 0x8130,
-0x8124, 0x8202, 0x8235, 0x8237, 0x8236, 0x8239, 0x838e, 0x839e,
-0x8398, 0x8378, 0x83a2, 0x8396, 0x83bd, 0x83ab, 0x8392, 0x838a,
-0x8393, 0x8389, 0x83a0, 0x8377, 0x837b, 0x837c,
-63, 0xb340,
-0x8386, 0x83a7, 0x8655, 0x5f6a, 0x86c7, 0x86c0, 0x86b6, 0x86c4,
-0x86b5, 0x86c6, 0x86cb, 0x86b1, 0x86af, 0x86c9, 0x8853, 0x889e,
-0x8888, 0x88ab, 0x8892, 0x8896, 0x888d, 0x888b, 0x8993, 0x898f,
-0x8a2a, 0x8a1d, 0x8a23, 0x8a25, 0x8a31, 0x8a2d, 0x8a1f, 0x8a1b,
-0x8a22, 0x8c49, 0x8c5a, 0x8ca9, 0x8cac, 0x8cab, 0x8ca8, 0x8caa,
-0x8ca7, 0x8d67, 0x8d66, 0x8dbe, 0x8dba, 0x8edb, 0x8edf, 0x9019,
-0x900d, 0x901a, 0x9017, 0x9023, 0x901f, 0x901d, 0x9010, 0x9015,
-0x901e, 0x9020, 0x900f, 0x9022, 0x9016, 0x901b, 0x9014,
-94, 0xb3a1,
-0x90e8, 0x90ed, 0x90fd, 0x9157, 0x91ce, 0x91f5, 0x91e6, 0x91e3,
-0x91e7, 0x91ed, 0x91e9, 0x9589, 0x966a, 0x9675, 0x9673, 0x9678,
-0x9670, 0x9674, 0x9676, 0x9677, 0x966c, 0x96c0, 0x96ea, 0x96e9,
-0x7ae0, 0x7adf, 0x9802, 0x9803, 0x9b5a, 0x9ce5, 0x9e75, 0x9e7f,
-0x9ea5, 0x9ebb, 0x50a2, 0x508d, 0x5085, 0x5099, 0x5091, 0x5080,
-0x5096, 0x5098, 0x509a, 0x6700, 0x51f1, 0x5272, 0x5274, 0x5275,
-0x5269, 0x52de, 0x52dd, 0x52db, 0x535a, 0x53a5, 0x557b, 0x5580,
-0x55a7, 0x557c, 0x558a, 0x559d, 0x5598, 0x5582, 0x559c, 0x55aa,
-0x5594, 0x5587, 0x558b, 0x5583, 0x55b3, 0x55ae, 0x559f, 0x553e,
-0x55b2, 0x559a, 0x55bb, 0x55ac, 0x55b1, 0x557e, 0x5589, 0x55ab,
-0x5599, 0x570d, 0x582f, 0x582a, 0x5834, 0x5824, 0x5830, 0x5831,
-0x5821, 0x581d, 0x5820, 0x58f9, 0x58fa, 0x5960,
-63, 0xb440,
-0x5a77, 0x5a9a, 0x5a7f, 0x5a92, 0x5a9b, 0x5aa7, 0x5b73, 0x5b71,
-0x5bd2, 0x5bcc, 0x5bd3, 0x5bd0, 0x5c0a, 0x5c0b, 0x5c31, 0x5d4c,
-0x5d50, 0x5d34, 0x5d47, 0x5dfd, 0x5e45, 0x5e3d, 0x5e40, 0x5e43,
-0x5e7e, 0x5eca, 0x5ec1, 0x5ec2, 0x5ec4, 0x5f3c, 0x5f6d, 0x5fa9,
-0x5faa, 0x5fa8, 0x60d1, 0x60e1, 0x60b2, 0x60b6, 0x60e0, 0x611c,
-0x6123, 0x60fa, 0x6115, 0x60f0, 0x60fb, 0x60f4, 0x6168, 0x60f1,
-0x610e, 0x60f6, 0x6109, 0x6100, 0x6112, 0x621f, 0x6249, 0x63a3,
-0x638c, 0x63cf, 0x63c0, 0x63e9, 0x63c9, 0x63c6, 0x63cd,
-94, 0xb4a1,
-0x63d2, 0x63e3, 0x63d0, 0x63e1, 0x63d6, 0x63ed, 0x63ee, 0x6376,
-0x63f4, 0x63ea, 0x63db, 0x6452, 0x63da, 0x63f9, 0x655e, 0x6566,
-0x6562, 0x6563, 0x6591, 0x6590, 0x65af, 0x666e, 0x6670, 0x6674,
-0x6676, 0x666f, 0x6691, 0x667a, 0x667e, 0x6677, 0x66fe, 0x66ff,
-0x671f, 0x671d, 0x68fa, 0x68d5, 0x68e0, 0x68d8, 0x68d7, 0x6905,
-0x68df, 0x68f5, 0x68ee, 0x68e7, 0x68f9, 0x68d2, 0x68f2, 0x68e3,
-0x68cb, 0x68cd, 0x690d, 0x6912, 0x690e, 0x68c9, 0x68da, 0x696e,
-0x68fb, 0x6b3e, 0x6b3a, 0x6b3d, 0x6b98, 0x6b96, 0x6bbc, 0x6bef,
-0x6c2e, 0x6c2f, 0x6c2c, 0x6e2f, 0x6e38, 0x6e54, 0x6e21, 0x6e32,
-0x6e67, 0x6e4a, 0x6e20, 0x6e25, 0x6e23, 0x6e1b, 0x6e5b, 0x6e58,
-0x6e24, 0x6e56, 0x6e6e, 0x6e2d, 0x6e26, 0x6e6f, 0x6e34, 0x6e4d,
-0x6e3a, 0x6e2c, 0x6e43, 0x6e1d, 0x6e3e, 0x6ecb,
-63, 0xb540,
-0x6e89, 0x6e19, 0x6e4e, 0x6e63, 0x6e44, 0x6e72, 0x6e69, 0x6e5f,
-0x7119, 0x711a, 0x7126, 0x7130, 0x7121, 0x7136, 0x716e, 0x711c,
-0x724c, 0x7284, 0x7280, 0x7336, 0x7325, 0x7334, 0x7329, 0x743a,
-0x742a, 0x7433, 0x7422, 0x7425, 0x7435, 0x7436, 0x7434, 0x742f,
-0x741b, 0x7426, 0x7428, 0x7525, 0x7526, 0x756b, 0x756a, 0x75e2,
-0x75db, 0x75e3, 0x75d9, 0x75d8, 0x75de, 0x75e0, 0x767b, 0x767c,
-0x7696, 0x7693, 0x76b4, 0x76dc, 0x774f, 0x77ed, 0x785d, 0x786c,
-0x786f, 0x7a0d, 0x7a08, 0x7a0b, 0x7a05, 0x7a00, 0x7a98,
-94, 0xb5a1,
-0x7a97, 0x7a96, 0x7ae5, 0x7ae3, 0x7b49, 0x7b56, 0x7b46, 0x7b50,
-0x7b52, 0x7b54, 0x7b4d, 0x7b4b, 0x7b4f, 0x7b51, 0x7c9f, 0x7ca5,
-0x7d5e, 0x7d50, 0x7d68, 0x7d55, 0x7d2b, 0x7d6e, 0x7d72, 0x7d61,
-0x7d66, 0x7d62, 0x7d70, 0x7d73, 0x5584, 0x7fd4, 0x7fd5, 0x800b,
-0x8052, 0x8085, 0x8155, 0x8154, 0x814b, 0x8151, 0x814e, 0x8139,
-0x8146, 0x813e, 0x814c, 0x8153, 0x8174, 0x8212, 0x821c, 0x83e9,
-0x8403, 0x83f8, 0x840d, 0x83e0, 0x83c5, 0x840b, 0x83c1, 0x83ef,
-0x83f1, 0x83f4, 0x8457, 0x840a, 0x83f0, 0x840c, 0x83cc, 0x83fd,
-0x83f2, 0x83ca, 0x8438, 0x840e, 0x8404, 0x83dc, 0x8407, 0x83d4,
-0x83df, 0x865b, 0x86df, 0x86d9, 0x86ed, 0x86d4, 0x86db, 0x86e4,
-0x86d0, 0x86de, 0x8857, 0x88c1, 0x88c2, 0x88b1, 0x8983, 0x8996,
-0x8a3b, 0x8a60, 0x8a55, 0x8a5e, 0x8a3c, 0x8a41,
-63, 0xb640,
-0x8a54, 0x8a5b, 0x8a50, 0x8a46, 0x8a34, 0x8a3a, 0x8a36, 0x8a56,
-0x8c61, 0x8c82, 0x8caf, 0x8cbc, 0x8cb3, 0x8cbd, 0x8cc1, 0x8cbb,
-0x8cc0, 0x8cb4, 0x8cb7, 0x8cb6, 0x8cbf, 0x8cb8, 0x8d8a, 0x8d85,
-0x8d81, 0x8dce, 0x8ddd, 0x8dcb, 0x8dda, 0x8dd1, 0x8dcc, 0x8ddb,
-0x8dc6, 0x8efb, 0x8ef8, 0x8efc, 0x8f9c, 0x902e, 0x9035, 0x9031,
-0x9038, 0x9032, 0x9036, 0x9102, 0x90f5, 0x9109, 0x90fe, 0x9163,
-0x9165, 0x91cf, 0x9214, 0x9215, 0x9223, 0x9209, 0x921e, 0x920d,
-0x9210, 0x9207, 0x9211, 0x9594, 0x958f, 0x958b, 0x9591,
-94, 0xb6a1,
-0x9593, 0x9592, 0x958e, 0x968a, 0x968e, 0x968b, 0x967d, 0x9685,
-0x9686, 0x968d, 0x9672, 0x9684, 0x96c1, 0x96c5, 0x96c4, 0x96c6,
-0x96c7, 0x96ef, 0x96f2, 0x97cc, 0x9805, 0x9806, 0x9808, 0x98e7,
-0x98ea, 0x98ef, 0x98e9, 0x98f2, 0x98ed, 0x99ae, 0x99ad, 0x9ec3,
-0x9ecd, 0x9ed1, 0x4e82, 0x50ad, 0x50b5, 0x50b2, 0x50b3, 0x50c5,
-0x50be, 0x50ac, 0x50b7, 0x50bb, 0x50af, 0x50c7, 0x527f, 0x5277,
-0x527d, 0x52df, 0x52e6, 0x52e4, 0x52e2, 0x52e3, 0x532f, 0x55df,
-0x55e8, 0x55d3, 0x55e6, 0x55ce, 0x55dc, 0x55c7, 0x55d1, 0x55e3,
-0x55e4, 0x55ef, 0x55da, 0x55e1, 0x55c5, 0x55c6, 0x55e5, 0x55c9,
-0x5712, 0x5713, 0x585e, 0x5851, 0x5858, 0x5857, 0x585a, 0x5854,
-0x586b, 0x584c, 0x586d, 0x584a, 0x5862, 0x5852, 0x584b, 0x5967,
-0x5ac1, 0x5ac9, 0x5acc, 0x5abe, 0x5abd, 0x5abc,
-63, 0xb740,
-0x5ab3, 0x5ac2, 0x5ab2, 0x5d69, 0x5d6f, 0x5e4c, 0x5e79, 0x5ec9,
-0x5ec8, 0x5f12, 0x5f59, 0x5fac, 0x5fae, 0x611a, 0x610f, 0x6148,
-0x611f, 0x60f3, 0x611b, 0x60f9, 0x6101, 0x6108, 0x614e, 0x614c,
-0x6144, 0x614d, 0x613e, 0x6134, 0x6127, 0x610d, 0x6106, 0x6137,
-0x6221, 0x6222, 0x6413, 0x643e, 0x641e, 0x642a, 0x642d, 0x643d,
-0x642c, 0x640f, 0x641c, 0x6414, 0x640d, 0x6436, 0x6416, 0x6417,
-0x6406, 0x656c, 0x659f, 0x65b0, 0x6697, 0x6689, 0x6687, 0x6688,
-0x6696, 0x6684, 0x6698, 0x668d, 0x6703, 0x6994, 0x696d,
-94, 0xb7a1,
-0x695a, 0x6977, 0x6960, 0x6954, 0x6975, 0x6930, 0x6982, 0x694a,
-0x6968, 0x696b, 0x695e, 0x6953, 0x6979, 0x6986, 0x695d, 0x6963,
-0x695b, 0x6b47, 0x6b72, 0x6bc0, 0x6bbf, 0x6bd3, 0x6bfd, 0x6ea2,
-0x6eaf, 0x6ed3, 0x6eb6, 0x6ec2, 0x6e90, 0x6e9d, 0x6ec7, 0x6ec5,
-0x6ea5, 0x6e98, 0x6ebc, 0x6eba, 0x6eab, 0x6ed1, 0x6e96, 0x6e9c,
-0x6ec4, 0x6ed4, 0x6eaa, 0x6ea7, 0x6eb4, 0x714e, 0x7159, 0x7169,
-0x7164, 0x7149, 0x7167, 0x715c, 0x716c, 0x7166, 0x714c, 0x7165,
-0x715e, 0x7146, 0x7168, 0x7156, 0x723a, 0x7252, 0x7337, 0x7345,
-0x733f, 0x733e, 0x746f, 0x745a, 0x7455, 0x745f, 0x745e, 0x7441,
-0x743f, 0x7459, 0x745b, 0x745c, 0x7576, 0x7578, 0x7600, 0x75f0,
-0x7601, 0x75f2, 0x75f1, 0x75fa, 0x75ff, 0x75f4, 0x75f3, 0x76de,
-0x76df, 0x775b, 0x776b, 0x7766, 0x775e, 0x7763,
-63, 0xb840,
-0x7779, 0x776a, 0x776c, 0x775c, 0x7765, 0x7768, 0x7762, 0x77ee,
-0x788e, 0x78b0, 0x7897, 0x7898, 0x788c, 0x7889, 0x787c, 0x7891,
-0x7893, 0x787f, 0x797a, 0x797f, 0x7981, 0x842c, 0x79bd, 0x7a1c,
-0x7a1a, 0x7a20, 0x7a14, 0x7a1f, 0x7a1e, 0x7a9f, 0x7aa0, 0x7b77,
-0x7bc0, 0x7b60, 0x7b6e, 0x7b67, 0x7cb1, 0x7cb3, 0x7cb5, 0x7d93,
-0x7d79, 0x7d91, 0x7d81, 0x7d8f, 0x7d5b, 0x7f6e, 0x7f69, 0x7f6a,
-0x7f72, 0x7fa9, 0x7fa8, 0x7fa4, 0x8056, 0x8058, 0x8086, 0x8084,
-0x8171, 0x8170, 0x8178, 0x8165, 0x816e, 0x8173, 0x816b,
-94, 0xb8a1,
-0x8179, 0x817a, 0x8166, 0x8205, 0x8247, 0x8482, 0x8477, 0x843d,
-0x8431, 0x8475, 0x8466, 0x846b, 0x8449, 0x846c, 0x845b, 0x843c,
-0x8435, 0x8461, 0x8463, 0x8469, 0x846d, 0x8446, 0x865e, 0x865c,
-0x865f, 0x86f9, 0x8713, 0x8708, 0x8707, 0x8700, 0x86fe, 0x86fb,
-0x8702, 0x8703, 0x8706, 0x870a, 0x8859, 0x88df, 0x88d4, 0x88d9,
-0x88dc, 0x88d8, 0x88dd, 0x88e1, 0x88ca, 0x88d5, 0x88d2, 0x899c,
-0x89e3, 0x8a6b, 0x8a72, 0x8a73, 0x8a66, 0x8a69, 0x8a70, 0x8a87,
-0x8a7c, 0x8a63, 0x8aa0, 0x8a71, 0x8a85, 0x8a6d, 0x8a62, 0x8a6e,
-0x8a6c, 0x8a79, 0x8a7b, 0x8a3e, 0x8a68, 0x8c62, 0x8c8a, 0x8c89,
-0x8cca, 0x8cc7, 0x8cc8, 0x8cc4, 0x8cb2, 0x8cc3, 0x8cc2, 0x8cc5,
-0x8de1, 0x8ddf, 0x8de8, 0x8def, 0x8df3, 0x8dfa, 0x8dea, 0x8de4,
-0x8de6, 0x8eb2, 0x8f03, 0x8f09, 0x8efe, 0x8f0a,
-63, 0xb940,
-0x8f9f, 0x8fb2, 0x904b, 0x904a, 0x9053, 0x9042, 0x9054, 0x903c,
-0x9055, 0x9050, 0x9047, 0x904f, 0x904e, 0x904d, 0x9051, 0x903e,
-0x9041, 0x9112, 0x9117, 0x916c, 0x916a, 0x9169, 0x91c9, 0x9237,
-0x9257, 0x9238, 0x923d, 0x9240, 0x923e, 0x925b, 0x924b, 0x9264,
-0x9251, 0x9234, 0x9249, 0x924d, 0x9245, 0x9239, 0x923f, 0x925a,
-0x9598, 0x9698, 0x9694, 0x9695, 0x96cd, 0x96cb, 0x96c9, 0x96ca,
-0x96f7, 0x96fb, 0x96f9, 0x96f6, 0x9756, 0x9774, 0x9776, 0x9810,
-0x9811, 0x9813, 0x980a, 0x9812, 0x980c, 0x98fc, 0x98f4,
-94, 0xb9a1,
-0x98fd, 0x98fe, 0x99b3, 0x99b1, 0x99b4, 0x9ae1, 0x9ce9, 0x9e82,
-0x9f0e, 0x9f13, 0x9f20, 0x50e7, 0x50ee, 0x50e5, 0x50d6, 0x50ed,
-0x50da, 0x50d5, 0x50cf, 0x50d1, 0x50f1, 0x50ce, 0x50e9, 0x5162,
-0x51f3, 0x5283, 0x5282, 0x5331, 0x53ad, 0x55fe, 0x5600, 0x561b,
-0x5617, 0x55fd, 0x5614, 0x5606, 0x5609, 0x560d, 0x560e, 0x55f7,
-0x5616, 0x561f, 0x5608, 0x5610, 0x55f6, 0x5718, 0x5716, 0x5875,
-0x587e, 0x5883, 0x5893, 0x588a, 0x5879, 0x5885, 0x587d, 0x58fd,
-0x5925, 0x5922, 0x5924, 0x596a, 0x5969, 0x5ae1, 0x5ae6, 0x5ae9,
-0x5ad7, 0x5ad6, 0x5ad8, 0x5ae3, 0x5b75, 0x5bde, 0x5be7, 0x5be1,
-0x5be5, 0x5be6, 0x5be8, 0x5be2, 0x5be4, 0x5bdf, 0x5c0d, 0x5c62,
-0x5d84, 0x5d87, 0x5e5b, 0x5e63, 0x5e55, 0x5e57, 0x5e54, 0x5ed3,
-0x5ed6, 0x5f0a, 0x5f46, 0x5f70, 0x5fb9, 0x6147,
-63, 0xba40,
-0x613f, 0x614b, 0x6177, 0x6162, 0x6163, 0x615f, 0x615a, 0x6158,
-0x6175, 0x622a, 0x6487, 0x6458, 0x6454, 0x64a4, 0x6478, 0x645f,
-0x647a, 0x6451, 0x6467, 0x6434, 0x646d, 0x647b, 0x6572, 0x65a1,
-0x65d7, 0x65d6, 0x66a2, 0x66a8, 0x669d, 0x699c, 0x69a8, 0x6995,
-0x69c1, 0x69ae, 0x69d3, 0x69cb, 0x699b, 0x69b7, 0x69bb, 0x69ab,
-0x69b4, 0x69d0, 0x69cd, 0x69ad, 0x69cc, 0x69a6, 0x69c3, 0x69a3,
-0x6b49, 0x6b4c, 0x6c33, 0x6f33, 0x6f14, 0x6efe, 0x6f13, 0x6ef4,
-0x6f29, 0x6f3e, 0x6f20, 0x6f2c, 0x6f0f, 0x6f02, 0x6f22,
-94, 0xbaa1,
-0x6eff, 0x6eef, 0x6f06, 0x6f31, 0x6f38, 0x6f32, 0x6f23, 0x6f15,
-0x6f2b, 0x6f2f, 0x6f88, 0x6f2a, 0x6eec, 0x6f01, 0x6ef2, 0x6ecc,
-0x6ef7, 0x7194, 0x7199, 0x717d, 0x718a, 0x7184, 0x7192, 0x723e,
-0x7292, 0x7296, 0x7344, 0x7350, 0x7464, 0x7463, 0x746a, 0x7470,
-0x746d, 0x7504, 0x7591, 0x7627, 0x760d, 0x760b, 0x7609, 0x7613,
-0x76e1, 0x76e3, 0x7784, 0x777d, 0x777f, 0x7761, 0x78c1, 0x789f,
-0x78a7, 0x78b3, 0x78a9, 0x78a3, 0x798e, 0x798f, 0x798d, 0x7a2e,
-0x7a31, 0x7aaa, 0x7aa9, 0x7aed, 0x7aef, 0x7ba1, 0x7b95, 0x7b8b,
-0x7b75, 0x7b97, 0x7b9d, 0x7b94, 0x7b8f, 0x7bb8, 0x7b87, 0x7b84,
-0x7cb9, 0x7cbd, 0x7cbe, 0x7dbb, 0x7db0, 0x7d9c, 0x7dbd, 0x7dbe,
-0x7da0, 0x7dca, 0x7db4, 0x7db2, 0x7db1, 0x7dba, 0x7da2, 0x7dbf,
-0x7db5, 0x7db8, 0x7dad, 0x7dd2, 0x7dc7, 0x7dac,
-63, 0xbb40,
-0x7f70, 0x7fe0, 0x7fe1, 0x7fdf, 0x805e, 0x805a, 0x8087, 0x8150,
-0x8180, 0x818f, 0x8188, 0x818a, 0x817f, 0x8182, 0x81e7, 0x81fa,
-0x8207, 0x8214, 0x821e, 0x824b, 0x84c9, 0x84bf, 0x84c6, 0x84c4,
-0x8499, 0x849e, 0x84b2, 0x849c, 0x84cb, 0x84b8, 0x84c0, 0x84d3,
-0x8490, 0x84bc, 0x84d1, 0x84ca, 0x873f, 0x871c, 0x873b, 0x8722,
-0x8725, 0x8734, 0x8718, 0x8755, 0x8737, 0x8729, 0x88f3, 0x8902,
-0x88f4, 0x88f9, 0x88f8, 0x88fd, 0x88e8, 0x891a, 0x88ef, 0x8aa6,
-0x8a8c, 0x8a9e, 0x8aa3, 0x8a8d, 0x8aa1, 0x8a93, 0x8aa4,
-94, 0xbba1,
-0x8aaa, 0x8aa5, 0x8aa8, 0x8a98, 0x8a91, 0x8a9a, 0x8aa7, 0x8c6a,
-0x8c8d, 0x8c8c, 0x8cd3, 0x8cd1, 0x8cd2, 0x8d6b, 0x8d99, 0x8d95,
-0x8dfc, 0x8f14, 0x8f12, 0x8f15, 0x8f13, 0x8fa3, 0x9060, 0x9058,
-0x905c, 0x9063, 0x9059, 0x905e, 0x9062, 0x905d, 0x905b, 0x9119,
-0x9118, 0x911e, 0x9175, 0x9178, 0x9177, 0x9174, 0x9278, 0x9280,
-0x9285, 0x9298, 0x9296, 0x927b, 0x9293, 0x929c, 0x92a8, 0x927c,
-0x9291, 0x95a1, 0x95a8, 0x95a9, 0x95a3, 0x95a5, 0x95a4, 0x9699,
-0x969c, 0x969b, 0x96cc, 0x96d2, 0x9700, 0x977c, 0x9785, 0x97f6,
-0x9817, 0x9818, 0x98af, 0x98b1, 0x9903, 0x9905, 0x990c, 0x9909,
-0x99c1, 0x9aaf, 0x9ab0, 0x9ae6, 0x9b41, 0x9b42, 0x9cf4, 0x9cf6,
-0x9cf3, 0x9ebc, 0x9f3b, 0x9f4a, 0x5104, 0x5100, 0x50fb, 0x50f5,
-0x50f9, 0x5102, 0x5108, 0x5109, 0x5105, 0x51dc,
-63, 0xbc40,
-0x5287, 0x5288, 0x5289, 0x528d, 0x528a, 0x52f0, 0x53b2, 0x562e,
-0x563b, 0x5639, 0x5632, 0x563f, 0x5634, 0x5629, 0x5653, 0x564e,
-0x5657, 0x5674, 0x5636, 0x562f, 0x5630, 0x5880, 0x589f, 0x589e,
-0x58b3, 0x589c, 0x58ae, 0x58a9, 0x58a6, 0x596d, 0x5b09, 0x5afb,
-0x5b0b, 0x5af5, 0x5b0c, 0x5b08, 0x5bee, 0x5bec, 0x5be9, 0x5beb,
-0x5c64, 0x5c65, 0x5d9d, 0x5d94, 0x5e62, 0x5e5f, 0x5e61, 0x5ee2,
-0x5eda, 0x5edf, 0x5edd, 0x5ee3, 0x5ee0, 0x5f48, 0x5f71, 0x5fb7,
-0x5fb5, 0x6176, 0x6167, 0x616e, 0x615d, 0x6155, 0x6182,
-94, 0xbca1,
-0x617c, 0x6170, 0x616b, 0x617e, 0x61a7, 0x6190, 0x61ab, 0x618e,
-0x61ac, 0x619a, 0x61a4, 0x6194, 0x61ae, 0x622e, 0x6469, 0x646f,
-0x6479, 0x649e, 0x64b2, 0x6488, 0x6490, 0x64b0, 0x64a5, 0x6493,
-0x6495, 0x64a9, 0x6492, 0x64ae, 0x64ad, 0x64ab, 0x649a, 0x64ac,
-0x6499, 0x64a2, 0x64b3, 0x6575, 0x6577, 0x6578, 0x66ae, 0x66ab,
-0x66b4, 0x66b1, 0x6a23, 0x6a1f, 0x69e8, 0x6a01, 0x6a1e, 0x6a19,
-0x69fd, 0x6a21, 0x6a13, 0x6a0a, 0x69f3, 0x6a02, 0x6a05, 0x69ed,
-0x6a11, 0x6b50, 0x6b4e, 0x6ba4, 0x6bc5, 0x6bc6, 0x6f3f, 0x6f7c,
-0x6f84, 0x6f51, 0x6f66, 0x6f54, 0x6f86, 0x6f6d, 0x6f5b, 0x6f78,
-0x6f6e, 0x6f8e, 0x6f7a, 0x6f70, 0x6f64, 0x6f97, 0x6f58, 0x6ed5,
-0x6f6f, 0x6f60, 0x6f5f, 0x719f, 0x71ac, 0x71b1, 0x71a8, 0x7256,
-0x729b, 0x734e, 0x7357, 0x7469, 0x748b, 0x7483,
-63, 0xbd40,
-0x747e, 0x7480, 0x757f, 0x7620, 0x7629, 0x761f, 0x7624, 0x7626,
-0x7621, 0x7622, 0x769a, 0x76ba, 0x76e4, 0x778e, 0x7787, 0x778c,
-0x7791, 0x778b, 0x78cb, 0x78c5, 0x78ba, 0x78ca, 0x78be, 0x78d5,
-0x78bc, 0x78d0, 0x7a3f, 0x7a3c, 0x7a40, 0x7a3d, 0x7a37, 0x7a3b,
-0x7aaf, 0x7aae, 0x7bad, 0x7bb1, 0x7bc4, 0x7bb4, 0x7bc6, 0x7bc7,
-0x7bc1, 0x7ba0, 0x7bcc, 0x7cca, 0x7de0, 0x7df4, 0x7def, 0x7dfb,
-0x7dd8, 0x7dec, 0x7ddd, 0x7de8, 0x7de3, 0x7dda, 0x7dde, 0x7de9,
-0x7d9e, 0x7dd9, 0x7df2, 0x7df9, 0x7f75, 0x7f77, 0x7faf,
-94, 0xbda1,
-0x7fe9, 0x8026, 0x819b, 0x819c, 0x819d, 0x81a0, 0x819a, 0x8198,
-0x8517, 0x853d, 0x851a, 0x84ee, 0x852c, 0x852d, 0x8513, 0x8511,
-0x8523, 0x8521, 0x8514, 0x84ec, 0x8525, 0x84ff, 0x8506, 0x8782,
-0x8774, 0x8776, 0x8760, 0x8766, 0x8778, 0x8768, 0x8759, 0x8757,
-0x874c, 0x8753, 0x885b, 0x885d, 0x8910, 0x8907, 0x8912, 0x8913,
-0x8915, 0x890a, 0x8abc, 0x8ad2, 0x8ac7, 0x8ac4, 0x8a95, 0x8acb,
-0x8af8, 0x8ab2, 0x8ac9, 0x8ac2, 0x8abf, 0x8ab0, 0x8ad6, 0x8acd,
-0x8ab6, 0x8ab9, 0x8adb, 0x8c4c, 0x8c4e, 0x8c6c, 0x8ce0, 0x8cde,
-0x8ce6, 0x8ce4, 0x8cec, 0x8ced, 0x8ce2, 0x8ce3, 0x8cdc, 0x8cea,
-0x8ce1, 0x8d6d, 0x8d9f, 0x8da3, 0x8e2b, 0x8e10, 0x8e1d, 0x8e22,
-0x8e0f, 0x8e29, 0x8e1f, 0x8e21, 0x8e1e, 0x8eba, 0x8f1d, 0x8f1b,
-0x8f1f, 0x8f29, 0x8f26, 0x8f2a, 0x8f1c, 0x8f1e,
-63, 0xbe40,
-0x8f25, 0x9069, 0x906e, 0x9068, 0x906d, 0x9077, 0x9130, 0x912d,
-0x9127, 0x9131, 0x9187, 0x9189, 0x918b, 0x9183, 0x92c5, 0x92bb,
-0x92b7, 0x92ea, 0x92ac, 0x92e4, 0x92c1, 0x92b3, 0x92bc, 0x92d2,
-0x92c7, 0x92f0, 0x92b2, 0x95ad, 0x95b1, 0x9704, 0x9706, 0x9707,
-0x9709, 0x9760, 0x978d, 0x978b, 0x978f, 0x9821, 0x982b, 0x981c,
-0x98b3, 0x990a, 0x9913, 0x9912, 0x9918, 0x99dd, 0x99d0, 0x99df,
-0x99db, 0x99d1, 0x99d5, 0x99d2, 0x99d9, 0x9ab7, 0x9aee, 0x9aef,
-0x9b27, 0x9b45, 0x9b44, 0x9b77, 0x9b6f, 0x9d06, 0x9d09,
-94, 0xbea1,
-0x9d03, 0x9ea9, 0x9ebe, 0x9ece, 0x58a8, 0x9f52, 0x5112, 0x5118,
-0x5114, 0x5110, 0x5115, 0x5180, 0x51aa, 0x51dd, 0x5291, 0x5293,
-0x52f3, 0x5659, 0x566b, 0x5679, 0x5669, 0x5664, 0x5678, 0x566a,
-0x5668, 0x5665, 0x5671, 0x566f, 0x566c, 0x5662, 0x5676, 0x58c1,
-0x58be, 0x58c7, 0x58c5, 0x596e, 0x5b1d, 0x5b34, 0x5b78, 0x5bf0,
-0x5c0e, 0x5f4a, 0x61b2, 0x6191, 0x61a9, 0x618a, 0x61cd, 0x61b6,
-0x61be, 0x61ca, 0x61c8, 0x6230, 0x64c5, 0x64c1, 0x64cb, 0x64bb,
-0x64bc, 0x64da, 0x64c4, 0x64c7, 0x64c2, 0x64cd, 0x64bf, 0x64d2,
-0x64d4, 0x64be, 0x6574, 0x66c6, 0x66c9, 0x66b9, 0x66c4, 0x66c7,
-0x66b8, 0x6a3d, 0x6a38, 0x6a3a, 0x6a59, 0x6a6b, 0x6a58, 0x6a39,
-0x6a44, 0x6a62, 0x6a61, 0x6a4b, 0x6a47, 0x6a35, 0x6a5f, 0x6a48,
-0x6b59, 0x6b77, 0x6c05, 0x6fc2, 0x6fb1, 0x6fa1,
-63, 0xbf40,
-0x6fc3, 0x6fa4, 0x6fc1, 0x6fa7, 0x6fb3, 0x6fc0, 0x6fb9, 0x6fb6,
-0x6fa6, 0x6fa0, 0x6fb4, 0x71be, 0x71c9, 0x71d0, 0x71d2, 0x71c8,
-0x71d5, 0x71b9, 0x71ce, 0x71d9, 0x71dc, 0x71c3, 0x71c4, 0x7368,
-0x749c, 0x74a3, 0x7498, 0x749f, 0x749e, 0x74e2, 0x750c, 0x750d,
-0x7634, 0x7638, 0x763a, 0x76e7, 0x76e5, 0x77a0, 0x779e, 0x779f,
-0x77a5, 0x78e8, 0x78da, 0x78ec, 0x78e7, 0x79a6, 0x7a4d, 0x7a4e,
-0x7a46, 0x7a4c, 0x7a4b, 0x7aba, 0x7bd9, 0x7c11, 0x7bc9, 0x7be4,
-0x7bdb, 0x7be1, 0x7be9, 0x7be6, 0x7cd5, 0x7cd6, 0x7e0a,
-94, 0xbfa1,
-0x7e11, 0x7e08, 0x7e1b, 0x7e23, 0x7e1e, 0x7e1d, 0x7e09, 0x7e10,
-0x7f79, 0x7fb2, 0x7ff0, 0x7ff1, 0x7fee, 0x8028, 0x81b3, 0x81a9,
-0x81a8, 0x81fb, 0x8208, 0x8258, 0x8259, 0x854a, 0x8559, 0x8548,
-0x8568, 0x8569, 0x8543, 0x8549, 0x856d, 0x856a, 0x855e, 0x8783,
-0x879f, 0x879e, 0x87a2, 0x878d, 0x8861, 0x892a, 0x8932, 0x8925,
-0x892b, 0x8921, 0x89aa, 0x89a6, 0x8ae6, 0x8afa, 0x8aeb, 0x8af1,
-0x8b00, 0x8adc, 0x8ae7, 0x8aee, 0x8afe, 0x8b01, 0x8b02, 0x8af7,
-0x8aed, 0x8af3, 0x8af6, 0x8afc, 0x8c6b, 0x8c6d, 0x8c93, 0x8cf4,
-0x8e44, 0x8e31, 0x8e34, 0x8e42, 0x8e39, 0x8e35, 0x8f3b, 0x8f2f,
-0x8f38, 0x8f33, 0x8fa8, 0x8fa6, 0x9075, 0x9074, 0x9078, 0x9072,
-0x907c, 0x907a, 0x9134, 0x9192, 0x9320, 0x9336, 0x92f8, 0x9333,
-0x932f, 0x9322, 0x92fc, 0x932b, 0x9304, 0x931a,
-63, 0xc040,
-0x9310, 0x9326, 0x9321, 0x9315, 0x932e, 0x9319, 0x95bb, 0x96a7,
-0x96a8, 0x96aa, 0x96d5, 0x970e, 0x9711, 0x9716, 0x970d, 0x9713,
-0x970f, 0x975b, 0x975c, 0x9766, 0x9798, 0x9830, 0x9838, 0x983b,
-0x9837, 0x982d, 0x9839, 0x9824, 0x9910, 0x9928, 0x991e, 0x991b,
-0x9921, 0x991a, 0x99ed, 0x99e2, 0x99f1, 0x9ab8, 0x9abc, 0x9afb,
-0x9aed, 0x9b28, 0x9b91, 0x9d15, 0x9d23, 0x9d26, 0x9d28, 0x9d12,
-0x9d1b, 0x9ed8, 0x9ed4, 0x9f8d, 0x9f9c, 0x512a, 0x511f, 0x5121,
-0x5132, 0x52f5, 0x568e, 0x5680, 0x5690, 0x5685, 0x5687,
-94, 0xc0a1,
-0x568f, 0x58d5, 0x58d3, 0x58d1, 0x58ce, 0x5b30, 0x5b2a, 0x5b24,
-0x5b7a, 0x5c37, 0x5c68, 0x5dbc, 0x5dba, 0x5dbd, 0x5db8, 0x5e6b,
-0x5f4c, 0x5fbd, 0x61c9, 0x61c2, 0x61c7, 0x61e6, 0x61cb, 0x6232,
-0x6234, 0x64ce, 0x64ca, 0x64d8, 0x64e0, 0x64f0, 0x64e6, 0x64ec,
-0x64f1, 0x64e2, 0x64ed, 0x6582, 0x6583, 0x66d9, 0x66d6, 0x6a80,
-0x6a94, 0x6a84, 0x6aa2, 0x6a9c, 0x6adb, 0x6aa3, 0x6a7e, 0x6a97,
-0x6a90, 0x6aa0, 0x6b5c, 0x6bae, 0x6bda, 0x6c08, 0x6fd8, 0x6ff1,
-0x6fdf, 0x6fe0, 0x6fdb, 0x6fe4, 0x6feb, 0x6fef, 0x6f80, 0x6fec,
-0x6fe1, 0x6fe9, 0x6fd5, 0x6fee, 0x6ff0, 0x71e7, 0x71df, 0x71ee,
-0x71e6, 0x71e5, 0x71ed, 0x71ec, 0x71f4, 0x71e0, 0x7235, 0x7246,
-0x7370, 0x7372, 0x74a9, 0x74b0, 0x74a6, 0x74a8, 0x7646, 0x7642,
-0x764c, 0x76ea, 0x77b3, 0x77aa, 0x77b0, 0x77ac,
-63, 0xc140,
-0x77a7, 0x77ad, 0x77ef, 0x78f7, 0x78fa, 0x78f4, 0x78ef, 0x7901,
-0x79a7, 0x79aa, 0x7a57, 0x7abf, 0x7c07, 0x7c0d, 0x7bfe, 0x7bf7,
-0x7c0c, 0x7be0, 0x7ce0, 0x7cdc, 0x7cde, 0x7ce2, 0x7cdf, 0x7cd9,
-0x7cdd, 0x7e2e, 0x7e3e, 0x7e46, 0x7e37, 0x7e32, 0x7e43, 0x7e2b,
-0x7e3d, 0x7e31, 0x7e45, 0x7e41, 0x7e34, 0x7e39, 0x7e48, 0x7e35,
-0x7e3f, 0x7e2f, 0x7f44, 0x7ff3, 0x7ffc, 0x8071, 0x8072, 0x8070,
-0x806f, 0x8073, 0x81c6, 0x81c3, 0x81ba, 0x81c2, 0x81c0, 0x81bf,
-0x81bd, 0x81c9, 0x81be, 0x81e8, 0x8209, 0x8271, 0x85aa,
-94, 0xc1a1,
-0x8584, 0x857e, 0x859c, 0x8591, 0x8594, 0x85af, 0x859b, 0x8587,
-0x85a8, 0x858a, 0x8667, 0x87c0, 0x87d1, 0x87b3, 0x87d2, 0x87c6,
-0x87ab, 0x87bb, 0x87ba, 0x87c8, 0x87cb, 0x893b, 0x8936, 0x8944,
-0x8938, 0x893d, 0x89ac, 0x8b0e, 0x8b17, 0x8b19, 0x8b1b, 0x8b0a,
-0x8b20, 0x8b1d, 0x8b04, 0x8b10, 0x8c41, 0x8c3f, 0x8c73, 0x8cfa,
-0x8cfd, 0x8cfc, 0x8cf8, 0x8cfb, 0x8da8, 0x8e49, 0x8e4b, 0x8e48,
-0x8e4a, 0x8f44, 0x8f3e, 0x8f42, 0x8f45, 0x8f3f, 0x907f, 0x907d,
-0x9084, 0x9081, 0x9082, 0x9080, 0x9139, 0x91a3, 0x919e, 0x919c,
-0x934d, 0x9382, 0x9328, 0x9375, 0x934a, 0x9365, 0x934b, 0x9318,
-0x937e, 0x936c, 0x935b, 0x9370, 0x935a, 0x9354, 0x95ca, 0x95cb,
-0x95cc, 0x95c8, 0x95c6, 0x96b1, 0x96b8, 0x96d6, 0x971c, 0x971e,
-0x97a0, 0x97d3, 0x9846, 0x98b6, 0x9935, 0x9a01,
-63, 0xc240,
-0x99ff, 0x9bae, 0x9bab, 0x9baa, 0x9bad, 0x9d3b, 0x9d3f, 0x9e8b,
-0x9ecf, 0x9ede, 0x9edc, 0x9edd, 0x9edb, 0x9f3e, 0x9f4b, 0x53e2,
-0x5695, 0x56ae, 0x58d9, 0x58d8, 0x5b38, 0x5f5d, 0x61e3, 0x6233,
-0x64f4, 0x64f2, 0x64fe, 0x6506, 0x64fa, 0x64fb, 0x64f7, 0x65b7,
-0x66dc, 0x6726, 0x6ab3, 0x6aac, 0x6ac3, 0x6abb, 0x6ab8, 0x6ac2,
-0x6aae, 0x6aaf, 0x6b5f, 0x6b78, 0x6baf, 0x7009, 0x700b, 0x6ffe,
-0x7006, 0x6ffa, 0x7011, 0x700f, 0x71fb, 0x71fc, 0x71fe, 0x71f8,
-0x7377, 0x7375, 0x74a7, 0x74bf, 0x7515, 0x7656, 0x7658,
-94, 0xc2a1,
-0x7652, 0x77bd, 0x77bf, 0x77bb, 0x77bc, 0x790e, 0x79ae, 0x7a61,
-0x7a62, 0x7a60, 0x7ac4, 0x7ac5, 0x7c2b, 0x7c27, 0x7c2a, 0x7c1e,
-0x7c23, 0x7c21, 0x7ce7, 0x7e54, 0x7e55, 0x7e5e, 0x7e5a, 0x7e61,
-0x7e52, 0x7e59, 0x7f48, 0x7ff9, 0x7ffb, 0x8077, 0x8076, 0x81cd,
-0x81cf, 0x820a, 0x85cf, 0x85a9, 0x85cd, 0x85d0, 0x85c9, 0x85b0,
-0x85ba, 0x85b9, 0x85a6, 0x87ef, 0x87ec, 0x87f2, 0x87e0, 0x8986,
-0x89b2, 0x89f4, 0x8b28, 0x8b39, 0x8b2c, 0x8b2b, 0x8c50, 0x8d05,
-0x8e59, 0x8e63, 0x8e66, 0x8e64, 0x8e5f, 0x8e55, 0x8ec0, 0x8f49,
-0x8f4d, 0x9087, 0x9083, 0x9088, 0x91ab, 0x91ac, 0x91d0, 0x9394,
-0x938a, 0x9396, 0x93a2, 0x93b3, 0x93ae, 0x93ac, 0x93b0, 0x9398,
-0x939a, 0x9397, 0x95d4, 0x95d6, 0x95d0, 0x95d5, 0x96e2, 0x96dc,
-0x96d9, 0x96db, 0x96de, 0x9724, 0x97a3, 0x97a6,
-63, 0xc340,
-0x97ad, 0x97f9, 0x984d, 0x984f, 0x984c, 0x984e, 0x9853, 0x98ba,
-0x993e, 0x993f, 0x993d, 0x992e, 0x99a5, 0x9a0e, 0x9ac1, 0x9b03,
-0x9b06, 0x9b4f, 0x9b4e, 0x9b4d, 0x9bca, 0x9bc9, 0x9bfd, 0x9bc8,
-0x9bc0, 0x9d51, 0x9d5d, 0x9d60, 0x9ee0, 0x9f15, 0x9f2c, 0x5133,
-0x56a5, 0x58de, 0x58df, 0x58e2, 0x5bf5, 0x9f90, 0x5eec, 0x61f2,
-0x61f7, 0x61f6, 0x61f5, 0x6500, 0x650f, 0x66e0, 0x66dd, 0x6ae5,
-0x6add, 0x6ada, 0x6ad3, 0x701b, 0x701f, 0x7028, 0x701a, 0x701d,
-0x7015, 0x7018, 0x7206, 0x720d, 0x7258, 0x72a2, 0x7378,
-94, 0xc3a1,
-0x737a, 0x74bd, 0x74ca, 0x74e3, 0x7587, 0x7586, 0x765f, 0x7661,
-0x77c7, 0x7919, 0x79b1, 0x7a6b, 0x7a69, 0x7c3e, 0x7c3f, 0x7c38,
-0x7c3d, 0x7c37, 0x7c40, 0x7e6b, 0x7e6d, 0x7e79, 0x7e69, 0x7e6a,
-0x7f85, 0x7e73, 0x7fb6, 0x7fb9, 0x7fb8, 0x81d8, 0x85e9, 0x85dd,
-0x85ea, 0x85d5, 0x85e4, 0x85e5, 0x85f7, 0x87fb, 0x8805, 0x880d,
-0x87f9, 0x87fe, 0x8960, 0x895f, 0x8956, 0x895e, 0x8b41, 0x8b5c,
-0x8b58, 0x8b49, 0x8b5a, 0x8b4e, 0x8b4f, 0x8b46, 0x8b59, 0x8d08,
-0x8d0a, 0x8e7c, 0x8e72, 0x8e87, 0x8e76, 0x8e6c, 0x8e7a, 0x8e74,
-0x8f54, 0x8f4e, 0x8fad, 0x908a, 0x908b, 0x91b1, 0x91ae, 0x93e1,
-0x93d1, 0x93df, 0x93c3, 0x93c8, 0x93dc, 0x93dd, 0x93d6, 0x93e2,
-0x93cd, 0x93d8, 0x93e4, 0x93d7, 0x93e8, 0x95dc, 0x96b4, 0x96e3,
-0x972a, 0x9727, 0x9761, 0x97dc, 0x97fb, 0x985e,
-63, 0xc440,
-0x9858, 0x985b, 0x98bc, 0x9945, 0x9949, 0x9a16, 0x9a19, 0x9b0d,
-0x9be8, 0x9be7, 0x9bd6, 0x9bdb, 0x9d89, 0x9d61, 0x9d72, 0x9d6a,
-0x9d6c, 0x9e92, 0x9e97, 0x9e93, 0x9eb4, 0x52f8, 0x56a8, 0x56b7,
-0x56b6, 0x56b4, 0x56bc, 0x58e4, 0x5b40, 0x5b43, 0x5b7d, 0x5bf6,
-0x5dc9, 0x61f8, 0x61fa, 0x6518, 0x6514, 0x6519, 0x66e6, 0x6727,
-0x6aec, 0x703e, 0x7030, 0x7032, 0x7210, 0x737b, 0x74cf, 0x7662,
-0x7665, 0x7926, 0x792a, 0x792c, 0x792b, 0x7ac7, 0x7af6, 0x7c4c,
-0x7c43, 0x7c4d, 0x7cef, 0x7cf0, 0x8fae, 0x7e7d, 0x7e7c,
-94, 0xc4a1,
-0x7e82, 0x7f4c, 0x8000, 0x81da, 0x8266, 0x85fb, 0x85f9, 0x8611,
-0x85fa, 0x8606, 0x860b, 0x8607, 0x860a, 0x8814, 0x8815, 0x8964,
-0x89ba, 0x89f8, 0x8b70, 0x8b6c, 0x8b66, 0x8b6f, 0x8b5f, 0x8b6b,
-0x8d0f, 0x8d0d, 0x8e89, 0x8e81, 0x8e85, 0x8e82, 0x91b4, 0x91cb,
-0x9418, 0x9403, 0x93fd, 0x95e1, 0x9730, 0x98c4, 0x9952, 0x9951,
-0x99a8, 0x9a2b, 0x9a30, 0x9a37, 0x9a35, 0x9c13, 0x9c0d, 0x9e79,
-0x9eb5, 0x9ee8, 0x9f2f, 0x9f5f, 0x9f63, 0x9f61, 0x5137, 0x5138,
-0x56c1, 0x56c0, 0x56c2, 0x5914, 0x5c6c, 0x5dcd, 0x61fc, 0x61fe,
-0x651d, 0x651c, 0x6595, 0x66e9, 0x6afb, 0x6b04, 0x6afa, 0x6bb2,
-0x704c, 0x721b, 0x72a7, 0x74d6, 0x74d4, 0x7669, 0x77d3, 0x7c50,
-0x7e8f, 0x7e8c, 0x7fbc, 0x8617, 0x862d, 0x861a, 0x8823, 0x8822,
-0x8821, 0x881f, 0x896a, 0x896c, 0x89bd, 0x8b74,
-63, 0xc540,
-0x8b77, 0x8b7d, 0x8d13, 0x8e8a, 0x8e8d, 0x8e8b, 0x8f5f, 0x8faf,
-0x91ba, 0x942e, 0x9433, 0x9435, 0x943a, 0x9438, 0x9432, 0x942b,
-0x95e2, 0x9738, 0x9739, 0x9732, 0x97ff, 0x9867, 0x9865, 0x9957,
-0x9a45, 0x9a43, 0x9a40, 0x9a3e, 0x9acf, 0x9b54, 0x9b51, 0x9c2d,
-0x9c25, 0x9daf, 0x9db4, 0x9dc2, 0x9db8, 0x9e9d, 0x9eef, 0x9f19,
-0x9f5c, 0x9f66, 0x9f67, 0x513c, 0x513b, 0x56c8, 0x56ca, 0x56c9,
-0x5b7f, 0x5dd4, 0x5dd2, 0x5f4e, 0x61ff, 0x6524, 0x6b0a, 0x6b61,
-0x7051, 0x7058, 0x7380, 0x74e4, 0x758a, 0x766e, 0x766c,
-94, 0xc5a1,
-0x79b3, 0x7c60, 0x7c5f, 0x807e, 0x807d, 0x81df, 0x8972, 0x896f,
-0x89fc, 0x8b80, 0x8d16, 0x8d17, 0x8e91, 0x8e93, 0x8f61, 0x9148,
-0x9444, 0x9451, 0x9452, 0x973d, 0x973e, 0x97c3, 0x97c1, 0x986b,
-0x9955, 0x9a55, 0x9a4d, 0x9ad2, 0x9b1a, 0x9c49, 0x9c31, 0x9c3e,
-0x9c3b, 0x9dd3, 0x9dd7, 0x9f34, 0x9f6c, 0x9f6a, 0x9f94, 0x56cc,
-0x5dd6, 0x6200, 0x6523, 0x652b, 0x652a, 0x66ec, 0x6b10, 0x74da,
-0x7aca, 0x7c64, 0x7c63, 0x7c65, 0x7e93, 0x7e96, 0x7e94, 0x81e2,
-0x8638, 0x863f, 0x8831, 0x8b8a, 0x9090, 0x908f, 0x9463, 0x9460,
-0x9464, 0x9768, 0x986f, 0x995c, 0x9a5a, 0x9a5b, 0x9a57, 0x9ad3,
-0x9ad4, 0x9ad1, 0x9c54, 0x9c57, 0x9c56, 0x9de5, 0x9e9f, 0x9ef4,
-0x56d1, 0x58e9, 0x652c, 0x705e, 0x7671, 0x7672, 0x77d7, 0x7f50,
-0x7f88, 0x8836, 0x8839, 0x8862, 0x8b93, 0x8b92,
-63, 0xc640,
-0x8b96, 0x8277, 0x8d1b, 0x91c0, 0x946a, 0x9742, 0x9748, 0x9744,
-0x97c6, 0x9870, 0x9a5f, 0x9b22, 0x9b58, 0x9c5f, 0x9df9, 0x9dfa,
-0x9e7c, 0x9e7d, 0x9f07, 0x9f77, 0x9f72, 0x5ef3, 0x6b16, 0x7063,
-0x7c6c, 0x7c6e, 0x883b, 0x89c0, 0x8ea1, 0x91c1, 0x9472, 0x9470,
-0x9871, 0x995e, 0x9ad6, 0x9b23, 0x9ecc, 0x7064, 0x77da, 0x8b9a,
-0x9477, 0x97c9, 0x9a62, 0x9a65, 0x7e9c, 0x8b9c, 0x8eaa, 0x91c5,
-0x947d, 0x947e, 0x947c, 0x9c77, 0x9c78, 0x9ef7, 0x8c54, 0x947f,
-0x9e1a, 0x7228, 0x9a6a, 0x9b31, 0x9e1b, 0x9e1e, 0x7c72,
-63, 0xc940,
-0x4e42, 0x4e5c, 0x51f5, 0x531a, 0x5382, 0x4e07, 0x4e0c, 0x4e47,
-0x4e8d, 0x56d7, 0xfa0c, 0x5c6e, 0x5f73, 0x4e0f, 0x5187, 0x4e0e,
-0x4e2e, 0x4e93, 0x4ec2, 0x4ec9, 0x4ec8, 0x5198, 0x52fc, 0x536c,
-0x53b9, 0x5720, 0x5903, 0x592c, 0x5c10, 0x5dff, 0x65e1, 0x6bb3,
-0x6bcc, 0x6c14, 0x723f, 0x4e31, 0x4e3c, 0x4ee8, 0x4edc, 0x4ee9,
-0x4ee1, 0x4edd, 0x4eda, 0x520c, 0x531c, 0x534c, 0x5722, 0x5723,
-0x5917, 0x592f, 0x5b81, 0x5b84, 0x5c12, 0x5c3b, 0x5c74, 0x5c73,
-0x5e04, 0x5e80, 0x5e82, 0x5fc9, 0x6209, 0x6250, 0x6c15,
-94, 0xc9a1,
-0x6c36, 0x6c43, 0x6c3f, 0x6c3b, 0x72ae, 0x72b0, 0x738a, 0x79b8,
-0x808a, 0x961e, 0x4f0e, 0x4f18, 0x4f2c, 0x4ef5, 0x4f14, 0x4ef1,
-0x4f00, 0x4ef7, 0x4f08, 0x4f1d, 0x4f02, 0x4f05, 0x4f22, 0x4f13,
-0x4f04, 0x4ef4, 0x4f12, 0x51b1, 0x5213, 0x5209, 0x5210, 0x52a6,
-0x5322, 0x531f, 0x534d, 0x538a, 0x5407, 0x56e1, 0x56df, 0x572e,
-0x572a, 0x5734, 0x593c, 0x5980, 0x597c, 0x5985, 0x597b, 0x597e,
-0x5977, 0x597f, 0x5b56, 0x5c15, 0x5c25, 0x5c7c, 0x5c7a, 0x5c7b,
-0x5c7e, 0x5ddf, 0x5e75, 0x5e84, 0x5f02, 0x5f1a, 0x5f74, 0x5fd5,
-0x5fd4, 0x5fcf, 0x625c, 0x625e, 0x6264, 0x6261, 0x6266, 0x6262,
-0x6259, 0x6260, 0x625a, 0x6265, 0x65ef, 0x65ee, 0x673e, 0x6739,
-0x6738, 0x673b, 0x673a, 0x673f, 0x673c, 0x6733, 0x6c18, 0x6c46,
-0x6c52, 0x6c5c, 0x6c4f, 0x6c4a, 0x6c54, 0x6c4b,
-63, 0xca40,
-0x6c4c, 0x7071, 0x725e, 0x72b4, 0x72b5, 0x738e, 0x752a, 0x767f,
-0x7a75, 0x7f51, 0x8278, 0x827c, 0x8280, 0x827d, 0x827f, 0x864d,
-0x897e, 0x9099, 0x9097, 0x9098, 0x909b, 0x9094, 0x9622, 0x9624,
-0x9620, 0x9623, 0x4f56, 0x4f3b, 0x4f62, 0x4f49, 0x4f53, 0x4f64,
-0x4f3e, 0x4f67, 0x4f52, 0x4f5f, 0x4f41, 0x4f58, 0x4f2d, 0x4f33,
-0x4f3f, 0x4f61, 0x518f, 0x51b9, 0x521c, 0x521e, 0x5221, 0x52ad,
-0x52ae, 0x5309, 0x5363, 0x5372, 0x538e, 0x538f, 0x5430, 0x5437,
-0x542a, 0x5454, 0x5445, 0x5419, 0x541c, 0x5425, 0x5418,
-94, 0xcaa1,
-0x543d, 0x544f, 0x5441, 0x5428, 0x5424, 0x5447, 0x56ee, 0x56e7,
-0x56e5, 0x5741, 0x5745, 0x574c, 0x5749, 0x574b, 0x5752, 0x5906,
-0x5940, 0x59a6, 0x5998, 0x59a0, 0x5997, 0x598e, 0x59a2, 0x5990,
-0x598f, 0x59a7, 0x59a1, 0x5b8e, 0x5b92, 0x5c28, 0x5c2a, 0x5c8d,
-0x5c8f, 0x5c88, 0x5c8b, 0x5c89, 0x5c92, 0x5c8a, 0x5c86, 0x5c93,
-0x5c95, 0x5de0, 0x5e0a, 0x5e0e, 0x5e8b, 0x5e89, 0x5e8c, 0x5e88,
-0x5e8d, 0x5f05, 0x5f1d, 0x5f78, 0x5f76, 0x5fd2, 0x5fd1, 0x5fd0,
-0x5fed, 0x5fe8, 0x5fee, 0x5ff3, 0x5fe1, 0x5fe4, 0x5fe3, 0x5ffa,
-0x5fef, 0x5ff7, 0x5ffb, 0x6000, 0x5ff4, 0x623a, 0x6283, 0x628c,
-0x628e, 0x628f, 0x6294, 0x6287, 0x6271, 0x627b, 0x627a, 0x6270,
-0x6281, 0x6288, 0x6277, 0x627d, 0x6272, 0x6274, 0x6537, 0x65f0,
-0x65f4, 0x65f3, 0x65f2, 0x65f5, 0x6745, 0x6747,
-63, 0xcb40,
-0x6759, 0x6755, 0x674c, 0x6748, 0x675d, 0x674d, 0x675a, 0x674b,
-0x6bd0, 0x6c19, 0x6c1a, 0x6c78, 0x6c67, 0x6c6b, 0x6c84, 0x6c8b,
-0x6c8f, 0x6c71, 0x6c6f, 0x6c69, 0x6c9a, 0x6c6d, 0x6c87, 0x6c95,
-0x6c9c, 0x6c66, 0x6c73, 0x6c65, 0x6c7b, 0x6c8e, 0x7074, 0x707a,
-0x7263, 0x72bf, 0x72bd, 0x72c3, 0x72c6, 0x72c1, 0x72ba, 0x72c5,
-0x7395, 0x7397, 0x7393, 0x7394, 0x7392, 0x753a, 0x7539, 0x7594,
-0x7595, 0x7681, 0x793d, 0x8034, 0x8095, 0x8099, 0x8090, 0x8092,
-0x809c, 0x8290, 0x828f, 0x8285, 0x828e, 0x8291, 0x8293,
-94, 0xcba1,
-0x828a, 0x8283, 0x8284, 0x8c78, 0x8fc9, 0x8fbf, 0x909f, 0x90a1,
-0x90a5, 0x909e, 0x90a7, 0x90a0, 0x9630, 0x9628, 0x962f, 0x962d,
-0x4e33, 0x4f98, 0x4f7c, 0x4f85, 0x4f7d, 0x4f80, 0x4f87, 0x4f76,
-0x4f74, 0x4f89, 0x4f84, 0x4f77, 0x4f4c, 0x4f97, 0x4f6a, 0x4f9a,
-0x4f79, 0x4f81, 0x4f78, 0x4f90, 0x4f9c, 0x4f94, 0x4f9e, 0x4f92,
-0x4f82, 0x4f95, 0x4f6b, 0x4f6e, 0x519e, 0x51bc, 0x51be, 0x5235,
-0x5232, 0x5233, 0x5246, 0x5231, 0x52bc, 0x530a, 0x530b, 0x533c,
-0x5392, 0x5394, 0x5487, 0x547f, 0x5481, 0x5491, 0x5482, 0x5488,
-0x546b, 0x547a, 0x547e, 0x5465, 0x546c, 0x5474, 0x5466, 0x548d,
-0x546f, 0x5461, 0x5460, 0x5498, 0x5463, 0x5467, 0x5464, 0x56f7,
-0x56f9, 0x576f, 0x5772, 0x576d, 0x576b, 0x5771, 0x5770, 0x5776,
-0x5780, 0x5775, 0x577b, 0x5773, 0x5774, 0x5762,
-63, 0xcc40,
-0x5768, 0x577d, 0x590c, 0x5945, 0x59b5, 0x59ba, 0x59cf, 0x59ce,
-0x59b2, 0x59cc, 0x59c1, 0x59b6, 0x59bc, 0x59c3, 0x59d6, 0x59b1,
-0x59bd, 0x59c0, 0x59c8, 0x59b4, 0x59c7, 0x5b62, 0x5b65, 0x5b93,
-0x5b95, 0x5c44, 0x5c47, 0x5cae, 0x5ca4, 0x5ca0, 0x5cb5, 0x5caf,
-0x5ca8, 0x5cac, 0x5c9f, 0x5ca3, 0x5cad, 0x5ca2, 0x5caa, 0x5ca7,
-0x5c9d, 0x5ca5, 0x5cb6, 0x5cb0, 0x5ca6, 0x5e17, 0x5e14, 0x5e19,
-0x5f28, 0x5f22, 0x5f23, 0x5f24, 0x5f54, 0x5f82, 0x5f7e, 0x5f7d,
-0x5fde, 0x5fe5, 0x602d, 0x6026, 0x6019, 0x6032, 0x600b,
-94, 0xcca1,
-0x6034, 0x600a, 0x6017, 0x6033, 0x601a, 0x601e, 0x602c, 0x6022,
-0x600d, 0x6010, 0x602e, 0x6013, 0x6011, 0x600c, 0x6009, 0x601c,
-0x6214, 0x623d, 0x62ad, 0x62b4, 0x62d1, 0x62be, 0x62aa, 0x62b6,
-0x62ca, 0x62ae, 0x62b3, 0x62af, 0x62bb, 0x62a9, 0x62b0, 0x62b8,
-0x653d, 0x65a8, 0x65bb, 0x6609, 0x65fc, 0x6604, 0x6612, 0x6608,
-0x65fb, 0x6603, 0x660b, 0x660d, 0x6605, 0x65fd, 0x6611, 0x6610,
-0x66f6, 0x670a, 0x6785, 0x676c, 0x678e, 0x6792, 0x6776, 0x677b,
-0x6798, 0x6786, 0x6784, 0x6774, 0x678d, 0x678c, 0x677a, 0x679f,
-0x6791, 0x6799, 0x6783, 0x677d, 0x6781, 0x6778, 0x6779, 0x6794,
-0x6b25, 0x6b80, 0x6b7e, 0x6bde, 0x6c1d, 0x6c93, 0x6cec, 0x6ceb,
-0x6cee, 0x6cd9, 0x6cb6, 0x6cd4, 0x6cad, 0x6ce7, 0x6cb7, 0x6cd0,
-0x6cc2, 0x6cba, 0x6cc3, 0x6cc6, 0x6ced, 0x6cf2,
-63, 0xcd40,
-0x6cd2, 0x6cdd, 0x6cb4, 0x6c8a, 0x6c9d, 0x6c80, 0x6cde, 0x6cc0,
-0x6d30, 0x6ccd, 0x6cc7, 0x6cb0, 0x6cf9, 0x6ccf, 0x6ce9, 0x6cd1,
-0x7094, 0x7098, 0x7085, 0x7093, 0x7086, 0x7084, 0x7091, 0x7096,
-0x7082, 0x709a, 0x7083, 0x726a, 0x72d6, 0x72cb, 0x72d8, 0x72c9,
-0x72dc, 0x72d2, 0x72d4, 0x72da, 0x72cc, 0x72d1, 0x73a4, 0x73a1,
-0x73ad, 0x73a6, 0x73a2, 0x73a0, 0x73ac, 0x739d, 0x74dd, 0x74e8,
-0x753f, 0x7540, 0x753e, 0x758c, 0x7598, 0x76af, 0x76f3, 0x76f1,
-0x76f0, 0x76f5, 0x77f8, 0x77fc, 0x77f9, 0x77fb, 0x77fa,
-94, 0xcda1,
-0x77f7, 0x7942, 0x793f, 0x79c5, 0x7a78, 0x7a7b, 0x7afb, 0x7c75,
-0x7cfd, 0x8035, 0x808f, 0x80ae, 0x80a3, 0x80b8, 0x80b5, 0x80ad,
-0x8220, 0x82a0, 0x82c0, 0x82ab, 0x829a, 0x8298, 0x829b, 0x82b5,
-0x82a7, 0x82ae, 0x82bc, 0x829e, 0x82ba, 0x82b4, 0x82a8, 0x82a1,
-0x82a9, 0x82c2, 0x82a4, 0x82c3, 0x82b6, 0x82a2, 0x8670, 0x866f,
-0x866d, 0x866e, 0x8c56, 0x8fd2, 0x8fcb, 0x8fd3, 0x8fcd, 0x8fd6,
-0x8fd5, 0x8fd7, 0x90b2, 0x90b4, 0x90af, 0x90b3, 0x90b0, 0x9639,
-0x963d, 0x963c, 0x963a, 0x9643, 0x4fcd, 0x4fc5, 0x4fd3, 0x4fb2,
-0x4fc9, 0x4fcb, 0x4fc1, 0x4fd4, 0x4fdc, 0x4fd9, 0x4fbb, 0x4fb3,
-0x4fdb, 0x4fc7, 0x4fd6, 0x4fba, 0x4fc0, 0x4fb9, 0x4fec, 0x5244,
-0x5249, 0x52c0, 0x52c2, 0x533d, 0x537c, 0x5397, 0x5396, 0x5399,
-0x5398, 0x54ba, 0x54a1, 0x54ad, 0x54a5, 0x54cf,
-63, 0xce40,
-0x54c3, 0x830d, 0x54b7, 0x54ae, 0x54d6, 0x54b6, 0x54c5, 0x54c6,
-0x54a0, 0x5470, 0x54bc, 0x54a2, 0x54be, 0x5472, 0x54de, 0x54b0,
-0x57b5, 0x579e, 0x579f, 0x57a4, 0x578c, 0x5797, 0x579d, 0x579b,
-0x5794, 0x5798, 0x578f, 0x5799, 0x57a5, 0x579a, 0x5795, 0x58f4,
-0x590d, 0x5953, 0x59e1, 0x59de, 0x59ee, 0x5a00, 0x59f1, 0x59dd,
-0x59fa, 0x59fd, 0x59fc, 0x59f6, 0x59e4, 0x59f2, 0x59f7, 0x59db,
-0x59e9, 0x59f3, 0x59f5, 0x59e0, 0x59fe, 0x59f4, 0x59ed, 0x5ba8,
-0x5c4c, 0x5cd0, 0x5cd8, 0x5ccc, 0x5cd7, 0x5ccb, 0x5cdb,
-94, 0xcea1,
-0x5cde, 0x5cda, 0x5cc9, 0x5cc7, 0x5cca, 0x5cd6, 0x5cd3, 0x5cd4,
-0x5ccf, 0x5cc8, 0x5cc6, 0x5cce, 0x5cdf, 0x5cf8, 0x5df9, 0x5e21,
-0x5e22, 0x5e23, 0x5e20, 0x5e24, 0x5eb0, 0x5ea4, 0x5ea2, 0x5e9b,
-0x5ea3, 0x5ea5, 0x5f07, 0x5f2e, 0x5f56, 0x5f86, 0x6037, 0x6039,
-0x6054, 0x6072, 0x605e, 0x6045, 0x6053, 0x6047, 0x6049, 0x605b,
-0x604c, 0x6040, 0x6042, 0x605f, 0x6024, 0x6044, 0x6058, 0x6066,
-0x606e, 0x6242, 0x6243, 0x62cf, 0x630d, 0x630b, 0x62f5, 0x630e,
-0x6303, 0x62eb, 0x62f9, 0x630f, 0x630c, 0x62f8, 0x62f6, 0x6300,
-0x6313, 0x6314, 0x62fa, 0x6315, 0x62fb, 0x62f0, 0x6541, 0x6543,
-0x65aa, 0x65bf, 0x6636, 0x6621, 0x6632, 0x6635, 0x661c, 0x6626,
-0x6622, 0x6633, 0x662b, 0x663a, 0x661d, 0x6634, 0x6639, 0x662e,
-0x670f, 0x6710, 0x67c1, 0x67f2, 0x67c8, 0x67ba,
-63, 0xcf40,
-0x67dc, 0x67bb, 0x67f8, 0x67d8, 0x67c0, 0x67b7, 0x67c5, 0x67eb,
-0x67e4, 0x67df, 0x67b5, 0x67cd, 0x67b3, 0x67f7, 0x67f6, 0x67ee,
-0x67e3, 0x67c2, 0x67b9, 0x67ce, 0x67e7, 0x67f0, 0x67b2, 0x67fc,
-0x67c6, 0x67ed, 0x67cc, 0x67ae, 0x67e6, 0x67db, 0x67fa, 0x67c9,
-0x67ca, 0x67c3, 0x67ea, 0x67cb, 0x6b28, 0x6b82, 0x6b84, 0x6bb6,
-0x6bd6, 0x6bd8, 0x6be0, 0x6c20, 0x6c21, 0x6d28, 0x6d34, 0x6d2d,
-0x6d1f, 0x6d3c, 0x6d3f, 0x6d12, 0x6d0a, 0x6cda, 0x6d33, 0x6d04,
-0x6d19, 0x6d3a, 0x6d1a, 0x6d11, 0x6d00, 0x6d1d, 0x6d42,
-94, 0xcfa1,
-0x6d01, 0x6d18, 0x6d37, 0x6d03, 0x6d0f, 0x6d40, 0x6d07, 0x6d20,
-0x6d2c, 0x6d08, 0x6d22, 0x6d09, 0x6d10, 0x70b7, 0x709f, 0x70be,
-0x70b1, 0x70b0, 0x70a1, 0x70b4, 0x70b5, 0x70a9, 0x7241, 0x7249,
-0x724a, 0x726c, 0x7270, 0x7273, 0x726e, 0x72ca, 0x72e4, 0x72e8,
-0x72eb, 0x72df, 0x72ea, 0x72e6, 0x72e3, 0x7385, 0x73cc, 0x73c2,
-0x73c8, 0x73c5, 0x73b9, 0x73b6, 0x73b5, 0x73b4, 0x73eb, 0x73bf,
-0x73c7, 0x73be, 0x73c3, 0x73c6, 0x73b8, 0x73cb, 0x74ec, 0x74ee,
-0x752e, 0x7547, 0x7548, 0x75a7, 0x75aa, 0x7679, 0x76c4, 0x7708,
-0x7703, 0x7704, 0x7705, 0x770a, 0x76f7, 0x76fb, 0x76fa, 0x77e7,
-0x77e8, 0x7806, 0x7811, 0x7812, 0x7805, 0x7810, 0x780f, 0x780e,
-0x7809, 0x7803, 0x7813, 0x794a, 0x794c, 0x794b, 0x7945, 0x7944,
-0x79d5, 0x79cd, 0x79cf, 0x79d6, 0x79ce, 0x7a80,
-63, 0xd040,
-0x7a7e, 0x7ad1, 0x7b00, 0x7b01, 0x7c7a, 0x7c78, 0x7c79, 0x7c7f,
-0x7c80, 0x7c81, 0x7d03, 0x7d08, 0x7d01, 0x7f58, 0x7f91, 0x7f8d,
-0x7fbe, 0x8007, 0x800e, 0x800f, 0x8014, 0x8037, 0x80d8, 0x80c7,
-0x80e0, 0x80d1, 0x80c8, 0x80c2, 0x80d0, 0x80c5, 0x80e3, 0x80d9,
-0x80dc, 0x80ca, 0x80d5, 0x80c9, 0x80cf, 0x80d7, 0x80e6, 0x80cd,
-0x81ff, 0x8221, 0x8294, 0x82d9, 0x82fe, 0x82f9, 0x8307, 0x82e8,
-0x8300, 0x82d5, 0x833a, 0x82eb, 0x82d6, 0x82f4, 0x82ec, 0x82e1,
-0x82f2, 0x82f5, 0x830c, 0x82fb, 0x82f6, 0x82f0, 0x82ea,
-94, 0xd0a1,
-0x82e4, 0x82e0, 0x82fa, 0x82f3, 0x82ed, 0x8677, 0x8674, 0x867c,
-0x8673, 0x8841, 0x884e, 0x8867, 0x886a, 0x8869, 0x89d3, 0x8a04,
-0x8a07, 0x8d72, 0x8fe3, 0x8fe1, 0x8fee, 0x8fe0, 0x90f1, 0x90bd,
-0x90bf, 0x90d5, 0x90c5, 0x90be, 0x90c7, 0x90cb, 0x90c8, 0x91d4,
-0x91d3, 0x9654, 0x964f, 0x9651, 0x9653, 0x964a, 0x964e, 0x501e,
-0x5005, 0x5007, 0x5013, 0x5022, 0x5030, 0x501b, 0x4ff5, 0x4ff4,
-0x5033, 0x5037, 0x502c, 0x4ff6, 0x4ff7, 0x5017, 0x501c, 0x5020,
-0x5027, 0x5035, 0x502f, 0x5031, 0x500e, 0x515a, 0x5194, 0x5193,
-0x51ca, 0x51c4, 0x51c5, 0x51c8, 0x51ce, 0x5261, 0x525a, 0x5252,
-0x525e, 0x525f, 0x5255, 0x5262, 0x52cd, 0x530e, 0x539e, 0x5526,
-0x54e2, 0x5517, 0x5512, 0x54e7, 0x54f3, 0x54e4, 0x551a, 0x54ff,
-0x5504, 0x5508, 0x54eb, 0x5511, 0x5505, 0x54f1,
-63, 0xd140,
-0x550a, 0x54fb, 0x54f7, 0x54f8, 0x54e0, 0x550e, 0x5503, 0x550b,
-0x5701, 0x5702, 0x57cc, 0x5832, 0x57d5, 0x57d2, 0x57ba, 0x57c6,
-0x57bd, 0x57bc, 0x57b8, 0x57b6, 0x57bf, 0x57c7, 0x57d0, 0x57b9,
-0x57c1, 0x590e, 0x594a, 0x5a19, 0x5a16, 0x5a2d, 0x5a2e, 0x5a15,
-0x5a0f, 0x5a17, 0x5a0a, 0x5a1e, 0x5a33, 0x5b6c, 0x5ba7, 0x5bad,
-0x5bac, 0x5c03, 0x5c56, 0x5c54, 0x5cec, 0x5cff, 0x5cee, 0x5cf1,
-0x5cf7, 0x5d00, 0x5cf9, 0x5e29, 0x5e28, 0x5ea8, 0x5eae, 0x5eaa,
-0x5eac, 0x5f33, 0x5f30, 0x5f67, 0x605d, 0x605a, 0x6067,
-94, 0xd1a1,
-0x6041, 0x60a2, 0x6088, 0x6080, 0x6092, 0x6081, 0x609d, 0x6083,
-0x6095, 0x609b, 0x6097, 0x6087, 0x609c, 0x608e, 0x6219, 0x6246,
-0x62f2, 0x6310, 0x6356, 0x632c, 0x6344, 0x6345, 0x6336, 0x6343,
-0x63e4, 0x6339, 0x634b, 0x634a, 0x633c, 0x6329, 0x6341, 0x6334,
-0x6358, 0x6354, 0x6359, 0x632d, 0x6347, 0x6333, 0x635a, 0x6351,
-0x6338, 0x6357, 0x6340, 0x6348, 0x654a, 0x6546, 0x65c6, 0x65c3,
-0x65c4, 0x65c2, 0x664a, 0x665f, 0x6647, 0x6651, 0x6712, 0x6713,
-0x681f, 0x681a, 0x6849, 0x6832, 0x6833, 0x683b, 0x684b, 0x684f,
-0x6816, 0x6831, 0x681c, 0x6835, 0x682b, 0x682d, 0x682f, 0x684e,
-0x6844, 0x6834, 0x681d, 0x6812, 0x6814, 0x6826, 0x6828, 0x682e,
-0x684d, 0x683a, 0x6825, 0x6820, 0x6b2c, 0x6b2f, 0x6b2d, 0x6b31,
-0x6b34, 0x6b6d, 0x8082, 0x6b88, 0x6be6, 0x6be4,
-63, 0xd240,
-0x6be8, 0x6be3, 0x6be2, 0x6be7, 0x6c25, 0x6d7a, 0x6d63, 0x6d64,
-0x6d76, 0x6d0d, 0x6d61, 0x6d92, 0x6d58, 0x6d62, 0x6d6d, 0x6d6f,
-0x6d91, 0x6d8d, 0x6def, 0x6d7f, 0x6d86, 0x6d5e, 0x6d67, 0x6d60,
-0x6d97, 0x6d70, 0x6d7c, 0x6d5f, 0x6d82, 0x6d98, 0x6d2f, 0x6d68,
-0x6d8b, 0x6d7e, 0x6d80, 0x6d84, 0x6d16, 0x6d83, 0x6d7b, 0x6d7d,
-0x6d75, 0x6d90, 0x70dc, 0x70d3, 0x70d1, 0x70dd, 0x70cb, 0x7f39,
-0x70e2, 0x70d7, 0x70d2, 0x70de, 0x70e0, 0x70d4, 0x70cd, 0x70c5,
-0x70c6, 0x70c7, 0x70da, 0x70ce, 0x70e1, 0x7242, 0x7278,
-94, 0xd2a1,
-0x7277, 0x7276, 0x7300, 0x72fa, 0x72f4, 0x72fe, 0x72f6, 0x72f3,
-0x72fb, 0x7301, 0x73d3, 0x73d9, 0x73e5, 0x73d6, 0x73bc, 0x73e7,
-0x73e3, 0x73e9, 0x73dc, 0x73d2, 0x73db, 0x73d4, 0x73dd, 0x73da,
-0x73d7, 0x73d8, 0x73e8, 0x74de, 0x74df, 0x74f4, 0x74f5, 0x7521,
-0x755b, 0x755f, 0x75b0, 0x75c1, 0x75bb, 0x75c4, 0x75c0, 0x75bf,
-0x75b6, 0x75ba, 0x768a, 0x76c9, 0x771d, 0x771b, 0x7710, 0x7713,
-0x7712, 0x7723, 0x7711, 0x7715, 0x7719, 0x771a, 0x7722, 0x7727,
-0x7823, 0x782c, 0x7822, 0x7835, 0x782f, 0x7828, 0x782e, 0x782b,
-0x7821, 0x7829, 0x7833, 0x782a, 0x7831, 0x7954, 0x795b, 0x794f,
-0x795c, 0x7953, 0x7952, 0x7951, 0x79eb, 0x79ec, 0x79e0, 0x79ee,
-0x79ed, 0x79ea, 0x79dc, 0x79de, 0x79dd, 0x7a86, 0x7a89, 0x7a85,
-0x7a8b, 0x7a8c, 0x7a8a, 0x7a87, 0x7ad8, 0x7b10,
-63, 0xd340,
-0x7b04, 0x7b13, 0x7b05, 0x7b0f, 0x7b08, 0x7b0a, 0x7b0e, 0x7b09,
-0x7b12, 0x7c84, 0x7c91, 0x7c8a, 0x7c8c, 0x7c88, 0x7c8d, 0x7c85,
-0x7d1e, 0x7d1d, 0x7d11, 0x7d0e, 0x7d18, 0x7d16, 0x7d13, 0x7d1f,
-0x7d12, 0x7d0f, 0x7d0c, 0x7f5c, 0x7f61, 0x7f5e, 0x7f60, 0x7f5d,
-0x7f5b, 0x7f96, 0x7f92, 0x7fc3, 0x7fc2, 0x7fc0, 0x8016, 0x803e,
-0x8039, 0x80fa, 0x80f2, 0x80f9, 0x80f5, 0x8101, 0x80fb, 0x8100,
-0x8201, 0x822f, 0x8225, 0x8333, 0x832d, 0x8344, 0x8319, 0x8351,
-0x8325, 0x8356, 0x833f, 0x8341, 0x8326, 0x831c, 0x8322,
-94, 0xd3a1,
-0x8342, 0x834e, 0x831b, 0x832a, 0x8308, 0x833c, 0x834d, 0x8316,
-0x8324, 0x8320, 0x8337, 0x832f, 0x8329, 0x8347, 0x8345, 0x834c,
-0x8353, 0x831e, 0x832c, 0x834b, 0x8327, 0x8348, 0x8653, 0x8652,
-0x86a2, 0x86a8, 0x8696, 0x868d, 0x8691, 0x869e, 0x8687, 0x8697,
-0x8686, 0x868b, 0x869a, 0x8685, 0x86a5, 0x8699, 0x86a1, 0x86a7,
-0x8695, 0x8698, 0x868e, 0x869d, 0x8690, 0x8694, 0x8843, 0x8844,
-0x886d, 0x8875, 0x8876, 0x8872, 0x8880, 0x8871, 0x887f, 0x886f,
-0x8883, 0x887e, 0x8874, 0x887c, 0x8a12, 0x8c47, 0x8c57, 0x8c7b,
-0x8ca4, 0x8ca3, 0x8d76, 0x8d78, 0x8db5, 0x8db7, 0x8db6, 0x8ed1,
-0x8ed3, 0x8ffe, 0x8ff5, 0x9002, 0x8fff, 0x8ffb, 0x9004, 0x8ffc,
-0x8ff6, 0x90d6, 0x90e0, 0x90d9, 0x90da, 0x90e3, 0x90df, 0x90e5,
-0x90d8, 0x90db, 0x90d7, 0x90dc, 0x90e4, 0x9150,
-63, 0xd440,
-0x914e, 0x914f, 0x91d5, 0x91e2, 0x91da, 0x965c, 0x965f, 0x96bc,
-0x98e3, 0x9adf, 0x9b2f, 0x4e7f, 0x5070, 0x506a, 0x5061, 0x505e,
-0x5060, 0x5053, 0x504b, 0x505d, 0x5072, 0x5048, 0x504d, 0x5041,
-0x505b, 0x504a, 0x5062, 0x5015, 0x5045, 0x505f, 0x5069, 0x506b,
-0x5063, 0x5064, 0x5046, 0x5040, 0x506e, 0x5073, 0x5057, 0x5051,
-0x51d0, 0x526b, 0x526d, 0x526c, 0x526e, 0x52d6, 0x52d3, 0x532d,
-0x539c, 0x5575, 0x5576, 0x553c, 0x554d, 0x5550, 0x5534, 0x552a,
-0x5551, 0x5562, 0x5536, 0x5535, 0x5530, 0x5552, 0x5545,
-94, 0xd4a1,
-0x550c, 0x5532, 0x5565, 0x554e, 0x5539, 0x5548, 0x552d, 0x553b,
-0x5540, 0x554b, 0x570a, 0x5707, 0x57fb, 0x5814, 0x57e2, 0x57f6,
-0x57dc, 0x57f4, 0x5800, 0x57ed, 0x57fd, 0x5808, 0x57f8, 0x580b,
-0x57f3, 0x57cf, 0x5807, 0x57ee, 0x57e3, 0x57f2, 0x57e5, 0x57ec,
-0x57e1, 0x580e, 0x57fc, 0x5810, 0x57e7, 0x5801, 0x580c, 0x57f1,
-0x57e9, 0x57f0, 0x580d, 0x5804, 0x595c, 0x5a60, 0x5a58, 0x5a55,
-0x5a67, 0x5a5e, 0x5a38, 0x5a35, 0x5a6d, 0x5a50, 0x5a5f, 0x5a65,
-0x5a6c, 0x5a53, 0x5a64, 0x5a57, 0x5a43, 0x5a5d, 0x5a52, 0x5a44,
-0x5a5b, 0x5a48, 0x5a8e, 0x5a3e, 0x5a4d, 0x5a39, 0x5a4c, 0x5a70,
-0x5a69, 0x5a47, 0x5a51, 0x5a56, 0x5a42, 0x5a5c, 0x5b72, 0x5b6e,
-0x5bc1, 0x5bc0, 0x5c59, 0x5d1e, 0x5d0b, 0x5d1d, 0x5d1a, 0x5d20,
-0x5d0c, 0x5d28, 0x5d0d, 0x5d26, 0x5d25, 0x5d0f,
-63, 0xd540,
-0x5d30, 0x5d12, 0x5d23, 0x5d1f, 0x5d2e, 0x5e3e, 0x5e34, 0x5eb1,
-0x5eb4, 0x5eb9, 0x5eb2, 0x5eb3, 0x5f36, 0x5f38, 0x5f9b, 0x5f96,
-0x5f9f, 0x608a, 0x6090, 0x6086, 0x60be, 0x60b0, 0x60ba, 0x60d3,
-0x60d4, 0x60cf, 0x60e4, 0x60d9, 0x60dd, 0x60c8, 0x60b1, 0x60db,
-0x60b7, 0x60ca, 0x60bf, 0x60c3, 0x60cd, 0x60c0, 0x6332, 0x6365,
-0x638a, 0x6382, 0x637d, 0x63bd, 0x639e, 0x63ad, 0x639d, 0x6397,
-0x63ab, 0x638e, 0x636f, 0x6387, 0x6390, 0x636e, 0x63af, 0x6375,
-0x639c, 0x636d, 0x63ae, 0x637c, 0x63a4, 0x633b, 0x639f,
-94, 0xd5a1,
-0x6378, 0x6385, 0x6381, 0x6391, 0x638d, 0x6370, 0x6553, 0x65cd,
-0x6665, 0x6661, 0x665b, 0x6659, 0x665c, 0x6662, 0x6718, 0x6879,
-0x6887, 0x6890, 0x689c, 0x686d, 0x686e, 0x68ae, 0x68ab, 0x6956,
-0x686f, 0x68a3, 0x68ac, 0x68a9, 0x6875, 0x6874, 0x68b2, 0x688f,
-0x6877, 0x6892, 0x687c, 0x686b, 0x6872, 0x68aa, 0x6880, 0x6871,
-0x687e, 0x689b, 0x6896, 0x688b, 0x68a0, 0x6889, 0x68a4, 0x6878,
-0x687b, 0x6891, 0x688c, 0x688a, 0x687d, 0x6b36, 0x6b33, 0x6b37,
-0x6b38, 0x6b91, 0x6b8f, 0x6b8d, 0x6b8e, 0x6b8c, 0x6c2a, 0x6dc0,
-0x6dab, 0x6db4, 0x6db3, 0x6e74, 0x6dac, 0x6de9, 0x6de2, 0x6db7,
-0x6df6, 0x6dd4, 0x6e00, 0x6dc8, 0x6de0, 0x6ddf, 0x6dd6, 0x6dbe,
-0x6de5, 0x6ddc, 0x6ddd, 0x6ddb, 0x6df4, 0x6dca, 0x6dbd, 0x6ded,
-0x6df0, 0x6dba, 0x6dd5, 0x6dc2, 0x6dcf, 0x6dc9,
-63, 0xd640,
-0x6dd0, 0x6df2, 0x6dd3, 0x6dfd, 0x6dd7, 0x6dcd, 0x6de3, 0x6dbb,
-0x70fa, 0x710d, 0x70f7, 0x7117, 0x70f4, 0x710c, 0x70f0, 0x7104,
-0x70f3, 0x7110, 0x70fc, 0x70ff, 0x7106, 0x7113, 0x7100, 0x70f8,
-0x70f6, 0x710b, 0x7102, 0x710e, 0x727e, 0x727b, 0x727c, 0x727f,
-0x731d, 0x7317, 0x7307, 0x7311, 0x7318, 0x730a, 0x7308, 0x72ff,
-0x730f, 0x731e, 0x7388, 0x73f6, 0x73f8, 0x73f5, 0x7404, 0x7401,
-0x73fd, 0x7407, 0x7400, 0x73fa, 0x73fc, 0x73ff, 0x740c, 0x740b,
-0x73f4, 0x7408, 0x7564, 0x7563, 0x75ce, 0x75d2, 0x75cf,
-94, 0xd6a1,
-0x75cb, 0x75cc, 0x75d1, 0x75d0, 0x768f, 0x7689, 0x76d3, 0x7739,
-0x772f, 0x772d, 0x7731, 0x7732, 0x7734, 0x7733, 0x773d, 0x7725,
-0x773b, 0x7735, 0x7848, 0x7852, 0x7849, 0x784d, 0x784a, 0x784c,
-0x7826, 0x7845, 0x7850, 0x7964, 0x7967, 0x7969, 0x796a, 0x7963,
-0x796b, 0x7961, 0x79bb, 0x79fa, 0x79f8, 0x79f6, 0x79f7, 0x7a8f,
-0x7a94, 0x7a90, 0x7b35, 0x7b47, 0x7b34, 0x7b25, 0x7b30, 0x7b22,
-0x7b24, 0x7b33, 0x7b18, 0x7b2a, 0x7b1d, 0x7b31, 0x7b2b, 0x7b2d,
-0x7b2f, 0x7b32, 0x7b38, 0x7b1a, 0x7b23, 0x7c94, 0x7c98, 0x7c96,
-0x7ca3, 0x7d35, 0x7d3d, 0x7d38, 0x7d36, 0x7d3a, 0x7d45, 0x7d2c,
-0x7d29, 0x7d41, 0x7d47, 0x7d3e, 0x7d3f, 0x7d4a, 0x7d3b, 0x7d28,
-0x7f63, 0x7f95, 0x7f9c, 0x7f9d, 0x7f9b, 0x7fca, 0x7fcb, 0x7fcd,
-0x7fd0, 0x7fd1, 0x7fc7, 0x7fcf, 0x7fc9, 0x801f,
-63, 0xd740,
-0x801e, 0x801b, 0x8047, 0x8043, 0x8048, 0x8118, 0x8125, 0x8119,
-0x811b, 0x812d, 0x811f, 0x812c, 0x811e, 0x8121, 0x8115, 0x8127,
-0x811d, 0x8122, 0x8211, 0x8238, 0x8233, 0x823a, 0x8234, 0x8232,
-0x8274, 0x8390, 0x83a3, 0x83a8, 0x838d, 0x837a, 0x8373, 0x83a4,
-0x8374, 0x838f, 0x8381, 0x8395, 0x8399, 0x8375, 0x8394, 0x83a9,
-0x837d, 0x8383, 0x838c, 0x839d, 0x839b, 0x83aa, 0x838b, 0x837e,
-0x83a5, 0x83af, 0x8388, 0x8397, 0x83b0, 0x837f, 0x83a6, 0x8387,
-0x83ae, 0x8376, 0x839a, 0x8659, 0x8656, 0x86bf, 0x86b7,
-94, 0xd7a1,
-0x86c2, 0x86c1, 0x86c5, 0x86ba, 0x86b0, 0x86c8, 0x86b9, 0x86b3,
-0x86b8, 0x86cc, 0x86b4, 0x86bb, 0x86bc, 0x86c3, 0x86bd, 0x86be,
-0x8852, 0x8889, 0x8895, 0x88a8, 0x88a2, 0x88aa, 0x889a, 0x8891,
-0x88a1, 0x889f, 0x8898, 0x88a7, 0x8899, 0x889b, 0x8897, 0x88a4,
-0x88ac, 0x888c, 0x8893, 0x888e, 0x8982, 0x89d6, 0x89d9, 0x89d5,
-0x8a30, 0x8a27, 0x8a2c, 0x8a1e, 0x8c39, 0x8c3b, 0x8c5c, 0x8c5d,
-0x8c7d, 0x8ca5, 0x8d7d, 0x8d7b, 0x8d79, 0x8dbc, 0x8dc2, 0x8db9,
-0x8dbf, 0x8dc1, 0x8ed8, 0x8ede, 0x8edd, 0x8edc, 0x8ed7, 0x8ee0,
-0x8ee1, 0x9024, 0x900b, 0x9011, 0x901c, 0x900c, 0x9021, 0x90ef,
-0x90ea, 0x90f0, 0x90f4, 0x90f2, 0x90f3, 0x90d4, 0x90eb, 0x90ec,
-0x90e9, 0x9156, 0x9158, 0x915a, 0x9153, 0x9155, 0x91ec, 0x91f4,
-0x91f1, 0x91f3, 0x91f8, 0x91e4, 0x91f9, 0x91ea,
-63, 0xd840,
-0x91eb, 0x91f7, 0x91e8, 0x91ee, 0x957a, 0x9586, 0x9588, 0x967c,
-0x966d, 0x966b, 0x9671, 0x966f, 0x96bf, 0x976a, 0x9804, 0x98e5,
-0x9997, 0x509b, 0x5095, 0x5094, 0x509e, 0x508b, 0x50a3, 0x5083,
-0x508c, 0x508e, 0x509d, 0x5068, 0x509c, 0x5092, 0x5082, 0x5087,
-0x515f, 0x51d4, 0x5312, 0x5311, 0x53a4, 0x53a7, 0x5591, 0x55a8,
-0x55a5, 0x55ad, 0x5577, 0x5645, 0x55a2, 0x5593, 0x5588, 0x558f,
-0x55b5, 0x5581, 0x55a3, 0x5592, 0x55a4, 0x557d, 0x558c, 0x55a6,
-0x557f, 0x5595, 0x55a1, 0x558e, 0x570c, 0x5829, 0x5837,
-94, 0xd8a1,
-0x5819, 0x581e, 0x5827, 0x5823, 0x5828, 0x57f5, 0x5848, 0x5825,
-0x581c, 0x581b, 0x5833, 0x583f, 0x5836, 0x582e, 0x5839, 0x5838,
-0x582d, 0x582c, 0x583b, 0x5961, 0x5aaf, 0x5a94, 0x5a9f, 0x5a7a,
-0x5aa2, 0x5a9e, 0x5a78, 0x5aa6, 0x5a7c, 0x5aa5, 0x5aac, 0x5a95,
-0x5aae, 0x5a37, 0x5a84, 0x5a8a, 0x5a97, 0x5a83, 0x5a8b, 0x5aa9,
-0x5a7b, 0x5a7d, 0x5a8c, 0x5a9c, 0x5a8f, 0x5a93, 0x5a9d, 0x5bea,
-0x5bcd, 0x5bcb, 0x5bd4, 0x5bd1, 0x5bca, 0x5bce, 0x5c0c, 0x5c30,
-0x5d37, 0x5d43, 0x5d6b, 0x5d41, 0x5d4b, 0x5d3f, 0x5d35, 0x5d51,
-0x5d4e, 0x5d55, 0x5d33, 0x5d3a, 0x5d52, 0x5d3d, 0x5d31, 0x5d59,
-0x5d42, 0x5d39, 0x5d49, 0x5d38, 0x5d3c, 0x5d32, 0x5d36, 0x5d40,
-0x5d45, 0x5e44, 0x5e41, 0x5f58, 0x5fa6, 0x5fa5, 0x5fab, 0x60c9,
-0x60b9, 0x60cc, 0x60e2, 0x60ce, 0x60c4, 0x6114,
-63, 0xd940,
-0x60f2, 0x610a, 0x6116, 0x6105, 0x60f5, 0x6113, 0x60f8, 0x60fc,
-0x60fe, 0x60c1, 0x6103, 0x6118, 0x611d, 0x6110, 0x60ff, 0x6104,
-0x610b, 0x624a, 0x6394, 0x63b1, 0x63b0, 0x63ce, 0x63e5, 0x63e8,
-0x63ef, 0x63c3, 0x649d, 0x63f3, 0x63ca, 0x63e0, 0x63f6, 0x63d5,
-0x63f2, 0x63f5, 0x6461, 0x63df, 0x63be, 0x63dd, 0x63dc, 0x63c4,
-0x63d8, 0x63d3, 0x63c2, 0x63c7, 0x63cc, 0x63cb, 0x63c8, 0x63f0,
-0x63d7, 0x63d9, 0x6532, 0x6567, 0x656a, 0x6564, 0x655c, 0x6568,
-0x6565, 0x658c, 0x659d, 0x659e, 0x65ae, 0x65d0, 0x65d2,
-94, 0xd9a1,
-0x667c, 0x666c, 0x667b, 0x6680, 0x6671, 0x6679, 0x666a, 0x6672,
-0x6701, 0x690c, 0x68d3, 0x6904, 0x68dc, 0x692a, 0x68ec, 0x68ea,
-0x68f1, 0x690f, 0x68d6, 0x68f7, 0x68eb, 0x68e4, 0x68f6, 0x6913,
-0x6910, 0x68f3, 0x68e1, 0x6907, 0x68cc, 0x6908, 0x6970, 0x68b4,
-0x6911, 0x68ef, 0x68c6, 0x6914, 0x68f8, 0x68d0, 0x68fd, 0x68fc,
-0x68e8, 0x690b, 0x690a, 0x6917, 0x68ce, 0x68c8, 0x68dd, 0x68de,
-0x68e6, 0x68f4, 0x68d1, 0x6906, 0x68d4, 0x68e9, 0x6915, 0x6925,
-0x68c7, 0x6b39, 0x6b3b, 0x6b3f, 0x6b3c, 0x6b94, 0x6b97, 0x6b99,
-0x6b95, 0x6bbd, 0x6bf0, 0x6bf2, 0x6bf3, 0x6c30, 0x6dfc, 0x6e46,
-0x6e47, 0x6e1f, 0x6e49, 0x6e88, 0x6e3c, 0x6e3d, 0x6e45, 0x6e62,
-0x6e2b, 0x6e3f, 0x6e41, 0x6e5d, 0x6e73, 0x6e1c, 0x6e33, 0x6e4b,
-0x6e40, 0x6e51, 0x6e3b, 0x6e03, 0x6e2e, 0x6e5e,
-63, 0xda40,
-0x6e68, 0x6e5c, 0x6e61, 0x6e31, 0x6e28, 0x6e60, 0x6e71, 0x6e6b,
-0x6e39, 0x6e22, 0x6e30, 0x6e53, 0x6e65, 0x6e27, 0x6e78, 0x6e64,
-0x6e77, 0x6e55, 0x6e79, 0x6e52, 0x6e66, 0x6e35, 0x6e36, 0x6e5a,
-0x7120, 0x711e, 0x712f, 0x70fb, 0x712e, 0x7131, 0x7123, 0x7125,
-0x7122, 0x7132, 0x711f, 0x7128, 0x713a, 0x711b, 0x724b, 0x725a,
-0x7288, 0x7289, 0x7286, 0x7285, 0x728b, 0x7312, 0x730b, 0x7330,
-0x7322, 0x7331, 0x7333, 0x7327, 0x7332, 0x732d, 0x7326, 0x7323,
-0x7335, 0x730c, 0x742e, 0x742c, 0x7430, 0x742b, 0x7416,
-94, 0xdaa1,
-0x741a, 0x7421, 0x742d, 0x7431, 0x7424, 0x7423, 0x741d, 0x7429,
-0x7420, 0x7432, 0x74fb, 0x752f, 0x756f, 0x756c, 0x75e7, 0x75da,
-0x75e1, 0x75e6, 0x75dd, 0x75df, 0x75e4, 0x75d7, 0x7695, 0x7692,
-0x76da, 0x7746, 0x7747, 0x7744, 0x774d, 0x7745, 0x774a, 0x774e,
-0x774b, 0x774c, 0x77de, 0x77ec, 0x7860, 0x7864, 0x7865, 0x785c,
-0x786d, 0x7871, 0x786a, 0x786e, 0x7870, 0x7869, 0x7868, 0x785e,
-0x7862, 0x7974, 0x7973, 0x7972, 0x7970, 0x7a02, 0x7a0a, 0x7a03,
-0x7a0c, 0x7a04, 0x7a99, 0x7ae6, 0x7ae4, 0x7b4a, 0x7b3b, 0x7b44,
-0x7b48, 0x7b4c, 0x7b4e, 0x7b40, 0x7b58, 0x7b45, 0x7ca2, 0x7c9e,
-0x7ca8, 0x7ca1, 0x7d58, 0x7d6f, 0x7d63, 0x7d53, 0x7d56, 0x7d67,
-0x7d6a, 0x7d4f, 0x7d6d, 0x7d5c, 0x7d6b, 0x7d52, 0x7d54, 0x7d69,
-0x7d51, 0x7d5f, 0x7d4e, 0x7f3e, 0x7f3f, 0x7f65,
-63, 0xdb40,
-0x7f66, 0x7fa2, 0x7fa0, 0x7fa1, 0x7fd7, 0x8051, 0x804f, 0x8050,
-0x80fe, 0x80d4, 0x8143, 0x814a, 0x8152, 0x814f, 0x8147, 0x813d,
-0x814d, 0x813a, 0x81e6, 0x81ee, 0x81f7, 0x81f8, 0x81f9, 0x8204,
-0x823c, 0x823d, 0x823f, 0x8275, 0x833b, 0x83cf, 0x83f9, 0x8423,
-0x83c0, 0x83e8, 0x8412, 0x83e7, 0x83e4, 0x83fc, 0x83f6, 0x8410,
-0x83c6, 0x83c8, 0x83eb, 0x83e3, 0x83bf, 0x8401, 0x83dd, 0x83e5,
-0x83d8, 0x83ff, 0x83e1, 0x83cb, 0x83ce, 0x83d6, 0x83f5, 0x83c9,
-0x8409, 0x840f, 0x83de, 0x8411, 0x8406, 0x83c2, 0x83f3,
-94, 0xdba1,
-0x83d5, 0x83fa, 0x83c7, 0x83d1, 0x83ea, 0x8413, 0x83c3, 0x83ec,
-0x83ee, 0x83c4, 0x83fb, 0x83d7, 0x83e2, 0x841b, 0x83db, 0x83fe,
-0x86d8, 0x86e2, 0x86e6, 0x86d3, 0x86e3, 0x86da, 0x86ea, 0x86dd,
-0x86eb, 0x86dc, 0x86ec, 0x86e9, 0x86d7, 0x86e8, 0x86d1, 0x8848,
-0x8856, 0x8855, 0x88ba, 0x88d7, 0x88b9, 0x88b8, 0x88c0, 0x88be,
-0x88b6, 0x88bc, 0x88b7, 0x88bd, 0x88b2, 0x8901, 0x88c9, 0x8995,
-0x8998, 0x8997, 0x89dd, 0x89da, 0x89db, 0x8a4e, 0x8a4d, 0x8a39,
-0x8a59, 0x8a40, 0x8a57, 0x8a58, 0x8a44, 0x8a45, 0x8a52, 0x8a48,
-0x8a51, 0x8a4a, 0x8a4c, 0x8a4f, 0x8c5f, 0x8c81, 0x8c80, 0x8cba,
-0x8cbe, 0x8cb0, 0x8cb9, 0x8cb5, 0x8d84, 0x8d80, 0x8d89, 0x8dd8,
-0x8dd3, 0x8dcd, 0x8dc7, 0x8dd6, 0x8ddc, 0x8dcf, 0x8dd5, 0x8dd9,
-0x8dc8, 0x8dd7, 0x8dc5, 0x8eef, 0x8ef7, 0x8efa,
-63, 0xdc40,
-0x8ef9, 0x8ee6, 0x8eee, 0x8ee5, 0x8ef5, 0x8ee7, 0x8ee8, 0x8ef6,
-0x8eeb, 0x8ef1, 0x8eec, 0x8ef4, 0x8ee9, 0x902d, 0x9034, 0x902f,
-0x9106, 0x912c, 0x9104, 0x90ff, 0x90fc, 0x9108, 0x90f9, 0x90fb,
-0x9101, 0x9100, 0x9107, 0x9105, 0x9103, 0x9161, 0x9164, 0x915f,
-0x9162, 0x9160, 0x9201, 0x920a, 0x9225, 0x9203, 0x921a, 0x9226,
-0x920f, 0x920c, 0x9200, 0x9212, 0x91ff, 0x91fd, 0x9206, 0x9204,
-0x9227, 0x9202, 0x921c, 0x9224, 0x9219, 0x9217, 0x9205, 0x9216,
-0x957b, 0x958d, 0x958c, 0x9590, 0x9687, 0x967e, 0x9688,
-94, 0xdca1,
-0x9689, 0x9683, 0x9680, 0x96c2, 0x96c8, 0x96c3, 0x96f1, 0x96f0,
-0x976c, 0x9770, 0x976e, 0x9807, 0x98a9, 0x98eb, 0x9ce6, 0x9ef9,
-0x4e83, 0x4e84, 0x4eb6, 0x50bd, 0x50bf, 0x50c6, 0x50ae, 0x50c4,
-0x50ca, 0x50b4, 0x50c8, 0x50c2, 0x50b0, 0x50c1, 0x50ba, 0x50b1,
-0x50cb, 0x50c9, 0x50b6, 0x50b8, 0x51d7, 0x527a, 0x5278, 0x527b,
-0x527c, 0x55c3, 0x55db, 0x55cc, 0x55d0, 0x55cb, 0x55ca, 0x55dd,
-0x55c0, 0x55d4, 0x55c4, 0x55e9, 0x55bf, 0x55d2, 0x558d, 0x55cf,
-0x55d5, 0x55e2, 0x55d6, 0x55c8, 0x55f2, 0x55cd, 0x55d9, 0x55c2,
-0x5714, 0x5853, 0x5868, 0x5864, 0x584f, 0x584d, 0x5849, 0x586f,
-0x5855, 0x584e, 0x585d, 0x5859, 0x5865, 0x585b, 0x583d, 0x5863,
-0x5871, 0x58fc, 0x5ac7, 0x5ac4, 0x5acb, 0x5aba, 0x5ab8, 0x5ab1,
-0x5ab5, 0x5ab0, 0x5abf, 0x5ac8, 0x5abb, 0x5ac6,
-63, 0xdd40,
-0x5ab7, 0x5ac0, 0x5aca, 0x5ab4, 0x5ab6, 0x5acd, 0x5ab9, 0x5a90,
-0x5bd6, 0x5bd8, 0x5bd9, 0x5c1f, 0x5c33, 0x5d71, 0x5d63, 0x5d4a,
-0x5d65, 0x5d72, 0x5d6c, 0x5d5e, 0x5d68, 0x5d67, 0x5d62, 0x5df0,
-0x5e4f, 0x5e4e, 0x5e4a, 0x5e4d, 0x5e4b, 0x5ec5, 0x5ecc, 0x5ec6,
-0x5ecb, 0x5ec7, 0x5f40, 0x5faf, 0x5fad, 0x60f7, 0x6149, 0x614a,
-0x612b, 0x6145, 0x6136, 0x6132, 0x612e, 0x6146, 0x612f, 0x614f,
-0x6129, 0x6140, 0x6220, 0x9168, 0x6223, 0x6225, 0x6224, 0x63c5,
-0x63f1, 0x63eb, 0x6410, 0x6412, 0x6409, 0x6420, 0x6424,
-94, 0xdda1,
-0x6433, 0x6443, 0x641f, 0x6415, 0x6418, 0x6439, 0x6437, 0x6422,
-0x6423, 0x640c, 0x6426, 0x6430, 0x6428, 0x6441, 0x6435, 0x642f,
-0x640a, 0x641a, 0x6440, 0x6425, 0x6427, 0x640b, 0x63e7, 0x641b,
-0x642e, 0x6421, 0x640e, 0x656f, 0x6592, 0x65d3, 0x6686, 0x668c,
-0x6695, 0x6690, 0x668b, 0x668a, 0x6699, 0x6694, 0x6678, 0x6720,
-0x6966, 0x695f, 0x6938, 0x694e, 0x6962, 0x6971, 0x693f, 0x6945,
-0x696a, 0x6939, 0x6942, 0x6957, 0x6959, 0x697a, 0x6948, 0x6949,
-0x6935, 0x696c, 0x6933, 0x693d, 0x6965, 0x68f0, 0x6978, 0x6934,
-0x6969, 0x6940, 0x696f, 0x6944, 0x6976, 0x6958, 0x6941, 0x6974,
-0x694c, 0x693b, 0x694b, 0x6937, 0x695c, 0x694f, 0x6951, 0x6932,
-0x6952, 0x692f, 0x697b, 0x693c, 0x6b46, 0x6b45, 0x6b43, 0x6b42,
-0x6b48, 0x6b41, 0x6b9b, 0xfa0d, 0x6bfb, 0x6bfc,
-63, 0xde40,
-0x6bf9, 0x6bf7, 0x6bf8, 0x6e9b, 0x6ed6, 0x6ec8, 0x6e8f, 0x6ec0,
-0x6e9f, 0x6e93, 0x6e94, 0x6ea0, 0x6eb1, 0x6eb9, 0x6ec6, 0x6ed2,
-0x6ebd, 0x6ec1, 0x6e9e, 0x6ec9, 0x6eb7, 0x6eb0, 0x6ecd, 0x6ea6,
-0x6ecf, 0x6eb2, 0x6ebe, 0x6ec3, 0x6edc, 0x6ed8, 0x6e99, 0x6e92,
-0x6e8e, 0x6e8d, 0x6ea4, 0x6ea1, 0x6ebf, 0x6eb3, 0x6ed0, 0x6eca,
-0x6e97, 0x6eae, 0x6ea3, 0x7147, 0x7154, 0x7152, 0x7163, 0x7160,
-0x7141, 0x715d, 0x7162, 0x7172, 0x7178, 0x716a, 0x7161, 0x7142,
-0x7158, 0x7143, 0x714b, 0x7170, 0x715f, 0x7150, 0x7153,
-94, 0xdea1,
-0x7144, 0x714d, 0x715a, 0x724f, 0x728d, 0x728c, 0x7291, 0x7290,
-0x728e, 0x733c, 0x7342, 0x733b, 0x733a, 0x7340, 0x734a, 0x7349,
-0x7444, 0x744a, 0x744b, 0x7452, 0x7451, 0x7457, 0x7440, 0x744f,
-0x7450, 0x744e, 0x7442, 0x7446, 0x744d, 0x7454, 0x74e1, 0x74ff,
-0x74fe, 0x74fd, 0x751d, 0x7579, 0x7577, 0x6983, 0x75ef, 0x760f,
-0x7603, 0x75f7, 0x75fe, 0x75fc, 0x75f9, 0x75f8, 0x7610, 0x75fb,
-0x75f6, 0x75ed, 0x75f5, 0x75fd, 0x7699, 0x76b5, 0x76dd, 0x7755,
-0x775f, 0x7760, 0x7752, 0x7756, 0x775a, 0x7769, 0x7767, 0x7754,
-0x7759, 0x776d, 0x77e0, 0x7887, 0x789a, 0x7894, 0x788f, 0x7884,
-0x7895, 0x7885, 0x7886, 0x78a1, 0x7883, 0x7879, 0x7899, 0x7880,
-0x7896, 0x787b, 0x797c, 0x7982, 0x797d, 0x7979, 0x7a11, 0x7a18,
-0x7a19, 0x7a12, 0x7a17, 0x7a15, 0x7a22, 0x7a13,
-63, 0xdf40,
-0x7a1b, 0x7a10, 0x7aa3, 0x7aa2, 0x7a9e, 0x7aeb, 0x7b66, 0x7b64,
-0x7b6d, 0x7b74, 0x7b69, 0x7b72, 0x7b65, 0x7b73, 0x7b71, 0x7b70,
-0x7b61, 0x7b78, 0x7b76, 0x7b63, 0x7cb2, 0x7cb4, 0x7caf, 0x7d88,
-0x7d86, 0x7d80, 0x7d8d, 0x7d7f, 0x7d85, 0x7d7a, 0x7d8e, 0x7d7b,
-0x7d83, 0x7d7c, 0x7d8c, 0x7d94, 0x7d84, 0x7d7d, 0x7d92, 0x7f6d,
-0x7f6b, 0x7f67, 0x7f68, 0x7f6c, 0x7fa6, 0x7fa5, 0x7fa7, 0x7fdb,
-0x7fdc, 0x8021, 0x8164, 0x8160, 0x8177, 0x815c, 0x8169, 0x815b,
-0x8162, 0x8172, 0x6721, 0x815e, 0x8176, 0x8167, 0x816f,
-94, 0xdfa1,
-0x8144, 0x8161, 0x821d, 0x8249, 0x8244, 0x8240, 0x8242, 0x8245,
-0x84f1, 0x843f, 0x8456, 0x8476, 0x8479, 0x848f, 0x848d, 0x8465,
-0x8451, 0x8440, 0x8486, 0x8467, 0x8430, 0x844d, 0x847d, 0x845a,
-0x8459, 0x8474, 0x8473, 0x845d, 0x8507, 0x845e, 0x8437, 0x843a,
-0x8434, 0x847a, 0x8443, 0x8478, 0x8432, 0x8445, 0x8429, 0x83d9,
-0x844b, 0x842f, 0x8442, 0x842d, 0x845f, 0x8470, 0x8439, 0x844e,
-0x844c, 0x8452, 0x846f, 0x84c5, 0x848e, 0x843b, 0x8447, 0x8436,
-0x8433, 0x8468, 0x847e, 0x8444, 0x842b, 0x8460, 0x8454, 0x846e,
-0x8450, 0x870b, 0x8704, 0x86f7, 0x870c, 0x86fa, 0x86d6, 0x86f5,
-0x874d, 0x86f8, 0x870e, 0x8709, 0x8701, 0x86f6, 0x870d, 0x8705,
-0x88d6, 0x88cb, 0x88cd, 0x88ce, 0x88de, 0x88db, 0x88da, 0x88cc,
-0x88d0, 0x8985, 0x899b, 0x89df, 0x89e5, 0x89e4,
-63, 0xe040,
-0x89e1, 0x89e0, 0x89e2, 0x89dc, 0x89e6, 0x8a76, 0x8a86, 0x8a7f,
-0x8a61, 0x8a3f, 0x8a77, 0x8a82, 0x8a84, 0x8a75, 0x8a83, 0x8a81,
-0x8a74, 0x8a7a, 0x8c3c, 0x8c4b, 0x8c4a, 0x8c65, 0x8c64, 0x8c66,
-0x8c86, 0x8c84, 0x8c85, 0x8ccc, 0x8d68, 0x8d69, 0x8d91, 0x8d8c,
-0x8d8e, 0x8d8f, 0x8d8d, 0x8d93, 0x8d94, 0x8d90, 0x8d92, 0x8df0,
-0x8de0, 0x8dec, 0x8df1, 0x8dee, 0x8dd0, 0x8de9, 0x8de3, 0x8de2,
-0x8de7, 0x8df2, 0x8deb, 0x8df4, 0x8f06, 0x8eff, 0x8f01, 0x8f00,
-0x8f05, 0x8f07, 0x8f08, 0x8f02, 0x8f0b, 0x9052, 0x903f,
-94, 0xe0a1,
-0x9044, 0x9049, 0x903d, 0x9110, 0x910d, 0x910f, 0x9111, 0x9116,
-0x9114, 0x910b, 0x910e, 0x916e, 0x916f, 0x9248, 0x9252, 0x9230,
-0x923a, 0x9266, 0x9233, 0x9265, 0x925e, 0x9283, 0x922e, 0x924a,
-0x9246, 0x926d, 0x926c, 0x924f, 0x9260, 0x9267, 0x926f, 0x9236,
-0x9261, 0x9270, 0x9231, 0x9254, 0x9263, 0x9250, 0x9272, 0x924e,
-0x9253, 0x924c, 0x9256, 0x9232, 0x959f, 0x959c, 0x959e, 0x959b,
-0x9692, 0x9693, 0x9691, 0x9697, 0x96ce, 0x96fa, 0x96fd, 0x96f8,
-0x96f5, 0x9773, 0x9777, 0x9778, 0x9772, 0x980f, 0x980d, 0x980e,
-0x98ac, 0x98f6, 0x98f9, 0x99af, 0x99b2, 0x99b0, 0x99b5, 0x9aad,
-0x9aab, 0x9b5b, 0x9cea, 0x9ced, 0x9ce7, 0x9e80, 0x9efd, 0x50e6,
-0x50d4, 0x50d7, 0x50e8, 0x50f3, 0x50db, 0x50ea, 0x50dd, 0x50e4,
-0x50d3, 0x50ec, 0x50f0, 0x50ef, 0x50e3, 0x50e0,
-63, 0xe140,
-0x51d8, 0x5280, 0x5281, 0x52e9, 0x52eb, 0x5330, 0x53ac, 0x5627,
-0x5615, 0x560c, 0x5612, 0x55fc, 0x560f, 0x561c, 0x5601, 0x5613,
-0x5602, 0x55fa, 0x561d, 0x5604, 0x55ff, 0x55f9, 0x5889, 0x587c,
-0x5890, 0x5898, 0x5886, 0x5881, 0x587f, 0x5874, 0x588b, 0x587a,
-0x5887, 0x5891, 0x588e, 0x5876, 0x5882, 0x5888, 0x587b, 0x5894,
-0x588f, 0x58fe, 0x596b, 0x5adc, 0x5aee, 0x5ae5, 0x5ad5, 0x5aea,
-0x5ada, 0x5aed, 0x5aeb, 0x5af3, 0x5ae2, 0x5ae0, 0x5adb, 0x5aec,
-0x5ade, 0x5add, 0x5ad9, 0x5ae8, 0x5adf, 0x5b77, 0x5be0,
-94, 0xe1a1,
-0x5be3, 0x5c63, 0x5d82, 0x5d80, 0x5d7d, 0x5d86, 0x5d7a, 0x5d81,
-0x5d77, 0x5d8a, 0x5d89, 0x5d88, 0x5d7e, 0x5d7c, 0x5d8d, 0x5d79,
-0x5d7f, 0x5e58, 0x5e59, 0x5e53, 0x5ed8, 0x5ed1, 0x5ed7, 0x5ece,
-0x5edc, 0x5ed5, 0x5ed9, 0x5ed2, 0x5ed4, 0x5f44, 0x5f43, 0x5f6f,
-0x5fb6, 0x612c, 0x6128, 0x6141, 0x615e, 0x6171, 0x6173, 0x6152,
-0x6153, 0x6172, 0x616c, 0x6180, 0x6174, 0x6154, 0x617a, 0x615b,
-0x6165, 0x613b, 0x616a, 0x6161, 0x6156, 0x6229, 0x6227, 0x622b,
-0x642b, 0x644d, 0x645b, 0x645d, 0x6474, 0x6476, 0x6472, 0x6473,
-0x647d, 0x6475, 0x6466, 0x64a6, 0x644e, 0x6482, 0x645e, 0x645c,
-0x644b, 0x6453, 0x6460, 0x6450, 0x647f, 0x643f, 0x646c, 0x646b,
-0x6459, 0x6465, 0x6477, 0x6573, 0x65a0, 0x66a1, 0x66a0, 0x669f,
-0x6705, 0x6704, 0x6722, 0x69b1, 0x69b6, 0x69c9,
-63, 0xe240,
-0x69a0, 0x69ce, 0x6996, 0x69b0, 0x69ac, 0x69bc, 0x6991, 0x6999,
-0x698e, 0x69a7, 0x698d, 0x69a9, 0x69be, 0x69af, 0x69bf, 0x69c4,
-0x69bd, 0x69a4, 0x69d4, 0x69b9, 0x69ca, 0x699a, 0x69cf, 0x69b3,
-0x6993, 0x69aa, 0x69a1, 0x699e, 0x69d9, 0x6997, 0x6990, 0x69c2,
-0x69b5, 0x69a5, 0x69c6, 0x6b4a, 0x6b4d, 0x6b4b, 0x6b9e, 0x6b9f,
-0x6ba0, 0x6bc3, 0x6bc4, 0x6bfe, 0x6ece, 0x6ef5, 0x6ef1, 0x6f03,
-0x6f25, 0x6ef8, 0x6f37, 0x6efb, 0x6f2e, 0x6f09, 0x6f4e, 0x6f19,
-0x6f1a, 0x6f27, 0x6f18, 0x6f3b, 0x6f12, 0x6eed, 0x6f0a,
-94, 0xe2a1,
-0x6f36, 0x6f73, 0x6ef9, 0x6eee, 0x6f2d, 0x6f40, 0x6f30, 0x6f3c,
-0x6f35, 0x6eeb, 0x6f07, 0x6f0e, 0x6f43, 0x6f05, 0x6efd, 0x6ef6,
-0x6f39, 0x6f1c, 0x6efc, 0x6f3a, 0x6f1f, 0x6f0d, 0x6f1e, 0x6f08,
-0x6f21, 0x7187, 0x7190, 0x7189, 0x7180, 0x7185, 0x7182, 0x718f,
-0x717b, 0x7186, 0x7181, 0x7197, 0x7244, 0x7253, 0x7297, 0x7295,
-0x7293, 0x7343, 0x734d, 0x7351, 0x734c, 0x7462, 0x7473, 0x7471,
-0x7475, 0x7472, 0x7467, 0x746e, 0x7500, 0x7502, 0x7503, 0x757d,
-0x7590, 0x7616, 0x7608, 0x760c, 0x7615, 0x7611, 0x760a, 0x7614,
-0x76b8, 0x7781, 0x777c, 0x7785, 0x7782, 0x776e, 0x7780, 0x776f,
-0x777e, 0x7783, 0x78b2, 0x78aa, 0x78b4, 0x78ad, 0x78a8, 0x787e,
-0x78ab, 0x789e, 0x78a5, 0x78a0, 0x78ac, 0x78a2, 0x78a4, 0x7998,
-0x798a, 0x798b, 0x7996, 0x7995, 0x7994, 0x7993,
-63, 0xe340,
-0x7997, 0x7988, 0x7992, 0x7990, 0x7a2b, 0x7a4a, 0x7a30, 0x7a2f,
-0x7a28, 0x7a26, 0x7aa8, 0x7aab, 0x7aac, 0x7aee, 0x7b88, 0x7b9c,
-0x7b8a, 0x7b91, 0x7b90, 0x7b96, 0x7b8d, 0x7b8c, 0x7b9b, 0x7b8e,
-0x7b85, 0x7b98, 0x5284, 0x7b99, 0x7ba4, 0x7b82, 0x7cbb, 0x7cbf,
-0x7cbc, 0x7cba, 0x7da7, 0x7db7, 0x7dc2, 0x7da3, 0x7daa, 0x7dc1,
-0x7dc0, 0x7dc5, 0x7d9d, 0x7dce, 0x7dc4, 0x7dc6, 0x7dcb, 0x7dcc,
-0x7daf, 0x7db9, 0x7d96, 0x7dbc, 0x7d9f, 0x7da6, 0x7dae, 0x7da9,
-0x7da1, 0x7dc9, 0x7f73, 0x7fe2, 0x7fe3, 0x7fe5, 0x7fde,
-94, 0xe3a1,
-0x8024, 0x805d, 0x805c, 0x8189, 0x8186, 0x8183, 0x8187, 0x818d,
-0x818c, 0x818b, 0x8215, 0x8497, 0x84a4, 0x84a1, 0x849f, 0x84ba,
-0x84ce, 0x84c2, 0x84ac, 0x84ae, 0x84ab, 0x84b9, 0x84b4, 0x84c1,
-0x84cd, 0x84aa, 0x849a, 0x84b1, 0x84d0, 0x849d, 0x84a7, 0x84bb,
-0x84a2, 0x8494, 0x84c7, 0x84cc, 0x849b, 0x84a9, 0x84af, 0x84a8,
-0x84d6, 0x8498, 0x84b6, 0x84cf, 0x84a0, 0x84d7, 0x84d4, 0x84d2,
-0x84db, 0x84b0, 0x8491, 0x8661, 0x8733, 0x8723, 0x8728, 0x876b,
-0x8740, 0x872e, 0x871e, 0x8721, 0x8719, 0x871b, 0x8743, 0x872c,
-0x8741, 0x873e, 0x8746, 0x8720, 0x8732, 0x872a, 0x872d, 0x873c,
-0x8712, 0x873a, 0x8731, 0x8735, 0x8742, 0x8726, 0x8727, 0x8738,
-0x8724, 0x871a, 0x8730, 0x8711, 0x88f7, 0x88e7, 0x88f1, 0x88f2,
-0x88fa, 0x88fe, 0x88ee, 0x88fc, 0x88f6, 0x88fb,
-63, 0xe440,
-0x88f0, 0x88ec, 0x88eb, 0x899d, 0x89a1, 0x899f, 0x899e, 0x89e9,
-0x89eb, 0x89e8, 0x8aab, 0x8a99, 0x8a8b, 0x8a92, 0x8a8f, 0x8a96,
-0x8c3d, 0x8c68, 0x8c69, 0x8cd5, 0x8ccf, 0x8cd7, 0x8d96, 0x8e09,
-0x8e02, 0x8dff, 0x8e0d, 0x8dfd, 0x8e0a, 0x8e03, 0x8e07, 0x8e06,
-0x8e05, 0x8dfe, 0x8e00, 0x8e04, 0x8f10, 0x8f11, 0x8f0e, 0x8f0d,
-0x9123, 0x911c, 0x9120, 0x9122, 0x911f, 0x911d, 0x911a, 0x9124,
-0x9121, 0x911b, 0x917a, 0x9172, 0x9179, 0x9173, 0x92a5, 0x92a4,
-0x9276, 0x929b, 0x927a, 0x92a0, 0x9294, 0x92aa, 0x928d,
-94, 0xe4a1,
-0x92a6, 0x929a, 0x92ab, 0x9279, 0x9297, 0x927f, 0x92a3, 0x92ee,
-0x928e, 0x9282, 0x9295, 0x92a2, 0x927d, 0x9288, 0x92a1, 0x928a,
-0x9286, 0x928c, 0x9299, 0x92a7, 0x927e, 0x9287, 0x92a9, 0x929d,
-0x928b, 0x922d, 0x969e, 0x96a1, 0x96ff, 0x9758, 0x977d, 0x977a,
-0x977e, 0x9783, 0x9780, 0x9782, 0x977b, 0x9784, 0x9781, 0x977f,
-0x97ce, 0x97cd, 0x9816, 0x98ad, 0x98ae, 0x9902, 0x9900, 0x9907,
-0x999d, 0x999c, 0x99c3, 0x99b9, 0x99bb, 0x99ba, 0x99c2, 0x99bd,
-0x99c7, 0x9ab1, 0x9ae3, 0x9ae7, 0x9b3e, 0x9b3f, 0x9b60, 0x9b61,
-0x9b5f, 0x9cf1, 0x9cf2, 0x9cf5, 0x9ea7, 0x50ff, 0x5103, 0x5130,
-0x50f8, 0x5106, 0x5107, 0x50f6, 0x50fe, 0x510b, 0x510c, 0x50fd,
-0x510a, 0x528b, 0x528c, 0x52f1, 0x52ef, 0x5648, 0x5642, 0x564c,
-0x5635, 0x5641, 0x564a, 0x5649, 0x5646, 0x5658,
-63, 0xe540,
-0x565a, 0x5640, 0x5633, 0x563d, 0x562c, 0x563e, 0x5638, 0x562a,
-0x563a, 0x571a, 0x58ab, 0x589d, 0x58b1, 0x58a0, 0x58a3, 0x58af,
-0x58ac, 0x58a5, 0x58a1, 0x58ff, 0x5aff, 0x5af4, 0x5afd, 0x5af7,
-0x5af6, 0x5b03, 0x5af8, 0x5b02, 0x5af9, 0x5b01, 0x5b07, 0x5b05,
-0x5b0f, 0x5c67, 0x5d99, 0x5d97, 0x5d9f, 0x5d92, 0x5da2, 0x5d93,
-0x5d95, 0x5da0, 0x5d9c, 0x5da1, 0x5d9a, 0x5d9e, 0x5e69, 0x5e5d,
-0x5e60, 0x5e5c, 0x7df3, 0x5edb, 0x5ede, 0x5ee1, 0x5f49, 0x5fb2,
-0x618b, 0x6183, 0x6179, 0x61b1, 0x61b0, 0x61a2, 0x6189,
-94, 0xe5a1,
-0x619b, 0x6193, 0x61af, 0x61ad, 0x619f, 0x6192, 0x61aa, 0x61a1,
-0x618d, 0x6166, 0x61b3, 0x622d, 0x646e, 0x6470, 0x6496, 0x64a0,
-0x6485, 0x6497, 0x649c, 0x648f, 0x648b, 0x648a, 0x648c, 0x64a3,
-0x649f, 0x6468, 0x64b1, 0x6498, 0x6576, 0x657a, 0x6579, 0x657b,
-0x65b2, 0x65b3, 0x66b5, 0x66b0, 0x66a9, 0x66b2, 0x66b7, 0x66aa,
-0x66af, 0x6a00, 0x6a06, 0x6a17, 0x69e5, 0x69f8, 0x6a15, 0x69f1,
-0x69e4, 0x6a20, 0x69ff, 0x69ec, 0x69e2, 0x6a1b, 0x6a1d, 0x69fe,
-0x6a27, 0x69f2, 0x69ee, 0x6a14, 0x69f7, 0x69e7, 0x6a40, 0x6a08,
-0x69e6, 0x69fb, 0x6a0d, 0x69fc, 0x69eb, 0x6a09, 0x6a04, 0x6a18,
-0x6a25, 0x6a0f, 0x69f6, 0x6a26, 0x6a07, 0x69f4, 0x6a16, 0x6b51,
-0x6ba5, 0x6ba3, 0x6ba2, 0x6ba6, 0x6c01, 0x6c00, 0x6bff, 0x6c02,
-0x6f41, 0x6f26, 0x6f7e, 0x6f87, 0x6fc6, 0x6f92,
-63, 0xe640,
-0x6f8d, 0x6f89, 0x6f8c, 0x6f62, 0x6f4f, 0x6f85, 0x6f5a, 0x6f96,
-0x6f76, 0x6f6c, 0x6f82, 0x6f55, 0x6f72, 0x6f52, 0x6f50, 0x6f57,
-0x6f94, 0x6f93, 0x6f5d, 0x6f00, 0x6f61, 0x6f6b, 0x6f7d, 0x6f67,
-0x6f90, 0x6f53, 0x6f8b, 0x6f69, 0x6f7f, 0x6f95, 0x6f63, 0x6f77,
-0x6f6a, 0x6f7b, 0x71b2, 0x71af, 0x719b, 0x71b0, 0x71a0, 0x719a,
-0x71a9, 0x71b5, 0x719d, 0x71a5, 0x719e, 0x71a4, 0x71a1, 0x71aa,
-0x719c, 0x71a7, 0x71b3, 0x7298, 0x729a, 0x7358, 0x7352, 0x735e,
-0x735f, 0x7360, 0x735d, 0x735b, 0x7361, 0x735a, 0x7359,
-94, 0xe6a1,
-0x7362, 0x7487, 0x7489, 0x748a, 0x7486, 0x7481, 0x747d, 0x7485,
-0x7488, 0x747c, 0x7479, 0x7508, 0x7507, 0x757e, 0x7625, 0x761e,
-0x7619, 0x761d, 0x761c, 0x7623, 0x761a, 0x7628, 0x761b, 0x769c,
-0x769d, 0x769e, 0x769b, 0x778d, 0x778f, 0x7789, 0x7788, 0x78cd,
-0x78bb, 0x78cf, 0x78cc, 0x78d1, 0x78ce, 0x78d4, 0x78c8, 0x78c3,
-0x78c4, 0x78c9, 0x799a, 0x79a1, 0x79a0, 0x799c, 0x79a2, 0x799b,
-0x6b76, 0x7a39, 0x7ab2, 0x7ab4, 0x7ab3, 0x7bb7, 0x7bcb, 0x7bbe,
-0x7bac, 0x7bce, 0x7baf, 0x7bb9, 0x7bca, 0x7bb5, 0x7cc5, 0x7cc8,
-0x7ccc, 0x7ccb, 0x7df7, 0x7ddb, 0x7dea, 0x7de7, 0x7dd7, 0x7de1,
-0x7e03, 0x7dfa, 0x7de6, 0x7df6, 0x7df1, 0x7df0, 0x7dee, 0x7ddf,
-0x7f76, 0x7fac, 0x7fb0, 0x7fad, 0x7fed, 0x7feb, 0x7fea, 0x7fec,
-0x7fe6, 0x7fe8, 0x8064, 0x8067, 0x81a3, 0x819f,
-63, 0xe740,
-0x819e, 0x8195, 0x81a2, 0x8199, 0x8197, 0x8216, 0x824f, 0x8253,
-0x8252, 0x8250, 0x824e, 0x8251, 0x8524, 0x853b, 0x850f, 0x8500,
-0x8529, 0x850e, 0x8509, 0x850d, 0x851f, 0x850a, 0x8527, 0x851c,
-0x84fb, 0x852b, 0x84fa, 0x8508, 0x850c, 0x84f4, 0x852a, 0x84f2,
-0x8515, 0x84f7, 0x84eb, 0x84f3, 0x84fc, 0x8512, 0x84ea, 0x84e9,
-0x8516, 0x84fe, 0x8528, 0x851d, 0x852e, 0x8502, 0x84fd, 0x851e,
-0x84f6, 0x8531, 0x8526, 0x84e7, 0x84e8, 0x84f0, 0x84ef, 0x84f9,
-0x8518, 0x8520, 0x8530, 0x850b, 0x8519, 0x852f, 0x8662,
-94, 0xe7a1,
-0x8756, 0x8763, 0x8764, 0x8777, 0x87e1, 0x8773, 0x8758, 0x8754,
-0x875b, 0x8752, 0x8761, 0x875a, 0x8751, 0x875e, 0x876d, 0x876a,
-0x8750, 0x874e, 0x875f, 0x875d, 0x876f, 0x876c, 0x877a, 0x876e,
-0x875c, 0x8765, 0x874f, 0x877b, 0x8775, 0x8762, 0x8767, 0x8769,
-0x885a, 0x8905, 0x890c, 0x8914, 0x890b, 0x8917, 0x8918, 0x8919,
-0x8906, 0x8916, 0x8911, 0x890e, 0x8909, 0x89a2, 0x89a4, 0x89a3,
-0x89ed, 0x89f0, 0x89ec, 0x8acf, 0x8ac6, 0x8ab8, 0x8ad3, 0x8ad1,
-0x8ad4, 0x8ad5, 0x8abb, 0x8ad7, 0x8abe, 0x8ac0, 0x8ac5, 0x8ad8,
-0x8ac3, 0x8aba, 0x8abd, 0x8ad9, 0x8c3e, 0x8c4d, 0x8c8f, 0x8ce5,
-0x8cdf, 0x8cd9, 0x8ce8, 0x8cda, 0x8cdd, 0x8ce7, 0x8da0, 0x8d9c,
-0x8da1, 0x8d9b, 0x8e20, 0x8e23, 0x8e25, 0x8e24, 0x8e2e, 0x8e15,
-0x8e1b, 0x8e16, 0x8e11, 0x8e19, 0x8e26, 0x8e27,
-63, 0xe840,
-0x8e14, 0x8e12, 0x8e18, 0x8e13, 0x8e1c, 0x8e17, 0x8e1a, 0x8f2c,
-0x8f24, 0x8f18, 0x8f1a, 0x8f20, 0x8f23, 0x8f16, 0x8f17, 0x9073,
-0x9070, 0x906f, 0x9067, 0x906b, 0x912f, 0x912b, 0x9129, 0x912a,
-0x9132, 0x9126, 0x912e, 0x9185, 0x9186, 0x918a, 0x9181, 0x9182,
-0x9184, 0x9180, 0x92d0, 0x92c3, 0x92c4, 0x92c0, 0x92d9, 0x92b6,
-0x92cf, 0x92f1, 0x92df, 0x92d8, 0x92e9, 0x92d7, 0x92dd, 0x92cc,
-0x92ef, 0x92c2, 0x92e8, 0x92ca, 0x92c8, 0x92ce, 0x92e6, 0x92cd,
-0x92d5, 0x92c9, 0x92e0, 0x92de, 0x92e7, 0x92d1, 0x92d3,
-94, 0xe8a1,
-0x92b5, 0x92e1, 0x92c6, 0x92b4, 0x957c, 0x95ac, 0x95ab, 0x95ae,
-0x95b0, 0x96a4, 0x96a2, 0x96d3, 0x9705, 0x9708, 0x9702, 0x975a,
-0x978a, 0x978e, 0x9788, 0x97d0, 0x97cf, 0x981e, 0x981d, 0x9826,
-0x9829, 0x9828, 0x9820, 0x981b, 0x9827, 0x98b2, 0x9908, 0x98fa,
-0x9911, 0x9914, 0x9916, 0x9917, 0x9915, 0x99dc, 0x99cd, 0x99cf,
-0x99d3, 0x99d4, 0x99ce, 0x99c9, 0x99d6, 0x99d8, 0x99cb, 0x99d7,
-0x99cc, 0x9ab3, 0x9aec, 0x9aeb, 0x9af3, 0x9af2, 0x9af1, 0x9b46,
-0x9b43, 0x9b67, 0x9b74, 0x9b71, 0x9b66, 0x9b76, 0x9b75, 0x9b70,
-0x9b68, 0x9b64, 0x9b6c, 0x9cfc, 0x9cfa, 0x9cfd, 0x9cff, 0x9cf7,
-0x9d07, 0x9d00, 0x9cf9, 0x9cfb, 0x9d08, 0x9d05, 0x9d04, 0x9e83,
-0x9ed3, 0x9f0f, 0x9f10, 0x511c, 0x5113, 0x5117, 0x511a, 0x5111,
-0x51de, 0x5334, 0x53e1, 0x5670, 0x5660, 0x566e,
-63, 0xe940,
-0x5673, 0x5666, 0x5663, 0x566d, 0x5672, 0x565e, 0x5677, 0x571c,
-0x571b, 0x58c8, 0x58bd, 0x58c9, 0x58bf, 0x58ba, 0x58c2, 0x58bc,
-0x58c6, 0x5b17, 0x5b19, 0x5b1b, 0x5b21, 0x5b14, 0x5b13, 0x5b10,
-0x5b16, 0x5b28, 0x5b1a, 0x5b20, 0x5b1e, 0x5bef, 0x5dac, 0x5db1,
-0x5da9, 0x5da7, 0x5db5, 0x5db0, 0x5dae, 0x5daa, 0x5da8, 0x5db2,
-0x5dad, 0x5daf, 0x5db4, 0x5e67, 0x5e68, 0x5e66, 0x5e6f, 0x5ee9,
-0x5ee7, 0x5ee6, 0x5ee8, 0x5ee5, 0x5f4b, 0x5fbc, 0x619d, 0x61a8,
-0x6196, 0x61c5, 0x61b4, 0x61c6, 0x61c1, 0x61cc, 0x61ba,
-94, 0xe9a1,
-0x61bf, 0x61b8, 0x618c, 0x64d7, 0x64d6, 0x64d0, 0x64cf, 0x64c9,
-0x64bd, 0x6489, 0x64c3, 0x64db, 0x64f3, 0x64d9, 0x6533, 0x657f,
-0x657c, 0x65a2, 0x66c8, 0x66be, 0x66c0, 0x66ca, 0x66cb, 0x66cf,
-0x66bd, 0x66bb, 0x66ba, 0x66cc, 0x6723, 0x6a34, 0x6a66, 0x6a49,
-0x6a67, 0x6a32, 0x6a68, 0x6a3e, 0x6a5d, 0x6a6d, 0x6a76, 0x6a5b,
-0x6a51, 0x6a28, 0x6a5a, 0x6a3b, 0x6a3f, 0x6a41, 0x6a6a, 0x6a64,
-0x6a50, 0x6a4f, 0x6a54, 0x6a6f, 0x6a69, 0x6a60, 0x6a3c, 0x6a5e,
-0x6a56, 0x6a55, 0x6a4d, 0x6a4e, 0x6a46, 0x6b55, 0x6b54, 0x6b56,
-0x6ba7, 0x6baa, 0x6bab, 0x6bc8, 0x6bc7, 0x6c04, 0x6c03, 0x6c06,
-0x6fad, 0x6fcb, 0x6fa3, 0x6fc7, 0x6fbc, 0x6fce, 0x6fc8, 0x6f5e,
-0x6fc4, 0x6fbd, 0x6f9e, 0x6fca, 0x6fa8, 0x7004, 0x6fa5, 0x6fae,
-0x6fba, 0x6fac, 0x6faa, 0x6fcf, 0x6fbf, 0x6fb8,
-63, 0xea40,
-0x6fa2, 0x6fc9, 0x6fab, 0x6fcd, 0x6faf, 0x6fb2, 0x6fb0, 0x71c5,
-0x71c2, 0x71bf, 0x71b8, 0x71d6, 0x71c0, 0x71c1, 0x71cb, 0x71d4,
-0x71ca, 0x71c7, 0x71cf, 0x71bd, 0x71d8, 0x71bc, 0x71c6, 0x71da,
-0x71db, 0x729d, 0x729e, 0x7369, 0x7366, 0x7367, 0x736c, 0x7365,
-0x736b, 0x736a, 0x747f, 0x749a, 0x74a0, 0x7494, 0x7492, 0x7495,
-0x74a1, 0x750b, 0x7580, 0x762f, 0x762d, 0x7631, 0x763d, 0x7633,
-0x763c, 0x7635, 0x7632, 0x7630, 0x76bb, 0x76e6, 0x779a, 0x779d,
-0x77a1, 0x779c, 0x779b, 0x77a2, 0x77a3, 0x7795, 0x7799,
-94, 0xeaa1,
-0x7797, 0x78dd, 0x78e9, 0x78e5, 0x78ea, 0x78de, 0x78e3, 0x78db,
-0x78e1, 0x78e2, 0x78ed, 0x78df, 0x78e0, 0x79a4, 0x7a44, 0x7a48,
-0x7a47, 0x7ab6, 0x7ab8, 0x7ab5, 0x7ab1, 0x7ab7, 0x7bde, 0x7be3,
-0x7be7, 0x7bdd, 0x7bd5, 0x7be5, 0x7bda, 0x7be8, 0x7bf9, 0x7bd4,
-0x7bea, 0x7be2, 0x7bdc, 0x7beb, 0x7bd8, 0x7bdf, 0x7cd2, 0x7cd4,
-0x7cd7, 0x7cd0, 0x7cd1, 0x7e12, 0x7e21, 0x7e17, 0x7e0c, 0x7e1f,
-0x7e20, 0x7e13, 0x7e0e, 0x7e1c, 0x7e15, 0x7e1a, 0x7e22, 0x7e0b,
-0x7e0f, 0x7e16, 0x7e0d, 0x7e14, 0x7e25, 0x7e24, 0x7f43, 0x7f7b,
-0x7f7c, 0x7f7a, 0x7fb1, 0x7fef, 0x802a, 0x8029, 0x806c, 0x81b1,
-0x81a6, 0x81ae, 0x81b9, 0x81b5, 0x81ab, 0x81b0, 0x81ac, 0x81b4,
-0x81b2, 0x81b7, 0x81a7, 0x81f2, 0x8255, 0x8256, 0x8257, 0x8556,
-0x8545, 0x856b, 0x854d, 0x8553, 0x8561, 0x8558,
-63, 0xeb40,
-0x8540, 0x8546, 0x8564, 0x8541, 0x8562, 0x8544, 0x8551, 0x8547,
-0x8563, 0x853e, 0x855b, 0x8571, 0x854e, 0x856e, 0x8575, 0x8555,
-0x8567, 0x8560, 0x858c, 0x8566, 0x855d, 0x8554, 0x8565, 0x856c,
-0x8663, 0x8665, 0x8664, 0x879b, 0x878f, 0x8797, 0x8793, 0x8792,
-0x8788, 0x8781, 0x8796, 0x8798, 0x8779, 0x8787, 0x87a3, 0x8785,
-0x8790, 0x8791, 0x879d, 0x8784, 0x8794, 0x879c, 0x879a, 0x8789,
-0x891e, 0x8926, 0x8930, 0x892d, 0x892e, 0x8927, 0x8931, 0x8922,
-0x8929, 0x8923, 0x892f, 0x892c, 0x891f, 0x89f1, 0x8ae0,
-94, 0xeba1,
-0x8ae2, 0x8af2, 0x8af4, 0x8af5, 0x8add, 0x8b14, 0x8ae4, 0x8adf,
-0x8af0, 0x8ac8, 0x8ade, 0x8ae1, 0x8ae8, 0x8aff, 0x8aef, 0x8afb,
-0x8c91, 0x8c92, 0x8c90, 0x8cf5, 0x8cee, 0x8cf1, 0x8cf0, 0x8cf3,
-0x8d6c, 0x8d6e, 0x8da5, 0x8da7, 0x8e33, 0x8e3e, 0x8e38, 0x8e40,
-0x8e45, 0x8e36, 0x8e3c, 0x8e3d, 0x8e41, 0x8e30, 0x8e3f, 0x8ebd,
-0x8f36, 0x8f2e, 0x8f35, 0x8f32, 0x8f39, 0x8f37, 0x8f34, 0x9076,
-0x9079, 0x907b, 0x9086, 0x90fa, 0x9133, 0x9135, 0x9136, 0x9193,
-0x9190, 0x9191, 0x918d, 0x918f, 0x9327, 0x931e, 0x9308, 0x931f,
-0x9306, 0x930f, 0x937a, 0x9338, 0x933c, 0x931b, 0x9323, 0x9312,
-0x9301, 0x9346, 0x932d, 0x930e, 0x930d, 0x92cb, 0x931d, 0x92fa,
-0x9325, 0x9313, 0x92f9, 0x92f7, 0x9334, 0x9302, 0x9324, 0x92ff,
-0x9329, 0x9339, 0x9335, 0x932a, 0x9314, 0x930c,
-63, 0xec40,
-0x930b, 0x92fe, 0x9309, 0x9300, 0x92fb, 0x9316, 0x95bc, 0x95cd,
-0x95be, 0x95b9, 0x95ba, 0x95b6, 0x95bf, 0x95b5, 0x95bd, 0x96a9,
-0x96d4, 0x970b, 0x9712, 0x9710, 0x9799, 0x9797, 0x9794, 0x97f0,
-0x97f8, 0x9835, 0x982f, 0x9832, 0x9924, 0x991f, 0x9927, 0x9929,
-0x999e, 0x99ee, 0x99ec, 0x99e5, 0x99e4, 0x99f0, 0x99e3, 0x99ea,
-0x99e9, 0x99e7, 0x9ab9, 0x9abf, 0x9ab4, 0x9abb, 0x9af6, 0x9afa,
-0x9af9, 0x9af7, 0x9b33, 0x9b80, 0x9b85, 0x9b87, 0x9b7c, 0x9b7e,
-0x9b7b, 0x9b82, 0x9b93, 0x9b92, 0x9b90, 0x9b7a, 0x9b95,
-94, 0xeca1,
-0x9b7d, 0x9b88, 0x9d25, 0x9d17, 0x9d20, 0x9d1e, 0x9d14, 0x9d29,
-0x9d1d, 0x9d18, 0x9d22, 0x9d10, 0x9d19, 0x9d1f, 0x9e88, 0x9e86,
-0x9e87, 0x9eae, 0x9ead, 0x9ed5, 0x9ed6, 0x9efa, 0x9f12, 0x9f3d,
-0x5126, 0x5125, 0x5122, 0x5124, 0x5120, 0x5129, 0x52f4, 0x5693,
-0x568c, 0x568d, 0x5686, 0x5684, 0x5683, 0x567e, 0x5682, 0x567f,
-0x5681, 0x58d6, 0x58d4, 0x58cf, 0x58d2, 0x5b2d, 0x5b25, 0x5b32,
-0x5b23, 0x5b2c, 0x5b27, 0x5b26, 0x5b2f, 0x5b2e, 0x5b7b, 0x5bf1,
-0x5bf2, 0x5db7, 0x5e6c, 0x5e6a, 0x5fbe, 0x5fbb, 0x61c3, 0x61b5,
-0x61bc, 0x61e7, 0x61e0, 0x61e5, 0x61e4, 0x61e8, 0x61de, 0x64ef,
-0x64e9, 0x64e3, 0x64eb, 0x64e4, 0x64e8, 0x6581, 0x6580, 0x65b6,
-0x65da, 0x66d2, 0x6a8d, 0x6a96, 0x6a81, 0x6aa5, 0x6a89, 0x6a9f,
-0x6a9b, 0x6aa1, 0x6a9e, 0x6a87, 0x6a93, 0x6a8e,
-63, 0xed40,
-0x6a95, 0x6a83, 0x6aa8, 0x6aa4, 0x6a91, 0x6a7f, 0x6aa6, 0x6a9a,
-0x6a85, 0x6a8c, 0x6a92, 0x6b5b, 0x6bad, 0x6c09, 0x6fcc, 0x6fa9,
-0x6ff4, 0x6fd4, 0x6fe3, 0x6fdc, 0x6fed, 0x6fe7, 0x6fe6, 0x6fde,
-0x6ff2, 0x6fdd, 0x6fe2, 0x6fe8, 0x71e1, 0x71f1, 0x71e8, 0x71f2,
-0x71e4, 0x71f0, 0x71e2, 0x7373, 0x736e, 0x736f, 0x7497, 0x74b2,
-0x74ab, 0x7490, 0x74aa, 0x74ad, 0x74b1, 0x74a5, 0x74af, 0x7510,
-0x7511, 0x7512, 0x750f, 0x7584, 0x7643, 0x7648, 0x7649, 0x7647,
-0x76a4, 0x76e9, 0x77b5, 0x77ab, 0x77b2, 0x77b7, 0x77b6,
-94, 0xeda1,
-0x77b4, 0x77b1, 0x77a8, 0x77f0, 0x78f3, 0x78fd, 0x7902, 0x78fb,
-0x78fc, 0x78f2, 0x7905, 0x78f9, 0x78fe, 0x7904, 0x79ab, 0x79a8,
-0x7a5c, 0x7a5b, 0x7a56, 0x7a58, 0x7a54, 0x7a5a, 0x7abe, 0x7ac0,
-0x7ac1, 0x7c05, 0x7c0f, 0x7bf2, 0x7c00, 0x7bff, 0x7bfb, 0x7c0e,
-0x7bf4, 0x7c0b, 0x7bf3, 0x7c02, 0x7c09, 0x7c03, 0x7c01, 0x7bf8,
-0x7bfd, 0x7c06, 0x7bf0, 0x7bf1, 0x7c10, 0x7c0a, 0x7ce8, 0x7e2d,
-0x7e3c, 0x7e42, 0x7e33, 0x9848, 0x7e38, 0x7e2a, 0x7e49, 0x7e40,
-0x7e47, 0x7e29, 0x7e4c, 0x7e30, 0x7e3b, 0x7e36, 0x7e44, 0x7e3a,
-0x7f45, 0x7f7f, 0x7f7e, 0x7f7d, 0x7ff4, 0x7ff2, 0x802c, 0x81bb,
-0x81c4, 0x81cc, 0x81ca, 0x81c5, 0x81c7, 0x81bc, 0x81e9, 0x825b,
-0x825a, 0x825c, 0x8583, 0x8580, 0x858f, 0x85a7, 0x8595, 0x85a0,
-0x858b, 0x85a3, 0x857b, 0x85a4, 0x859a, 0x859e,
-63, 0xee40,
-0x8577, 0x857c, 0x8589, 0x85a1, 0x857a, 0x8578, 0x8557, 0x858e,
-0x8596, 0x8586, 0x858d, 0x8599, 0x859d, 0x8581, 0x85a2, 0x8582,
-0x8588, 0x8585, 0x8579, 0x8576, 0x8598, 0x8590, 0x859f, 0x8668,
-0x87be, 0x87aa, 0x87ad, 0x87c5, 0x87b0, 0x87ac, 0x87b9, 0x87b5,
-0x87bc, 0x87ae, 0x87c9, 0x87c3, 0x87c2, 0x87cc, 0x87b7, 0x87af,
-0x87c4, 0x87ca, 0x87b4, 0x87b6, 0x87bf, 0x87b8, 0x87bd, 0x87de,
-0x87b2, 0x8935, 0x8933, 0x893c, 0x893e, 0x8941, 0x8952, 0x8937,
-0x8942, 0x89ad, 0x89af, 0x89ae, 0x89f2, 0x89f3, 0x8b1e,
-94, 0xeea1,
-0x8b18, 0x8b16, 0x8b11, 0x8b05, 0x8b0b, 0x8b22, 0x8b0f, 0x8b12,
-0x8b15, 0x8b07, 0x8b0d, 0x8b08, 0x8b06, 0x8b1c, 0x8b13, 0x8b1a,
-0x8c4f, 0x8c70, 0x8c72, 0x8c71, 0x8c6f, 0x8c95, 0x8c94, 0x8cf9,
-0x8d6f, 0x8e4e, 0x8e4d, 0x8e53, 0x8e50, 0x8e4c, 0x8e47, 0x8f43,
-0x8f40, 0x9085, 0x907e, 0x9138, 0x919a, 0x91a2, 0x919b, 0x9199,
-0x919f, 0x91a1, 0x919d, 0x91a0, 0x93a1, 0x9383, 0x93af, 0x9364,
-0x9356, 0x9347, 0x937c, 0x9358, 0x935c, 0x9376, 0x9349, 0x9350,
-0x9351, 0x9360, 0x936d, 0x938f, 0x934c, 0x936a, 0x9379, 0x9357,
-0x9355, 0x9352, 0x934f, 0x9371, 0x9377, 0x937b, 0x9361, 0x935e,
-0x9363, 0x9367, 0x9380, 0x934e, 0x9359, 0x95c7, 0x95c0, 0x95c9,
-0x95c3, 0x95c5, 0x95b7, 0x96ae, 0x96b0, 0x96ac, 0x9720, 0x971f,
-0x9718, 0x971d, 0x9719, 0x979a, 0x97a1, 0x979c,
-63, 0xef40,
-0x979e, 0x979d, 0x97d5, 0x97d4, 0x97f1, 0x9841, 0x9844, 0x984a,
-0x9849, 0x9845, 0x9843, 0x9925, 0x992b, 0x992c, 0x992a, 0x9933,
-0x9932, 0x992f, 0x992d, 0x9931, 0x9930, 0x9998, 0x99a3, 0x99a1,
-0x9a02, 0x99fa, 0x99f4, 0x99f7, 0x99f9, 0x99f8, 0x99f6, 0x99fb,
-0x99fd, 0x99fe, 0x99fc, 0x9a03, 0x9abe, 0x9afe, 0x9afd, 0x9b01,
-0x9afc, 0x9b48, 0x9b9a, 0x9ba8, 0x9b9e, 0x9b9b, 0x9ba6, 0x9ba1,
-0x9ba5, 0x9ba4, 0x9b86, 0x9ba2, 0x9ba0, 0x9baf, 0x9d33, 0x9d41,
-0x9d67, 0x9d36, 0x9d2e, 0x9d2f, 0x9d31, 0x9d38, 0x9d30,
-94, 0xefa1,
-0x9d45, 0x9d42, 0x9d43, 0x9d3e, 0x9d37, 0x9d40, 0x9d3d, 0x7ff5,
-0x9d2d, 0x9e8a, 0x9e89, 0x9e8d, 0x9eb0, 0x9ec8, 0x9eda, 0x9efb,
-0x9eff, 0x9f24, 0x9f23, 0x9f22, 0x9f54, 0x9fa0, 0x5131, 0x512d,
-0x512e, 0x5698, 0x569c, 0x5697, 0x569a, 0x569d, 0x5699, 0x5970,
-0x5b3c, 0x5c69, 0x5c6a, 0x5dc0, 0x5e6d, 0x5e6e, 0x61d8, 0x61df,
-0x61ed, 0x61ee, 0x61f1, 0x61ea, 0x61f0, 0x61eb, 0x61d6, 0x61e9,
-0x64ff, 0x6504, 0x64fd, 0x64f8, 0x6501, 0x6503, 0x64fc, 0x6594,
-0x65db, 0x66da, 0x66db, 0x66d8, 0x6ac5, 0x6ab9, 0x6abd, 0x6ae1,
-0x6ac6, 0x6aba, 0x6ab6, 0x6ab7, 0x6ac7, 0x6ab4, 0x6aad, 0x6b5e,
-0x6bc9, 0x6c0b, 0x7007, 0x700c, 0x700d, 0x7001, 0x7005, 0x7014,
-0x700e, 0x6fff, 0x7000, 0x6ffb, 0x7026, 0x6ffc, 0x6ff7, 0x700a,
-0x7201, 0x71ff, 0x71f9, 0x7203, 0x71fd, 0x7376,
-63, 0xf040,
-0x74b8, 0x74c0, 0x74b5, 0x74c1, 0x74be, 0x74b6, 0x74bb, 0x74c2,
-0x7514, 0x7513, 0x765c, 0x7664, 0x7659, 0x7650, 0x7653, 0x7657,
-0x765a, 0x76a6, 0x76bd, 0x76ec, 0x77c2, 0x77ba, 0x78ff, 0x790c,
-0x7913, 0x7914, 0x7909, 0x7910, 0x7912, 0x7911, 0x79ad, 0x79ac,
-0x7a5f, 0x7c1c, 0x7c29, 0x7c19, 0x7c20, 0x7c1f, 0x7c2d, 0x7c1d,
-0x7c26, 0x7c28, 0x7c22, 0x7c25, 0x7c30, 0x7e5c, 0x7e50, 0x7e56,
-0x7e63, 0x7e58, 0x7e62, 0x7e5f, 0x7e51, 0x7e60, 0x7e57, 0x7e53,
-0x7fb5, 0x7fb3, 0x7ff7, 0x7ff8, 0x8075, 0x81d1, 0x81d2,
-94, 0xf0a1,
-0x81d0, 0x825f, 0x825e, 0x85b4, 0x85c6, 0x85c0, 0x85c3, 0x85c2,
-0x85b3, 0x85b5, 0x85bd, 0x85c7, 0x85c4, 0x85bf, 0x85cb, 0x85ce,
-0x85c8, 0x85c5, 0x85b1, 0x85b6, 0x85d2, 0x8624, 0x85b8, 0x85b7,
-0x85be, 0x8669, 0x87e7, 0x87e6, 0x87e2, 0x87db, 0x87eb, 0x87ea,
-0x87e5, 0x87df, 0x87f3, 0x87e4, 0x87d4, 0x87dc, 0x87d3, 0x87ed,
-0x87d8, 0x87e3, 0x87a4, 0x87d7, 0x87d9, 0x8801, 0x87f4, 0x87e8,
-0x87dd, 0x8953, 0x894b, 0x894f, 0x894c, 0x8946, 0x8950, 0x8951,
-0x8949, 0x8b2a, 0x8b27, 0x8b23, 0x8b33, 0x8b30, 0x8b35, 0x8b47,
-0x8b2f, 0x8b3c, 0x8b3e, 0x8b31, 0x8b25, 0x8b37, 0x8b26, 0x8b36,
-0x8b2e, 0x8b24, 0x8b3b, 0x8b3d, 0x8b3a, 0x8c42, 0x8c75, 0x8c99,
-0x8c98, 0x8c97, 0x8cfe, 0x8d04, 0x8d02, 0x8d00, 0x8e5c, 0x8e62,
-0x8e60, 0x8e57, 0x8e56, 0x8e5e, 0x8e65, 0x8e67,
-63, 0xf140,
-0x8e5b, 0x8e5a, 0x8e61, 0x8e5d, 0x8e69, 0x8e54, 0x8f46, 0x8f47,
-0x8f48, 0x8f4b, 0x9128, 0x913a, 0x913b, 0x913e, 0x91a8, 0x91a5,
-0x91a7, 0x91af, 0x91aa, 0x93b5, 0x938c, 0x9392, 0x93b7, 0x939b,
-0x939d, 0x9389, 0x93a7, 0x938e, 0x93aa, 0x939e, 0x93a6, 0x9395,
-0x9388, 0x9399, 0x939f, 0x938d, 0x93b1, 0x9391, 0x93b2, 0x93a4,
-0x93a8, 0x93b4, 0x93a3, 0x93a5, 0x95d2, 0x95d3, 0x95d1, 0x96b3,
-0x96d7, 0x96da, 0x5dc2, 0x96df, 0x96d8, 0x96dd, 0x9723, 0x9722,
-0x9725, 0x97ac, 0x97ae, 0x97a8, 0x97ab, 0x97a4, 0x97aa,
-94, 0xf1a1,
-0x97a2, 0x97a5, 0x97d7, 0x97d9, 0x97d6, 0x97d8, 0x97fa, 0x9850,
-0x9851, 0x9852, 0x98b8, 0x9941, 0x993c, 0x993a, 0x9a0f, 0x9a0b,
-0x9a09, 0x9a0d, 0x9a04, 0x9a11, 0x9a0a, 0x9a05, 0x9a07, 0x9a06,
-0x9ac0, 0x9adc, 0x9b08, 0x9b04, 0x9b05, 0x9b29, 0x9b35, 0x9b4a,
-0x9b4c, 0x9b4b, 0x9bc7, 0x9bc6, 0x9bc3, 0x9bbf, 0x9bc1, 0x9bb5,
-0x9bb8, 0x9bd3, 0x9bb6, 0x9bc4, 0x9bb9, 0x9bbd, 0x9d5c, 0x9d53,
-0x9d4f, 0x9d4a, 0x9d5b, 0x9d4b, 0x9d59, 0x9d56, 0x9d4c, 0x9d57,
-0x9d52, 0x9d54, 0x9d5f, 0x9d58, 0x9d5a, 0x9e8e, 0x9e8c, 0x9edf,
-0x9f01, 0x9f00, 0x9f16, 0x9f25, 0x9f2b, 0x9f2a, 0x9f29, 0x9f28,
-0x9f4c, 0x9f55, 0x5134, 0x5135, 0x5296, 0x52f7, 0x53b4, 0x56ab,
-0x56ad, 0x56a6, 0x56a7, 0x56aa, 0x56ac, 0x58da, 0x58dd, 0x58db,
-0x5912, 0x5b3d, 0x5b3e, 0x5b3f, 0x5dc3, 0x5e70,
-63, 0xf240,
-0x5fbf, 0x61fb, 0x6507, 0x6510, 0x650d, 0x6509, 0x650c, 0x650e,
-0x6584, 0x65de, 0x65dd, 0x66de, 0x6ae7, 0x6ae0, 0x6acc, 0x6ad1,
-0x6ad9, 0x6acb, 0x6adf, 0x6adc, 0x6ad0, 0x6aeb, 0x6acf, 0x6acd,
-0x6ade, 0x6b60, 0x6bb0, 0x6c0c, 0x7019, 0x7027, 0x7020, 0x7016,
-0x702b, 0x7021, 0x7022, 0x7023, 0x7029, 0x7017, 0x7024, 0x701c,
-0x702a, 0x720c, 0x720a, 0x7207, 0x7202, 0x7205, 0x72a5, 0x72a6,
-0x72a4, 0x72a3, 0x72a1, 0x74cb, 0x74c5, 0x74b7, 0x74c3, 0x7516,
-0x7660, 0x77c9, 0x77ca, 0x77c4, 0x77f1, 0x791d, 0x791b,
-94, 0xf2a1,
-0x7921, 0x791c, 0x7917, 0x791e, 0x79b0, 0x7a67, 0x7a68, 0x7c33,
-0x7c3c, 0x7c39, 0x7c2c, 0x7c3b, 0x7cec, 0x7cea, 0x7e76, 0x7e75,
-0x7e78, 0x7e70, 0x7e77, 0x7e6f, 0x7e7a, 0x7e72, 0x7e74, 0x7e68,
-0x7f4b, 0x7f4a, 0x7f83, 0x7f86, 0x7fb7, 0x7ffd, 0x7ffe, 0x8078,
-0x81d7, 0x81d5, 0x8264, 0x8261, 0x8263, 0x85eb, 0x85f1, 0x85ed,
-0x85d9, 0x85e1, 0x85e8, 0x85da, 0x85d7, 0x85ec, 0x85f2, 0x85f8,
-0x85d8, 0x85df, 0x85e3, 0x85dc, 0x85d1, 0x85f0, 0x85e6, 0x85ef,
-0x85de, 0x85e2, 0x8800, 0x87fa, 0x8803, 0x87f6, 0x87f7, 0x8809,
-0x880c, 0x880b, 0x8806, 0x87fc, 0x8808, 0x87ff, 0x880a, 0x8802,
-0x8962, 0x895a, 0x895b, 0x8957, 0x8961, 0x895c, 0x8958, 0x895d,
-0x8959, 0x8988, 0x89b7, 0x89b6, 0x89f6, 0x8b50, 0x8b48, 0x8b4a,
-0x8b40, 0x8b53, 0x8b56, 0x8b54, 0x8b4b, 0x8b55,
-63, 0xf340,
-0x8b51, 0x8b42, 0x8b52, 0x8b57, 0x8c43, 0x8c77, 0x8c76, 0x8c9a,
-0x8d06, 0x8d07, 0x8d09, 0x8dac, 0x8daa, 0x8dad, 0x8dab, 0x8e6d,
-0x8e78, 0x8e73, 0x8e6a, 0x8e6f, 0x8e7b, 0x8ec2, 0x8f52, 0x8f51,
-0x8f4f, 0x8f50, 0x8f53, 0x8fb4, 0x9140, 0x913f, 0x91b0, 0x91ad,
-0x93de, 0x93c7, 0x93cf, 0x93c2, 0x93da, 0x93d0, 0x93f9, 0x93ec,
-0x93cc, 0x93d9, 0x93a9, 0x93e6, 0x93ca, 0x93d4, 0x93ee, 0x93e3,
-0x93d5, 0x93c4, 0x93ce, 0x93c0, 0x93d2, 0x93e7, 0x957d, 0x95da,
-0x95db, 0x96e1, 0x9729, 0x972b, 0x972c, 0x9728, 0x9726,
-94, 0xf3a1,
-0x97b3, 0x97b7, 0x97b6, 0x97dd, 0x97de, 0x97df, 0x985c, 0x9859,
-0x985d, 0x9857, 0x98bf, 0x98bd, 0x98bb, 0x98be, 0x9948, 0x9947,
-0x9943, 0x99a6, 0x99a7, 0x9a1a, 0x9a15, 0x9a25, 0x9a1d, 0x9a24,
-0x9a1b, 0x9a22, 0x9a20, 0x9a27, 0x9a23, 0x9a1e, 0x9a1c, 0x9a14,
-0x9ac2, 0x9b0b, 0x9b0a, 0x9b0e, 0x9b0c, 0x9b37, 0x9bea, 0x9beb,
-0x9be0, 0x9bde, 0x9be4, 0x9be6, 0x9be2, 0x9bf0, 0x9bd4, 0x9bd7,
-0x9bec, 0x9bdc, 0x9bd9, 0x9be5, 0x9bd5, 0x9be1, 0x9bda, 0x9d77,
-0x9d81, 0x9d8a, 0x9d84, 0x9d88, 0x9d71, 0x9d80, 0x9d78, 0x9d86,
-0x9d8b, 0x9d8c, 0x9d7d, 0x9d6b, 0x9d74, 0x9d75, 0x9d70, 0x9d69,
-0x9d85, 0x9d73, 0x9d7b, 0x9d82, 0x9d6f, 0x9d79, 0x9d7f, 0x9d87,
-0x9d68, 0x9e94, 0x9e91, 0x9ec0, 0x9efc, 0x9f2d, 0x9f40, 0x9f41,
-0x9f4d, 0x9f56, 0x9f57, 0x9f58, 0x5337, 0x56b2,
-63, 0xf440,
-0x56b5, 0x56b3, 0x58e3, 0x5b45, 0x5dc6, 0x5dc7, 0x5eee, 0x5eef,
-0x5fc0, 0x5fc1, 0x61f9, 0x6517, 0x6516, 0x6515, 0x6513, 0x65df,
-0x66e8, 0x66e3, 0x66e4, 0x6af3, 0x6af0, 0x6aea, 0x6ae8, 0x6af9,
-0x6af1, 0x6aee, 0x6aef, 0x703c, 0x7035, 0x702f, 0x7037, 0x7034,
-0x7031, 0x7042, 0x7038, 0x703f, 0x703a, 0x7039, 0x7040, 0x703b,
-0x7033, 0x7041, 0x7213, 0x7214, 0x72a8, 0x737d, 0x737c, 0x74ba,
-0x76ab, 0x76aa, 0x76be, 0x76ed, 0x77cc, 0x77ce, 0x77cf, 0x77cd,
-0x77f2, 0x7925, 0x7923, 0x7927, 0x7928, 0x7924, 0x7929,
-94, 0xf4a1,
-0x79b2, 0x7a6e, 0x7a6c, 0x7a6d, 0x7af7, 0x7c49, 0x7c48, 0x7c4a,
-0x7c47, 0x7c45, 0x7cee, 0x7e7b, 0x7e7e, 0x7e81, 0x7e80, 0x7fba,
-0x7fff, 0x8079, 0x81db, 0x81d9, 0x820b, 0x8268, 0x8269, 0x8622,
-0x85ff, 0x8601, 0x85fe, 0x861b, 0x8600, 0x85f6, 0x8604, 0x8609,
-0x8605, 0x860c, 0x85fd, 0x8819, 0x8810, 0x8811, 0x8817, 0x8813,
-0x8816, 0x8963, 0x8966, 0x89b9, 0x89f7, 0x8b60, 0x8b6a, 0x8b5d,
-0x8b68, 0x8b63, 0x8b65, 0x8b67, 0x8b6d, 0x8dae, 0x8e86, 0x8e88,
-0x8e84, 0x8f59, 0x8f56, 0x8f57, 0x8f55, 0x8f58, 0x8f5a, 0x908d,
-0x9143, 0x9141, 0x91b7, 0x91b5, 0x91b2, 0x91b3, 0x940b, 0x9413,
-0x93fb, 0x9420, 0x940f, 0x9414, 0x93fe, 0x9415, 0x9410, 0x9428,
-0x9419, 0x940d, 0x93f5, 0x9400, 0x93f7, 0x9407, 0x940e, 0x9416,
-0x9412, 0x93fa, 0x9409, 0x93f8, 0x940a, 0x93ff,
-63, 0xf540,
-0x93fc, 0x940c, 0x93f6, 0x9411, 0x9406, 0x95de, 0x95e0, 0x95df,
-0x972e, 0x972f, 0x97b9, 0x97bb, 0x97fd, 0x97fe, 0x9860, 0x9862,
-0x9863, 0x985f, 0x98c1, 0x98c2, 0x9950, 0x994e, 0x9959, 0x994c,
-0x994b, 0x9953, 0x9a32, 0x9a34, 0x9a31, 0x9a2c, 0x9a2a, 0x9a36,
-0x9a29, 0x9a2e, 0x9a38, 0x9a2d, 0x9ac7, 0x9aca, 0x9ac6, 0x9b10,
-0x9b12, 0x9b11, 0x9c0b, 0x9c08, 0x9bf7, 0x9c05, 0x9c12, 0x9bf8,
-0x9c40, 0x9c07, 0x9c0e, 0x9c06, 0x9c17, 0x9c14, 0x9c09, 0x9d9f,
-0x9d99, 0x9da4, 0x9d9d, 0x9d92, 0x9d98, 0x9d90, 0x9d9b,
-94, 0xf5a1,
-0x9da0, 0x9d94, 0x9d9c, 0x9daa, 0x9d97, 0x9da1, 0x9d9a, 0x9da2,
-0x9da8, 0x9d9e, 0x9da3, 0x9dbf, 0x9da9, 0x9d96, 0x9da6, 0x9da7,
-0x9e99, 0x9e9b, 0x9e9a, 0x9ee5, 0x9ee4, 0x9ee7, 0x9ee6, 0x9f30,
-0x9f2e, 0x9f5b, 0x9f60, 0x9f5e, 0x9f5d, 0x9f59, 0x9f91, 0x513a,
-0x5139, 0x5298, 0x5297, 0x56c3, 0x56bd, 0x56be, 0x5b48, 0x5b47,
-0x5dcb, 0x5dcf, 0x5ef1, 0x61fd, 0x651b, 0x6b02, 0x6afc, 0x6b03,
-0x6af8, 0x6b00, 0x7043, 0x7044, 0x704a, 0x7048, 0x7049, 0x7045,
-0x7046, 0x721d, 0x721a, 0x7219, 0x737e, 0x7517, 0x766a, 0x77d0,
-0x792d, 0x7931, 0x792f, 0x7c54, 0x7c53, 0x7cf2, 0x7e8a, 0x7e87,
-0x7e88, 0x7e8b, 0x7e86, 0x7e8d, 0x7f4d, 0x7fbb, 0x8030, 0x81dd,
-0x8618, 0x862a, 0x8626, 0x861f, 0x8623, 0x861c, 0x8619, 0x8627,
-0x862e, 0x8621, 0x8620, 0x8629, 0x861e, 0x8625,
-63, 0xf640,
-0x8829, 0x881d, 0x881b, 0x8820, 0x8824, 0x881c, 0x882b, 0x884a,
-0x896d, 0x8969, 0x896e, 0x896b, 0x89fa, 0x8b79, 0x8b78, 0x8b45,
-0x8b7a, 0x8b7b, 0x8d10, 0x8d14, 0x8daf, 0x8e8e, 0x8e8c, 0x8f5e,
-0x8f5b, 0x8f5d, 0x9146, 0x9144, 0x9145, 0x91b9, 0x943f, 0x943b,
-0x9436, 0x9429, 0x943d, 0x943c, 0x9430, 0x9439, 0x942a, 0x9437,
-0x942c, 0x9440, 0x9431, 0x95e5, 0x95e4, 0x95e3, 0x9735, 0x973a,
-0x97bf, 0x97e1, 0x9864, 0x98c9, 0x98c6, 0x98c0, 0x9958, 0x9956,
-0x9a39, 0x9a3d, 0x9a46, 0x9a44, 0x9a42, 0x9a41, 0x9a3a,
-94, 0xf6a1,
-0x9a3f, 0x9acd, 0x9b15, 0x9b17, 0x9b18, 0x9b16, 0x9b3a, 0x9b52,
-0x9c2b, 0x9c1d, 0x9c1c, 0x9c2c, 0x9c23, 0x9c28, 0x9c29, 0x9c24,
-0x9c21, 0x9db7, 0x9db6, 0x9dbc, 0x9dc1, 0x9dc7, 0x9dca, 0x9dcf,
-0x9dbe, 0x9dc5, 0x9dc3, 0x9dbb, 0x9db5, 0x9dce, 0x9db9, 0x9dba,
-0x9dac, 0x9dc8, 0x9db1, 0x9dad, 0x9dcc, 0x9db3, 0x9dcd, 0x9db2,
-0x9e7a, 0x9e9c, 0x9eeb, 0x9eee, 0x9eed, 0x9f1b, 0x9f18, 0x9f1a,
-0x9f31, 0x9f4e, 0x9f65, 0x9f64, 0x9f92, 0x4eb9, 0x56c6, 0x56c5,
-0x56cb, 0x5971, 0x5b4b, 0x5b4c, 0x5dd5, 0x5dd1, 0x5ef2, 0x6521,
-0x6520, 0x6526, 0x6522, 0x6b0b, 0x6b08, 0x6b09, 0x6c0d, 0x7055,
-0x7056, 0x7057, 0x7052, 0x721e, 0x721f, 0x72a9, 0x737f, 0x74d8,
-0x74d5, 0x74d9, 0x74d7, 0x766d, 0x76ad, 0x7935, 0x79b4, 0x7a70,
-0x7a71, 0x7c57, 0x7c5c, 0x7c59, 0x7c5b, 0x7c5a,
-63, 0xf740,
-0x7cf4, 0x7cf1, 0x7e91, 0x7f4f, 0x7f87, 0x81de, 0x826b, 0x8634,
-0x8635, 0x8633, 0x862c, 0x8632, 0x8636, 0x882c, 0x8828, 0x8826,
-0x882a, 0x8825, 0x8971, 0x89bf, 0x89be, 0x89fb, 0x8b7e, 0x8b84,
-0x8b82, 0x8b86, 0x8b85, 0x8b7f, 0x8d15, 0x8e95, 0x8e94, 0x8e9a,
-0x8e92, 0x8e90, 0x8e96, 0x8e97, 0x8f60, 0x8f62, 0x9147, 0x944c,
-0x9450, 0x944a, 0x944b, 0x944f, 0x9447, 0x9445, 0x9448, 0x9449,
-0x9446, 0x973f, 0x97e3, 0x986a, 0x9869, 0x98cb, 0x9954, 0x995b,
-0x9a4e, 0x9a53, 0x9a54, 0x9a4c, 0x9a4f, 0x9a48, 0x9a4a,
-94, 0xf7a1,
-0x9a49, 0x9a52, 0x9a50, 0x9ad0, 0x9b19, 0x9b2b, 0x9b3b, 0x9b56,
-0x9b55, 0x9c46, 0x9c48, 0x9c3f, 0x9c44, 0x9c39, 0x9c33, 0x9c41,
-0x9c3c, 0x9c37, 0x9c34, 0x9c32, 0x9c3d, 0x9c36, 0x9ddb, 0x9dd2,
-0x9dde, 0x9dda, 0x9dcb, 0x9dd0, 0x9ddc, 0x9dd1, 0x9ddf, 0x9de9,
-0x9dd9, 0x9dd8, 0x9dd6, 0x9df5, 0x9dd5, 0x9ddd, 0x9eb6, 0x9ef0,
-0x9f35, 0x9f33, 0x9f32, 0x9f42, 0x9f6b, 0x9f95, 0x9fa2, 0x513d,
-0x5299, 0x58e8, 0x58e7, 0x5972, 0x5b4d, 0x5dd8, 0x882f, 0x5f4f,
-0x6201, 0x6203, 0x6204, 0x6529, 0x6525, 0x6596, 0x66eb, 0x6b11,
-0x6b12, 0x6b0f, 0x6bca, 0x705b, 0x705a, 0x7222, 0x7382, 0x7381,
-0x7383, 0x7670, 0x77d4, 0x7c67, 0x7c66, 0x7e95, 0x826c, 0x863a,
-0x8640, 0x8639, 0x863c, 0x8631, 0x863b, 0x863e, 0x8830, 0x8832,
-0x882e, 0x8833, 0x8976, 0x8974, 0x8973, 0x89fe,
-63, 0xf840,
-0x8b8c, 0x8b8e, 0x8b8b, 0x8b88, 0x8c45, 0x8d19, 0x8e98, 0x8f64,
-0x8f63, 0x91bc, 0x9462, 0x9455, 0x945d, 0x9457, 0x945e, 0x97c4,
-0x97c5, 0x9800, 0x9a56, 0x9a59, 0x9b1e, 0x9b1f, 0x9b20, 0x9c52,
-0x9c58, 0x9c50, 0x9c4a, 0x9c4d, 0x9c4b, 0x9c55, 0x9c59, 0x9c4c,
-0x9c4e, 0x9dfb, 0x9df7, 0x9def, 0x9de3, 0x9deb, 0x9df8, 0x9de4,
-0x9df6, 0x9de1, 0x9dee, 0x9de6, 0x9df2, 0x9df0, 0x9de2, 0x9dec,
-0x9df4, 0x9df3, 0x9de8, 0x9ded, 0x9ec2, 0x9ed0, 0x9ef2, 0x9ef3,
-0x9f06, 0x9f1c, 0x9f38, 0x9f37, 0x9f36, 0x9f43, 0x9f4f,
-94, 0xf8a1,
-0x9f71, 0x9f70, 0x9f6e, 0x9f6f, 0x56d3, 0x56cd, 0x5b4e, 0x5c6d,
-0x652d, 0x66ed, 0x66ee, 0x6b13, 0x705f, 0x7061, 0x705d, 0x7060,
-0x7223, 0x74db, 0x74e5, 0x77d5, 0x7938, 0x79b7, 0x79b6, 0x7c6a,
-0x7e97, 0x7f89, 0x826d, 0x8643, 0x8838, 0x8837, 0x8835, 0x884b,
-0x8b94, 0x8b95, 0x8e9e, 0x8e9f, 0x8ea0, 0x8e9d, 0x91be, 0x91bd,
-0x91c2, 0x946b, 0x9468, 0x9469, 0x96e5, 0x9746, 0x9743, 0x9747,
-0x97c7, 0x97e5, 0x9a5e, 0x9ad5, 0x9b59, 0x9c63, 0x9c67, 0x9c66,
-0x9c62, 0x9c5e, 0x9c60, 0x9e02, 0x9dfe, 0x9e07, 0x9e03, 0x9e06,
-0x9e05, 0x9e00, 0x9e01, 0x9e09, 0x9dff, 0x9dfd, 0x9e04, 0x9ea0,
-0x9f1e, 0x9f46, 0x9f74, 0x9f75, 0x9f76, 0x56d4, 0x652e, 0x65b8,
-0x6b18, 0x6b19, 0x6b17, 0x6b1a, 0x7062, 0x7226, 0x72aa, 0x77d8,
-0x77d9, 0x7939, 0x7c69, 0x7c6b, 0x7cf6, 0x7e9a,
-63, 0xf940,
-0x7e98, 0x7e9b, 0x7e99, 0x81e0, 0x81e1, 0x8646, 0x8647, 0x8648,
-0x8979, 0x897a, 0x897c, 0x897b, 0x89ff, 0x8b98, 0x8b99, 0x8ea5,
-0x8ea4, 0x8ea3, 0x946e, 0x946d, 0x946f, 0x9471, 0x9473, 0x9749,
-0x9872, 0x995f, 0x9c68, 0x9c6e, 0x9c6d, 0x9e0b, 0x9e0d, 0x9e10,
-0x9e0f, 0x9e12, 0x9e11, 0x9ea1, 0x9ef5, 0x9f09, 0x9f47, 0x9f78,
-0x9f7b, 0x9f7a, 0x9f79, 0x571e, 0x7066, 0x7c6f, 0x883c, 0x8db2,
-0x8ea6, 0x91c3, 0x9474, 0x9478, 0x9476, 0x9475, 0x9a60, 0x9c74,
-0x9c73, 0x9c71, 0x9c75, 0x9e14, 0x9e13, 0x9ef6, 0x9f0a,
-53, 0xf9a1,
-0x9fa4, 0x7068, 0x7065, 0x7cf7, 0x866a, 0x883e, 0x883d, 0x883f,
-0x8b9e, 0x8c9c, 0x8ea9, 0x8ec9, 0x974b, 0x9873, 0x9874, 0x98cc,
-0x9961, 0x99ab, 0x9a64, 0x9a66, 0x9a67, 0x9b24, 0x9e15, 0x9e17,
-0x9f48, 0x6207, 0x6b1e, 0x7227, 0x864c, 0x8ea8, 0x9482, 0x9480,
-0x9481, 0x9a69, 0x9a68, 0x9b2e, 0x9e19, 0x7229, 0x864b, 0x8b9f,
-0x9483, 0x9c79, 0x9eb7, 0x7675, 0x9a6b, 0x9c7a, 0x9e1d, 0x7069,
-0x706a, 0x9ea4, 0x9f7e, 0x9f49, 0x9f98,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/entmgr_inst.m4 b/usr/src/cmd/man/src/util/nsgmls.src/lib/entmgr_inst.m4
deleted file mode 100644
index 2614511deb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/entmgr_inst.m4
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1995 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MANUAL_INST
-
-#define SP_DEFINE_TEMPLATES
-#include "Owner.h"
-#include "CopyOwner.h"
-#include "RangeMap.h"
-#include "Ptr.h"
-#include "StringOf.h"
-#include "StringC.h"
-#include "Vector.h"
-#include "ISet.h"
-#include "ISetIter.h"
-#include "XcharMap.h"
-#include "SubstTable.h"
-#include "StringResource.h"
-#include "CharMap.h"
-#undef SP_DEFINE_TEMPLATES
-
-#include "types.h"
-#include "Location.h"
-#include "Message.h"
-#include "NamedResource.h"
-#include "EntityManager.h"
-#include "CharsetRegistry.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-__instantiate(Ptr < InputSourceOrigin >\
-)
-__instantiate(ConstPtr < InputSourceOrigin >\
-)
-__instantiate(Ptr < Origin >\
-)
-__instantiate(ConstPtr < Origin >\
-)
-__instantiate(Ptr < SharedXcharMap < unsigned char > >\
-)
-__instantiate(ConstPtr < SharedXcharMap < unsigned char > >\
-)
-__instantiate(Ptr < SharedXcharMap < PackedBoolean > >\
-)
-__instantiate(ConstPtr < SharedXcharMap < PackedBoolean > >\
-)
-__instantiate(Ptr < SharedXcharMap < EquivCode > >\
-)
-__instantiate(ConstPtr < SharedXcharMap < EquivCode > >\
-)
-__instantiate(Ptr < StringResource < Char > >\
-)
-__instantiate(ConstPtr < StringResource < Char > >\
-)
-__instantiate(Ptr < NamedResource >\
-)
-__instantiate(ConstPtr < NamedResource >\
-)
-__instantiate(Ptr < EntityManager >\
-)
-__instantiate(ConstPtr < EntityManager >\
-)
-__instantiate(Ptr < EntityCatalog >\
-)
-__instantiate(ConstPtr < EntityCatalog >\
-)
-__instantiate(Owner < MessageArg >\
-)
-__instantiate(CopyOwner < MessageArg >\
-)
-__instantiate(String < Char >\
-)
-__instantiate(Vector < OpenElementInfo >\
-)
-__instantiate(Vector < CopyOwner < MessageArg > >\
-)
-__instantiate(SharedXcharMap < unsigned char >\
-)
-__instantiate(XcharMap < unsigned char >\
-)
-__instantiate(`Vector < RangeMapRange < WideChar, UnivChar > > '\
-)
-__instantiate(`RangeMapIter < WideChar, UnivChar > ')
-__instantiate(`RangeMap < WideChar, UnivChar > ')
-__instantiate(Vector < InputSourceOriginNamedCharRef >\
-)
-__instantiate(Vector < StringC >\
-)
-__instantiate(Owner < ExternalInfo >\
-)
-__instantiate(ISet < Char >\
-)
-__instantiate(Vector < ISetRange < Char > >\
-)
-__instantiate(ISet < WideChar >\
-)
-__instantiate(ISetIter < Char >\
-)
-__instantiate(ISetIter < WideChar >\
-)
-__instantiate(Vector < ISetRange < WideChar > >\
-)
-__instantiate(SubstTable < Char >\
-)
-__instantiate(SharedXcharMap < PackedBoolean >\
-)
-__instantiate(SharedXcharMap < EquivCode >\
-)
-__instantiate(String < SyntaxChar >\
-)
-__instantiate(XcharMap < PackedBoolean >\
-)
-__instantiate(XcharMap < EquivCode >\
-)
-__instantiate(Vector < char >\
-)
-#if defined(SP_HAVE_BOOL) && defined(SP_SIZEOF_BOOL_1)
-__instantiate(Vector < PackedBoolean >\
-)
-#endif
-__instantiate(CharMap < Unsigned32 >\
-)
-#ifdef SP_MULTI_BYTE
-__instantiate(CharMapPage < Unsigned32 >\
-)
-__instantiate(CharMapColumn < Unsigned32 >\
-)
-#endif
-__instantiate(CharMapResource < Unsigned32 >\
-)
-__instantiate(Ptr < CharMapResource < Unsigned32 > >\
-)
-__instantiate(ConstPtr < CharMapResource < Unsigned32 > >\
-)
-__instantiate(Owner < CharsetRegistry::Iter >\
-)
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MANUAL_INST */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/events.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/events.h
deleted file mode 100644
index eccdfb1085..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/events.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-EVENT(MessageEvent, message)
-EVENT(DataEvent, data)
-EVENT(StartElementEvent, startElement)
-EVENT(EndElementEvent, endElement)
-EVENT(PiEvent, pi)
-EVENT(SdataEntityEvent, sdataEntity)
-EVENT(ExternalDataEntityEvent, externalDataEntity)
-EVENT(SubdocEntityEvent, subdocEntity)
-EVENT(NonSgmlCharEvent, nonSgmlChar)
-EVENT(AppinfoEvent, appinfo)
-EVENT(UselinkEvent, uselink)
-EVENT(UsemapEvent, usemap)
-EVENT(StartDtdEvent, startDtd)
-EVENT(EndDtdEvent, endDtd)
-EVENT(StartLpdEvent, startLpd)
-EVENT(EndLpdEvent, endLpd)
-EVENT(EndPrologEvent, endProlog)
-EVENT(SgmlDeclEvent, sgmlDecl)
-EVENT(CommentDeclEvent, commentDecl)
-EVENT(SSepEvent, sSep)
-EVENT(IgnoredReEvent, ignoredRe)
-EVENT(ReOriginEvent, reOrigin)
-EVENT(IgnoredRsEvent, ignoredRs)
-EVENT(IgnoredCharsEvent, ignoredChars)
-EVENT(MarkedSectionStartEvent, markedSectionStart)
-EVENT(MarkedSectionEndEvent, markedSectionEnd)
-EVENT(EntityStartEvent, entityStart)
-EVENT(EntityEndEvent, entityEnd)
-EVENT(EntityDeclEvent, entityDecl)
-EVENT(NotationDeclEvent, notationDecl)
-EVENT(ElementDeclEvent, elementDecl)
-EVENT(AttlistDeclEvent, attlistDecl)
-EVENT(LinkAttlistDeclEvent, linkAttlistDecl)
-EVENT(AttlistNotationDeclEvent, attlistNotationDecl)
-EVENT(LinkDeclEvent, linkDecl)
-EVENT(IdLinkDeclEvent, idLinkDecl)
-EVENT(ShortrefDeclEvent, shortrefDecl)
-EVENT(IgnoredMarkupEvent, ignoredMarkup)
-EVENT(EntityDefaultedEvent, entityDefaulted)
-EVENT(SgmlDeclEntityEvent, sgmlDeclEntity)
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/gb2312.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/gb2312.h
deleted file mode 100644
index 96be8868d4..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/gb2312.h
+++ /dev/null
@@ -1,1043 +0,0 @@
-94, 0x2121,
-0x3000, 0x3001, 0x3002, 0x30fb, 0x02c9, 0x02c7, 0x00a8, 0x3003,
-0x3005, 0x2015, 0xff5e, 0x2225, 0x2026, 0x2018, 0x2019, 0x201c,
-0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c,
-0x300d, 0x300e, 0x300f, 0x3016, 0x3017, 0x3010, 0x3011, 0x00b1,
-0x00d7, 0x00f7, 0x2236, 0x2227, 0x2228, 0x2211, 0x220f, 0x222a,
-0x2229, 0x2208, 0x2237, 0x221a, 0x22a5, 0x2225, 0x2220, 0x2312,
-0x2299, 0x222b, 0x222e, 0x2261, 0x224c, 0x2248, 0x223d, 0x221d,
-0x2260, 0x226e, 0x226f, 0x2264, 0x2265, 0x221e, 0x2235, 0x2234,
-0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xff04, 0x00a4,
-0xffe0, 0xffe1, 0x2030, 0x00a7, 0x2116, 0x2606, 0x2605, 0x25cb,
-0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2,
-0x203b, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,
-50, 0x2231,
-0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f,
-0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497,
-0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476, 0x2477,
-0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f,
-0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487,
-0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
-0x2468, 0x2469,
-10, 0x2265,
-0x3220, 0x3221, 0x3222, 0x3223, 0x3224, 0x3225, 0x3226, 0x3227,
-0x3228, 0x3229,
-12, 0x2271,
-0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167,
-0x2168, 0x2169, 0x216a, 0x216b,
-94, 0x2321,
-0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07, 0xff08,
-0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10,
-0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
-0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20,
-0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28,
-0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30,
-0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38,
-0xff39, 0xff3a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, 0xff40,
-0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48,
-0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50,
-0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58,
-0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3,
-83, 0x2421,
-0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
-0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
-0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
-0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
-0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
-0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
-0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
-0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
-0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
-0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
-0x3091, 0x3092, 0x3093,
-86, 0x2521,
-0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
-0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
-0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
-0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
-0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
-0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
-0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
-0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
-0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
-0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
-0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6,
-24, 0x2621,
-0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
-0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
-0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
-24, 0x2641,
-0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
-0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
-0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
-33, 0x2721,
-0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416,
-0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
-0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426,
-0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e,
-0x042f,
-33, 0x2751,
-0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436,
-0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
-0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446,
-0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e,
-0x044f,
-26, 0x2821,
-0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b, 0x00e8,
-0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2, 0x00f2,
-0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da, 0x01dc,
-0x00fc, 0x00ea,
-37, 0x2845,
-0x3105, 0x3106, 0x3107, 0x3108, 0x3109, 0x310a, 0x310b, 0x310c,
-0x310d, 0x310e, 0x310f, 0x3110, 0x3111, 0x3112, 0x3113, 0x3114,
-0x3115, 0x3116, 0x3117, 0x3118, 0x3119, 0x311a, 0x311b, 0x311c,
-0x311d, 0x311e, 0x311f, 0x3120, 0x3121, 0x3122, 0x3123, 0x3124,
-0x3125, 0x3126, 0x3127, 0x3128, 0x3129,
-76, 0x2924,
-0x2500, 0x2501, 0x2502, 0x2503, 0x2504, 0x2505, 0x2506, 0x2507,
-0x2508, 0x2509, 0x250a, 0x250b, 0x250c, 0x250d, 0x250e, 0x250f,
-0x2510, 0x2511, 0x2512, 0x2513, 0x2514, 0x2515, 0x2516, 0x2517,
-0x2518, 0x2519, 0x251a, 0x251b, 0x251c, 0x251d, 0x251e, 0x251f,
-0x2520, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527,
-0x2528, 0x2529, 0x252a, 0x252b, 0x252c, 0x252d, 0x252e, 0x252f,
-0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537,
-0x2538, 0x2539, 0x253a, 0x253b, 0x253c, 0x253d, 0x253e, 0x253f,
-0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547,
-0x2548, 0x2549, 0x254a, 0x254b,
-94, 0x3021,
-0x554a, 0x963f, 0x57c3, 0x6328, 0x54ce, 0x5509, 0x54c0, 0x7691,
-0x764c, 0x853c, 0x77ee, 0x827e, 0x788d, 0x7231, 0x9698, 0x978d,
-0x6c28, 0x5b89, 0x4ffa, 0x6309, 0x6697, 0x5cb8, 0x80fa, 0x6848,
-0x80ae, 0x6602, 0x76ce, 0x51f9, 0x6556, 0x71ac, 0x7ff1, 0x8884,
-0x50b2, 0x5965, 0x61ca, 0x6fb3, 0x82ad, 0x634c, 0x6252, 0x53ed,
-0x5427, 0x7b06, 0x516b, 0x75a4, 0x5df4, 0x62d4, 0x8dcb, 0x9776,
-0x628a, 0x8019, 0x575d, 0x9738, 0x7f62, 0x7238, 0x767d, 0x67cf,
-0x767e, 0x6446, 0x4f70, 0x8d25, 0x62dc, 0x7a17, 0x6591, 0x73ed,
-0x642c, 0x6273, 0x822c, 0x9881, 0x677f, 0x7248, 0x626e, 0x62cc,
-0x4f34, 0x74e3, 0x534a, 0x529e, 0x7eca, 0x90a6, 0x5e2e, 0x6886,
-0x699c, 0x8180, 0x7ed1, 0x68d2, 0x78c5, 0x868c, 0x9551, 0x508d,
-0x8c24, 0x82de, 0x80de, 0x5305, 0x8912, 0x5265,
-94, 0x3121,
-0x8584, 0x96f9, 0x4fdd, 0x5821, 0x9971, 0x5b9d, 0x62b1, 0x62a5,
-0x66b4, 0x8c79, 0x9c8d, 0x7206, 0x676f, 0x7891, 0x60b2, 0x5351,
-0x5317, 0x8f88, 0x80cc, 0x8d1d, 0x94a1, 0x500d, 0x72c8, 0x5907,
-0x60eb, 0x7119, 0x88ab, 0x5954, 0x82ef, 0x672c, 0x7b28, 0x5d29,
-0x7ef7, 0x752d, 0x6cf5, 0x8e66, 0x8ff8, 0x903c, 0x9f3b, 0x6bd4,
-0x9119, 0x7b14, 0x5f7c, 0x78a7, 0x84d6, 0x853d, 0x6bd5, 0x6bd9,
-0x6bd6, 0x5e01, 0x5e87, 0x75f9, 0x95ed, 0x655d, 0x5f0a, 0x5fc5,
-0x8f9f, 0x58c1, 0x81c2, 0x907f, 0x965b, 0x97ad, 0x8fb9, 0x7f16,
-0x8d2c, 0x6241, 0x4fbf, 0x53d8, 0x535e, 0x8fa8, 0x8fa9, 0x8fab,
-0x904d, 0x6807, 0x5f6a, 0x8198, 0x8868, 0x9cd6, 0x618b, 0x522b,
-0x762a, 0x5f6c, 0x658c, 0x6fd2, 0x6ee8, 0x5bbe, 0x6448, 0x5175,
-0x51b0, 0x67c4, 0x4e19, 0x79c9, 0x997c, 0x70b3,
-94, 0x3221,
-0x75c5, 0x5e76, 0x73bb, 0x83e0, 0x64ad, 0x62e8, 0x94b5, 0x6ce2,
-0x535a, 0x52c3, 0x640f, 0x94c2, 0x7b94, 0x4f2f, 0x5e1b, 0x8236,
-0x8116, 0x818a, 0x6e24, 0x6cca, 0x9a73, 0x6355, 0x535c, 0x54fa,
-0x8865, 0x57e0, 0x4e0d, 0x5e03, 0x6b65, 0x7c3f, 0x90e8, 0x6016,
-0x64e6, 0x731c, 0x88c1, 0x6750, 0x624d, 0x8d22, 0x776c, 0x8e29,
-0x91c7, 0x5f69, 0x83dc, 0x8521, 0x9910, 0x53c2, 0x8695, 0x6b8b,
-0x60ed, 0x60e8, 0x707f, 0x82cd, 0x8231, 0x4ed3, 0x6ca7, 0x85cf,
-0x64cd, 0x7cd9, 0x69fd, 0x66f9, 0x8349, 0x5395, 0x7b56, 0x4fa7,
-0x518c, 0x6d4b, 0x5c42, 0x8e6d, 0x63d2, 0x53c9, 0x832c, 0x8336,
-0x67e5, 0x78b4, 0x643d, 0x5bdf, 0x5c94, 0x5dee, 0x8be7, 0x62c6,
-0x67f4, 0x8c7a, 0x6400, 0x63ba, 0x8749, 0x998b, 0x8c17, 0x7f20,
-0x94f2, 0x4ea7, 0x9610, 0x98a4, 0x660c, 0x7316,
-94, 0x3321,
-0x573a, 0x5c1d, 0x5e38, 0x957f, 0x507f, 0x80a0, 0x5382, 0x655e,
-0x7545, 0x5531, 0x5021, 0x8d85, 0x6284, 0x949e, 0x671d, 0x5632,
-0x6f6e, 0x5de2, 0x5435, 0x7092, 0x8f66, 0x626f, 0x64a4, 0x63a3,
-0x5f7b, 0x6f88, 0x90f4, 0x81e3, 0x8fb0, 0x5c18, 0x6668, 0x5ff1,
-0x6c89, 0x9648, 0x8d81, 0x886c, 0x6491, 0x79f0, 0x57ce, 0x6a59,
-0x6210, 0x5448, 0x4e58, 0x7a0b, 0x60e9, 0x6f84, 0x8bda, 0x627f,
-0x901e, 0x9a8b, 0x79e4, 0x5403, 0x75f4, 0x6301, 0x5319, 0x6c60,
-0x8fdf, 0x5f1b, 0x9a70, 0x803b, 0x9f7f, 0x4f88, 0x5c3a, 0x8d64,
-0x7fc5, 0x65a5, 0x70bd, 0x5145, 0x51b2, 0x866b, 0x5d07, 0x5ba0,
-0x62bd, 0x916c, 0x7574, 0x8e0c, 0x7a20, 0x6101, 0x7b79, 0x4ec7,
-0x7ef8, 0x7785, 0x4e11, 0x81ed, 0x521d, 0x51fa, 0x6a71, 0x53a8,
-0x8e87, 0x9504, 0x96cf, 0x6ec1, 0x9664, 0x695a,
-94, 0x3421,
-0x7840, 0x50a8, 0x77d7, 0x6410, 0x89e6, 0x5904, 0x63e3, 0x5ddd,
-0x7a7f, 0x693d, 0x4f20, 0x8239, 0x5598, 0x4e32, 0x75ae, 0x7a97,
-0x5e62, 0x5e8a, 0x95ef, 0x521b, 0x5439, 0x708a, 0x6376, 0x9524,
-0x5782, 0x6625, 0x693f, 0x9187, 0x5507, 0x6df3, 0x7eaf, 0x8822,
-0x6233, 0x7ef0, 0x75b5, 0x8328, 0x78c1, 0x96cc, 0x8f9e, 0x6148,
-0x74f7, 0x8bcd, 0x6b64, 0x523a, 0x8d50, 0x6b21, 0x806a, 0x8471,
-0x56f1, 0x5306, 0x4ece, 0x4e1b, 0x51d1, 0x7c97, 0x918b, 0x7c07,
-0x4fc3, 0x8e7f, 0x7be1, 0x7a9c, 0x6467, 0x5d14, 0x50ac, 0x8106,
-0x7601, 0x7cb9, 0x6dec, 0x7fe0, 0x6751, 0x5b58, 0x5bf8, 0x78cb,
-0x64ae, 0x6413, 0x63aa, 0x632b, 0x9519, 0x642d, 0x8fbe, 0x7b54,
-0x7629, 0x6253, 0x5927, 0x5446, 0x6b79, 0x50a3, 0x6234, 0x5e26,
-0x6b86, 0x4ee3, 0x8d37, 0x888b, 0x5f85, 0x902e,
-94, 0x3521,
-0x6020, 0x803d, 0x62c5, 0x4e39, 0x5355, 0x90f8, 0x63b8, 0x80c6,
-0x65e6, 0x6c2e, 0x4f46, 0x60ee, 0x6de1, 0x8bde, 0x5f39, 0x86cb,
-0x5f53, 0x6321, 0x515a, 0x8361, 0x6863, 0x5200, 0x6363, 0x8e48,
-0x5012, 0x5c9b, 0x7977, 0x5bfc, 0x5230, 0x7a3b, 0x60bc, 0x9053,
-0x76d7, 0x5fb7, 0x5f97, 0x7684, 0x8e6c, 0x706f, 0x767b, 0x7b49,
-0x77aa, 0x51f3, 0x9093, 0x5824, 0x4f4e, 0x6ef4, 0x8fea, 0x654c,
-0x7b1b, 0x72c4, 0x6da4, 0x7fdf, 0x5ae1, 0x62b5, 0x5e95, 0x5730,
-0x8482, 0x7b2c, 0x5e1d, 0x5f1f, 0x9012, 0x7f14, 0x98a0, 0x6382,
-0x6ec7, 0x7898, 0x70b9, 0x5178, 0x975b, 0x57ab, 0x7535, 0x4f43,
-0x7538, 0x5e97, 0x60e6, 0x5960, 0x6dc0, 0x6bbf, 0x7889, 0x53fc,
-0x96d5, 0x51cb, 0x5201, 0x6389, 0x540a, 0x9493, 0x8c03, 0x8dcc,
-0x7239, 0x789f, 0x8776, 0x8fed, 0x8c0d, 0x53e0,
-94, 0x3621,
-0x4e01, 0x76ef, 0x53ee, 0x9489, 0x9876, 0x9f0e, 0x952d, 0x5b9a,
-0x8ba2, 0x4e22, 0x4e1c, 0x51ac, 0x8463, 0x61c2, 0x52a8, 0x680b,
-0x4f97, 0x606b, 0x51bb, 0x6d1e, 0x515c, 0x6296, 0x6597, 0x9661,
-0x8c46, 0x9017, 0x75d8, 0x90fd, 0x7763, 0x6bd2, 0x728a, 0x72ec,
-0x8bfb, 0x5835, 0x7779, 0x8d4c, 0x675c, 0x9540, 0x809a, 0x5ea6,
-0x6e21, 0x5992, 0x7aef, 0x77ed, 0x953b, 0x6bb5, 0x65ad, 0x7f0e,
-0x5806, 0x5151, 0x961f, 0x5bf9, 0x58a9, 0x5428, 0x8e72, 0x6566,
-0x987f, 0x56e4, 0x949d, 0x76fe, 0x9041, 0x6387, 0x54c6, 0x591a,
-0x593a, 0x579b, 0x8eb2, 0x6735, 0x8dfa, 0x8235, 0x5241, 0x60f0,
-0x5815, 0x86fe, 0x5ce8, 0x9e45, 0x4fc4, 0x989d, 0x8bb9, 0x5a25,
-0x6076, 0x5384, 0x627c, 0x904f, 0x9102, 0x997f, 0x6069, 0x800c,
-0x513f, 0x8033, 0x5c14, 0x9975, 0x6d31, 0x4e8c,
-94, 0x3721,
-0x8d30, 0x53d1, 0x7f5a, 0x7b4f, 0x4f10, 0x4e4f, 0x9600, 0x6cd5,
-0x73d0, 0x85e9, 0x5e06, 0x756a, 0x7ffb, 0x6a0a, 0x77fe, 0x9492,
-0x7e41, 0x51e1, 0x70e6, 0x53cd, 0x8fd4, 0x8303, 0x8d29, 0x72af,
-0x996d, 0x6cdb, 0x574a, 0x82b3, 0x65b9, 0x80aa, 0x623f, 0x9632,
-0x59a8, 0x4eff, 0x8bbf, 0x7eba, 0x653e, 0x83f2, 0x975e, 0x5561,
-0x98de, 0x80a5, 0x532a, 0x8bfd, 0x5420, 0x80ba, 0x5e9f, 0x6cb8,
-0x8d39, 0x82ac, 0x915a, 0x5429, 0x6c1b, 0x5206, 0x7eb7, 0x575f,
-0x711a, 0x6c7e, 0x7c89, 0x594b, 0x4efd, 0x5fff, 0x6124, 0x7caa,
-0x4e30, 0x5c01, 0x67ab, 0x8702, 0x5cf0, 0x950b, 0x98ce, 0x75af,
-0x70fd, 0x9022, 0x51af, 0x7f1d, 0x8bbd, 0x5949, 0x51e4, 0x4f5b,
-0x5426, 0x592b, 0x6577, 0x80a4, 0x5b75, 0x6276, 0x62c2, 0x8f90,
-0x5e45, 0x6c1f, 0x7b26, 0x4f0f, 0x4fd8, 0x670d,
-94, 0x3821,
-0x6d6e, 0x6daa, 0x798f, 0x88b1, 0x5f17, 0x752b, 0x629a, 0x8f85,
-0x4fef, 0x91dc, 0x65a7, 0x812f, 0x8151, 0x5e9c, 0x8150, 0x8d74,
-0x526f, 0x8986, 0x8d4b, 0x590d, 0x5085, 0x4ed8, 0x961c, 0x7236,
-0x8179, 0x8d1f, 0x5bcc, 0x8ba3, 0x9644, 0x5987, 0x7f1a, 0x5490,
-0x5676, 0x560e, 0x8be5, 0x6539, 0x6982, 0x9499, 0x76d6, 0x6e89,
-0x5e72, 0x7518, 0x6746, 0x67d1, 0x7aff, 0x809d, 0x8d76, 0x611f,
-0x79c6, 0x6562, 0x8d63, 0x5188, 0x521a, 0x94a2, 0x7f38, 0x809b,
-0x7eb2, 0x5c97, 0x6e2f, 0x6760, 0x7bd9, 0x768b, 0x9ad8, 0x818f,
-0x7f94, 0x7cd5, 0x641e, 0x9550, 0x7a3f, 0x544a, 0x54e5, 0x6b4c,
-0x6401, 0x6208, 0x9e3d, 0x80f3, 0x7599, 0x5272, 0x9769, 0x845b,
-0x683c, 0x86e4, 0x9601, 0x9694, 0x94ec, 0x4e2a, 0x5404, 0x7ed9,
-0x6839, 0x8ddf, 0x8015, 0x66f4, 0x5e9a, 0x7fb9,
-94, 0x3921,
-0x57c2, 0x803f, 0x6897, 0x5de5, 0x653b, 0x529f, 0x606d, 0x9f9a,
-0x4f9b, 0x8eac, 0x516c, 0x5bab, 0x5f13, 0x5de9, 0x6c5e, 0x62f1,
-0x8d21, 0x5171, 0x94a9, 0x52fe, 0x6c9f, 0x82df, 0x72d7, 0x57a2,
-0x6784, 0x8d2d, 0x591f, 0x8f9c, 0x83c7, 0x5495, 0x7b8d, 0x4f30,
-0x6cbd, 0x5b64, 0x59d1, 0x9f13, 0x53e4, 0x86ca, 0x9aa8, 0x8c37,
-0x80a1, 0x6545, 0x987e, 0x56fa, 0x96c7, 0x522e, 0x74dc, 0x5250,
-0x5be1, 0x6302, 0x8902, 0x4e56, 0x62d0, 0x602a, 0x68fa, 0x5173,
-0x5b98, 0x51a0, 0x89c2, 0x7ba1, 0x9986, 0x7f50, 0x60ef, 0x704c,
-0x8d2f, 0x5149, 0x5e7f, 0x901b, 0x7470, 0x89c4, 0x572d, 0x7845,
-0x5f52, 0x9f9f, 0x95fa, 0x8f68, 0x9b3c, 0x8be1, 0x7678, 0x6842,
-0x67dc, 0x8dea, 0x8d35, 0x523d, 0x8f8a, 0x6eda, 0x68cd, 0x9505,
-0x90ed, 0x56fd, 0x679c, 0x88f9, 0x8fc7, 0x54c8,
-94, 0x3a21,
-0x9ab8, 0x5b69, 0x6d77, 0x6c26, 0x4ea5, 0x5bb3, 0x9a87, 0x9163,
-0x61a8, 0x90af, 0x97e9, 0x542b, 0x6db5, 0x5bd2, 0x51fd, 0x558a,
-0x7f55, 0x7ff0, 0x64bc, 0x634d, 0x65f1, 0x61be, 0x608d, 0x710a,
-0x6c57, 0x6c49, 0x592f, 0x676d, 0x822a, 0x58d5, 0x568e, 0x8c6a,
-0x6beb, 0x90dd, 0x597d, 0x8017, 0x53f7, 0x6d69, 0x5475, 0x559d,
-0x8377, 0x83cf, 0x6838, 0x79be, 0x548c, 0x4f55, 0x5408, 0x76d2,
-0x8c89, 0x9602, 0x6cb3, 0x6db8, 0x8d6b, 0x8910, 0x9e64, 0x8d3a,
-0x563f, 0x9ed1, 0x75d5, 0x5f88, 0x72e0, 0x6068, 0x54fc, 0x4ea8,
-0x6a2a, 0x8861, 0x6052, 0x8f70, 0x54c4, 0x70d8, 0x8679, 0x9e3f,
-0x6d2a, 0x5b8f, 0x5f18, 0x7ea2, 0x5589, 0x4faf, 0x7334, 0x543c,
-0x539a, 0x5019, 0x540e, 0x547c, 0x4e4e, 0x5ffd, 0x745a, 0x58f6,
-0x846b, 0x80e1, 0x8774, 0x72d0, 0x7cca, 0x6e56,
-94, 0x3b21,
-0x5f27, 0x864e, 0x552c, 0x62a4, 0x4e92, 0x6caa, 0x6237, 0x82b1,
-0x54d7, 0x534e, 0x733e, 0x6ed1, 0x753b, 0x5212, 0x5316, 0x8bdd,
-0x69d0, 0x5f8a, 0x6000, 0x6dee, 0x574f, 0x6b22, 0x73af, 0x6853,
-0x8fd8, 0x7f13, 0x6362, 0x60a3, 0x5524, 0x75ea, 0x8c62, 0x7115,
-0x6da3, 0x5ba6, 0x5e7b, 0x8352, 0x614c, 0x9ec4, 0x78fa, 0x8757,
-0x7c27, 0x7687, 0x51f0, 0x60f6, 0x714c, 0x6643, 0x5e4c, 0x604d,
-0x8c0e, 0x7070, 0x6325, 0x8f89, 0x5fbd, 0x6062, 0x86d4, 0x56de,
-0x6bc1, 0x6094, 0x6167, 0x5349, 0x60e0, 0x6666, 0x8d3f, 0x79fd,
-0x4f1a, 0x70e9, 0x6c47, 0x8bb3, 0x8bf2, 0x7ed8, 0x8364, 0x660f,
-0x5a5a, 0x9b42, 0x6d51, 0x6df7, 0x8c41, 0x6d3b, 0x4f19, 0x706b,
-0x83b7, 0x6216, 0x60d1, 0x970d, 0x8d27, 0x7978, 0x51fb, 0x573e,
-0x57fa, 0x673a, 0x7578, 0x7a3d, 0x79ef, 0x7b95,
-94, 0x3c21,
-0x808c, 0x9965, 0x8ff9, 0x6fc0, 0x8ba5, 0x9e21, 0x59ec, 0x7ee9,
-0x7f09, 0x5409, 0x6781, 0x68d8, 0x8f91, 0x7c4d, 0x96c6, 0x53ca,
-0x6025, 0x75be, 0x6c72, 0x5373, 0x5ac9, 0x7ea7, 0x6324, 0x51e0,
-0x810a, 0x5df1, 0x84df, 0x6280, 0x5180, 0x5b63, 0x4f0e, 0x796d,
-0x5242, 0x60b8, 0x6d4e, 0x5bc4, 0x5bc2, 0x8ba1, 0x8bb0, 0x65e2,
-0x5fcc, 0x9645, 0x5993, 0x7ee7, 0x7eaa, 0x5609, 0x67b7, 0x5939,
-0x4f73, 0x5bb6, 0x52a0, 0x835a, 0x988a, 0x8d3e, 0x7532, 0x94be,
-0x5047, 0x7a3c, 0x4ef7, 0x67b6, 0x9a7e, 0x5ac1, 0x6b7c, 0x76d1,
-0x575a, 0x5c16, 0x7b3a, 0x95f4, 0x714e, 0x517c, 0x80a9, 0x8270,
-0x5978, 0x7f04, 0x8327, 0x68c0, 0x67ec, 0x78b1, 0x7877, 0x62e3,
-0x6361, 0x7b80, 0x4fed, 0x526a, 0x51cf, 0x8350, 0x69db, 0x9274,
-0x8df5, 0x8d31, 0x89c1, 0x952e, 0x7bad, 0x4ef6,
-94, 0x3d21,
-0x5065, 0x8230, 0x5251, 0x996f, 0x6e10, 0x6e85, 0x6da7, 0x5efa,
-0x50f5, 0x59dc, 0x5c06, 0x6d46, 0x6c5f, 0x7586, 0x848b, 0x6868,
-0x5956, 0x8bb2, 0x5320, 0x9171, 0x964d, 0x8549, 0x6912, 0x7901,
-0x7126, 0x80f6, 0x4ea4, 0x90ca, 0x6d47, 0x9a84, 0x5a07, 0x56bc,
-0x6405, 0x94f0, 0x77eb, 0x4fa5, 0x811a, 0x72e1, 0x89d2, 0x997a,
-0x7f34, 0x7ede, 0x527f, 0x6559, 0x9175, 0x8f7f, 0x8f83, 0x53eb,
-0x7a96, 0x63ed, 0x63a5, 0x7686, 0x79f8, 0x8857, 0x9636, 0x622a,
-0x52ab, 0x8282, 0x6854, 0x6770, 0x6377, 0x776b, 0x7aed, 0x6d01,
-0x7ed3, 0x89e3, 0x59d0, 0x6212, 0x85c9, 0x82a5, 0x754c, 0x501f,
-0x4ecb, 0x75a5, 0x8beb, 0x5c4a, 0x5dfe, 0x7b4b, 0x65a4, 0x91d1,
-0x4eca, 0x6d25, 0x895f, 0x7d27, 0x9526, 0x4ec5, 0x8c28, 0x8fdb,
-0x9773, 0x664b, 0x7981, 0x8fd1, 0x70ec, 0x6d78,
-94, 0x3e21,
-0x5c3d, 0x52b2, 0x8346, 0x5162, 0x830e, 0x775b, 0x6676, 0x9cb8,
-0x4eac, 0x60ca, 0x7cbe, 0x7cb3, 0x7ecf, 0x4e95, 0x8b66, 0x666f,
-0x9888, 0x9759, 0x5883, 0x656c, 0x955c, 0x5f84, 0x75c9, 0x9756,
-0x7adf, 0x7ade, 0x51c0, 0x70af, 0x7a98, 0x63ea, 0x7a76, 0x7ea0,
-0x7396, 0x97ed, 0x4e45, 0x7078, 0x4e5d, 0x9152, 0x53a9, 0x6551,
-0x65e7, 0x81fc, 0x8205, 0x548e, 0x5c31, 0x759a, 0x97a0, 0x62d8,
-0x72d9, 0x75bd, 0x5c45, 0x9a79, 0x83ca, 0x5c40, 0x5480, 0x77e9,
-0x4e3e, 0x6cae, 0x805a, 0x62d2, 0x636e, 0x5de8, 0x5177, 0x8ddd,
-0x8e1e, 0x952f, 0x4ff1, 0x53e5, 0x60e7, 0x70ac, 0x5267, 0x6350,
-0x9e43, 0x5a1f, 0x5026, 0x7737, 0x5377, 0x7ee2, 0x6485, 0x652b,
-0x6289, 0x6398, 0x5014, 0x7235, 0x89c9, 0x51b3, 0x8bc0, 0x7edd,
-0x5747, 0x83cc, 0x94a7, 0x519b, 0x541b, 0x5cfb,
-94, 0x3f21,
-0x4fca, 0x7ae3, 0x6d5a, 0x90e1, 0x9a8f, 0x5580, 0x5496, 0x5361,
-0x54af, 0x5f00, 0x63e9, 0x6977, 0x51ef, 0x6168, 0x520a, 0x582a,
-0x52d8, 0x574e, 0x780d, 0x770b, 0x5eb7, 0x6177, 0x7ce0, 0x625b,
-0x6297, 0x4ea2, 0x7095, 0x8003, 0x62f7, 0x70e4, 0x9760, 0x5777,
-0x82db, 0x67ef, 0x68f5, 0x78d5, 0x9897, 0x79d1, 0x58f3, 0x54b3,
-0x53ef, 0x6e34, 0x514b, 0x523b, 0x5ba2, 0x8bfe, 0x80af, 0x5543,
-0x57a6, 0x6073, 0x5751, 0x542d, 0x7a7a, 0x6050, 0x5b54, 0x63a7,
-0x62a0, 0x53e3, 0x6263, 0x5bc7, 0x67af, 0x54ed, 0x7a9f, 0x82e6,
-0x9177, 0x5e93, 0x88e4, 0x5938, 0x57ae, 0x630e, 0x8de8, 0x80ef,
-0x5757, 0x7b77, 0x4fa9, 0x5feb, 0x5bbd, 0x6b3e, 0x5321, 0x7b50,
-0x72c2, 0x6846, 0x77ff, 0x7736, 0x65f7, 0x51b5, 0x4e8f, 0x76d4,
-0x5cbf, 0x7aa5, 0x8475, 0x594e, 0x9b41, 0x5080,
-94, 0x4021,
-0x9988, 0x6127, 0x6e83, 0x5764, 0x6606, 0x6346, 0x56f0, 0x62ec,
-0x6269, 0x5ed3, 0x9614, 0x5783, 0x62c9, 0x5587, 0x8721, 0x814a,
-0x8fa3, 0x5566, 0x83b1, 0x6765, 0x8d56, 0x84dd, 0x5a6a, 0x680f,
-0x62e6, 0x7bee, 0x9611, 0x5170, 0x6f9c, 0x8c30, 0x63fd, 0x89c8,
-0x61d2, 0x7f06, 0x70c2, 0x6ee5, 0x7405, 0x6994, 0x72fc, 0x5eca,
-0x90ce, 0x6717, 0x6d6a, 0x635e, 0x52b3, 0x7262, 0x8001, 0x4f6c,
-0x59e5, 0x916a, 0x70d9, 0x6d9d, 0x52d2, 0x4e50, 0x96f7, 0x956d,
-0x857e, 0x78ca, 0x7d2f, 0x5121, 0x5792, 0x64c2, 0x808b, 0x7c7b,
-0x6cea, 0x68f1, 0x695e, 0x51b7, 0x5398, 0x68a8, 0x7281, 0x9ece,
-0x7bf1, 0x72f8, 0x79bb, 0x6f13, 0x7406, 0x674e, 0x91cc, 0x9ca4,
-0x793c, 0x8389, 0x8354, 0x540f, 0x6817, 0x4e3d, 0x5389, 0x52b1,
-0x783e, 0x5386, 0x5229, 0x5088, 0x4f8b, 0x4fd0,
-94, 0x4121,
-0x75e2, 0x7acb, 0x7c92, 0x6ca5, 0x96b6, 0x529b, 0x7483, 0x54e9,
-0x4fe9, 0x8054, 0x83b2, 0x8fde, 0x9570, 0x5ec9, 0x601c, 0x6d9f,
-0x5e18, 0x655b, 0x8138, 0x94fe, 0x604b, 0x70bc, 0x7ec3, 0x7cae,
-0x51c9, 0x6881, 0x7cb1, 0x826f, 0x4e24, 0x8f86, 0x91cf, 0x667e,
-0x4eae, 0x8c05, 0x64a9, 0x804a, 0x50da, 0x7597, 0x71ce, 0x5be5,
-0x8fbd, 0x6f66, 0x4e86, 0x6482, 0x9563, 0x5ed6, 0x6599, 0x5217,
-0x88c2, 0x70c8, 0x52a3, 0x730e, 0x7433, 0x6797, 0x78f7, 0x9716,
-0x4e34, 0x90bb, 0x9cde, 0x6dcb, 0x51db, 0x8d41, 0x541d, 0x62ce,
-0x73b2, 0x83f1, 0x96f6, 0x9f84, 0x94c3, 0x4f36, 0x7f9a, 0x51cc,
-0x7075, 0x9675, 0x5cad, 0x9886, 0x53e6, 0x4ee4, 0x6e9c, 0x7409,
-0x69b4, 0x786b, 0x998f, 0x7559, 0x5218, 0x7624, 0x6d41, 0x67f3,
-0x516d, 0x9f99, 0x804b, 0x5499, 0x7b3c, 0x7abf,
-94, 0x4221,
-0x9686, 0x5784, 0x62e2, 0x9647, 0x697c, 0x5a04, 0x6402, 0x7bd3,
-0x6f0f, 0x964b, 0x82a6, 0x5362, 0x9885, 0x5e90, 0x7089, 0x63b3,
-0x5364, 0x864f, 0x9c81, 0x9e93, 0x788c, 0x9732, 0x8def, 0x8d42,
-0x9e7f, 0x6f5e, 0x7984, 0x5f55, 0x9646, 0x622e, 0x9a74, 0x5415,
-0x94dd, 0x4fa3, 0x65c5, 0x5c65, 0x5c61, 0x7f15, 0x8651, 0x6c2f,
-0x5f8b, 0x7387, 0x6ee4, 0x7eff, 0x5ce6, 0x631b, 0x5b6a, 0x6ee6,
-0x5375, 0x4e71, 0x63a0, 0x7565, 0x62a1, 0x8f6e, 0x4f26, 0x4ed1,
-0x6ca6, 0x7eb6, 0x8bba, 0x841d, 0x87ba, 0x7f57, 0x903b, 0x9523,
-0x7ba9, 0x9aa1, 0x88f8, 0x843d, 0x6d1b, 0x9a86, 0x7edc, 0x5988,
-0x9ebb, 0x739b, 0x7801, 0x8682, 0x9a6c, 0x9a82, 0x561b, 0x5417,
-0x57cb, 0x4e70, 0x9ea6, 0x5356, 0x8fc8, 0x8109, 0x7792, 0x9992,
-0x86ee, 0x6ee1, 0x8513, 0x66fc, 0x6162, 0x6f2b,
-94, 0x4321,
-0x8c29, 0x8292, 0x832b, 0x76f2, 0x6c13, 0x5fd9, 0x83bd, 0x732b,
-0x8305, 0x951a, 0x6bdb, 0x77db, 0x94c6, 0x536f, 0x8302, 0x5192,
-0x5e3d, 0x8c8c, 0x8d38, 0x4e48, 0x73ab, 0x679a, 0x6885, 0x9176,
-0x9709, 0x7164, 0x6ca1, 0x7709, 0x5a92, 0x9541, 0x6bcf, 0x7f8e,
-0x6627, 0x5bd0, 0x59b9, 0x5a9a, 0x95e8, 0x95f7, 0x4eec, 0x840c,
-0x8499, 0x6aac, 0x76df, 0x9530, 0x731b, 0x68a6, 0x5b5f, 0x772f,
-0x919a, 0x9761, 0x7cdc, 0x8ff7, 0x8c1c, 0x5f25, 0x7c73, 0x79d8,
-0x89c5, 0x6ccc, 0x871c, 0x5bc6, 0x5e42, 0x68c9, 0x7720, 0x7ef5,
-0x5195, 0x514d, 0x52c9, 0x5a29, 0x7f05, 0x9762, 0x82d7, 0x63cf,
-0x7784, 0x85d0, 0x79d2, 0x6e3a, 0x5e99, 0x5999, 0x8511, 0x706d,
-0x6c11, 0x62bf, 0x76bf, 0x654f, 0x60af, 0x95fd, 0x660e, 0x879f,
-0x9e23, 0x94ed, 0x540d, 0x547d, 0x8c2c, 0x6478,
-94, 0x4421,
-0x6479, 0x8611, 0x6a21, 0x819c, 0x78e8, 0x6469, 0x9b54, 0x62b9,
-0x672b, 0x83ab, 0x58a8, 0x9ed8, 0x6cab, 0x6f20, 0x5bde, 0x964c,
-0x8c0b, 0x725f, 0x67d0, 0x62c7, 0x7261, 0x4ea9, 0x59c6, 0x6bcd,
-0x5893, 0x66ae, 0x5e55, 0x52df, 0x6155, 0x6728, 0x76ee, 0x7766,
-0x7267, 0x7a46, 0x62ff, 0x54ea, 0x5450, 0x94a0, 0x90a3, 0x5a1c,
-0x7eb3, 0x6c16, 0x4e43, 0x5976, 0x8010, 0x5948, 0x5357, 0x7537,
-0x96be, 0x56ca, 0x6320, 0x8111, 0x607c, 0x95f9, 0x6dd6, 0x5462,
-0x9981, 0x5185, 0x5ae9, 0x80fd, 0x59ae, 0x9713, 0x502a, 0x6ce5,
-0x5c3c, 0x62df, 0x4f60, 0x533f, 0x817b, 0x9006, 0x6eba, 0x852b,
-0x62c8, 0x5e74, 0x78be, 0x64b5, 0x637b, 0x5ff5, 0x5a18, 0x917f,
-0x9e1f, 0x5c3f, 0x634f, 0x8042, 0x5b7d, 0x556e, 0x954a, 0x954d,
-0x6d85, 0x60a8, 0x67e0, 0x72de, 0x51dd, 0x5b81,
-94, 0x4521,
-0x62e7, 0x6cde, 0x725b, 0x626d, 0x94ae, 0x7ebd, 0x8113, 0x6d53,
-0x519c, 0x5f04, 0x5974, 0x52aa, 0x6012, 0x5973, 0x6696, 0x8650,
-0x759f, 0x632a, 0x61e6, 0x7cef, 0x8bfa, 0x54e6, 0x6b27, 0x9e25,
-0x6bb4, 0x85d5, 0x5455, 0x5076, 0x6ca4, 0x556a, 0x8db4, 0x722c,
-0x5e15, 0x6015, 0x7436, 0x62cd, 0x6392, 0x724c, 0x5f98, 0x6e43,
-0x6d3e, 0x6500, 0x6f58, 0x76d8, 0x78d0, 0x76fc, 0x7554, 0x5224,
-0x53db, 0x4e53, 0x5e9e, 0x65c1, 0x802a, 0x80d6, 0x629b, 0x5486,
-0x5228, 0x70ae, 0x888d, 0x8dd1, 0x6ce1, 0x5478, 0x80da, 0x57f9,
-0x88f4, 0x8d54, 0x966a, 0x914d, 0x4f69, 0x6c9b, 0x55b7, 0x76c6,
-0x7830, 0x62a8, 0x70f9, 0x6f8e, 0x5f6d, 0x84ec, 0x68da, 0x787c,
-0x7bf7, 0x81a8, 0x670b, 0x9e4f, 0x6367, 0x78b0, 0x576f, 0x7812,
-0x9739, 0x6279, 0x62ab, 0x5288, 0x7435, 0x6bd7,
-94, 0x4621,
-0x5564, 0x813e, 0x75b2, 0x76ae, 0x5339, 0x75de, 0x50fb, 0x5c41,
-0x8b6c, 0x7bc7, 0x504f, 0x7247, 0x9a97, 0x98d8, 0x6f02, 0x74e2,
-0x7968, 0x6487, 0x77a5, 0x62fc, 0x9891, 0x8d2b, 0x54c1, 0x8058,
-0x4e52, 0x576a, 0x82f9, 0x840d, 0x5e73, 0x51ed, 0x74f6, 0x8bc4,
-0x5c4f, 0x5761, 0x6cfc, 0x9887, 0x5a46, 0x7834, 0x9b44, 0x8feb,
-0x7c95, 0x5256, 0x6251, 0x94fa, 0x4ec6, 0x8386, 0x8461, 0x83e9,
-0x84b2, 0x57d4, 0x6734, 0x5703, 0x666e, 0x6d66, 0x8c31, 0x66dd,
-0x7011, 0x671f, 0x6b3a, 0x6816, 0x621a, 0x59bb, 0x4e03, 0x51c4,
-0x6f06, 0x67d2, 0x6c8f, 0x5176, 0x68cb, 0x5947, 0x6b67, 0x7566,
-0x5d0e, 0x8110, 0x9f50, 0x65d7, 0x7948, 0x7941, 0x9a91, 0x8d77,
-0x5c82, 0x4e5e, 0x4f01, 0x542f, 0x5951, 0x780c, 0x5668, 0x6c14,
-0x8fc4, 0x5f03, 0x6c7d, 0x6ce3, 0x8bab, 0x6390,
-94, 0x4721,
-0x6070, 0x6d3d, 0x7275, 0x6266, 0x948e, 0x94c5, 0x5343, 0x8fc1,
-0x7b7e, 0x4edf, 0x8c26, 0x4e7e, 0x9ed4, 0x94b1, 0x94b3, 0x524d,
-0x6f5c, 0x9063, 0x6d45, 0x8c34, 0x5811, 0x5d4c, 0x6b20, 0x6b49,
-0x67aa, 0x545b, 0x8154, 0x7f8c, 0x5899, 0x8537, 0x5f3a, 0x62a2,
-0x6a47, 0x9539, 0x6572, 0x6084, 0x6865, 0x77a7, 0x4e54, 0x4fa8,
-0x5de7, 0x9798, 0x64ac, 0x7fd8, 0x5ced, 0x4fcf, 0x7a8d, 0x5207,
-0x8304, 0x4e14, 0x602f, 0x7a83, 0x94a6, 0x4fb5, 0x4eb2, 0x79e6,
-0x7434, 0x52e4, 0x82b9, 0x64d2, 0x79bd, 0x5bdd, 0x6c81, 0x9752,
-0x8f7b, 0x6c22, 0x503e, 0x537f, 0x6e05, 0x64ce, 0x6674, 0x6c30,
-0x60c5, 0x9877, 0x8bf7, 0x5e86, 0x743c, 0x7a77, 0x79cb, 0x4e18,
-0x90b1, 0x7403, 0x6c42, 0x56da, 0x914b, 0x6cc5, 0x8d8b, 0x533a,
-0x86c6, 0x66f2, 0x8eaf, 0x5c48, 0x9a71, 0x6e20,
-94, 0x4821,
-0x53d6, 0x5a36, 0x9f8b, 0x8da3, 0x53bb, 0x5708, 0x98a7, 0x6743,
-0x919b, 0x6cc9, 0x5168, 0x75ca, 0x62f3, 0x72ac, 0x5238, 0x529d,
-0x7f3a, 0x7094, 0x7638, 0x5374, 0x9e4a, 0x69b7, 0x786e, 0x96c0,
-0x88d9, 0x7fa4, 0x7136, 0x71c3, 0x5189, 0x67d3, 0x74e4, 0x58e4,
-0x6518, 0x56b7, 0x8ba9, 0x9976, 0x6270, 0x7ed5, 0x60f9, 0x70ed,
-0x58ec, 0x4ec1, 0x4eba, 0x5fcd, 0x97e7, 0x4efb, 0x8ba4, 0x5203,
-0x598a, 0x7eab, 0x6254, 0x4ecd, 0x65e5, 0x620e, 0x8338, 0x84c9,
-0x8363, 0x878d, 0x7194, 0x6eb6, 0x5bb9, 0x7ed2, 0x5197, 0x63c9,
-0x67d4, 0x8089, 0x8339, 0x8815, 0x5112, 0x5b7a, 0x5982, 0x8fb1,
-0x4e73, 0x6c5d, 0x5165, 0x8925, 0x8f6f, 0x962e, 0x854a, 0x745e,
-0x9510, 0x95f0, 0x6da6, 0x82e5, 0x5f31, 0x6492, 0x6d12, 0x8428,
-0x816e, 0x9cc3, 0x585e, 0x8d5b, 0x4e09, 0x53c1,
-94, 0x4921,
-0x4f1e, 0x6563, 0x6851, 0x55d3, 0x4e27, 0x6414, 0x9a9a, 0x626b,
-0x5ac2, 0x745f, 0x8272, 0x6da9, 0x68ee, 0x50e7, 0x838e, 0x7802,
-0x6740, 0x5239, 0x6c99, 0x7eb1, 0x50bb, 0x5565, 0x715e, 0x7b5b,
-0x6652, 0x73ca, 0x82eb, 0x6749, 0x5c71, 0x5220, 0x717d, 0x886b,
-0x95ea, 0x9655, 0x64c5, 0x8d61, 0x81b3, 0x5584, 0x6c55, 0x6247,
-0x7f2e, 0x5892, 0x4f24, 0x5546, 0x8d4f, 0x664c, 0x4e0a, 0x5c1a,
-0x88f3, 0x68a2, 0x634e, 0x7a0d, 0x70e7, 0x828d, 0x52fa, 0x97f6,
-0x5c11, 0x54e8, 0x90b5, 0x7ecd, 0x5962, 0x8d4a, 0x86c7, 0x820c,
-0x820d, 0x8d66, 0x6444, 0x5c04, 0x6151, 0x6d89, 0x793e, 0x8bbe,
-0x7837, 0x7533, 0x547b, 0x4f38, 0x8eab, 0x6df1, 0x5a20, 0x7ec5,
-0x795e, 0x6c88, 0x5ba1, 0x5a76, 0x751a, 0x80be, 0x614e, 0x6e17,
-0x58f0, 0x751f, 0x7525, 0x7272, 0x5347, 0x7ef3,
-94, 0x4a21,
-0x7701, 0x76db, 0x5269, 0x80dc, 0x5723, 0x5e08, 0x5931, 0x72ee,
-0x65bd, 0x6e7f, 0x8bd7, 0x5c38, 0x8671, 0x5341, 0x77f3, 0x62fe,
-0x65f6, 0x4ec0, 0x98df, 0x8680, 0x5b9e, 0x8bc6, 0x53f2, 0x77e2,
-0x4f7f, 0x5c4e, 0x9a76, 0x59cb, 0x5f0f, 0x793a, 0x58eb, 0x4e16,
-0x67ff, 0x4e8b, 0x62ed, 0x8a93, 0x901d, 0x52bf, 0x662f, 0x55dc,
-0x566c, 0x9002, 0x4ed5, 0x4f8d, 0x91ca, 0x9970, 0x6c0f, 0x5e02,
-0x6043, 0x5ba4, 0x89c6, 0x8bd5, 0x6536, 0x624b, 0x9996, 0x5b88,
-0x5bff, 0x6388, 0x552e, 0x53d7, 0x7626, 0x517d, 0x852c, 0x67a2,
-0x68b3, 0x6b8a, 0x6292, 0x8f93, 0x53d4, 0x8212, 0x6dd1, 0x758f,
-0x4e66, 0x8d4e, 0x5b70, 0x719f, 0x85af, 0x6691, 0x66d9, 0x7f72,
-0x8700, 0x9ecd, 0x9f20, 0x5c5e, 0x672f, 0x8ff0, 0x6811, 0x675f,
-0x620d, 0x7ad6, 0x5885, 0x5eb6, 0x6570, 0x6f31,
-94, 0x4b21,
-0x6055, 0x5237, 0x800d, 0x6454, 0x8870, 0x7529, 0x5e05, 0x6813,
-0x62f4, 0x971c, 0x53cc, 0x723d, 0x8c01, 0x6c34, 0x7761, 0x7a0e,
-0x542e, 0x77ac, 0x987a, 0x821c, 0x8bf4, 0x7855, 0x6714, 0x70c1,
-0x65af, 0x6495, 0x5636, 0x601d, 0x79c1, 0x53f8, 0x4e1d, 0x6b7b,
-0x8086, 0x5bfa, 0x55e3, 0x56db, 0x4f3a, 0x4f3c, 0x9972, 0x5df3,
-0x677e, 0x8038, 0x6002, 0x9882, 0x9001, 0x5b8b, 0x8bbc, 0x8bf5,
-0x641c, 0x8258, 0x64de, 0x55fd, 0x82cf, 0x9165, 0x4fd7, 0x7d20,
-0x901f, 0x7c9f, 0x50f3, 0x5851, 0x6eaf, 0x5bbf, 0x8bc9, 0x8083,
-0x9178, 0x849c, 0x7b97, 0x867d, 0x968b, 0x968f, 0x7ee5, 0x9ad3,
-0x788e, 0x5c81, 0x7a57, 0x9042, 0x96a7, 0x795f, 0x5b59, 0x635f,
-0x7b0b, 0x84d1, 0x68ad, 0x5506, 0x7f29, 0x7410, 0x7d22, 0x9501,
-0x6240, 0x584c, 0x4ed6, 0x5b83, 0x5979, 0x5854,
-94, 0x4c21,
-0x736d, 0x631e, 0x8e4b, 0x8e0f, 0x80ce, 0x82d4, 0x62ac, 0x53f0,
-0x6cf0, 0x915e, 0x592a, 0x6001, 0x6c70, 0x574d, 0x644a, 0x8d2a,
-0x762b, 0x6ee9, 0x575b, 0x6a80, 0x75f0, 0x6f6d, 0x8c2d, 0x8c08,
-0x5766, 0x6bef, 0x8892, 0x78b3, 0x63a2, 0x53f9, 0x70ad, 0x6c64,
-0x5858, 0x642a, 0x5802, 0x68e0, 0x819b, 0x5510, 0x7cd6, 0x5018,
-0x8eba, 0x6dcc, 0x8d9f, 0x70eb, 0x638f, 0x6d9b, 0x6ed4, 0x7ee6,
-0x8404, 0x6843, 0x9003, 0x6dd8, 0x9676, 0x8ba8, 0x5957, 0x7279,
-0x85e4, 0x817e, 0x75bc, 0x8a8a, 0x68af, 0x5254, 0x8e22, 0x9511,
-0x63d0, 0x9898, 0x8e44, 0x557c, 0x4f53, 0x66ff, 0x568f, 0x60d5,
-0x6d95, 0x5243, 0x5c49, 0x5929, 0x6dfb, 0x586b, 0x7530, 0x751c,
-0x606c, 0x8214, 0x8146, 0x6311, 0x6761, 0x8fe2, 0x773a, 0x8df3,
-0x8d34, 0x94c1, 0x5e16, 0x5385, 0x542c, 0x70c3,
-94, 0x4d21,
-0x6c40, 0x5ef7, 0x505c, 0x4ead, 0x5ead, 0x633a, 0x8247, 0x901a,
-0x6850, 0x916e, 0x77b3, 0x540c, 0x94dc, 0x5f64, 0x7ae5, 0x6876,
-0x6345, 0x7b52, 0x7edf, 0x75db, 0x5077, 0x6295, 0x5934, 0x900f,
-0x51f8, 0x79c3, 0x7a81, 0x56fe, 0x5f92, 0x9014, 0x6d82, 0x5c60,
-0x571f, 0x5410, 0x5154, 0x6e4d, 0x56e2, 0x63a8, 0x9893, 0x817f,
-0x8715, 0x892a, 0x9000, 0x541e, 0x5c6f, 0x81c0, 0x62d6, 0x6258,
-0x8131, 0x9e35, 0x9640, 0x9a6e, 0x9a7c, 0x692d, 0x59a5, 0x62d3,
-0x553e, 0x6316, 0x54c7, 0x86d9, 0x6d3c, 0x5a03, 0x74e6, 0x889c,
-0x6b6a, 0x5916, 0x8c4c, 0x5f2f, 0x6e7e, 0x73a9, 0x987d, 0x4e38,
-0x70f7, 0x5b8c, 0x7897, 0x633d, 0x665a, 0x7696, 0x60cb, 0x5b9b,
-0x5a49, 0x4e07, 0x8155, 0x6c6a, 0x738b, 0x4ea1, 0x6789, 0x7f51,
-0x5f80, 0x65fa, 0x671b, 0x5fd8, 0x5984, 0x5a01,
-94, 0x4e21,
-0x5dcd, 0x5fae, 0x5371, 0x97e6, 0x8fdd, 0x6845, 0x56f4, 0x552f,
-0x60df, 0x4e3a, 0x6f4d, 0x7ef4, 0x82c7, 0x840e, 0x59d4, 0x4f1f,
-0x4f2a, 0x5c3e, 0x7eac, 0x672a, 0x851a, 0x5473, 0x754f, 0x80c3,
-0x5582, 0x9b4f, 0x4f4d, 0x6e2d, 0x8c13, 0x5c09, 0x6170, 0x536b,
-0x761f, 0x6e29, 0x868a, 0x6587, 0x95fb, 0x7eb9, 0x543b, 0x7a33,
-0x7d0a, 0x95ee, 0x55e1, 0x7fc1, 0x74ee, 0x631d, 0x8717, 0x6da1,
-0x7a9d, 0x6211, 0x65a1, 0x5367, 0x63e1, 0x6c83, 0x5deb, 0x545c,
-0x94a8, 0x4e4c, 0x6c61, 0x8bec, 0x5c4b, 0x65e0, 0x829c, 0x68a7,
-0x543e, 0x5434, 0x6bcb, 0x6b66, 0x4e94, 0x6342, 0x5348, 0x821e,
-0x4f0d, 0x4fae, 0x575e, 0x620a, 0x96fe, 0x6664, 0x7269, 0x52ff,
-0x52a1, 0x609f, 0x8bef, 0x6614, 0x7199, 0x6790, 0x897f, 0x7852,
-0x77fd, 0x6670, 0x563b, 0x5438, 0x9521, 0x727a,
-94, 0x4f21,
-0x7a00, 0x606f, 0x5e0c, 0x6089, 0x819d, 0x5915, 0x60dc, 0x7184,
-0x70ef, 0x6eaa, 0x6c50, 0x7280, 0x6a84, 0x88ad, 0x5e2d, 0x4e60,
-0x5ab3, 0x559c, 0x94e3, 0x6d17, 0x7cfb, 0x9699, 0x620f, 0x7ec6,
-0x778e, 0x867e, 0x5323, 0x971e, 0x8f96, 0x6687, 0x5ce1, 0x4fa0,
-0x72ed, 0x4e0b, 0x53a6, 0x590f, 0x5413, 0x6380, 0x9528, 0x5148,
-0x4ed9, 0x9c9c, 0x7ea4, 0x54b8, 0x8d24, 0x8854, 0x8237, 0x95f2,
-0x6d8e, 0x5f26, 0x5acc, 0x663e, 0x9669, 0x73b0, 0x732e, 0x53bf,
-0x817a, 0x9985, 0x7fa1, 0x5baa, 0x9677, 0x9650, 0x7ebf, 0x76f8,
-0x53a2, 0x9576, 0x9999, 0x7bb1, 0x8944, 0x6e58, 0x4e61, 0x7fd4,
-0x7965, 0x8be6, 0x60f3, 0x54cd, 0x4eab, 0x9879, 0x5df7, 0x6a61,
-0x50cf, 0x5411, 0x8c61, 0x8427, 0x785d, 0x9704, 0x524a, 0x54ee,
-0x56a3, 0x9500, 0x6d88, 0x5bb5, 0x6dc6, 0x6653,
-94, 0x5021,
-0x5c0f, 0x5b5d, 0x6821, 0x8096, 0x5578, 0x7b11, 0x6548, 0x6954,
-0x4e9b, 0x6b47, 0x874e, 0x978b, 0x534f, 0x631f, 0x643a, 0x90aa,
-0x659c, 0x80c1, 0x8c10, 0x5199, 0x68b0, 0x5378, 0x87f9, 0x61c8,
-0x6cc4, 0x6cfb, 0x8c22, 0x5c51, 0x85aa, 0x82af, 0x950c, 0x6b23,
-0x8f9b, 0x65b0, 0x5ffb, 0x5fc3, 0x4fe1, 0x8845, 0x661f, 0x8165,
-0x7329, 0x60fa, 0x5174, 0x5211, 0x578b, 0x5f62, 0x90a2, 0x884c,
-0x9192, 0x5e78, 0x674f, 0x6027, 0x59d3, 0x5144, 0x51f6, 0x80f8,
-0x5308, 0x6c79, 0x96c4, 0x718a, 0x4f11, 0x4fee, 0x7f9e, 0x673d,
-0x55c5, 0x9508, 0x79c0, 0x8896, 0x7ee3, 0x589f, 0x620c, 0x9700,
-0x865a, 0x5618, 0x987b, 0x5f90, 0x8bb8, 0x84c4, 0x9157, 0x53d9,
-0x65ed, 0x5e8f, 0x755c, 0x6064, 0x7d6e, 0x5a7f, 0x7eea, 0x7eed,
-0x8f69, 0x55a7, 0x5ba3, 0x60ac, 0x65cb, 0x7384,
-94, 0x5121,
-0x9009, 0x7663, 0x7729, 0x7eda, 0x9774, 0x859b, 0x5b66, 0x7a74,
-0x96ea, 0x8840, 0x52cb, 0x718f, 0x5faa, 0x65ec, 0x8be2, 0x5bfb,
-0x9a6f, 0x5de1, 0x6b89, 0x6c5b, 0x8bad, 0x8baf, 0x900a, 0x8fc5,
-0x538b, 0x62bc, 0x9e26, 0x9e2d, 0x5440, 0x4e2b, 0x82bd, 0x7259,
-0x869c, 0x5d16, 0x8859, 0x6daf, 0x96c5, 0x54d1, 0x4e9a, 0x8bb6,
-0x7109, 0x54bd, 0x9609, 0x70df, 0x6df9, 0x76d0, 0x4e25, 0x7814,
-0x8712, 0x5ca9, 0x5ef6, 0x8a00, 0x989c, 0x960e, 0x708e, 0x6cbf,
-0x5944, 0x63a9, 0x773c, 0x884d, 0x6f14, 0x8273, 0x5830, 0x71d5,
-0x538c, 0x781a, 0x96c1, 0x5501, 0x5f66, 0x7130, 0x5bb4, 0x8c1a,
-0x9a8c, 0x6b83, 0x592e, 0x9e2f, 0x79e7, 0x6768, 0x626c, 0x4f6f,
-0x75a1, 0x7f8a, 0x6d0b, 0x9633, 0x6c27, 0x4ef0, 0x75d2, 0x517b,
-0x6837, 0x6f3e, 0x9080, 0x8170, 0x5996, 0x7476,
-94, 0x5221,
-0x6447, 0x5c27, 0x9065, 0x7a91, 0x8c23, 0x59da, 0x54ac, 0x8200,
-0x836f, 0x8981, 0x8000, 0x6930, 0x564e, 0x8036, 0x7237, 0x91ce,
-0x51b6, 0x4e5f, 0x9875, 0x6396, 0x4e1a, 0x53f6, 0x66f3, 0x814b,
-0x591c, 0x6db2, 0x4e00, 0x58f9, 0x533b, 0x63d6, 0x94f1, 0x4f9d,
-0x4f0a, 0x8863, 0x9890, 0x5937, 0x9057, 0x79fb, 0x4eea, 0x80f0,
-0x7591, 0x6c82, 0x5b9c, 0x59e8, 0x5f5d, 0x6905, 0x8681, 0x501a,
-0x5df2, 0x4e59, 0x77e3, 0x4ee5, 0x827a, 0x6291, 0x6613, 0x9091,
-0x5c79, 0x4ebf, 0x5f79, 0x81c6, 0x9038, 0x8084, 0x75ab, 0x4ea6,
-0x88d4, 0x610f, 0x6bc5, 0x5fc6, 0x4e49, 0x76ca, 0x6ea2, 0x8be3,
-0x8bae, 0x8c0a, 0x8bd1, 0x5f02, 0x7ffc, 0x7fcc, 0x7ece, 0x8335,
-0x836b, 0x56e0, 0x6bb7, 0x97f3, 0x9634, 0x59fb, 0x541f, 0x94f6,
-0x6deb, 0x5bc5, 0x996e, 0x5c39, 0x5f15, 0x9690,
-94, 0x5321,
-0x5370, 0x82f1, 0x6a31, 0x5a74, 0x9e70, 0x5e94, 0x7f28, 0x83b9,
-0x8424, 0x8425, 0x8367, 0x8747, 0x8fce, 0x8d62, 0x76c8, 0x5f71,
-0x9896, 0x786c, 0x6620, 0x54df, 0x62e5, 0x4f63, 0x81c3, 0x75c8,
-0x5eb8, 0x96cd, 0x8e0a, 0x86f9, 0x548f, 0x6cf3, 0x6d8c, 0x6c38,
-0x607f, 0x52c7, 0x7528, 0x5e7d, 0x4f18, 0x60a0, 0x5fe7, 0x5c24,
-0x7531, 0x90ae, 0x94c0, 0x72b9, 0x6cb9, 0x6e38, 0x9149, 0x6709,
-0x53cb, 0x53f3, 0x4f51, 0x91c9, 0x8bf1, 0x53c8, 0x5e7c, 0x8fc2,
-0x6de4, 0x4e8e, 0x76c2, 0x6986, 0x865e, 0x611a, 0x8206, 0x4f59,
-0x4fde, 0x903e, 0x9c7c, 0x6109, 0x6e1d, 0x6e14, 0x9685, 0x4e88,
-0x5a31, 0x96e8, 0x4e0e, 0x5c7f, 0x79b9, 0x5b87, 0x8bed, 0x7fbd,
-0x7389, 0x57df, 0x828b, 0x90c1, 0x5401, 0x9047, 0x55bb, 0x5cea,
-0x5fa1, 0x6108, 0x6b32, 0x72f1, 0x80b2, 0x8a89,
-94, 0x5421,
-0x6d74, 0x5bd3, 0x88d5, 0x9884, 0x8c6b, 0x9a6d, 0x9e33, 0x6e0a,
-0x51a4, 0x5143, 0x57a3, 0x8881, 0x539f, 0x63f4, 0x8f95, 0x56ed,
-0x5458, 0x5706, 0x733f, 0x6e90, 0x7f18, 0x8fdc, 0x82d1, 0x613f,
-0x6028, 0x9662, 0x66f0, 0x7ea6, 0x8d8a, 0x8dc3, 0x94a5, 0x5cb3,
-0x7ca4, 0x6708, 0x60a6, 0x9605, 0x8018, 0x4e91, 0x90e7, 0x5300,
-0x9668, 0x5141, 0x8fd0, 0x8574, 0x915d, 0x6655, 0x97f5, 0x5b55,
-0x531d, 0x7838, 0x6742, 0x683d, 0x54c9, 0x707e, 0x5bb0, 0x8f7d,
-0x518d, 0x5728, 0x54b1, 0x6512, 0x6682, 0x8d5e, 0x8d43, 0x810f,
-0x846c, 0x906d, 0x7cdf, 0x51ff, 0x85fb, 0x67a3, 0x65e9, 0x6fa1,
-0x86a4, 0x8e81, 0x566a, 0x9020, 0x7682, 0x7076, 0x71e5, 0x8d23,
-0x62e9, 0x5219, 0x6cfd, 0x8d3c, 0x600e, 0x589e, 0x618e, 0x66fe,
-0x8d60, 0x624e, 0x55b3, 0x6e23, 0x672d, 0x8f67,
-94, 0x5521,
-0x94e1, 0x95f8, 0x7728, 0x6805, 0x69a8, 0x548b, 0x4e4d, 0x70b8,
-0x8bc8, 0x6458, 0x658b, 0x5b85, 0x7a84, 0x503a, 0x5be8, 0x77bb,
-0x6be1, 0x8a79, 0x7c98, 0x6cbe, 0x76cf, 0x65a9, 0x8f97, 0x5d2d,
-0x5c55, 0x8638, 0x6808, 0x5360, 0x6218, 0x7ad9, 0x6e5b, 0x7efd,
-0x6a1f, 0x7ae0, 0x5f70, 0x6f33, 0x5f20, 0x638c, 0x6da8, 0x6756,
-0x4e08, 0x5e10, 0x8d26, 0x4ed7, 0x80c0, 0x7634, 0x969c, 0x62db,
-0x662d, 0x627e, 0x6cbc, 0x8d75, 0x7167, 0x7f69, 0x5146, 0x8087,
-0x53ec, 0x906e, 0x6298, 0x54f2, 0x86f0, 0x8f99, 0x8005, 0x9517,
-0x8517, 0x8fd9, 0x6d59, 0x73cd, 0x659f, 0x771f, 0x7504, 0x7827,
-0x81fb, 0x8d1e, 0x9488, 0x4fa6, 0x6795, 0x75b9, 0x8bca, 0x9707,
-0x632f, 0x9547, 0x9635, 0x84b8, 0x6323, 0x7741, 0x5f81, 0x72f0,
-0x4e89, 0x6014, 0x6574, 0x62ef, 0x6b63, 0x653f,
-94, 0x5621,
-0x5e27, 0x75c7, 0x90d1, 0x8bc1, 0x829d, 0x679d, 0x652f, 0x5431,
-0x8718, 0x77e5, 0x80a2, 0x8102, 0x6c41, 0x4e4b, 0x7ec7, 0x804c,
-0x76f4, 0x690d, 0x6b96, 0x6267, 0x503c, 0x4f84, 0x5740, 0x6307,
-0x6b62, 0x8dbe, 0x53ea, 0x65e8, 0x7eb8, 0x5fd7, 0x631a, 0x63b7,
-0x81f3, 0x81f4, 0x7f6e, 0x5e1c, 0x5cd9, 0x5236, 0x667a, 0x79e9,
-0x7a1a, 0x8d28, 0x7099, 0x75d4, 0x6ede, 0x6cbb, 0x7a92, 0x4e2d,
-0x76c5, 0x5fe0, 0x949f, 0x8877, 0x7ec8, 0x79cd, 0x80bf, 0x91cd,
-0x4ef2, 0x4f17, 0x821f, 0x5468, 0x5dde, 0x6d32, 0x8bcc, 0x7ca5,
-0x8f74, 0x8098, 0x5e1a, 0x5492, 0x76b1, 0x5b99, 0x663c, 0x9aa4,
-0x73e0, 0x682a, 0x86db, 0x6731, 0x732a, 0x8bf8, 0x8bdb, 0x9010,
-0x7af9, 0x70db, 0x716e, 0x62c4, 0x77a9, 0x5631, 0x4e3b, 0x8457,
-0x67f1, 0x52a9, 0x86c0, 0x8d2e, 0x94f8, 0x7b51,
-89, 0x5721,
-0x4f4f, 0x6ce8, 0x795d, 0x9a7b, 0x6293, 0x722a, 0x62fd, 0x4e13,
-0x7816, 0x8f6c, 0x64b0, 0x8d5a, 0x7bc6, 0x6869, 0x5e84, 0x88c5,
-0x5986, 0x649e, 0x58ee, 0x72b6, 0x690e, 0x9525, 0x8ffd, 0x8d58,
-0x5760, 0x7f00, 0x8c06, 0x51c6, 0x6349, 0x62d9, 0x5353, 0x684c,
-0x7422, 0x8301, 0x914c, 0x5544, 0x7740, 0x707c, 0x6d4a, 0x5179,
-0x54a8, 0x8d44, 0x59ff, 0x6ecb, 0x6dc4, 0x5b5c, 0x7d2b, 0x4ed4,
-0x7c7d, 0x6ed3, 0x5b50, 0x81ea, 0x6e0d, 0x5b57, 0x9b03, 0x68d5,
-0x8e2a, 0x5b97, 0x7efc, 0x603b, 0x7eb5, 0x90b9, 0x8d70, 0x594f,
-0x63cd, 0x79df, 0x8db3, 0x5352, 0x65cf, 0x7956, 0x8bc5, 0x963b,
-0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a, 0x5c0a,
-0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c, 0x5750,
-0x5ea7,
-94, 0x5821,
-0x4e8d, 0x4e0c, 0x5140, 0x4e10, 0x5eff, 0x5345, 0x4e15, 0x4e98,
-0x4e1e, 0x9b32, 0x5b6c, 0x5669, 0x4e28, 0x79ba, 0x4e3f, 0x5315,
-0x4e47, 0x592d, 0x723b, 0x536e, 0x6c10, 0x56df, 0x80e4, 0x9997,
-0x6bd3, 0x777e, 0x9f17, 0x4e36, 0x4e9f, 0x9f10, 0x4e5c, 0x4e69,
-0x4e93, 0x8288, 0x5b5b, 0x556c, 0x560f, 0x4ec4, 0x538d, 0x539d,
-0x53a3, 0x53a5, 0x53ae, 0x9765, 0x8d5d, 0x531a, 0x53f5, 0x5326,
-0x532e, 0x533e, 0x8d5c, 0x5366, 0x5363, 0x5202, 0x5208, 0x520e,
-0x522d, 0x5233, 0x523f, 0x5240, 0x524c, 0x525e, 0x5261, 0x525c,
-0x84af, 0x527d, 0x5282, 0x5281, 0x5290, 0x5293, 0x5182, 0x7f54,
-0x4ebb, 0x4ec3, 0x4ec9, 0x4ec2, 0x4ee8, 0x4ee1, 0x4eeb, 0x4ede,
-0x4f1b, 0x4ef3, 0x4f22, 0x4f64, 0x4ef5, 0x4f25, 0x4f27, 0x4f09,
-0x4f2b, 0x4f5e, 0x4f67, 0x6538, 0x4f5a, 0x4f5d,
-94, 0x5921,
-0x4f5f, 0x4f57, 0x4f32, 0x4f3d, 0x4f76, 0x4f74, 0x4f91, 0x4f89,
-0x4f83, 0x4f8f, 0x4f7e, 0x4f7b, 0x4faa, 0x4f7c, 0x4fac, 0x4f94,
-0x4fe6, 0x4fe8, 0x4fea, 0x4fc5, 0x4fda, 0x4fe3, 0x4fdc, 0x4fd1,
-0x4fdf, 0x4ff8, 0x5029, 0x504c, 0x4ff3, 0x502c, 0x500f, 0x502e,
-0x502d, 0x4ffe, 0x501c, 0x500c, 0x5025, 0x5028, 0x507e, 0x5043,
-0x5055, 0x5048, 0x504e, 0x506c, 0x507b, 0x50a5, 0x50a7, 0x50a9,
-0x50ba, 0x50d6, 0x5106, 0x50ed, 0x50ec, 0x50e6, 0x50ee, 0x5107,
-0x510b, 0x4edd, 0x6c3d, 0x4f58, 0x4f65, 0x4fce, 0x9fa0, 0x6c46,
-0x7c74, 0x516e, 0x5dfd, 0x9ec9, 0x9998, 0x5181, 0x5914, 0x52f9,
-0x530d, 0x8a07, 0x5310, 0x51eb, 0x5919, 0x5155, 0x4ea0, 0x5156,
-0x4eb3, 0x886e, 0x88a4, 0x4eb5, 0x8114, 0x88d2, 0x7980, 0x5b34,
-0x8803, 0x7fb8, 0x51ab, 0x51b1, 0x51bd, 0x51bc,
-94, 0x5a21,
-0x51c7, 0x5196, 0x51a2, 0x51a5, 0x8ba0, 0x8ba6, 0x8ba7, 0x8baa,
-0x8bb4, 0x8bb5, 0x8bb7, 0x8bc2, 0x8bc3, 0x8bcb, 0x8bcf, 0x8bce,
-0x8bd2, 0x8bd3, 0x8bd4, 0x8bd6, 0x8bd8, 0x8bd9, 0x8bdc, 0x8bdf,
-0x8be0, 0x8be4, 0x8be8, 0x8be9, 0x8bee, 0x8bf0, 0x8bf3, 0x8bf6,
-0x8bf9, 0x8bfc, 0x8bff, 0x8c00, 0x8c02, 0x8c04, 0x8c07, 0x8c0c,
-0x8c0f, 0x8c11, 0x8c12, 0x8c14, 0x8c15, 0x8c16, 0x8c19, 0x8c1b,
-0x8c18, 0x8c1d, 0x8c1f, 0x8c20, 0x8c21, 0x8c25, 0x8c27, 0x8c2a,
-0x8c2b, 0x8c2e, 0x8c2f, 0x8c32, 0x8c33, 0x8c35, 0x8c36, 0x5369,
-0x537a, 0x961d, 0x9622, 0x9621, 0x9631, 0x962a, 0x963d, 0x963c,
-0x9642, 0x9649, 0x9654, 0x965f, 0x9667, 0x966c, 0x9672, 0x9674,
-0x9688, 0x968d, 0x9697, 0x96b0, 0x9097, 0x909b, 0x909d, 0x9099,
-0x90ac, 0x90a1, 0x90b4, 0x90b3, 0x90b6, 0x90ba,
-94, 0x5b21,
-0x90b8, 0x90b0, 0x90cf, 0x90c5, 0x90be, 0x90d0, 0x90c4, 0x90c7,
-0x90d3, 0x90e6, 0x90e2, 0x90dc, 0x90d7, 0x90db, 0x90eb, 0x90ef,
-0x90fe, 0x9104, 0x9122, 0x911e, 0x9123, 0x9131, 0x912f, 0x9139,
-0x9143, 0x9146, 0x520d, 0x5942, 0x52a2, 0x52ac, 0x52ad, 0x52be,
-0x54ff, 0x52d0, 0x52d6, 0x52f0, 0x53df, 0x71ee, 0x77cd, 0x5ef4,
-0x51f5, 0x51fc, 0x9b2f, 0x53b6, 0x5f01, 0x755a, 0x5def, 0x574c,
-0x57a9, 0x57a1, 0x587e, 0x58bc, 0x58c5, 0x58d1, 0x5729, 0x572c,
-0x572a, 0x5733, 0x5739, 0x572e, 0x572f, 0x575c, 0x573b, 0x5742,
-0x5769, 0x5785, 0x576b, 0x5786, 0x577c, 0x577b, 0x5768, 0x576d,
-0x5776, 0x5773, 0x57ad, 0x57a4, 0x578c, 0x57b2, 0x57cf, 0x57a7,
-0x57b4, 0x5793, 0x57a0, 0x57d5, 0x57d8, 0x57da, 0x57d9, 0x57d2,
-0x57b8, 0x57f4, 0x57ef, 0x57f8, 0x57e4, 0x57dd,
-94, 0x5c21,
-0x580b, 0x580d, 0x57fd, 0x57ed, 0x5800, 0x581e, 0x5819, 0x5844,
-0x5820, 0x5865, 0x586c, 0x5881, 0x5889, 0x589a, 0x5880, 0x99a8,
-0x9f19, 0x61ff, 0x8279, 0x827d, 0x827f, 0x828f, 0x828a, 0x82a8,
-0x8284, 0x828e, 0x8291, 0x8297, 0x8299, 0x82ab, 0x82b8, 0x82be,
-0x82b0, 0x82c8, 0x82ca, 0x82e3, 0x8298, 0x82b7, 0x82ae, 0x82cb,
-0x82cc, 0x82c1, 0x82a9, 0x82b4, 0x82a1, 0x82aa, 0x829f, 0x82c4,
-0x82ce, 0x82a4, 0x82e1, 0x8309, 0x82f7, 0x82e4, 0x830f, 0x8307,
-0x82dc, 0x82f4, 0x82d2, 0x82d8, 0x830c, 0x82fb, 0x82d3, 0x8311,
-0x831a, 0x8306, 0x8314, 0x8315, 0x82e0, 0x82d5, 0x831c, 0x8351,
-0x835b, 0x835c, 0x8308, 0x8392, 0x833c, 0x8334, 0x8331, 0x839b,
-0x835e, 0x832f, 0x834f, 0x8347, 0x8343, 0x835f, 0x8340, 0x8317,
-0x8360, 0x832d, 0x833a, 0x8333, 0x8366, 0x8365,
-94, 0x5d21,
-0x8368, 0x831b, 0x8369, 0x836c, 0x836a, 0x836d, 0x836e, 0x83b0,
-0x8378, 0x83b3, 0x83b4, 0x83a0, 0x83aa, 0x8393, 0x839c, 0x8385,
-0x837c, 0x83b6, 0x83a9, 0x837d, 0x83b8, 0x837b, 0x8398, 0x839e,
-0x83a8, 0x83ba, 0x83bc, 0x83c1, 0x8401, 0x83e5, 0x83d8, 0x5807,
-0x8418, 0x840b, 0x83dd, 0x83fd, 0x83d6, 0x841c, 0x8438, 0x8411,
-0x8406, 0x83d4, 0x83df, 0x840f, 0x8403, 0x83f8, 0x83f9, 0x83ea,
-0x83c5, 0x83c0, 0x8426, 0x83f0, 0x83e1, 0x845c, 0x8451, 0x845a,
-0x8459, 0x8473, 0x8487, 0x8488, 0x847a, 0x8489, 0x8478, 0x843c,
-0x8446, 0x8469, 0x8476, 0x848c, 0x848e, 0x8431, 0x846d, 0x84c1,
-0x84cd, 0x84d0, 0x84e6, 0x84bd, 0x84d3, 0x84ca, 0x84bf, 0x84ba,
-0x84e0, 0x84a1, 0x84b9, 0x84b4, 0x8497, 0x84e5, 0x84e3, 0x850c,
-0x750d, 0x8538, 0x84f0, 0x8539, 0x851f, 0x853a,
-94, 0x5e21,
-0x8556, 0x853b, 0x84ff, 0x84fc, 0x8559, 0x8548, 0x8568, 0x8564,
-0x855e, 0x857a, 0x77a2, 0x8543, 0x8572, 0x857b, 0x85a4, 0x85a8,
-0x8587, 0x858f, 0x8579, 0x85ae, 0x859c, 0x8585, 0x85b9, 0x85b7,
-0x85b0, 0x85d3, 0x85c1, 0x85dc, 0x85ff, 0x8627, 0x8605, 0x8629,
-0x8616, 0x863c, 0x5efe, 0x5f08, 0x593c, 0x5941, 0x8037, 0x5955,
-0x595a, 0x5958, 0x530f, 0x5c22, 0x5c25, 0x5c2c, 0x5c34, 0x624c,
-0x626a, 0x629f, 0x62bb, 0x62ca, 0x62da, 0x62d7, 0x62ee, 0x6322,
-0x62f6, 0x6339, 0x634b, 0x6343, 0x63ad, 0x63f6, 0x6371, 0x637a,
-0x638e, 0x63b4, 0x636d, 0x63ac, 0x638a, 0x6369, 0x63ae, 0x63bc,
-0x63f2, 0x63f8, 0x63e0, 0x63ff, 0x63c4, 0x63de, 0x63ce, 0x6452,
-0x63c6, 0x63be, 0x6445, 0x6441, 0x640b, 0x641b, 0x6420, 0x640c,
-0x6426, 0x6421, 0x645e, 0x6484, 0x646d, 0x6496,
-94, 0x5f21,
-0x647a, 0x64b7, 0x64b8, 0x6499, 0x64ba, 0x64c0, 0x64d0, 0x64d7,
-0x64e4, 0x64e2, 0x6509, 0x6525, 0x652e, 0x5f0b, 0x5fd2, 0x7519,
-0x5f11, 0x535f, 0x53f1, 0x53fd, 0x53e9, 0x53e8, 0x53fb, 0x5412,
-0x5416, 0x5406, 0x544b, 0x5452, 0x5453, 0x5454, 0x5456, 0x5443,
-0x5421, 0x5457, 0x5459, 0x5423, 0x5432, 0x5482, 0x5494, 0x5477,
-0x5471, 0x5464, 0x549a, 0x549b, 0x5484, 0x5476, 0x5466, 0x549d,
-0x54d0, 0x54ad, 0x54c2, 0x54b4, 0x54d2, 0x54a7, 0x54a6, 0x54d3,
-0x54d4, 0x5472, 0x54a3, 0x54d5, 0x54bb, 0x54bf, 0x54cc, 0x54d9,
-0x54da, 0x54dc, 0x54a9, 0x54aa, 0x54a4, 0x54dd, 0x54cf, 0x54de,
-0x551b, 0x54e7, 0x5520, 0x54fd, 0x5514, 0x54f3, 0x5522, 0x5523,
-0x550f, 0x5511, 0x5527, 0x552a, 0x5567, 0x558f, 0x55b5, 0x5549,
-0x556d, 0x5541, 0x5555, 0x553f, 0x5550, 0x553c,
-94, 0x6021,
-0x5537, 0x5556, 0x5575, 0x5576, 0x5577, 0x5533, 0x5530, 0x555c,
-0x558b, 0x55d2, 0x5583, 0x55b1, 0x55b9, 0x5588, 0x5581, 0x559f,
-0x557e, 0x55d6, 0x5591, 0x557b, 0x55df, 0x55bd, 0x55be, 0x5594,
-0x5599, 0x55ea, 0x55f7, 0x55c9, 0x561f, 0x55d1, 0x55eb, 0x55ec,
-0x55d4, 0x55e6, 0x55dd, 0x55c4, 0x55ef, 0x55e5, 0x55f2, 0x55f3,
-0x55cc, 0x55cd, 0x55e8, 0x55f5, 0x55e4, 0x8f94, 0x561e, 0x5608,
-0x560c, 0x5601, 0x5624, 0x5623, 0x55fe, 0x5600, 0x5627, 0x562d,
-0x5658, 0x5639, 0x5657, 0x562c, 0x564d, 0x5662, 0x5659, 0x565c,
-0x564c, 0x5654, 0x5686, 0x5664, 0x5671, 0x566b, 0x567b, 0x567c,
-0x5685, 0x5693, 0x56af, 0x56d4, 0x56d7, 0x56dd, 0x56e1, 0x56f5,
-0x56eb, 0x56f9, 0x56ff, 0x5704, 0x570a, 0x5709, 0x571c, 0x5e0f,
-0x5e19, 0x5e14, 0x5e11, 0x5e31, 0x5e3b, 0x5e3c,
-94, 0x6121,
-0x5e37, 0x5e44, 0x5e54, 0x5e5b, 0x5e5e, 0x5e61, 0x5c8c, 0x5c7a,
-0x5c8d, 0x5c90, 0x5c96, 0x5c88, 0x5c98, 0x5c99, 0x5c91, 0x5c9a,
-0x5c9c, 0x5cb5, 0x5ca2, 0x5cbd, 0x5cac, 0x5cab, 0x5cb1, 0x5ca3,
-0x5cc1, 0x5cb7, 0x5cc4, 0x5cd2, 0x5ce4, 0x5ccb, 0x5ce5, 0x5d02,
-0x5d03, 0x5d27, 0x5d26, 0x5d2e, 0x5d24, 0x5d1e, 0x5d06, 0x5d1b,
-0x5d58, 0x5d3e, 0x5d34, 0x5d3d, 0x5d6c, 0x5d5b, 0x5d6f, 0x5d5d,
-0x5d6b, 0x5d4b, 0x5d4a, 0x5d69, 0x5d74, 0x5d82, 0x5d99, 0x5d9d,
-0x8c73, 0x5db7, 0x5dc5, 0x5f73, 0x5f77, 0x5f82, 0x5f87, 0x5f89,
-0x5f8c, 0x5f95, 0x5f99, 0x5f9c, 0x5fa8, 0x5fad, 0x5fb5, 0x5fbc,
-0x8862, 0x5f61, 0x72ad, 0x72b0, 0x72b4, 0x72b7, 0x72b8, 0x72c3,
-0x72c1, 0x72ce, 0x72cd, 0x72d2, 0x72e8, 0x72ef, 0x72e9, 0x72f2,
-0x72f4, 0x72f7, 0x7301, 0x72f3, 0x7303, 0x72fa,
-94, 0x6221,
-0x72fb, 0x7317, 0x7313, 0x7321, 0x730a, 0x731e, 0x731d, 0x7315,
-0x7322, 0x7339, 0x7325, 0x732c, 0x7338, 0x7331, 0x7350, 0x734d,
-0x7357, 0x7360, 0x736c, 0x736f, 0x737e, 0x821b, 0x5925, 0x98e7,
-0x5924, 0x5902, 0x9963, 0x9967, 0x9968, 0x9969, 0x996a, 0x996b,
-0x996c, 0x9974, 0x9977, 0x997d, 0x9980, 0x9984, 0x9987, 0x998a,
-0x998d, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, 0x5e80, 0x5e91,
-0x5e8b, 0x5e96, 0x5ea5, 0x5ea0, 0x5eb9, 0x5eb5, 0x5ebe, 0x5eb3,
-0x8d53, 0x5ed2, 0x5ed1, 0x5edb, 0x5ee8, 0x5eea, 0x81ba, 0x5fc4,
-0x5fc9, 0x5fd6, 0x5fcf, 0x6003, 0x5fee, 0x6004, 0x5fe1, 0x5fe4,
-0x5ffe, 0x6005, 0x6006, 0x5fea, 0x5fed, 0x5ff8, 0x6019, 0x6035,
-0x6026, 0x601b, 0x600f, 0x600d, 0x6029, 0x602b, 0x600a, 0x603f,
-0x6021, 0x6078, 0x6079, 0x607b, 0x607a, 0x6042,
-94, 0x6321,
-0x606a, 0x607d, 0x6096, 0x609a, 0x60ad, 0x609d, 0x6083, 0x6092,
-0x608c, 0x609b, 0x60ec, 0x60bb, 0x60b1, 0x60dd, 0x60d8, 0x60c6,
-0x60da, 0x60b4, 0x6120, 0x6126, 0x6115, 0x6123, 0x60f4, 0x6100,
-0x610e, 0x612b, 0x614a, 0x6175, 0x61ac, 0x6194, 0x61a7, 0x61b7,
-0x61d4, 0x61f5, 0x5fdd, 0x96b3, 0x95e9, 0x95eb, 0x95f1, 0x95f3,
-0x95f5, 0x95f6, 0x95fc, 0x95fe, 0x9603, 0x9604, 0x9606, 0x9608,
-0x960a, 0x960b, 0x960c, 0x960d, 0x960f, 0x9612, 0x9615, 0x9616,
-0x9617, 0x9619, 0x961a, 0x4e2c, 0x723f, 0x6215, 0x6c35, 0x6c54,
-0x6c5c, 0x6c4a, 0x6ca3, 0x6c85, 0x6c90, 0x6c94, 0x6c8c, 0x6c68,
-0x6c69, 0x6c74, 0x6c76, 0x6c86, 0x6ca9, 0x6cd0, 0x6cd4, 0x6cad,
-0x6cf7, 0x6cf8, 0x6cf1, 0x6cd7, 0x6cb2, 0x6ce0, 0x6cd6, 0x6cfa,
-0x6ceb, 0x6cee, 0x6cb1, 0x6cd3, 0x6cef, 0x6cfe,
-94, 0x6421,
-0x6d39, 0x6d27, 0x6d0c, 0x6d43, 0x6d48, 0x6d07, 0x6d04, 0x6d19,
-0x6d0e, 0x6d2b, 0x6d4d, 0x6d2e, 0x6d35, 0x6d1a, 0x6d4f, 0x6d52,
-0x6d54, 0x6d33, 0x6d91, 0x6d6f, 0x6d9e, 0x6da0, 0x6d5e, 0x6d93,
-0x6d94, 0x6d5c, 0x6d60, 0x6d7c, 0x6d63, 0x6e1a, 0x6dc7, 0x6dc5,
-0x6dde, 0x6e0e, 0x6dbf, 0x6de0, 0x6e11, 0x6de6, 0x6ddd, 0x6dd9,
-0x6e16, 0x6dab, 0x6e0c, 0x6dae, 0x6e2b, 0x6e6e, 0x6e4e, 0x6e6b,
-0x6eb2, 0x6e5f, 0x6e86, 0x6e53, 0x6e54, 0x6e32, 0x6e25, 0x6e44,
-0x6edf, 0x6eb1, 0x6e98, 0x6ee0, 0x6f2d, 0x6ee2, 0x6ea5, 0x6ea7,
-0x6ebd, 0x6ebb, 0x6eb7, 0x6ed7, 0x6eb4, 0x6ecf, 0x6e8f, 0x6ec2,
-0x6e9f, 0x6f62, 0x6f46, 0x6f47, 0x6f24, 0x6f15, 0x6ef9, 0x6f2f,
-0x6f36, 0x6f4b, 0x6f74, 0x6f2a, 0x6f09, 0x6f29, 0x6f89, 0x6f8d,
-0x6f8c, 0x6f78, 0x6f72, 0x6f7c, 0x6f7a, 0x6fd1,
-94, 0x6521,
-0x6fc9, 0x6fa7, 0x6fb9, 0x6fb6, 0x6fc2, 0x6fe1, 0x6fee, 0x6fde,
-0x6fe0, 0x6fef, 0x701a, 0x7023, 0x701b, 0x7039, 0x7035, 0x704f,
-0x705e, 0x5b80, 0x5b84, 0x5b95, 0x5b93, 0x5ba5, 0x5bb8, 0x752f,
-0x9a9e, 0x6434, 0x5be4, 0x5bee, 0x8930, 0x5bf0, 0x8e47, 0x8b07,
-0x8fb6, 0x8fd3, 0x8fd5, 0x8fe5, 0x8fee, 0x8fe4, 0x8fe9, 0x8fe6,
-0x8ff3, 0x8fe8, 0x9005, 0x9004, 0x900b, 0x9026, 0x9011, 0x900d,
-0x9016, 0x9021, 0x9035, 0x9036, 0x902d, 0x902f, 0x9044, 0x9051,
-0x9052, 0x9050, 0x9068, 0x9058, 0x9062, 0x905b, 0x66b9, 0x9074,
-0x907d, 0x9082, 0x9088, 0x9083, 0x908b, 0x5f50, 0x5f57, 0x5f56,
-0x5f58, 0x5c3b, 0x54ab, 0x5c50, 0x5c59, 0x5b71, 0x5c63, 0x5c66,
-0x7fbc, 0x5f2a, 0x5f29, 0x5f2d, 0x8274, 0x5f3c, 0x9b3b, 0x5c6e,
-0x5981, 0x5983, 0x598d, 0x59a9, 0x59aa, 0x59a3,
-94, 0x6621,
-0x5997, 0x59ca, 0x59ab, 0x599e, 0x59a4, 0x59d2, 0x59b2, 0x59af,
-0x59d7, 0x59be, 0x5a05, 0x5a06, 0x59dd, 0x5a08, 0x59e3, 0x59d8,
-0x59f9, 0x5a0c, 0x5a09, 0x5a32, 0x5a34, 0x5a11, 0x5a23, 0x5a13,
-0x5a40, 0x5a67, 0x5a4a, 0x5a55, 0x5a3c, 0x5a62, 0x5a75, 0x80ec,
-0x5aaa, 0x5a9b, 0x5a77, 0x5a7a, 0x5abe, 0x5aeb, 0x5ab2, 0x5ad2,
-0x5ad4, 0x5ab8, 0x5ae0, 0x5ae3, 0x5af1, 0x5ad6, 0x5ae6, 0x5ad8,
-0x5adc, 0x5b09, 0x5b17, 0x5b16, 0x5b32, 0x5b37, 0x5b40, 0x5c15,
-0x5c1c, 0x5b5a, 0x5b65, 0x5b73, 0x5b51, 0x5b53, 0x5b62, 0x9a75,
-0x9a77, 0x9a78, 0x9a7a, 0x9a7f, 0x9a7d, 0x9a80, 0x9a81, 0x9a85,
-0x9a88, 0x9a8a, 0x9a90, 0x9a92, 0x9a93, 0x9a96, 0x9a98, 0x9a9b,
-0x9a9c, 0x9a9d, 0x9a9f, 0x9aa0, 0x9aa2, 0x9aa3, 0x9aa5, 0x9aa7,
-0x7e9f, 0x7ea1, 0x7ea3, 0x7ea5, 0x7ea8, 0x7ea9,
-94, 0x6721,
-0x7ead, 0x7eb0, 0x7ebe, 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec9, 0x7ecb,
-0x7ecc, 0x7ed0, 0x7ed4, 0x7ed7, 0x7edb, 0x7ee0, 0x7ee1, 0x7ee8,
-0x7eeb, 0x7eee, 0x7eef, 0x7ef1, 0x7ef2, 0x7f0d, 0x7ef6, 0x7efa,
-0x7efb, 0x7efe, 0x7f01, 0x7f02, 0x7f03, 0x7f07, 0x7f08, 0x7f0b,
-0x7f0c, 0x7f0f, 0x7f11, 0x7f12, 0x7f17, 0x7f19, 0x7f1c, 0x7f1b,
-0x7f1f, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, 0x7f27,
-0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2f, 0x7f30, 0x7f31, 0x7f32,
-0x7f33, 0x7f35, 0x5e7a, 0x757f, 0x5ddb, 0x753e, 0x9095, 0x738e,
-0x7391, 0x73ae, 0x73a2, 0x739f, 0x73cf, 0x73c2, 0x73d1, 0x73b7,
-0x73b3, 0x73c0, 0x73c9, 0x73c8, 0x73e5, 0x73d9, 0x987c, 0x740a,
-0x73e9, 0x73e7, 0x73de, 0x73ba, 0x73f2, 0x740f, 0x742a, 0x745b,
-0x7426, 0x7425, 0x7428, 0x7430, 0x742e, 0x742c,
-94, 0x6821,
-0x741b, 0x741a, 0x7441, 0x745c, 0x7457, 0x7455, 0x7459, 0x7477,
-0x746d, 0x747e, 0x749c, 0x748e, 0x7480, 0x7481, 0x7487, 0x748b,
-0x749e, 0x74a8, 0x74a9, 0x7490, 0x74a7, 0x74d2, 0x74ba, 0x97ea,
-0x97eb, 0x97ec, 0x674c, 0x6753, 0x675e, 0x6748, 0x6769, 0x67a5,
-0x6787, 0x676a, 0x6773, 0x6798, 0x67a7, 0x6775, 0x67a8, 0x679e,
-0x67ad, 0x678b, 0x6777, 0x677c, 0x67f0, 0x6809, 0x67d8, 0x680a,
-0x67e9, 0x67b0, 0x680c, 0x67d9, 0x67b5, 0x67da, 0x67b3, 0x67dd,
-0x6800, 0x67c3, 0x67b8, 0x67e2, 0x680e, 0x67c1, 0x67fd, 0x6832,
-0x6833, 0x6860, 0x6861, 0x684e, 0x6862, 0x6844, 0x6864, 0x6883,
-0x681d, 0x6855, 0x6866, 0x6841, 0x6867, 0x6840, 0x683e, 0x684a,
-0x6849, 0x6829, 0x68b5, 0x688f, 0x6874, 0x6877, 0x6893, 0x686b,
-0x68c2, 0x696e, 0x68fc, 0x691f, 0x6920, 0x68f9,
-94, 0x6921,
-0x6924, 0x68f0, 0x690b, 0x6901, 0x6957, 0x68e3, 0x6910, 0x6971,
-0x6939, 0x6960, 0x6942, 0x695d, 0x6984, 0x696b, 0x6980, 0x6998,
-0x6978, 0x6934, 0x69cc, 0x6987, 0x6988, 0x69ce, 0x6989, 0x6966,
-0x6963, 0x6979, 0x699b, 0x69a7, 0x69bb, 0x69ab, 0x69ad, 0x69d4,
-0x69b1, 0x69c1, 0x69ca, 0x69df, 0x6995, 0x69e0, 0x698d, 0x69ff,
-0x6a2f, 0x69ed, 0x6a17, 0x6a18, 0x6a65, 0x69f2, 0x6a44, 0x6a3e,
-0x6aa0, 0x6a50, 0x6a5b, 0x6a35, 0x6a8e, 0x6a79, 0x6a3d, 0x6a28,
-0x6a58, 0x6a7c, 0x6a91, 0x6a90, 0x6aa9, 0x6a97, 0x6aab, 0x7337,
-0x7352, 0x6b81, 0x6b82, 0x6b87, 0x6b84, 0x6b92, 0x6b93, 0x6b8d,
-0x6b9a, 0x6b9b, 0x6ba1, 0x6baa, 0x8f6b, 0x8f6d, 0x8f71, 0x8f72,
-0x8f73, 0x8f75, 0x8f76, 0x8f78, 0x8f77, 0x8f79, 0x8f7a, 0x8f7c,
-0x8f7e, 0x8f81, 0x8f82, 0x8f84, 0x8f87, 0x8f8b,
-94, 0x6a21,
-0x8f8d, 0x8f8e, 0x8f8f, 0x8f98, 0x8f9a, 0x8ece, 0x620b, 0x6217,
-0x621b, 0x621f, 0x6222, 0x6221, 0x6225, 0x6224, 0x622c, 0x81e7,
-0x74ef, 0x74f4, 0x74ff, 0x750f, 0x7511, 0x7513, 0x6534, 0x65ee,
-0x65ef, 0x65f0, 0x660a, 0x6619, 0x6772, 0x6603, 0x6615, 0x6600,
-0x7085, 0x66f7, 0x661d, 0x6634, 0x6631, 0x6636, 0x6635, 0x8006,
-0x665f, 0x6654, 0x6641, 0x664f, 0x6656, 0x6661, 0x6657, 0x6677,
-0x6684, 0x668c, 0x66a7, 0x669d, 0x66be, 0x66db, 0x66dc, 0x66e6,
-0x66e9, 0x8d32, 0x8d33, 0x8d36, 0x8d3b, 0x8d3d, 0x8d40, 0x8d45,
-0x8d46, 0x8d48, 0x8d49, 0x8d47, 0x8d4d, 0x8d55, 0x8d59, 0x89c7,
-0x89ca, 0x89cb, 0x89cc, 0x89ce, 0x89cf, 0x89d0, 0x89d1, 0x726e,
-0x729f, 0x725d, 0x7266, 0x726f, 0x727e, 0x727f, 0x7284, 0x728b,
-0x728d, 0x728f, 0x7292, 0x6308, 0x6332, 0x63b0,
-94, 0x6b21,
-0x643f, 0x64d8, 0x8004, 0x6bea, 0x6bf3, 0x6bfd, 0x6bf5, 0x6bf9,
-0x6c05, 0x6c07, 0x6c06, 0x6c0d, 0x6c15, 0x6c18, 0x6c19, 0x6c1a,
-0x6c21, 0x6c29, 0x6c24, 0x6c2a, 0x6c32, 0x6535, 0x6555, 0x656b,
-0x724d, 0x7252, 0x7256, 0x7230, 0x8662, 0x5216, 0x809f, 0x809c,
-0x8093, 0x80bc, 0x670a, 0x80bd, 0x80b1, 0x80ab, 0x80ad, 0x80b4,
-0x80b7, 0x80e7, 0x80e8, 0x80e9, 0x80ea, 0x80db, 0x80c2, 0x80c4,
-0x80d9, 0x80cd, 0x80d7, 0x6710, 0x80dd, 0x80eb, 0x80f1, 0x80f4,
-0x80ed, 0x810d, 0x810e, 0x80f2, 0x80fc, 0x6715, 0x8112, 0x8c5a,
-0x8136, 0x811e, 0x812c, 0x8118, 0x8132, 0x8148, 0x814c, 0x8153,
-0x8174, 0x8159, 0x815a, 0x8171, 0x8160, 0x8169, 0x817c, 0x817d,
-0x816d, 0x8167, 0x584d, 0x5ab5, 0x8188, 0x8182, 0x8191, 0x6ed5,
-0x81a3, 0x81aa, 0x81cc, 0x6726, 0x81ca, 0x81bb,
-94, 0x6c21,
-0x81c1, 0x81a6, 0x6b24, 0x6b37, 0x6b39, 0x6b43, 0x6b46, 0x6b59,
-0x98d1, 0x98d2, 0x98d3, 0x98d5, 0x98d9, 0x98da, 0x6bb3, 0x5f40,
-0x6bc2, 0x89f3, 0x6590, 0x9f51, 0x6593, 0x65bc, 0x65c6, 0x65c4,
-0x65c3, 0x65cc, 0x65ce, 0x65d2, 0x65d6, 0x7080, 0x709c, 0x7096,
-0x709d, 0x70bb, 0x70c0, 0x70b7, 0x70ab, 0x70b1, 0x70e8, 0x70ca,
-0x7110, 0x7113, 0x7116, 0x712f, 0x7131, 0x7173, 0x715c, 0x7168,
-0x7145, 0x7172, 0x714a, 0x7178, 0x717a, 0x7198, 0x71b3, 0x71b5,
-0x71a8, 0x71a0, 0x71e0, 0x71d4, 0x71e7, 0x71f9, 0x721d, 0x7228,
-0x706c, 0x7118, 0x7166, 0x71b9, 0x623e, 0x623d, 0x6243, 0x6248,
-0x6249, 0x793b, 0x7940, 0x7946, 0x7949, 0x795b, 0x795c, 0x7953,
-0x795a, 0x7962, 0x7957, 0x7960, 0x796f, 0x7967, 0x797a, 0x7985,
-0x798a, 0x799a, 0x79a7, 0x79b3, 0x5fd1, 0x5fd0,
-94, 0x6d21,
-0x603c, 0x605d, 0x605a, 0x6067, 0x6041, 0x6059, 0x6063, 0x60ab,
-0x6106, 0x610d, 0x615d, 0x61a9, 0x619d, 0x61cb, 0x61d1, 0x6206,
-0x8080, 0x807f, 0x6c93, 0x6cf6, 0x6dfc, 0x77f6, 0x77f8, 0x7800,
-0x7809, 0x7817, 0x7818, 0x7811, 0x65ab, 0x782d, 0x781c, 0x781d,
-0x7839, 0x783a, 0x783b, 0x781f, 0x783c, 0x7825, 0x782c, 0x7823,
-0x7829, 0x784e, 0x786d, 0x7856, 0x7857, 0x7826, 0x7850, 0x7847,
-0x784c, 0x786a, 0x789b, 0x7893, 0x789a, 0x7887, 0x789c, 0x78a1,
-0x78a3, 0x78b2, 0x78b9, 0x78a5, 0x78d4, 0x78d9, 0x78c9, 0x78ec,
-0x78f2, 0x7905, 0x78f4, 0x7913, 0x7924, 0x791e, 0x7934, 0x9f9b,
-0x9ef9, 0x9efb, 0x9efc, 0x76f1, 0x7704, 0x770d, 0x76f9, 0x7707,
-0x7708, 0x771a, 0x7722, 0x7719, 0x772d, 0x7726, 0x7735, 0x7738,
-0x7750, 0x7751, 0x7747, 0x7743, 0x775a, 0x7768,
-94, 0x6e21,
-0x7762, 0x7765, 0x777f, 0x778d, 0x777d, 0x7780, 0x778c, 0x7791,
-0x779f, 0x77a0, 0x77b0, 0x77b5, 0x77bd, 0x753a, 0x7540, 0x754e,
-0x754b, 0x7548, 0x755b, 0x7572, 0x7579, 0x7583, 0x7f58, 0x7f61,
-0x7f5f, 0x8a48, 0x7f68, 0x7f74, 0x7f71, 0x7f79, 0x7f81, 0x7f7e,
-0x76cd, 0x76e5, 0x8832, 0x9485, 0x9486, 0x9487, 0x948b, 0x948a,
-0x948c, 0x948d, 0x948f, 0x9490, 0x9494, 0x9497, 0x9495, 0x949a,
-0x949b, 0x949c, 0x94a3, 0x94a4, 0x94ab, 0x94aa, 0x94ad, 0x94ac,
-0x94af, 0x94b0, 0x94b2, 0x94b4, 0x94b6, 0x94b7, 0x94b8, 0x94b9,
-0x94ba, 0x94bc, 0x94bd, 0x94bf, 0x94c4, 0x94c8, 0x94c9, 0x94ca,
-0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94d0, 0x94d1, 0x94d2, 0x94d5,
-0x94d6, 0x94d7, 0x94d9, 0x94d8, 0x94db, 0x94de, 0x94df, 0x94e0,
-0x94e2, 0x94e4, 0x94e5, 0x94e7, 0x94e8, 0x94ea,
-94, 0x6f21,
-0x94e9, 0x94eb, 0x94ee, 0x94ef, 0x94f3, 0x94f4, 0x94f5, 0x94f7,
-0x94f9, 0x94fc, 0x94fd, 0x94ff, 0x9503, 0x9502, 0x9506, 0x9507,
-0x9509, 0x950a, 0x950d, 0x950e, 0x950f, 0x9512, 0x9513, 0x9514,
-0x9515, 0x9516, 0x9518, 0x951b, 0x951d, 0x951e, 0x951f, 0x9522,
-0x952a, 0x952b, 0x9529, 0x952c, 0x9531, 0x9532, 0x9534, 0x9536,
-0x9537, 0x9538, 0x953c, 0x953e, 0x953f, 0x9542, 0x9535, 0x9544,
-0x9545, 0x9546, 0x9549, 0x954c, 0x954e, 0x954f, 0x9552, 0x9553,
-0x9554, 0x9556, 0x9557, 0x9558, 0x9559, 0x955b, 0x955e, 0x955f,
-0x955d, 0x9561, 0x9562, 0x9564, 0x9565, 0x9566, 0x9567, 0x9568,
-0x9569, 0x956a, 0x956b, 0x956c, 0x956f, 0x9571, 0x9572, 0x9573,
-0x953a, 0x77e7, 0x77ec, 0x96c9, 0x79d5, 0x79ed, 0x79e3, 0x79eb,
-0x7a06, 0x5d47, 0x7a03, 0x7a02, 0x7a1e, 0x7a14,
-94, 0x7021,
-0x7a39, 0x7a37, 0x7a51, 0x9ecf, 0x99a5, 0x7a70, 0x7688, 0x768e,
-0x7693, 0x7699, 0x76a4, 0x74de, 0x74e0, 0x752c, 0x9e20, 0x9e22,
-0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e32, 0x9e31, 0x9e36,
-0x9e38, 0x9e37, 0x9e39, 0x9e3a, 0x9e3e, 0x9e41, 0x9e42, 0x9e44,
-0x9e46, 0x9e47, 0x9e48, 0x9e49, 0x9e4b, 0x9e4c, 0x9e4e, 0x9e51,
-0x9e55, 0x9e57, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5e, 0x9e63, 0x9e66,
-0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e71, 0x9e6d,
-0x9e73, 0x7592, 0x7594, 0x7596, 0x75a0, 0x759d, 0x75ac, 0x75a3,
-0x75b3, 0x75b4, 0x75b8, 0x75c4, 0x75b1, 0x75b0, 0x75c3, 0x75c2,
-0x75d6, 0x75cd, 0x75e3, 0x75e8, 0x75e6, 0x75e4, 0x75eb, 0x75e7,
-0x7603, 0x75f1, 0x75fc, 0x75ff, 0x7610, 0x7600, 0x7605, 0x760c,
-0x7617, 0x760a, 0x7625, 0x7618, 0x7615, 0x7619,
-94, 0x7121,
-0x761b, 0x763c, 0x7622, 0x7620, 0x7640, 0x762d, 0x7630, 0x763f,
-0x7635, 0x7643, 0x763e, 0x7633, 0x764d, 0x765e, 0x7654, 0x765c,
-0x7656, 0x766b, 0x766f, 0x7fca, 0x7ae6, 0x7a78, 0x7a79, 0x7a80,
-0x7a86, 0x7a88, 0x7a95, 0x7aa6, 0x7aa0, 0x7aac, 0x7aa8, 0x7aad,
-0x7ab3, 0x8864, 0x8869, 0x8872, 0x887d, 0x887f, 0x8882, 0x88a2,
-0x88c6, 0x88b7, 0x88bc, 0x88c9, 0x88e2, 0x88ce, 0x88e3, 0x88e5,
-0x88f1, 0x891a, 0x88fc, 0x88e8, 0x88fe, 0x88f0, 0x8921, 0x8919,
-0x8913, 0x891b, 0x890a, 0x8934, 0x892b, 0x8936, 0x8941, 0x8966,
-0x897b, 0x758b, 0x80e5, 0x76b2, 0x76b4, 0x77dc, 0x8012, 0x8014,
-0x8016, 0x801c, 0x8020, 0x8022, 0x8025, 0x8026, 0x8027, 0x8029,
-0x8028, 0x8031, 0x800b, 0x8035, 0x8043, 0x8046, 0x804d, 0x8052,
-0x8069, 0x8071, 0x8983, 0x9878, 0x9880, 0x9883,
-94, 0x7221,
-0x9889, 0x988c, 0x988d, 0x988f, 0x9894, 0x989a, 0x989b, 0x989e,
-0x989f, 0x98a1, 0x98a2, 0x98a5, 0x98a6, 0x864d, 0x8654, 0x866c,
-0x866e, 0x867f, 0x867a, 0x867c, 0x867b, 0x86a8, 0x868d, 0x868b,
-0x86ac, 0x869d, 0x86a7, 0x86a3, 0x86aa, 0x8693, 0x86a9, 0x86b6,
-0x86c4, 0x86b5, 0x86ce, 0x86b0, 0x86ba, 0x86b1, 0x86af, 0x86c9,
-0x86cf, 0x86b4, 0x86e9, 0x86f1, 0x86f2, 0x86ed, 0x86f3, 0x86d0,
-0x8713, 0x86de, 0x86f4, 0x86df, 0x86d8, 0x86d1, 0x8703, 0x8707,
-0x86f8, 0x8708, 0x870a, 0x870d, 0x8709, 0x8723, 0x873b, 0x871e,
-0x8725, 0x872e, 0x871a, 0x873e, 0x8748, 0x8734, 0x8731, 0x8729,
-0x8737, 0x873f, 0x8782, 0x8722, 0x877d, 0x877e, 0x877b, 0x8760,
-0x8770, 0x874c, 0x876e, 0x878b, 0x8753, 0x8763, 0x877c, 0x8764,
-0x8759, 0x8765, 0x8793, 0x87af, 0x87a8, 0x87d2,
-94, 0x7321,
-0x87c6, 0x8788, 0x8785, 0x87ad, 0x8797, 0x8783, 0x87ab, 0x87e5,
-0x87ac, 0x87b5, 0x87b3, 0x87cb, 0x87d3, 0x87bd, 0x87d1, 0x87c0,
-0x87ca, 0x87db, 0x87ea, 0x87e0, 0x87ee, 0x8816, 0x8813, 0x87fe,
-0x880a, 0x881b, 0x8821, 0x8839, 0x883c, 0x7f36, 0x7f42, 0x7f44,
-0x7f45, 0x8210, 0x7afa, 0x7afd, 0x7b08, 0x7b03, 0x7b04, 0x7b15,
-0x7b0a, 0x7b2b, 0x7b0f, 0x7b47, 0x7b38, 0x7b2a, 0x7b19, 0x7b2e,
-0x7b31, 0x7b20, 0x7b25, 0x7b24, 0x7b33, 0x7b3e, 0x7b1e, 0x7b58,
-0x7b5a, 0x7b45, 0x7b75, 0x7b4c, 0x7b5d, 0x7b60, 0x7b6e, 0x7b7b,
-0x7b62, 0x7b72, 0x7b71, 0x7b90, 0x7ba6, 0x7ba7, 0x7bb8, 0x7bac,
-0x7b9d, 0x7ba8, 0x7b85, 0x7baa, 0x7b9c, 0x7ba2, 0x7bab, 0x7bb4,
-0x7bd1, 0x7bc1, 0x7bcc, 0x7bdd, 0x7bda, 0x7be5, 0x7be6, 0x7bea,
-0x7c0c, 0x7bfe, 0x7bfc, 0x7c0f, 0x7c16, 0x7c0b,
-94, 0x7421,
-0x7c1f, 0x7c2a, 0x7c26, 0x7c38, 0x7c41, 0x7c40, 0x81fe, 0x8201,
-0x8202, 0x8204, 0x81ec, 0x8844, 0x8221, 0x8222, 0x8223, 0x822d,
-0x822f, 0x8228, 0x822b, 0x8238, 0x823b, 0x8233, 0x8234, 0x823e,
-0x8244, 0x8249, 0x824b, 0x824f, 0x825a, 0x825f, 0x8268, 0x887e,
-0x8885, 0x8888, 0x88d8, 0x88df, 0x895e, 0x7f9d, 0x7f9f, 0x7fa7,
-0x7faf, 0x7fb0, 0x7fb2, 0x7c7c, 0x6549, 0x7c91, 0x7c9d, 0x7c9c,
-0x7c9e, 0x7ca2, 0x7cb2, 0x7cbc, 0x7cbd, 0x7cc1, 0x7cc7, 0x7ccc,
-0x7ccd, 0x7cc8, 0x7cc5, 0x7cd7, 0x7ce8, 0x826e, 0x66a8, 0x7fbf,
-0x7fce, 0x7fd5, 0x7fe5, 0x7fe1, 0x7fe6, 0x7fe9, 0x7fee, 0x7ff3,
-0x7cf8, 0x7d77, 0x7da6, 0x7dae, 0x7e47, 0x7e9b, 0x9eb8, 0x9eb4,
-0x8d73, 0x8d84, 0x8d94, 0x8d91, 0x8db1, 0x8d67, 0x8d6d, 0x8c47,
-0x8c49, 0x914a, 0x9150, 0x914e, 0x914f, 0x9164,
-94, 0x7521,
-0x9162, 0x9161, 0x9170, 0x9169, 0x916f, 0x917d, 0x917e, 0x9172,
-0x9174, 0x9179, 0x918c, 0x9185, 0x9190, 0x918d, 0x9191, 0x91a2,
-0x91a3, 0x91aa, 0x91ad, 0x91ae, 0x91af, 0x91b5, 0x91b4, 0x91ba,
-0x8c55, 0x9e7e, 0x8db8, 0x8deb, 0x8e05, 0x8e59, 0x8e69, 0x8db5,
-0x8dbf, 0x8dbc, 0x8dba, 0x8dc4, 0x8dd6, 0x8dd7, 0x8dda, 0x8dde,
-0x8dce, 0x8dcf, 0x8ddb, 0x8dc6, 0x8dec, 0x8df7, 0x8df8, 0x8de3,
-0x8df9, 0x8dfb, 0x8de4, 0x8e09, 0x8dfd, 0x8e14, 0x8e1d, 0x8e1f,
-0x8e2c, 0x8e2e, 0x8e23, 0x8e2f, 0x8e3a, 0x8e40, 0x8e39, 0x8e35,
-0x8e3d, 0x8e31, 0x8e49, 0x8e41, 0x8e42, 0x8e51, 0x8e52, 0x8e4a,
-0x8e70, 0x8e76, 0x8e7c, 0x8e6f, 0x8e74, 0x8e85, 0x8e8f, 0x8e94,
-0x8e90, 0x8e9c, 0x8e9e, 0x8c78, 0x8c82, 0x8c8a, 0x8c85, 0x8c98,
-0x8c94, 0x659b, 0x89d6, 0x89de, 0x89da, 0x89dc,
-94, 0x7621,
-0x89e5, 0x89eb, 0x89ef, 0x8a3e, 0x8b26, 0x9753, 0x96e9, 0x96f3,
-0x96ef, 0x9706, 0x9701, 0x9708, 0x970f, 0x970e, 0x972a, 0x972d,
-0x9730, 0x973e, 0x9f80, 0x9f83, 0x9f85, 0x9f86, 0x9f87, 0x9f88,
-0x9f89, 0x9f8a, 0x9f8c, 0x9efe, 0x9f0b, 0x9f0d, 0x96b9, 0x96bc,
-0x96bd, 0x96ce, 0x96d2, 0x77bf, 0x96e0, 0x928e, 0x92ae, 0x92c8,
-0x933e, 0x936a, 0x93ca, 0x938f, 0x943e, 0x946b, 0x9c7f, 0x9c82,
-0x9c85, 0x9c86, 0x9c87, 0x9c88, 0x7a23, 0x9c8b, 0x9c8e, 0x9c90,
-0x9c91, 0x9c92, 0x9c94, 0x9c95, 0x9c9a, 0x9c9b, 0x9c9e, 0x9c9f,
-0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8,
-0x9ca9, 0x9cab, 0x9cad, 0x9cae, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3,
-0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd,
-0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cca, 0x9ccb,
-94, 0x7721,
-0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd3, 0x9cd4, 0x9cd5,
-0x9cd7, 0x9cd8, 0x9cd9, 0x9cdc, 0x9cdd, 0x9cdf, 0x9ce2, 0x977c,
-0x9785, 0x9791, 0x9792, 0x9794, 0x97af, 0x97ab, 0x97a3, 0x97b2,
-0x97b4, 0x9ab1, 0x9ab0, 0x9ab7, 0x9e58, 0x9ab6, 0x9aba, 0x9abc,
-0x9ac1, 0x9ac0, 0x9ac5, 0x9ac2, 0x9acb, 0x9acc, 0x9ad1, 0x9b45,
-0x9b43, 0x9b47, 0x9b49, 0x9b48, 0x9b4d, 0x9b51, 0x98e8, 0x990d,
-0x992e, 0x9955, 0x9954, 0x9adf, 0x9ae1, 0x9ae6, 0x9aef, 0x9aeb,
-0x9afb, 0x9aed, 0x9af9, 0x9b08, 0x9b0f, 0x9b13, 0x9b1f, 0x9b23,
-0x9ebd, 0x9ebe, 0x7e3b, 0x9e82, 0x9e87, 0x9e88, 0x9e8b, 0x9e92,
-0x93d6, 0x9e9d, 0x9e9f, 0x9edb, 0x9edc, 0x9edd, 0x9ee0, 0x9edf,
-0x9ee2, 0x9ee9, 0x9ee7, 0x9ee5, 0x9eea, 0x9eef, 0x9f22, 0x9f2c,
-0x9f2f, 0x9f39, 0x9f37, 0x9f3d, 0x9f3e, 0x9f44,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/instmac.m4 b/usr/src/cmd/man/src/util/nsgmls.src/lib/instmac.m4
deleted file mode 100644
index e7186b2083..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/instmac.m4
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-dnl Copyright (c) 1994 James Clark
-dnl See the file COPYING for copying permission.
-dnl M4 macros for template instantiation.
-define(`__undefine', defn(`undefine'))dnl
-define(`__define', defn(`define'))dnl
-define(`__changequote', defn(`changequote'))dnl
-define(`__include', defn(`include'))dnl
-define(`__ifdef', defn(`ifdef'))dnl
-define(`__divert', defn(`divert'))dnl
-define(`__dnl', defn(`dnl'))dnl
-define(`__incr', defn(`incr'))dnl
-define(`__index', 0)dnl
-define(`__concat', $1$2)dnl
-define(`__instantiate',`#ifdef __DECCXX
-#pragma define_template $1
-#else
-#ifdef __xlC__
-#pragma define($1)
-#else
-#ifdef SP_ANSI_CLASS_INST
-template class $1;
-#else
-typedef $1 __concat(Dummy_,__index);
-#endif
-#endif
-#endif
-__define(`__index',__incr(__index))__dnl')dnl
-define(`__func_index', 0)dnl
-define(`__instantiate_func3',
-`#ifdef __GNUG__
-template void $1($2, $3, $4);
-#else
-static
-void __concat(func_,__func_index) ($2 arg1, $3 arg2, $4 arg3) {
-(void)$1(arg1, arg2, arg3);
-}
-#endif
-__define(`__func_index',__incr(__func_index))__dnl')dnl
-dnl we want __p to be expanded even inside comments
-changecom()__dnl
-__undefine(`changecom')__dnl
-__undefine(`changequote')__dnl
-__undefine(`decr')__dnl
-__undefine(`define')__dnl
-__undefine(`defn')__dnl
-__undefine(`divert')__dnl
-__undefine(`divnum')__dnl
-__undefine(`dnl')__dnl
-__undefine(`dumpdef')__dnl
-__undefine(`errprint')__dnl
-__undefine(`eval')__dnl
-__undefine(`ifdef')__dnl
-__undefine(`ifelse')__dnl
-__undefine(`include')__dnl
-__undefine(`incr')__dnl
-__undefine(`index')__dnl
-__undefine(`len')__dnl
-__undefine(`m4exit')__dnl
-__undefine(`m4wrap')__dnl
-__undefine(`maketemp')__dnl
-__undefine(`popdef')__dnl
-__undefine(`pushdef')__dnl
-__undefine(`shift')__dnl
-__undefine(`sinclude')__dnl
-__undefine(`substr')__dnl
-__undefine(`syscmd')__dnl
-__undefine(`sysval')__dnl
-__undefine(`traceoff')__dnl
-__undefine(`traceon')__dnl
-__undefine(`translit')__dnl
-__undefine(`undefine')__dnl
-__undefine(`undivert')__dnl
-__undefine(`unix')__dnl
-__dnl __changequote(,)__dnl disable quoting
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ir.out b/usr/src/cmd/man/src/util/nsgmls.src/lib/ir.out
deleted file mode 100644
index e69de29bb2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ir.out
+++ /dev/null
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso646-jis.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso646-jis.h
deleted file mode 100644
index b708d2ebad..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso646-jis.h
+++ /dev/null
@@ -1,14 +0,0 @@
-96, 0x0020,
-0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
-0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
-0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
-0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
-0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
-0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
-0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
-0x0058, 0x0059, 0x005a, 0x005b, 0x00a5, 0x005d, 0x005e, 0x005f,
-0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
-0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
-0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
-0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x203e, 0x007f,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-2.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-2.h
deleted file mode 100644
index 1c4dcd2693..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-2.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* ISO 8859-2 */
-96, 0x0020,
-0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7,
-0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
-0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7,
-0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
-0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
-0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
-0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
-0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
-0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
-0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
-0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
-0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-3.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-3.h
deleted file mode 100644
index e3d9152581..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-3.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* ISO 8859-3 */
-5, 0x0020,
-0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4,
-8, 0x0026,
-0x0124, 0x00a7, 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad,
-15, 0x002f,
-0x017b, 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125,
-0x00b7, 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd,
-4, 0x003f,
-0x017c, 0x00c0, 0x00c1, 0x00c2,
-12, 0x0044,
-0x00c4, 0x010a, 0x0108, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb,
-0x00cc, 0x00cd, 0x00ce, 0x00cf,
-18, 0x0051,
-0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, 0x011c,
-0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, 0x00e0,
-0x00e1, 0x00e2,
-12, 0x0064,
-0x00e4, 0x010b, 0x0109, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb,
-0x00ec, 0x00ed, 0x00ee, 0x00ef,
-15, 0x0071,
-0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, 0x011d,
-0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-4.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-4.h
deleted file mode 100644
index 3fa1fa6225..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-4.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* ISO 8859-4 */
-96, 0x0020,
-0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7,
-0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
-0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7,
-0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
-0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
-0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
-0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
-0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
-0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
-0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
-0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
-0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-5.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-5.h
deleted file mode 100644
index 63265a57a8..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-5.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* ISO 8859-5 */
-96, 0x0020,
-0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
-0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
-0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
-0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
-0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
-0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
-0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
-0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
-0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
-0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
-0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-6.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-6.h
deleted file mode 100644
index 8b6e430b7f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-6.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ISO 8859-6 */
-1, 0x0020,
-0x00a0,
-1, 0x0024,
-0x00a4,
-2, 0x002c,
-0x060c, 0x00ad,
-1, 0x003b,
-0x061b,
-1, 0x003f,
-0x061f,
-26, 0x0041,
-0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628,
-0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, 0x0630,
-0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638,
-0x0639, 0x063a,
-19, 0x0060,
-0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
-0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
-0x0650, 0x0651, 0x0652,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-7.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-7.h
deleted file mode 100644
index b3ccbdf67c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-7.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ISO 8859-7 */
-4, 0x0020,
-0x00a0, 0x02bd, 0x02bc, 0x00a3,
-4, 0x0026,
-0x00a6, 0x00a7, 0x00a8, 0x00a9,
-3, 0x002b,
-0x00ab, 0x00ac, 0x00ad,
-35, 0x002f,
-0x2015, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386,
-0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e,
-0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396,
-0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e,
-0x039f, 0x03a0, 0x03a1,
-44, 0x0053,
-0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa,
-0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b1, 0x03b2,
-0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba,
-0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c2,
-0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca,
-0x03cb, 0x03cc, 0x03cd, 0x03ce,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-8.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-8.h
deleted file mode 100644
index 608c08df66..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-8.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* ISO 8859-8 */
-1, 0x0020,
-0x00a0,
-29, 0x0022,
-0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9,
-0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x203e, 0x00b0, 0x00b1,
-0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9,
-0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be,
-28, 0x005f,
-0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6,
-0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de,
-0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6,
-0x05e7, 0x05e8, 0x05e9, 0x05ea,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-9.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-9.h
deleted file mode 100644
index 81886c959e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/iso8859-9.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* ISO 8859-9 */
-96, 0x0020,
-0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
-0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
-0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
-0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
-0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
-0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
-0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
-0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
-0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
-0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
-0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
-0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0201.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0201.h
deleted file mode 100644
index e74975d03c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0201.h
+++ /dev/null
@@ -1,10 +0,0 @@
-63, 0x0021,
-0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67, 0xff68,
-0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f, 0xff70,
-0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77, 0xff78,
-0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f, 0xff80,
-0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87, 0xff88,
-0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f, 0xff90,
-0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97, 0xff98,
-0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0208.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0208.h
deleted file mode 100644
index 685553a51f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0208.h
+++ /dev/null
@@ -1,971 +0,0 @@
-94, 0x2121,
-0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b,
-0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e,
-0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd,
-0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0x005c,
-0x301c, 0x2016, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c,
-0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b,
-0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e,
-0x300f, 0x3010, 0x3011, 0xff0b, 0x2212, 0x00b1, 0x00d7, 0x00f7,
-0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e, 0x2234,
-0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5, 0xff04,
-0x00a2, 0x00a3, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20, 0x00a7,
-0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7,
-14, 0x2221,
-0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b,
-0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,
-8, 0x223a,
-0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229,
-7, 0x224a,
-0x2227, 0x2228, 0x00ac, 0x21d2, 0x21d4, 0x2200, 0x2203,
-15, 0x225c,
-0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x226a,
-0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b, 0x222c,
-8, 0x2272,
-0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021, 0x00b6,
-1, 0x227e,
-0x25ef,
-10, 0x2330,
-0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17,
-0xff18, 0xff19,
-26, 0x2341,
-0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28,
-0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30,
-0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38,
-0xff39, 0xff3a,
-26, 0x2361,
-0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48,
-0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50,
-0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58,
-0xff59, 0xff5a,
-83, 0x2421,
-0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
-0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
-0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
-0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
-0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
-0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
-0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
-0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
-0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
-0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
-0x3091, 0x3092, 0x3093,
-86, 0x2521,
-0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
-0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
-0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
-0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
-0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
-0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
-0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
-0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
-0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
-0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
-0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6,
-24, 0x2621,
-0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
-0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
-0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
-24, 0x2641,
-0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
-0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
-0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
-33, 0x2721,
-0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416,
-0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
-0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426,
-0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e,
-0x042f,
-33, 0x2751,
-0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436,
-0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
-0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446,
-0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e,
-0x044f,
-32, 0x2821,
-0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c,
-0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b,
-0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f,
-0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542,
-94, 0x3021,
-0x4e9c, 0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, 0x59f6,
-0x9022, 0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, 0x65ed,
-0x8466, 0x82a6, 0x9bf5, 0x6893, 0x5727, 0x65a1, 0x6271, 0x5b9b,
-0x59d0, 0x867b, 0x98f4, 0x7d62, 0x7dbe, 0x9b8e, 0x6216, 0x7c9f,
-0x88b7, 0x5b89, 0x5eb5, 0x6309, 0x6697, 0x6848, 0x95c7, 0x978d,
-0x674f, 0x4ee5, 0x4f0a, 0x4f4d, 0x4f9d, 0x5049, 0x56f2, 0x5937,
-0x59d4, 0x5a01, 0x5c09, 0x60df, 0x610f, 0x6170, 0x6613, 0x6905,
-0x70ba, 0x754f, 0x7570, 0x79fb, 0x7dad, 0x7def, 0x80c3, 0x840e,
-0x8863, 0x8b02, 0x9055, 0x907a, 0x533b, 0x4e95, 0x4ea5, 0x57df,
-0x80b2, 0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, 0x7a32,
-0x8328, 0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, 0x56e0,
-0x59fb, 0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d,
-94, 0x3121,
-0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, 0x70cf,
-0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, 0x7893,
-0x81fc, 0x6e26, 0x5618, 0x5504, 0x6b1d, 0x851a, 0x9c3b, 0x59e5,
-0x53a9, 0x6d66, 0x74dc, 0x958f, 0x5642, 0x4e91, 0x904b, 0x96f2,
-0x834f, 0x990c, 0x53e1, 0x55b6, 0x5b30, 0x5f71, 0x6620, 0x66f3,
-0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, 0x9834,
-0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, 0x99c5,
-0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0x5712,
-0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4, 0x6cbf,
-0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01, 0x8276,
-0x82d1, 0x8597, 0x9060, 0x925b, 0x9d1b, 0x5869, 0x65bc, 0x6c5a,
-0x7525, 0x51f9, 0x592e, 0x5965, 0x5f80, 0x5fdc,
-94, 0x3221,
-0x62bc, 0x65fa, 0x6a2a, 0x6b27, 0x6bb4, 0x738b, 0x7fc1, 0x8956,
-0x9d2c, 0x9d0e, 0x9ec4, 0x5ca1, 0x6c96, 0x837b, 0x5104, 0x5c4b,
-0x61b6, 0x81c6, 0x6876, 0x7261, 0x4e59, 0x4ffa, 0x5378, 0x6069,
-0x6e29, 0x7a4f, 0x97f3, 0x4e0b, 0x5316, 0x4eee, 0x4f55, 0x4f3d,
-0x4fa1, 0x4f73, 0x52a0, 0x53ef, 0x5609, 0x590f, 0x5ac1, 0x5bb6,
-0x5be1, 0x79d1, 0x6687, 0x679c, 0x67b6, 0x6b4c, 0x6cb3, 0x706b,
-0x73c2, 0x798d, 0x79be, 0x7a3c, 0x7b87, 0x82b1, 0x82db, 0x8304,
-0x8377, 0x83ef, 0x83d3, 0x8766, 0x8ab2, 0x5629, 0x8ca8, 0x8fe6,
-0x904e, 0x971e, 0x868a, 0x4fc4, 0x5ce8, 0x6211, 0x7259, 0x753b,
-0x81e5, 0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, 0x4ecb,
-0x4f1a, 0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, 0x602a,
-0x6094, 0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539,
-94, 0x3321,
-0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, 0x7d75,
-0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, 0x5916,
-0x54b3, 0x5bb3, 0x5d16, 0x6168, 0x6982, 0x6daf, 0x788d, 0x84cb,
-0x8857, 0x8a72, 0x93a7, 0x9ab8, 0x6d6c, 0x99a8, 0x86d9, 0x57a3,
-0x67ff, 0x86ce, 0x920e, 0x5283, 0x5687, 0x5404, 0x5ed3, 0x62e1,
-0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, 0x899a,
-0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, 0x5b66,
-0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0x6a7f,
-0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec, 0x6d3b,
-0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39, 0x53f6,
-0x691b, 0x6a3a, 0x9784, 0x682a, 0x515c, 0x7ac3, 0x84b2, 0x91dc,
-0x938c, 0x565b, 0x9d28, 0x6822, 0x8305, 0x8431,
-94, 0x3421,
-0x7ca5, 0x5208, 0x82c5, 0x74e6, 0x4e7e, 0x4f83, 0x51a0, 0x5bd2,
-0x520a, 0x52d8, 0x52e7, 0x5dfb, 0x559a, 0x582a, 0x59e6, 0x5b8c,
-0x5b98, 0x5bdb, 0x5e72, 0x5e79, 0x60a3, 0x611f, 0x6163, 0x61be,
-0x63db, 0x6562, 0x67d1, 0x6853, 0x68fa, 0x6b3e, 0x6b53, 0x6c57,
-0x6f22, 0x6f97, 0x6f45, 0x74b0, 0x7518, 0x76e3, 0x770b, 0x7aff,
-0x7ba1, 0x7c21, 0x7de9, 0x7f36, 0x7ff0, 0x809d, 0x8266, 0x839e,
-0x89b3, 0x8acc, 0x8cab, 0x9084, 0x9451, 0x9593, 0x9591, 0x95a2,
-0x9665, 0x97d3, 0x9928, 0x8218, 0x4e38, 0x542b, 0x5cb8, 0x5dcc,
-0x73a9, 0x764c, 0x773c, 0x5ca9, 0x7feb, 0x8d0b, 0x96c1, 0x9811,
-0x9854, 0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, 0x57fa,
-0x5947, 0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, 0x63ee,
-0x673a, 0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4,
-94, 0x3521,
-0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, 0x5b63,
-0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, 0x8ecc,
-0x8f1d, 0x98e2, 0x9a0e, 0x9b3c, 0x4e80, 0x507d, 0x5100, 0x5993,
-0x5b9c, 0x622f, 0x6280, 0x64ec, 0x6b3a, 0x72a0, 0x7591, 0x7947,
-0x7fa9, 0x87fb, 0x8abc, 0x8b70, 0x63ac, 0x83ca, 0x97a0, 0x5409,
-0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, 0x9ecd,
-0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, 0x4ec7,
-0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0x673d,
-0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae, 0x7b08,
-0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45, 0x5de8,
-0x62d2, 0x62e0, 0x6319, 0x6e20, 0x865a, 0x8a31, 0x8ddd, 0x92f8,
-0x6f01, 0x79a6, 0x9b5a, 0x4ea8, 0x4eab, 0x4eac,
-94, 0x3621,
-0x4f9b, 0x4fa0, 0x50d1, 0x5147, 0x7af6, 0x5171, 0x51f6, 0x5354,
-0x5321, 0x537f, 0x53eb, 0x55ac, 0x5883, 0x5ce1, 0x5f37, 0x5f4a,
-0x602f, 0x6050, 0x606d, 0x631f, 0x6559, 0x6a4b, 0x6cc1, 0x72c2,
-0x72ed, 0x77ef, 0x80f8, 0x8105, 0x8208, 0x854e, 0x90f7, 0x93e1,
-0x97ff, 0x9957, 0x9a5a, 0x4ef0, 0x51dd, 0x5c2d, 0x6681, 0x696d,
-0x5c40, 0x66f2, 0x6975, 0x7389, 0x6850, 0x7c81, 0x50c5, 0x52e4,
-0x5747, 0x5dfe, 0x9326, 0x65a4, 0x6b23, 0x6b3d, 0x7434, 0x7981,
-0x79bd, 0x7b4b, 0x7dca, 0x82b9, 0x83cc, 0x887f, 0x895f, 0x8b39,
-0x8fd1, 0x91d1, 0x541f, 0x9280, 0x4e5d, 0x5036, 0x53e5, 0x533a,
-0x72d7, 0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, 0x99d2,
-0x5177, 0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, 0x9047,
-0x9685, 0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48,
-94, 0x3721,
-0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, 0x9688,
-0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, 0x85ab,
-0x8a13, 0x7fa4, 0x8ecd, 0x90e1, 0x5366, 0x8888, 0x7941, 0x4fc2,
-0x50be, 0x5211, 0x5144, 0x5553, 0x572d, 0x73ea, 0x578b, 0x5951,
-0x5f62, 0x5f84, 0x6075, 0x6176, 0x6167, 0x61a9, 0x63b2, 0x643a,
-0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, 0x7d4c,
-0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, 0x8a63,
-0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0x5287,
-0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20, 0x6c7a,
-0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6, 0x5039,
-0x5026, 0x5065, 0x517c, 0x5238, 0x5263, 0x55a7, 0x570f, 0x5805,
-0x5acc, 0x5efa, 0x61b2, 0x61f8, 0x62f3, 0x6372,
-94, 0x3821,
-0x691c, 0x6a29, 0x727d, 0x72ac, 0x732e, 0x7814, 0x786f, 0x7d79,
-0x770c, 0x80a9, 0x898b, 0x8b19, 0x8ce2, 0x8ed2, 0x9063, 0x9375,
-0x967a, 0x9855, 0x9a13, 0x9e78, 0x5143, 0x539f, 0x53b3, 0x5e7b,
-0x5f26, 0x6e1b, 0x6e90, 0x7384, 0x73fe, 0x7d43, 0x8237, 0x8a00,
-0x8afa, 0x9650, 0x4e4e, 0x500b, 0x53e4, 0x547c, 0x56fa, 0x59d1,
-0x5b64, 0x5df1, 0x5eab, 0x5f27, 0x6238, 0x6545, 0x67af, 0x6e56,
-0x72d0, 0x7cca, 0x88b4, 0x80a1, 0x80e1, 0x83f0, 0x864e, 0x8a87,
-0x8de8, 0x9237, 0x96c7, 0x9867, 0x9f13, 0x4e94, 0x4e92, 0x4f0d,
-0x5348, 0x5449, 0x543e, 0x5a2f, 0x5f8c, 0x5fa1, 0x609f, 0x68a7,
-0x6a8e, 0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, 0x4e5e,
-0x9bc9, 0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, 0x516c,
-0x529f, 0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411,
-94, 0x3921,
-0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, 0x5b8f,
-0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, 0x5f18,
-0x6052, 0x614c, 0x6297, 0x62d8, 0x63a7, 0x653b, 0x6602, 0x6643,
-0x66f4, 0x676d, 0x6821, 0x6897, 0x69cb, 0x6c5f, 0x6d2a, 0x6d69,
-0x6e2f, 0x6e9d, 0x7532, 0x7687, 0x786c, 0x7a3f, 0x7ce0, 0x7d05,
-0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, 0x8154,
-0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, 0x8cfc,
-0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0x9805,
-0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408, 0x58d5,
-0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b, 0x544a,
-0x56fd, 0x7a40, 0x9177, 0x9d60, 0x9ed2, 0x7344, 0x6f09, 0x8170,
-0x7511, 0x5ffd, 0x60da, 0x9aa8, 0x72db, 0x8fbc,
-94, 0x3a21,
-0x6b64, 0x9803, 0x4eca, 0x56f0, 0x5764, 0x58be, 0x5a5a, 0x6068,
-0x61c7, 0x660f, 0x6606, 0x6839, 0x68b1, 0x6df7, 0x75d5, 0x7d3a,
-0x826e, 0x9b42, 0x4e9b, 0x4f50, 0x53c9, 0x5506, 0x5d6f, 0x5de6,
-0x5dee, 0x67fb, 0x6c99, 0x7473, 0x7802, 0x8a50, 0x9396, 0x88df,
-0x5750, 0x5ea7, 0x632b, 0x50b5, 0x50ac, 0x518d, 0x6700, 0x54c9,
-0x585e, 0x59bb, 0x5bb0, 0x5f69, 0x624d, 0x63a1, 0x683d, 0x6b73,
-0x6e08, 0x707d, 0x91c7, 0x7280, 0x7815, 0x7826, 0x796d, 0x658e,
-0x7d30, 0x83dc, 0x88c1, 0x8f09, 0x969b, 0x5264, 0x5728, 0x6750,
-0x7f6a, 0x8ca1, 0x51b4, 0x5742, 0x962a, 0x583a, 0x698a, 0x80b4,
-0x54b2, 0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, 0x548b,
-0x643e, 0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, 0x932f,
-0x685c, 0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237,
-94, 0x3b21,
-0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, 0x96d1,
-0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, 0x4e09,
-0x5098, 0x53c2, 0x5c71, 0x60e8, 0x6492, 0x6563, 0x685f, 0x71e6,
-0x73ca, 0x7523, 0x7b97, 0x7e82, 0x8695, 0x8b83, 0x8cdb, 0x9178,
-0x9910, 0x65ac, 0x66ab, 0x6b8b, 0x4ed5, 0x4ed4, 0x4f3a, 0x4f7f,
-0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, 0x59c9,
-0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, 0x6307,
-0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0x6b7b,
-0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b, 0x80a2,
-0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c, 0x8aee,
-0x8cc7, 0x8cdc, 0x96cc, 0x98fc, 0x6b6f, 0x4e8b, 0x4f3c, 0x4f8d,
-0x5150, 0x5b57, 0x5bfa, 0x6148, 0x6301, 0x6642,
-94, 0x3c21,
-0x6b21, 0x6ecb, 0x6cbb, 0x723e, 0x74bd, 0x75d4, 0x78c1, 0x793a,
-0x800c, 0x8033, 0x81ea, 0x8494, 0x8f9e, 0x6c50, 0x9e7f, 0x5f0f,
-0x8b58, 0x9d2b, 0x7afa, 0x8ef8, 0x5b8d, 0x96eb, 0x4e03, 0x53f1,
-0x57f7, 0x5931, 0x5ac9, 0x5ba4, 0x6089, 0x6e7f, 0x6f06, 0x75be,
-0x8cea, 0x5b9f, 0x8500, 0x7be0, 0x5072, 0x67f4, 0x829d, 0x5c61,
-0x854a, 0x7e1e, 0x820e, 0x5199, 0x5c04, 0x6368, 0x8d66, 0x659c,
-0x716e, 0x793e, 0x7d17, 0x8005, 0x8b1d, 0x8eca, 0x906e, 0x86c7,
-0x90aa, 0x501f, 0x52fa, 0x5c3a, 0x6753, 0x707c, 0x7235, 0x914c,
-0x91c8, 0x932b, 0x82e5, 0x5bc2, 0x5f31, 0x60f9, 0x4e3b, 0x53d6,
-0x5b88, 0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, 0x816b,
-0x8da3, 0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, 0x6388,
-0x6a39, 0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468,
-94, 0x3d21,
-0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, 0x79c0,
-0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, 0x8846,
-0x8972, 0x8b90, 0x8e74, 0x8f2f, 0x9031, 0x914b, 0x916c, 0x96c6,
-0x919c, 0x4ec0, 0x4f4f, 0x5145, 0x5341, 0x5f93, 0x620e, 0x67d4,
-0x6c41, 0x6e0b, 0x7363, 0x7e26, 0x91cd, 0x9283, 0x53d4, 0x5919,
-0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, 0x51fa,
-0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, 0x821c,
-0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0x6e96,
-0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806, 0x51e6,
-0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2, 0x7f72,
-0x66f8, 0x85af, 0x85f7, 0x8af8, 0x52a9, 0x53d9, 0x5973, 0x5e8f,
-0x5f90, 0x6055, 0x92e4, 0x9664, 0x50b7, 0x511f,
-94, 0x3e21,
-0x52dd, 0x5320, 0x5347, 0x53ec, 0x54e8, 0x5546, 0x5531, 0x5617,
-0x5968, 0x59be, 0x5a3c, 0x5bb5, 0x5c06, 0x5c0f, 0x5c11, 0x5c1a,
-0x5e84, 0x5e8a, 0x5ee0, 0x5f70, 0x627f, 0x6284, 0x62db, 0x638c,
-0x6377, 0x6607, 0x660c, 0x662d, 0x6676, 0x677e, 0x68a2, 0x6a1f,
-0x6a35, 0x6cbc, 0x6d88, 0x6e09, 0x6e58, 0x713c, 0x7126, 0x7167,
-0x75c7, 0x7701, 0x785d, 0x7901, 0x7965, 0x79f0, 0x7ae0, 0x7b11,
-0x7ca7, 0x7d39, 0x8096, 0x83d6, 0x848b, 0x8549, 0x885d, 0x88f3,
-0x8a1f, 0x8a3c, 0x8a54, 0x8a73, 0x8c61, 0x8cde, 0x91a4, 0x9266,
-0x937e, 0x9418, 0x969c, 0x9798, 0x4e0a, 0x4e08, 0x4e1e, 0x4e57,
-0x5197, 0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, 0x60c5,
-0x64fe, 0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, 0x84b8,
-0x8b72, 0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe,
-94, 0x3f21,
-0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, 0x89e6,
-0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, 0x5507,
-0x5a20, 0x5bdd, 0x5be9, 0x5fc3, 0x614e, 0x632f, 0x65b0, 0x664b,
-0x68ee, 0x699b, 0x6d78, 0x6df1, 0x7533, 0x75b9, 0x771f, 0x795e,
-0x79e6, 0x7d33, 0x81e3, 0x82af, 0x85aa, 0x89aa, 0x8a3a, 0x8eab,
-0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, 0x5875,
-0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, 0x9663,
-0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0x9017,
-0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761, 0x7c8b,
-0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f, 0x745e,
-0x9ac4, 0x5d07, 0x5d69, 0x6570, 0x67a2, 0x8da8, 0x96db, 0x636e,
-0x6749, 0x6919, 0x83c5, 0x9817, 0x96c0, 0x88fe,
-94, 0x4021,
-0x6f84, 0x647a, 0x5bf8, 0x4e16, 0x702c, 0x755d, 0x662f, 0x51c4,
-0x5236, 0x52e2, 0x59d3, 0x5f81, 0x6027, 0x6210, 0x653f, 0x6574,
-0x661f, 0x6674, 0x68f2, 0x6816, 0x6b63, 0x6e05, 0x7272, 0x751f,
-0x76db, 0x7cbe, 0x8056, 0x58f0, 0x88fd, 0x897f, 0x8aa0, 0x8a93,
-0x8acb, 0x901d, 0x9192, 0x9752, 0x9759, 0x6589, 0x7a0e, 0x8106,
-0x96bb, 0x5e2d, 0x60dc, 0x621a, 0x65a5, 0x6614, 0x6790, 0x77f3,
-0x7a4d, 0x7c4d, 0x7e3e, 0x810a, 0x8cac, 0x8d64, 0x8de1, 0x8e5f,
-0x78a9, 0x5207, 0x62d9, 0x63a5, 0x6442, 0x6298, 0x8a2d, 0x7a83,
-0x7bc0, 0x8aac, 0x96ea, 0x7d76, 0x820c, 0x8749, 0x4ed9, 0x5148,
-0x5343, 0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, 0x6247,
-0x64b0, 0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, 0x6f5c,
-0x714e, 0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda,
-94, 0x4121,
-0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, 0x8cce,
-0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, 0x524d,
-0x5584, 0x6f38, 0x7136, 0x5168, 0x7985, 0x7e55, 0x81b3, 0x7cce,
-0x564c, 0x5851, 0x5ca8, 0x63aa, 0x66fe, 0x66fd, 0x695a, 0x72d9,
-0x758f, 0x758e, 0x790e, 0x7956, 0x79df, 0x7c97, 0x7d20, 0x7d44,
-0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, 0x53cc,
-0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, 0x5c64,
-0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0x64cd,
-0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5, 0x4e89,
-0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061, 0x8349,
-0x8358, 0x846c, 0x84bc, 0x85fb, 0x88c5, 0x8d70, 0x9001, 0x906d,
-0x9397, 0x971c, 0x9a12, 0x50cf, 0x5897, 0x618e,
-94, 0x4221,
-0x81d3, 0x8535, 0x8d08, 0x9020, 0x4fc3, 0x5074, 0x5247, 0x5373,
-0x606f, 0x6349, 0x675f, 0x6e2c, 0x8db3, 0x901f, 0x4fd7, 0x5c5e,
-0x8cca, 0x65cf, 0x7d9a, 0x5352, 0x8896, 0x5176, 0x63c3, 0x5b58,
-0x5b6b, 0x5c0a, 0x640d, 0x6751, 0x905c, 0x4ed6, 0x591a, 0x592a,
-0x6c70, 0x8a51, 0x553e, 0x5815, 0x59a5, 0x60f0, 0x6253, 0x67c1,
-0x8235, 0x6955, 0x9640, 0x99c4, 0x9a28, 0x4f53, 0x5806, 0x5bfe,
-0x8010, 0x5cb1, 0x5e2f, 0x5f85, 0x6020, 0x614b, 0x6234, 0x66ff,
-0x6cf0, 0x6ede, 0x80ce, 0x817f, 0x82d4, 0x888b, 0x8cb8, 0x9000,
-0x902e, 0x968a, 0x9edb, 0x9bdb, 0x4ee3, 0x53f0, 0x5927, 0x7b2c,
-0x918d, 0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, 0x5b85,
-0x6258, 0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, 0x9438,
-0x6fc1, 0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea,
-94, 0x4321,
-0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, 0x7aea,
-0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, 0x4e39,
-0x5358, 0x5606, 0x5766, 0x62c5, 0x63a2, 0x65e6, 0x6b4e, 0x6de1,
-0x6e5b, 0x70ad, 0x77ed, 0x7aef, 0x7baa, 0x7dbb, 0x803d, 0x80c6,
-0x86cb, 0x8a95, 0x935b, 0x56e3, 0x58c7, 0x5f3e, 0x65ad, 0x6696,
-0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, 0x5f1b,
-0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, 0x8718,
-0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0x9010,
-0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2, 0x5b99,
-0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877, 0x8a3b,
-0x914e, 0x92f3, 0x99d0, 0x6a17, 0x7026, 0x732a, 0x82e7, 0x8457,
-0x8caf, 0x4e01, 0x5146, 0x51cb, 0x558b, 0x5bf5,
-94, 0x4421,
-0x5e16, 0x5e33, 0x5e81, 0x5f14, 0x5f35, 0x5f6b, 0x5fb4, 0x61f2,
-0x6311, 0x66a2, 0x671d, 0x6f6e, 0x7252, 0x753a, 0x773a, 0x8074,
-0x8139, 0x8178, 0x8776, 0x8abf, 0x8adc, 0x8d85, 0x8df3, 0x929a,
-0x9577, 0x9802, 0x9ce5, 0x52c5, 0x6357, 0x76f4, 0x6715, 0x6c88,
-0x73cd, 0x8cc3, 0x93ae, 0x9673, 0x6d25, 0x589c, 0x690e, 0x69cc,
-0x8ffd, 0x939a, 0x75db, 0x901a, 0x585a, 0x6802, 0x63b4, 0x69fb,
-0x4f43, 0x6f2c, 0x67d8, 0x8fbb, 0x8526, 0x7db4, 0x9354, 0x693f,
-0x6f70, 0x576a, 0x58f7, 0x5b2c, 0x7d2c, 0x722a, 0x540a, 0x91e3,
-0x9db4, 0x4ead, 0x4f4e, 0x505c, 0x5075, 0x5243, 0x8c9e, 0x5448,
-0x5824, 0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, 0x608c,
-0x62b5, 0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, 0x7a0b,
-0x7de0, 0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013,
-94, 0x4521,
-0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, 0x6575,
-0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, 0x5fb9,
-0x64a4, 0x8f4d, 0x8fed, 0x9244, 0x5178, 0x586b, 0x5929, 0x5c55,
-0x5e97, 0x6dfb, 0x7e8f, 0x751c, 0x8cbc, 0x8ee2, 0x985b, 0x70b9,
-0x4f1d, 0x6bbf, 0x6fb1, 0x7530, 0x96fb, 0x514e, 0x5410, 0x5835,
-0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, 0x767b,
-0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, 0x52aa,
-0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0x51cd,
-0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6, 0x5d8b,
-0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df, 0x76d7,
-0x6dd8, 0x6e6f, 0x6d9b, 0x706f, 0x71c8, 0x5f53, 0x75d8, 0x7977,
-0x7b49, 0x7b54, 0x7b52, 0x7cd6, 0x7d71, 0x5230,
-94, 0x4621,
-0x8463, 0x8569, 0x85e4, 0x8a0e, 0x8b04, 0x8c46, 0x8e0f, 0x9003,
-0x900f, 0x9419, 0x9676, 0x982d, 0x9a30, 0x95d8, 0x50cd, 0x52d5,
-0x540c, 0x5802, 0x5c0e, 0x61a7, 0x649e, 0x6d1e, 0x77b3, 0x7ae5,
-0x80f4, 0x8404, 0x9053, 0x9285, 0x5ce0, 0x9d07, 0x533f, 0x5f97,
-0x5fb3, 0x6d9c, 0x7279, 0x7763, 0x79bf, 0x7be4, 0x6bd2, 0x72ec,
-0x8aad, 0x6803, 0x6a61, 0x51f8, 0x7a81, 0x6934, 0x5c4a, 0x9cf6,
-0x82eb, 0x5bc5, 0x9149, 0x701e, 0x5678, 0x5c6f, 0x60c7, 0x6566,
-0x6c8c, 0x8c5a, 0x9041, 0x9813, 0x5451, 0x66c7, 0x920d, 0x5948,
-0x90a3, 0x5185, 0x4e4d, 0x51ea, 0x8599, 0x8b0e, 0x7058, 0x637a,
-0x934b, 0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, 0x8edf,
-0x96e3, 0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, 0x8cd1,
-0x8089, 0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165,
-94, 0x4721,
-0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, 0x6fe1,
-0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, 0x5ff5,
-0x637b, 0x649a, 0x71c3, 0x7c98, 0x4e43, 0x5efc, 0x4e4b, 0x57dc,
-0x56a2, 0x60a9, 0x6fc3, 0x7d0d, 0x80fd, 0x8133, 0x81bf, 0x8fb2,
-0x8997, 0x86a4, 0x5df4, 0x628a, 0x64ad, 0x8987, 0x6777, 0x6ce2,
-0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, 0x4ff3,
-0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, 0x80cc,
-0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0x6973,
-0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019, 0x877f,
-0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd, 0x67cf,
-0x6cca, 0x767d, 0x7b94, 0x7c95, 0x8236, 0x8584, 0x8feb, 0x66dd,
-0x6f20, 0x7206, 0x7e1b, 0x83ab, 0x99c1, 0x9ea6,
-94, 0x4821,
-0x51fd, 0x7bb1, 0x7872, 0x7bb8, 0x8087, 0x7b48, 0x6ae8, 0x5e61,
-0x808c, 0x7551, 0x7560, 0x516b, 0x9262, 0x6e8c, 0x767a, 0x9197,
-0x9aea, 0x4f10, 0x7f70, 0x629c, 0x7b4f, 0x95a5, 0x9ce9, 0x567a,
-0x5859, 0x86e4, 0x96bc, 0x4f34, 0x5224, 0x534a, 0x53cd, 0x53db,
-0x5e06, 0x642c, 0x6591, 0x677f, 0x6c3e, 0x6c4e, 0x7248, 0x72af,
-0x73ed, 0x7554, 0x7e41, 0x822c, 0x85e9, 0x8ca9, 0x7bc4, 0x91c6,
-0x7169, 0x9812, 0x98ef, 0x633d, 0x6669, 0x756a, 0x76e4, 0x78d0,
-0x8543, 0x86ee, 0x532a, 0x5351, 0x5426, 0x5983, 0x5e87, 0x5f7c,
-0x60b2, 0x6249, 0x6279, 0x62ab, 0x6590, 0x6bd4, 0x6ccc, 0x75b2,
-0x76ae, 0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, 0x8ab9,
-0x8cbb, 0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, 0x5c3e,
-0x5fae, 0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e,
-94, 0x4921,
-0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, 0x819d,
-0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, 0x6867,
-0x59eb, 0x5a9b, 0x7d10, 0x767e, 0x8b2c, 0x4ff5, 0x5f6a, 0x6a19,
-0x6c37, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8a55, 0x8c79, 0x5edf,
-0x63cf, 0x75c5, 0x79d2, 0x82d7, 0x9328, 0x92f2, 0x849c, 0x86ed,
-0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, 0x8cd3,
-0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, 0x5a66,
-0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0x65a7,
-0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299, 0x8b5c,
-0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab, 0x6b66,
-0x821e, 0x8461, 0x856a, 0x90e8, 0x5c01, 0x6953, 0x98a8, 0x847a,
-0x8557, 0x4f0f, 0x526f, 0x5fa9, 0x5e45, 0x670d,
-94, 0x4a21,
-0x798f, 0x8179, 0x8907, 0x8986, 0x6df5, 0x5f17, 0x6255, 0x6cb8,
-0x4ecf, 0x7269, 0x9b92, 0x5206, 0x543b, 0x5674, 0x58b3, 0x61a4,
-0x626e, 0x711a, 0x596e, 0x7c89, 0x7cde, 0x7d1b, 0x96f0, 0x6587,
-0x805e, 0x4e19, 0x4f75, 0x5175, 0x5840, 0x5e63, 0x5e73, 0x5f0a,
-0x67c4, 0x4e26, 0x853d, 0x9589, 0x965b, 0x7c73, 0x9801, 0x50fb,
-0x58c1, 0x7656, 0x78a7, 0x5225, 0x77a5, 0x8511, 0x7b86, 0x504f,
-0x5909, 0x7247, 0x7bc7, 0x7de8, 0x8fba, 0x8fd4, 0x904d, 0x4fbf,
-0x52c9, 0x5a29, 0x5f01, 0x97ad, 0x4fdd, 0x8217, 0x92ea, 0x5703,
-0x6355, 0x6b69, 0x752b, 0x88dc, 0x8f14, 0x7a42, 0x52df, 0x5893,
-0x6155, 0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, 0x4ff8,
-0x5305, 0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, 0x5d29,
-0x5e96, 0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b,
-94, 0x4b21,
-0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, 0x840c,
-0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, 0x98fd,
-0x9cf3, 0x9d6c, 0x4e4f, 0x4ea1, 0x508d, 0x5256, 0x574a, 0x59a8,
-0x5e3d, 0x5fd8, 0x5fd9, 0x623f, 0x66b4, 0x671b, 0x67d0, 0x68d2,
-0x5192, 0x7d21, 0x80aa, 0x81a8, 0x8b00, 0x8c8c, 0x8cbf, 0x927e,
-0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, 0x64b2,
-0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, 0x6b86,
-0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0x6469,
-0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a, 0x6bce,
-0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe, 0x9c52,
-0x685d, 0x4ea6, 0x4fe3, 0x53c8, 0x62b9, 0x672b, 0x6cab, 0x8fc4,
-0x4fad, 0x7e6d, 0x9ebf, 0x4e07, 0x6162, 0x6e80,
-94, 0x4c21,
-0x6f2b, 0x8513, 0x5473, 0x672a, 0x9b45, 0x5df3, 0x7b95, 0x5cac,
-0x5bc6, 0x871c, 0x6e4a, 0x84d1, 0x7a14, 0x8108, 0x5999, 0x7c8d,
-0x6c11, 0x7720, 0x52d9, 0x5922, 0x7121, 0x725f, 0x77db, 0x9727,
-0x9d61, 0x690b, 0x5a7f, 0x5a18, 0x51a5, 0x540d, 0x547d, 0x660e,
-0x76df, 0x8ff7, 0x9298, 0x9cf4, 0x59ea, 0x725d, 0x6ec5, 0x514d,
-0x68c9, 0x7dbf, 0x7dec, 0x9762, 0x9eba, 0x6478, 0x6a21, 0x8302,
-0x5984, 0x5b5f, 0x6bdb, 0x731b, 0x76f2, 0x7db2, 0x8017, 0x8499,
-0x5132, 0x6728, 0x9ed9, 0x76ee, 0x6762, 0x52ff, 0x9905, 0x5c24,
-0x623b, 0x7c7e, 0x8cb0, 0x554f, 0x60b6, 0x7d0b, 0x9580, 0x5301,
-0x4e5f, 0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, 0x77e2,
-0x5384, 0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, 0x67f3,
-0x85ae, 0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652,
-94, 0x4d21,
-0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, 0x5ba5,
-0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, 0x6d8c,
-0x7336, 0x7337, 0x7531, 0x7950, 0x88d5, 0x8a98, 0x904a, 0x9091,
-0x90f5, 0x96c4, 0x878d, 0x5915, 0x4e88, 0x4f59, 0x4e0e, 0x8a89,
-0x8f3f, 0x9810, 0x50ad, 0x5e7c, 0x5996, 0x5bb9, 0x5eb8, 0x63da,
-0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, 0x7194,
-0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, 0x8b21,
-0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0x6c83,
-0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8, 0x6765,
-0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a, 0x4e71,
-0x5375, 0x5d50, 0x6b04, 0x6feb, 0x85cd, 0x862d, 0x89a7, 0x5229,
-0x540f, 0x5c65, 0x674e, 0x68a8, 0x7406, 0x7483,
-94, 0x4e21,
-0x75e2, 0x88cf, 0x88e1, 0x91cc, 0x96e2, 0x9678, 0x5f8b, 0x7387,
-0x7acb, 0x844e, 0x63a0, 0x7565, 0x5289, 0x6d41, 0x6e9c, 0x7409,
-0x7559, 0x786b, 0x7c92, 0x9686, 0x7adc, 0x9f8d, 0x4fb6, 0x616e,
-0x65c5, 0x865c, 0x4e86, 0x4eae, 0x50da, 0x4e21, 0x51cc, 0x5bee,
-0x6599, 0x6881, 0x6dbc, 0x731f, 0x7642, 0x77ad, 0x7a1c, 0x7ce7,
-0x826f, 0x8ad2, 0x907c, 0x91cf, 0x9675, 0x9818, 0x529b, 0x7dd1,
-0x502b, 0x5398, 0x6797, 0x6dcb, 0x71d0, 0x7433, 0x81e8, 0x8f2a,
-0x96a3, 0x9c57, 0x9e9f, 0x7460, 0x5841, 0x6d99, 0x7d2f, 0x985e,
-0x4ee4, 0x4f36, 0x4f8b, 0x51b7, 0x52b1, 0x5dba, 0x601c, 0x73b2,
-0x793c, 0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, 0x9f62,
-0x66a6, 0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, 0x604b,
-0x6190, 0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f,
-51, 0x4f21,
-0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, 0x8cc2,
-0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, 0x697c,
-0x6994, 0x6d6a, 0x6f0f, 0x7262, 0x72fc, 0x7bed, 0x8001, 0x807e,
-0x874b, 0x90ce, 0x516d, 0x9e93, 0x7984, 0x808b, 0x9332, 0x8ad6,
-0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, 0x67a0,
-0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, 0x6900,
-0x6e7e, 0x7897, 0x8155,
-94, 0x5021,
-0x5f0c, 0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, 0x4e3f,
-0x4e42, 0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, 0x8212,
-0x5f0d, 0x4e8e, 0x4e9e, 0x4e9f, 0x4ea0, 0x4ea2, 0x4eb0, 0x4eb3,
-0x4eb6, 0x4ece, 0x4ecd, 0x4ec4, 0x4ec6, 0x4ec2, 0x4ed7, 0x4ede,
-0x4eed, 0x4edf, 0x4ef7, 0x4f09, 0x4f5a, 0x4f30, 0x4f5b, 0x4f5d,
-0x4f57, 0x4f47, 0x4f76, 0x4f88, 0x4f8f, 0x4f98, 0x4f7b, 0x4f69,
-0x4f70, 0x4f91, 0x4f6f, 0x4f86, 0x4f96, 0x5118, 0x4fd4, 0x4fdf,
-0x4fce, 0x4fd8, 0x4fdb, 0x4fd1, 0x4fda, 0x4fd0, 0x4fe4, 0x4fe5,
-0x501a, 0x5028, 0x5014, 0x502a, 0x5025, 0x5005, 0x4f1c, 0x4ff6,
-0x5021, 0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, 0x5043,
-0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, 0x506c,
-0x5078, 0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2,
-94, 0x5121,
-0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, 0x50ed,
-0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, 0x5116,
-0x5115, 0x5114, 0x511a, 0x5121, 0x513a, 0x5137, 0x513c, 0x513b,
-0x513f, 0x5140, 0x5152, 0x514c, 0x5154, 0x5162, 0x7af8, 0x5169,
-0x516a, 0x516e, 0x5180, 0x5182, 0x56d8, 0x518c, 0x5189, 0x518f,
-0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, 0x51a9,
-0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, 0x51bd,
-0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0x51f0,
-0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227, 0x522a,
-0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c, 0x525e,
-0x5254, 0x526a, 0x5274, 0x5269, 0x5273, 0x527f, 0x527d, 0x528d,
-0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8fa8,
-94, 0x5221,
-0x8fa7, 0x52ac, 0x52ad, 0x52bc, 0x52b5, 0x52c1, 0x52cd, 0x52d7,
-0x52de, 0x52e3, 0x52e6, 0x98ed, 0x52e0, 0x52f3, 0x52f5, 0x52f8,
-0x52f9, 0x5306, 0x5308, 0x7538, 0x530d, 0x5310, 0x530f, 0x5315,
-0x531a, 0x5323, 0x532f, 0x5331, 0x5333, 0x5338, 0x5340, 0x5346,
-0x5345, 0x4e17, 0x5349, 0x534d, 0x51d6, 0x535e, 0x5369, 0x536e,
-0x5918, 0x537b, 0x5377, 0x5382, 0x5396, 0x53a0, 0x53a6, 0x53a5,
-0x53ae, 0x53b0, 0x53b6, 0x53c3, 0x7c12, 0x96d9, 0x53df, 0x66fc,
-0x71ee, 0x53ee, 0x53e8, 0x53ed, 0x53fa, 0x5401, 0x543d, 0x5440,
-0x542c, 0x542d, 0x543c, 0x542e, 0x5436, 0x5429, 0x541d, 0x544e,
-0x548f, 0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, 0x5492,
-0x547b, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, 0x54a2,
-0x54b8, 0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8,
-94, 0x5321,
-0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, 0x54e6,
-0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, 0x5539,
-0x5540, 0x5563, 0x554c, 0x552e, 0x555c, 0x5545, 0x5556, 0x5557,
-0x5538, 0x5533, 0x555d, 0x5599, 0x5580, 0x54af, 0x558a, 0x559f,
-0x557b, 0x557e, 0x5598, 0x559e, 0x55ae, 0x557c, 0x5583, 0x55a9,
-0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, 0x55e4,
-0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, 0x55f9,
-0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0x566b,
-0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a, 0x56a0,
-0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2, 0x56bc,
-0x56c1, 0x56c3, 0x56c0, 0x56c8, 0x56ce, 0x56d1, 0x56d3, 0x56d7,
-0x56ee, 0x56f9, 0x5700, 0x56ff, 0x5704, 0x5709,
-94, 0x5421,
-0x5708, 0x570b, 0x570d, 0x5713, 0x5718, 0x5716, 0x55c7, 0x571c,
-0x5726, 0x5737, 0x5738, 0x574e, 0x573b, 0x5740, 0x574f, 0x5769,
-0x57c0, 0x5788, 0x5761, 0x577f, 0x5789, 0x5793, 0x57a0, 0x57b3,
-0x57a4, 0x57aa, 0x57b0, 0x57c3, 0x57c6, 0x57d4, 0x57d2, 0x57d3,
-0x580a, 0x57d6, 0x57e3, 0x580b, 0x5819, 0x581d, 0x5872, 0x5821,
-0x5862, 0x584b, 0x5870, 0x6bc0, 0x5852, 0x583d, 0x5879, 0x5885,
-0x58b9, 0x589f, 0x58ab, 0x58ba, 0x58de, 0x58bb, 0x58b8, 0x58ae,
-0x58c5, 0x58d3, 0x58d1, 0x58d7, 0x58d9, 0x58d8, 0x58e5, 0x58dc,
-0x58e4, 0x58df, 0x58ef, 0x58fa, 0x58f9, 0x58fb, 0x58fc, 0x58fd,
-0x5902, 0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, 0x592d,
-0x5932, 0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, 0x595a,
-0x5958, 0x5962, 0x5960, 0x5967, 0x596c, 0x5969,
-94, 0x5521,
-0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, 0x59c6,
-0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, 0x5a11,
-0x5a1c, 0x5a09, 0x5a1a, 0x5a40, 0x5a6c, 0x5a49, 0x5a35, 0x5a36,
-0x5a62, 0x5a6a, 0x5a9a, 0x5abc, 0x5abe, 0x5acb, 0x5ac2, 0x5abd,
-0x5ae3, 0x5ad7, 0x5ae6, 0x5ae9, 0x5ad6, 0x5afa, 0x5afb, 0x5b0c,
-0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, 0x5b43,
-0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, 0x5b69,
-0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0x5b83,
-0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0, 0x5be4,
-0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6, 0x5bf3,
-0x5c05, 0x5c07, 0x5c08, 0x5c0d, 0x5c13, 0x5c20, 0x5c22, 0x5c28,
-0x5c38, 0x5c39, 0x5c41, 0x5c46, 0x5c4e, 0x5c53,
-94, 0x5621,
-0x5c50, 0x5c4f, 0x5b71, 0x5c6c, 0x5c6e, 0x4e62, 0x5c76, 0x5c79,
-0x5c8c, 0x5c91, 0x5c94, 0x599b, 0x5cab, 0x5cbb, 0x5cb6, 0x5cbc,
-0x5cb7, 0x5cc5, 0x5cbe, 0x5cc7, 0x5cd9, 0x5ce9, 0x5cfd, 0x5cfa,
-0x5ced, 0x5d8c, 0x5cea, 0x5d0b, 0x5d15, 0x5d17, 0x5d5c, 0x5d1f,
-0x5d1b, 0x5d11, 0x5d14, 0x5d22, 0x5d1a, 0x5d19, 0x5d18, 0x5d4c,
-0x5d52, 0x5d4e, 0x5d4b, 0x5d6c, 0x5d73, 0x5d76, 0x5d87, 0x5d84,
-0x5d82, 0x5da2, 0x5d9d, 0x5dac, 0x5dae, 0x5dbd, 0x5d90, 0x5db7,
-0x5dbc, 0x5dc9, 0x5dcd, 0x5dd3, 0x5dd2, 0x5dd6, 0x5ddb, 0x5deb,
-0x5df2, 0x5df5, 0x5e0b, 0x5e1a, 0x5e19, 0x5e11, 0x5e1b, 0x5e36,
-0x5e37, 0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, 0x5e5f,
-0x5e62, 0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, 0x5e7f,
-0x5ea0, 0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf,
-94, 0x5721,
-0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, 0x5ee8,
-0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, 0x5efe,
-0x5f03, 0x5f09, 0x5f5d, 0x5f5c, 0x5f0b, 0x5f11, 0x5f16, 0x5f29,
-0x5f2d, 0x5f38, 0x5f41, 0x5f48, 0x5f4c, 0x5f4e, 0x5f2f, 0x5f51,
-0x5f56, 0x5f57, 0x5f59, 0x5f61, 0x5f6d, 0x5f73, 0x5f77, 0x5f83,
-0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, 0x5f99,
-0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, 0x5fe4,
-0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0x6019,
-0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b, 0x6026,
-0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f, 0x604a,
-0x6046, 0x604d, 0x6063, 0x6043, 0x6064, 0x6042, 0x606c, 0x606b,
-0x6059, 0x6081, 0x608d, 0x60e7, 0x6083, 0x609a,
-94, 0x5821,
-0x6084, 0x609b, 0x6096, 0x6097, 0x6092, 0x60a7, 0x608b, 0x60e1,
-0x60b8, 0x60e0, 0x60d3, 0x60b4, 0x5ff0, 0x60bd, 0x60c6, 0x60b5,
-0x60d8, 0x614d, 0x6115, 0x6106, 0x60f6, 0x60f7, 0x6100, 0x60f4,
-0x60fa, 0x6103, 0x6121, 0x60fb, 0x60f1, 0x610d, 0x610e, 0x6147,
-0x613e, 0x6128, 0x6127, 0x614a, 0x613f, 0x613c, 0x612c, 0x6134,
-0x613d, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, 0x615a,
-0x616b, 0x6174, 0x616f, 0x6165, 0x6171, 0x615f, 0x615d, 0x6153,
-0x6175, 0x6199, 0x6196, 0x6187, 0x61ac, 0x6194, 0x619a, 0x618a,
-0x6191, 0x61ab, 0x61ae, 0x61cc, 0x61ca, 0x61c9, 0x61f7, 0x61c8,
-0x61c3, 0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, 0x61e3,
-0x61f6, 0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, 0x6200,
-0x6208, 0x6209, 0x620d, 0x620c, 0x6214, 0x621b,
-94, 0x5921,
-0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, 0x6241,
-0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, 0x6282,
-0x6289, 0x627e, 0x6292, 0x6293, 0x6296, 0x62d4, 0x6283, 0x6294,
-0x62d7, 0x62d1, 0x62bb, 0x62cf, 0x62ff, 0x62c6, 0x64d4, 0x62c8,
-0x62dc, 0x62cc, 0x62ca, 0x62c2, 0x62c7, 0x629b, 0x62c9, 0x630c,
-0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, 0x6350,
-0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, 0x63ab,
-0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0x6369,
-0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2, 0x63f6,
-0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, 0x651d,
-0x6417, 0x6428, 0x640f, 0x6467, 0x646f, 0x6476, 0x644e, 0x652a,
-0x6495, 0x6493, 0x64a5, 0x64a9, 0x6488, 0x64bc,
-94, 0x5a21,
-0x64da, 0x64d2, 0x64c5, 0x64c7, 0x64bb, 0x64d8, 0x64c2, 0x64f1,
-0x64e7, 0x8209, 0x64e0, 0x64e1, 0x62ac, 0x64e3, 0x64ef, 0x652c,
-0x64f6, 0x64f4, 0x64f2, 0x64fa, 0x6500, 0x64fd, 0x6518, 0x651c,
-0x6505, 0x6524, 0x6523, 0x652b, 0x6534, 0x6535, 0x6537, 0x6536,
-0x6538, 0x754b, 0x6548, 0x6556, 0x6555, 0x654d, 0x6558, 0x655e,
-0x655d, 0x6572, 0x6578, 0x6582, 0x6583, 0x8b8a, 0x659b, 0x659f,
-0x65ab, 0x65b7, 0x65c3, 0x65c6, 0x65c1, 0x65c4, 0x65cc, 0x65d2,
-0x65db, 0x65d9, 0x65e0, 0x65e1, 0x65f1, 0x6772, 0x660a, 0x6603,
-0x65fb, 0x6773, 0x6635, 0x6636, 0x6634, 0x661c, 0x664f, 0x6644,
-0x6649, 0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, 0x665f,
-0x6662, 0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, 0x6698,
-0x669d, 0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc,
-94, 0x5b21,
-0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, 0x66e9,
-0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, 0x6727,
-0x9738, 0x672e, 0x673f, 0x6736, 0x6741, 0x6738, 0x6737, 0x6746,
-0x675e, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, 0x67a9,
-0x677c, 0x676a, 0x678c, 0x678b, 0x67a6, 0x67a1, 0x6785, 0x67b7,
-0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, 0x67de,
-0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, 0x6a9c,
-0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0x68b3,
-0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f, 0x68ad,
-0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874, 0x68b5,
-0x68a0, 0x68ba, 0x690f, 0x688d, 0x687e, 0x6901, 0x68ca, 0x6908,
-0x68d8, 0x6922, 0x6926, 0x68e1, 0x690c, 0x68cd,
-94, 0x5c21,
-0x68d4, 0x68e7, 0x68d5, 0x6936, 0x6912, 0x6904, 0x68d7, 0x68e3,
-0x6925, 0x68f9, 0x68e0, 0x68ef, 0x6928, 0x692a, 0x691a, 0x6923,
-0x6921, 0x68c6, 0x6979, 0x6977, 0x695c, 0x6978, 0x696b, 0x6954,
-0x697e, 0x696e, 0x6939, 0x6974, 0x693d, 0x6959, 0x6930, 0x6961,
-0x695e, 0x695d, 0x6981, 0x696a, 0x69b2, 0x69ae, 0x69d0, 0x69bf,
-0x69c1, 0x69d3, 0x69be, 0x69ce, 0x5be8, 0x69ca, 0x69dd, 0x69bb,
-0x69c3, 0x69a7, 0x6a2e, 0x6991, 0x69a0, 0x699c, 0x6995, 0x69b4,
-0x69de, 0x69e8, 0x6a02, 0x6a1b, 0x69ff, 0x6b0a, 0x69f9, 0x69f2,
-0x69e7, 0x6a05, 0x69b1, 0x6a1e, 0x69ed, 0x6a14, 0x69eb, 0x6a0a,
-0x6a12, 0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, 0x6a36,
-0x6a78, 0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, 0x6a22,
-0x6a90, 0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3,
-94, 0x5d21,
-0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, 0x6aac,
-0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, 0x6b05,
-0x8616, 0x6afa, 0x6b12, 0x6b16, 0x9b31, 0x6b1f, 0x6b38, 0x6b37,
-0x76dc, 0x6b39, 0x98ee, 0x6b47, 0x6b43, 0x6b49, 0x6b50, 0x6b59,
-0x6b54, 0x6b5b, 0x6b5f, 0x6b61, 0x6b78, 0x6b79, 0x6b7f, 0x6b80,
-0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, 0x6baa,
-0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, 0x6bc6,
-0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0x9ebe,
-0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e, 0x6c55,
-0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b, 0x6c7e,
-0x6c68, 0x6c73, 0x6c92, 0x6c90, 0x6cc4, 0x6cf1, 0x6cd3, 0x6cbd,
-0x6cd7, 0x6cc5, 0x6cdd, 0x6cae, 0x6cb1, 0x6cbe,
-94, 0x5e21,
-0x6cba, 0x6cdb, 0x6cef, 0x6cd9, 0x6cea, 0x6d1f, 0x884d, 0x6d36,
-0x6d2b, 0x6d3d, 0x6d38, 0x6d19, 0x6d35, 0x6d33, 0x6d12, 0x6d0c,
-0x6d63, 0x6d93, 0x6d64, 0x6d5a, 0x6d79, 0x6d59, 0x6d8e, 0x6d95,
-0x6fe4, 0x6d85, 0x6df9, 0x6e15, 0x6e0a, 0x6db5, 0x6dc7, 0x6de6,
-0x6db8, 0x6dc6, 0x6dec, 0x6dde, 0x6dcc, 0x6de8, 0x6dd2, 0x6dc5,
-0x6dfa, 0x6dd9, 0x6de4, 0x6dd5, 0x6dea, 0x6dee, 0x6e2d, 0x6e6e,
-0x6e2e, 0x6e19, 0x6e72, 0x6e5f, 0x6e3e, 0x6e23, 0x6e6b, 0x6e2b,
-0x6e76, 0x6e4d, 0x6e1f, 0x6e43, 0x6e3a, 0x6e4e, 0x6e24, 0x6eff,
-0x6e1d, 0x6e38, 0x6e82, 0x6eaa, 0x6e98, 0x6ec9, 0x6eb7, 0x6ed3,
-0x6ebd, 0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, 0x6ea5,
-0x6ec2, 0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, 0x6efe,
-0x6f3f, 0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc,
-94, 0x5f21,
-0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, 0x6f80,
-0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, 0x6f8e,
-0x6f91, 0x6fc2, 0x6f66, 0x6fb3, 0x6fa3, 0x6fa1, 0x6fa4, 0x6fb9,
-0x6fc6, 0x6faa, 0x6fdf, 0x6fd5, 0x6fec, 0x6fd4, 0x6fd8, 0x6ff1,
-0x6fee, 0x6fdb, 0x7009, 0x700b, 0x6ffa, 0x7011, 0x7001, 0x700f,
-0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, 0x7030,
-0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, 0x70f1,
-0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0x70d9,
-0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188, 0x7166,
-0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184, 0x7195,
-0x71a8, 0x71ac, 0x71d7, 0x71b9, 0x71be, 0x71d2, 0x71c9, 0x71d4,
-0x71ce, 0x71e0, 0x71ec, 0x71e7, 0x71f5, 0x71fc,
-94, 0x6021,
-0x71f9, 0x71ff, 0x720d, 0x7210, 0x721b, 0x7228, 0x722d, 0x722c,
-0x7230, 0x7232, 0x723b, 0x723c, 0x723f, 0x7240, 0x7246, 0x724b,
-0x7258, 0x7274, 0x727e, 0x7282, 0x7281, 0x7287, 0x7292, 0x7296,
-0x72a2, 0x72a7, 0x72b9, 0x72b2, 0x72c3, 0x72c6, 0x72c4, 0x72ce,
-0x72d2, 0x72e2, 0x72e0, 0x72e1, 0x72f9, 0x72f7, 0x500f, 0x7317,
-0x730a, 0x731c, 0x7316, 0x731d, 0x7334, 0x732f, 0x7329, 0x7325,
-0x733e, 0x734e, 0x734f, 0x9ed8, 0x7357, 0x736a, 0x7368, 0x7370,
-0x7378, 0x7375, 0x737b, 0x737a, 0x73c8, 0x73b3, 0x73ce, 0x73bb,
-0x73c0, 0x73e5, 0x73ee, 0x73de, 0x74a2, 0x7405, 0x746f, 0x7425,
-0x73f8, 0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, 0x7441,
-0x745c, 0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, 0x748b,
-0x749e, 0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1,
-94, 0x6121,
-0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, 0x74f1,
-0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, 0x750d,
-0x7515, 0x7513, 0x751e, 0x7526, 0x752c, 0x753c, 0x7544, 0x754d,
-0x754a, 0x7549, 0x755b, 0x7546, 0x755a, 0x7569, 0x7564, 0x7567,
-0x756b, 0x756d, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, 0x758a,
-0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, 0x75c2,
-0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, 0x75cd,
-0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0x75fc,
-0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d, 0x7609,
-0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, 0x7630,
-0x763b, 0x7647, 0x7648, 0x7646, 0x765c, 0x7658, 0x7661, 0x7662,
-0x7668, 0x7669, 0x766a, 0x7667, 0x766c, 0x7670,
-94, 0x6221,
-0x7672, 0x7676, 0x7678, 0x767c, 0x7680, 0x7683, 0x7688, 0x768b,
-0x768e, 0x7696, 0x7693, 0x7699, 0x769a, 0x76b0, 0x76b4, 0x76b8,
-0x76b9, 0x76ba, 0x76c2, 0x76cd, 0x76d6, 0x76d2, 0x76de, 0x76e1,
-0x76e5, 0x76e7, 0x76ea, 0x862f, 0x76fb, 0x7708, 0x7707, 0x7704,
-0x7729, 0x7724, 0x771e, 0x7725, 0x7726, 0x771b, 0x7737, 0x7738,
-0x7747, 0x775a, 0x7768, 0x776b, 0x775b, 0x7765, 0x777f, 0x777e,
-0x7779, 0x778e, 0x778b, 0x7791, 0x77a0, 0x779e, 0x77b0, 0x77b6,
-0x77b9, 0x77bf, 0x77bc, 0x77bd, 0x77bb, 0x77c7, 0x77cd, 0x77d7,
-0x77da, 0x77dc, 0x77e3, 0x77ee, 0x77fc, 0x780c, 0x7812, 0x7926,
-0x7820, 0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, 0x789a,
-0x788c, 0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, 0x78cb,
-0x78d4, 0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec,
-94, 0x6321,
-0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, 0x7919,
-0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, 0x7955,
-0x7953, 0x797a, 0x797f, 0x798a, 0x799d, 0x79a7, 0x9f4b, 0x79aa,
-0x79ae, 0x79b3, 0x79b9, 0x79ba, 0x79c9, 0x79d5, 0x79e7, 0x79ec,
-0x79e1, 0x79e3, 0x7a08, 0x7a0d, 0x7a18, 0x7a19, 0x7a20, 0x7a1f,
-0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, 0x7a49,
-0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, 0x7a88,
-0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0x7ab6,
-0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd, 0x7acf,
-0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2, 0x7ae6,
-0x7aed, 0x7af0, 0x7b02, 0x7b0f, 0x7b0a, 0x7b06, 0x7b33, 0x7b18,
-0x7b19, 0x7b1e, 0x7b35, 0x7b28, 0x7b36, 0x7b50,
-94, 0x6421,
-0x7b7a, 0x7b04, 0x7b4d, 0x7b0b, 0x7b4c, 0x7b45, 0x7b75, 0x7b65,
-0x7b74, 0x7b67, 0x7b70, 0x7b71, 0x7b6c, 0x7b6e, 0x7b9d, 0x7b98,
-0x7b9f, 0x7b8d, 0x7b9c, 0x7b9a, 0x7b8b, 0x7b92, 0x7b8f, 0x7b5d,
-0x7b99, 0x7bcb, 0x7bc1, 0x7bcc, 0x7bcf, 0x7bb4, 0x7bc6, 0x7bdd,
-0x7be9, 0x7c11, 0x7c14, 0x7be6, 0x7be5, 0x7c60, 0x7c00, 0x7c07,
-0x7c13, 0x7bf3, 0x7bf7, 0x7c17, 0x7c0d, 0x7bf6, 0x7c23, 0x7c27,
-0x7c2a, 0x7c1f, 0x7c37, 0x7c2b, 0x7c3d, 0x7c4c, 0x7c43, 0x7c54,
-0x7c4f, 0x7c40, 0x7c50, 0x7c58, 0x7c5f, 0x7c64, 0x7c56, 0x7c65,
-0x7c6c, 0x7c75, 0x7c83, 0x7c90, 0x7ca4, 0x7cad, 0x7ca2, 0x7cab,
-0x7ca1, 0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, 0x7cbd,
-0x7cc0, 0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, 0x9b3b,
-0x7cef, 0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06,
-94, 0x6521,
-0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, 0x7d32,
-0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, 0x7d68,
-0x7d6e, 0x7d4f, 0x7d63, 0x7d93, 0x7d89, 0x7d5b, 0x7d8f, 0x7d7d,
-0x7d9b, 0x7dba, 0x7dae, 0x7da3, 0x7db5, 0x7dc7, 0x7dbd, 0x7dab,
-0x7e3d, 0x7da2, 0x7daf, 0x7ddc, 0x7db8, 0x7d9f, 0x7db0, 0x7dd8,
-0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, 0x7e0a,
-0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, 0x7e22,
-0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0x7e32,
-0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a, 0x7e79,
-0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d, 0x8fae,
-0x7e7f, 0x7e88, 0x7e89, 0x7e8c, 0x7e92, 0x7e90, 0x7e93, 0x7e94,
-0x7e96, 0x7e8e, 0x7e9b, 0x7e9c, 0x7f38, 0x7f3a,
-94, 0x6621,
-0x7f45, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f50, 0x7f51, 0x7f55, 0x7f54,
-0x7f58, 0x7f5f, 0x7f60, 0x7f68, 0x7f69, 0x7f67, 0x7f78, 0x7f82,
-0x7f86, 0x7f83, 0x7f88, 0x7f87, 0x7f8c, 0x7f94, 0x7f9e, 0x7f9d,
-0x7f9a, 0x7fa3, 0x7faf, 0x7fb2, 0x7fb9, 0x7fae, 0x7fb6, 0x7fb8,
-0x8b71, 0x7fc5, 0x7fc6, 0x7fca, 0x7fd5, 0x7fd4, 0x7fe1, 0x7fe6,
-0x7fe9, 0x7ff3, 0x7ff9, 0x98dc, 0x8006, 0x8004, 0x800b, 0x8012,
-0x8018, 0x8019, 0x801c, 0x8021, 0x8028, 0x803f, 0x803b, 0x804a,
-0x8046, 0x8052, 0x8058, 0x805a, 0x805f, 0x8062, 0x8068, 0x8073,
-0x8072, 0x8070, 0x8076, 0x8079, 0x807d, 0x807f, 0x8084, 0x8086,
-0x8085, 0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, 0x80db,
-0x80e5, 0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, 0x80ef,
-0x80f1, 0x811b, 0x8129, 0x8123, 0x812f, 0x814b,
-94, 0x6721,
-0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, 0x816e,
-0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, 0x8182,
-0x81a0, 0x8195, 0x81a4, 0x81a3, 0x815f, 0x8193, 0x81a9, 0x81b0,
-0x81b5, 0x81be, 0x81b8, 0x81bd, 0x81c0, 0x81c2, 0x81ba, 0x81c9,
-0x81cd, 0x81d1, 0x81d9, 0x81d8, 0x81c8, 0x81da, 0x81df, 0x81e0,
-0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, 0x8207,
-0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, 0x8233,
-0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0x8262,
-0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278, 0x827e,
-0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1, 0x82e3,
-0x82df, 0x82d2, 0x82f4, 0x82f3, 0x82fa, 0x8393, 0x8303, 0x82fb,
-0x82f9, 0x82de, 0x8306, 0x82dc, 0x8309, 0x82d9,
-94, 0x6821,
-0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, 0x8350,
-0x8345, 0x832f, 0x832b, 0x8317, 0x8318, 0x8385, 0x839a, 0x83aa,
-0x839f, 0x83a2, 0x8396, 0x8323, 0x838e, 0x8387, 0x838a, 0x837c,
-0x83b5, 0x8373, 0x8375, 0x83a0, 0x8389, 0x83a8, 0x83f4, 0x8413,
-0x83eb, 0x83ce, 0x83fd, 0x8403, 0x83d8, 0x840b, 0x83c1, 0x83f7,
-0x8407, 0x83e0, 0x83f2, 0x840d, 0x8422, 0x8420, 0x83bd, 0x8438,
-0x8506, 0x83fb, 0x846d, 0x842a, 0x843c, 0x855a, 0x8484, 0x8477,
-0x846b, 0x84ad, 0x846e, 0x8482, 0x8469, 0x8446, 0x842c, 0x846f,
-0x8479, 0x8435, 0x84ca, 0x8462, 0x84b9, 0x84bf, 0x849f, 0x84d9,
-0x84cd, 0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, 0x84a1,
-0x8521, 0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, 0x8515,
-0x8514, 0x84fc, 0x8540, 0x8563, 0x8558, 0x8548,
-94, 0x6921,
-0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, 0x8591,
-0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, 0x859c,
-0x8577, 0x857e, 0x8590, 0x85c9, 0x85ba, 0x85cf, 0x85b9, 0x85d0,
-0x85d5, 0x85dd, 0x85e5, 0x85dc, 0x85f9, 0x860a, 0x8613, 0x860b,
-0x85fe, 0x85fa, 0x8606, 0x8622, 0x861a, 0x8630, 0x863f, 0x864d,
-0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, 0x86a9,
-0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, 0x86b0,
-0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0x86df,
-0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, 0x86fb,
-0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f, 0x8737,
-0x873b, 0x8725, 0x8729, 0x871a, 0x8760, 0x875f, 0x8778, 0x874c,
-0x874e, 0x8774, 0x8757, 0x8768, 0x876e, 0x8759,
-94, 0x6a21,
-0x8753, 0x8763, 0x876a, 0x8805, 0x87a2, 0x879f, 0x8782, 0x87af,
-0x87cb, 0x87bd, 0x87c0, 0x87d0, 0x96d6, 0x87ab, 0x87c4, 0x87b3,
-0x87c7, 0x87c6, 0x87bb, 0x87ef, 0x87f2, 0x87e0, 0x880f, 0x880d,
-0x87fe, 0x87f6, 0x87f7, 0x880e, 0x87d2, 0x8811, 0x8816, 0x8815,
-0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883b, 0x8844,
-0x8842, 0x8852, 0x8859, 0x885e, 0x8862, 0x886b, 0x8881, 0x887e,
-0x889e, 0x8875, 0x887d, 0x88b5, 0x8872, 0x8882, 0x8897, 0x8892,
-0x88ae, 0x8899, 0x88a2, 0x888d, 0x88a4, 0x88b0, 0x88bf, 0x88b1,
-0x88c3, 0x88c4, 0x88d4, 0x88d8, 0x88d9, 0x88dd, 0x88f9, 0x8902,
-0x88fc, 0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, 0x8913,
-0x8943, 0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, 0x893b,
-0x8936, 0x8938, 0x894c, 0x891d, 0x8960, 0x895e,
-94, 0x6b21,
-0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, 0x897e,
-0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, 0x89a6,
-0x89ac, 0x89af, 0x89b2, 0x89ba, 0x89bd, 0x89bf, 0x89c0, 0x89da,
-0x89dc, 0x89dd, 0x89e7, 0x89f4, 0x89f8, 0x8a03, 0x8a16, 0x8a10,
-0x8a0c, 0x8a1b, 0x8a1d, 0x8a25, 0x8a36, 0x8a41, 0x8a5b, 0x8a52,
-0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, 0x8a82,
-0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, 0x8aa3,
-0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0x8ae4,
-0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb, 0x8b0c,
-0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20, 0x8b33,
-0x97ab, 0x8b26, 0x8b2b, 0x8b3e, 0x8b28, 0x8b41, 0x8b4c, 0x8b4f,
-0x8b4e, 0x8b49, 0x8b56, 0x8b5b, 0x8b5a, 0x8b6b,
-94, 0x6c21,
-0x8b5f, 0x8b6c, 0x8b6f, 0x8b74, 0x8b7d, 0x8b80, 0x8b8c, 0x8b8e,
-0x8b92, 0x8b93, 0x8b96, 0x8b99, 0x8b9a, 0x8c3a, 0x8c41, 0x8c3f,
-0x8c48, 0x8c4c, 0x8c4e, 0x8c50, 0x8c55, 0x8c62, 0x8c6c, 0x8c78,
-0x8c7a, 0x8c82, 0x8c89, 0x8c85, 0x8c8a, 0x8c8d, 0x8c8e, 0x8c94,
-0x8c7c, 0x8c98, 0x621d, 0x8cad, 0x8caa, 0x8cbd, 0x8cb2, 0x8cb3,
-0x8cae, 0x8cb6, 0x8cc8, 0x8cc1, 0x8ce4, 0x8ce3, 0x8cda, 0x8cfd,
-0x8cfa, 0x8cfb, 0x8d04, 0x8d05, 0x8d0a, 0x8d07, 0x8d0f, 0x8d0d,
-0x8d10, 0x9f4e, 0x8d13, 0x8ccd, 0x8d14, 0x8d16, 0x8d67, 0x8d6d,
-0x8d71, 0x8d73, 0x8d81, 0x8d99, 0x8dc2, 0x8dbe, 0x8dba, 0x8dcf,
-0x8dda, 0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, 0x8ddf,
-0x8de3, 0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, 0x8e10,
-0x8e1f, 0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a,
-94, 0x6d21,
-0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, 0x8e60,
-0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, 0x8e87,
-0x8e85, 0x8e84, 0x8e8b, 0x8e8a, 0x8e93, 0x8e91, 0x8e94, 0x8e99,
-0x8eaa, 0x8ea1, 0x8eac, 0x8eb0, 0x8ec6, 0x8eb1, 0x8ebe, 0x8ec5,
-0x8ec8, 0x8ecb, 0x8edb, 0x8ee3, 0x8efc, 0x8efb, 0x8eeb, 0x8efe,
-0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, 0x8f1f,
-0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, 0x8f42,
-0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0x8f62,
-0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf, 0x8fb7,
-0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4, 0x9005,
-0x8ff9, 0x8ffa, 0x9011, 0x9015, 0x9021, 0x900d, 0x901e, 0x9016,
-0x900b, 0x9027, 0x9036, 0x9035, 0x9039, 0x8ff8,
-94, 0x6e21,
-0x904f, 0x9050, 0x9051, 0x9052, 0x900e, 0x9049, 0x903e, 0x9056,
-0x9058, 0x905e, 0x9068, 0x906f, 0x9076, 0x96a8, 0x9072, 0x9082,
-0x907d, 0x9081, 0x9080, 0x908a, 0x9089, 0x908f, 0x90a8, 0x90af,
-0x90b1, 0x90b5, 0x90e2, 0x90e4, 0x6248, 0x90db, 0x9102, 0x9112,
-0x9119, 0x9132, 0x9130, 0x914a, 0x9156, 0x9158, 0x9163, 0x9165,
-0x9169, 0x9173, 0x9172, 0x918b, 0x9189, 0x9182, 0x91a2, 0x91ab,
-0x91af, 0x91aa, 0x91b5, 0x91b4, 0x91ba, 0x91c0, 0x91c1, 0x91c9,
-0x91cb, 0x91d0, 0x91d6, 0x91df, 0x91e1, 0x91db, 0x91fc, 0x91f5,
-0x91f6, 0x921e, 0x91ff, 0x9214, 0x922c, 0x9215, 0x9211, 0x925e,
-0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, 0x924b,
-0x9250, 0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, 0x92b9,
-0x92b7, 0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e,
-94, 0x6f21,
-0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, 0x935c,
-0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, 0x9394,
-0x93b9, 0x93d6, 0x93d7, 0x93e8, 0x93e5, 0x93d8, 0x93c3, 0x93dd,
-0x93d0, 0x93c8, 0x93e4, 0x941a, 0x9414, 0x9413, 0x9403, 0x9407,
-0x9410, 0x9436, 0x942b, 0x9435, 0x9421, 0x943a, 0x9441, 0x9452,
-0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, 0x9470,
-0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, 0x947f,
-0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0x95a0,
-0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be, 0x95ca,
-0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6, 0x95dc,
-0x95e1, 0x95e5, 0x95e2, 0x9621, 0x9628, 0x962e, 0x962f, 0x9642,
-0x964c, 0x964f, 0x964b, 0x9677, 0x965c, 0x965e,
-94, 0x7021,
-0x965d, 0x965f, 0x9666, 0x9672, 0x966c, 0x968d, 0x9698, 0x9695,
-0x9697, 0x96aa, 0x96a7, 0x96b1, 0x96b2, 0x96b0, 0x96b4, 0x96b6,
-0x96b8, 0x96b9, 0x96ce, 0x96cb, 0x96c9, 0x96cd, 0x894d, 0x96dc,
-0x970d, 0x96d5, 0x96f9, 0x9704, 0x9706, 0x9708, 0x9713, 0x970e,
-0x9711, 0x970f, 0x9716, 0x9719, 0x9724, 0x972a, 0x9730, 0x9739,
-0x973d, 0x973e, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, 0x975c,
-0x9760, 0x9764, 0x9766, 0x9768, 0x52d2, 0x976b, 0x9771, 0x9779,
-0x9785, 0x977c, 0x9781, 0x977a, 0x9786, 0x978b, 0x978f, 0x9790,
-0x979c, 0x97a8, 0x97a6, 0x97a3, 0x97b3, 0x97b4, 0x97c3, 0x97c6,
-0x97c8, 0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, 0x97f6,
-0x97f5, 0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, 0x983d,
-0x9846, 0x984f, 0x984b, 0x986b, 0x986f, 0x9870,
-94, 0x7121,
-0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, 0x98c4,
-0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, 0x9914,
-0x9918, 0x9921, 0x991d, 0x991e, 0x9924, 0x9920, 0x992c, 0x992e,
-0x993d, 0x993e, 0x9942, 0x9949, 0x9945, 0x9950, 0x994b, 0x9951,
-0x9952, 0x994c, 0x9955, 0x9997, 0x9998, 0x99a5, 0x99ad, 0x99ae,
-0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, 0x99ee,
-0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, 0x99e2,
-0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0x9a3e,
-0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65, 0x9a64,
-0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0, 0x9acf,
-0x9ad1, 0x9ad3, 0x9ad4, 0x9ade, 0x9adf, 0x9ae2, 0x9ae3, 0x9ae6,
-0x9aef, 0x9aeb, 0x9aee, 0x9af4, 0x9af1, 0x9af7,
-94, 0x7221,
-0x9afb, 0x9b06, 0x9b18, 0x9b1a, 0x9b1f, 0x9b22, 0x9b23, 0x9b25,
-0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2e, 0x9b2f, 0x9b32, 0x9b44,
-0x9b43, 0x9b4f, 0x9b4d, 0x9b4e, 0x9b51, 0x9b58, 0x9b74, 0x9b93,
-0x9b83, 0x9b91, 0x9b96, 0x9b97, 0x9b9f, 0x9ba0, 0x9ba8, 0x9bb4,
-0x9bc0, 0x9bca, 0x9bb9, 0x9bc6, 0x9bcf, 0x9bd1, 0x9bd2, 0x9be3,
-0x9be2, 0x9be4, 0x9bd4, 0x9be1, 0x9c3a, 0x9bf2, 0x9bf1, 0x9bf0,
-0x9c15, 0x9c14, 0x9c09, 0x9c13, 0x9c0c, 0x9c06, 0x9c08, 0x9c12,
-0x9c0a, 0x9c04, 0x9c2e, 0x9c1b, 0x9c25, 0x9c24, 0x9c21, 0x9c30,
-0x9c47, 0x9c32, 0x9c46, 0x9c3e, 0x9c5a, 0x9c60, 0x9c67, 0x9c76,
-0x9c78, 0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, 0x9d03,
-0x9d06, 0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, 0x9d15,
-0x9d12, 0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48,
-94, 0x7321,
-0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, 0x9d89,
-0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, 0x9db2,
-0x9dc4, 0x9dc1, 0x9dbb, 0x9db8, 0x9dba, 0x9dc6, 0x9dcf, 0x9dc2,
-0x9dd9, 0x9dd3, 0x9df8, 0x9de6, 0x9ded, 0x9def, 0x9dfd, 0x9e1a,
-0x9e1b, 0x9e1e, 0x9e75, 0x9e79, 0x9e7d, 0x9e81, 0x9e88, 0x9e8b,
-0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, 0x9eb8,
-0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, 0x9ed4,
-0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0x9ef4,
-0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07, 0x9f08,
-0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52, 0x9f54,
-0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c, 0x9f6a,
-0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0,
-6, 0x7421,
-0x582f, 0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0212.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0212.h
deleted file mode 100644
index 67b00a3267..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/jis0212.h
+++ /dev/null
@@ -1,871 +0,0 @@
-11, 0x222f,
-0x02d8, 0x02c7, 0x00b8, 0x02d9, 0x02dd, 0x00af, 0x02db, 0x02da,
-0x007e, 0x0384, 0x0385,
-3, 0x2242,
-0x00a1, 0x00a6, 0x00bf,
-7, 0x226b,
-0x00ba, 0x00aa, 0x00a9, 0x00ae, 0x2122, 0x00a4, 0x2116,
-5, 0x2661,
-0x0386, 0x0388, 0x0389, 0x038a, 0x03aa,
-1, 0x2667,
-0x038c,
-2, 0x2669,
-0x038e, 0x03ab,
-1, 0x266c,
-0x038f,
-12, 0x2671,
-0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, 0x03c2,
-0x03cd, 0x03cb, 0x03b0, 0x03ce,
-13, 0x2742,
-0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409,
-0x040a, 0x040b, 0x040c, 0x040e, 0x040f,
-13, 0x2772,
-0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459,
-0x045a, 0x045b, 0x045c, 0x045e, 0x045f,
-2, 0x2921,
-0x00c6, 0x0110,
-1, 0x2924,
-0x0126,
-1, 0x2926,
-0x0132,
-2, 0x2928,
-0x0141, 0x013f,
-3, 0x292b,
-0x014a, 0x00d8, 0x0152,
-2, 0x292f,
-0x0166, 0x00de,
-16, 0x2941,
-0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, 0x0142,
-0x0140, 0x0149, 0x014b, 0x00f8, 0x0153, 0x00df, 0x0167, 0x00fe,
-24, 0x2a21,
-0x00c1, 0x00c0, 0x00c4, 0x00c2, 0x0102, 0x01cd, 0x0100, 0x0104,
-0x00c5, 0x00c3, 0x0106, 0x0108, 0x010c, 0x00c7, 0x010a, 0x010e,
-0x00c9, 0x00c8, 0x00cb, 0x00ca, 0x011a, 0x0116, 0x0112, 0x0118,
-62, 0x2a3a,
-0x011c, 0x011e, 0x0122, 0x0120, 0x0124, 0x00cd, 0x00cc, 0x00cf,
-0x00ce, 0x01cf, 0x0130, 0x012a, 0x012e, 0x0128, 0x0134, 0x0136,
-0x0139, 0x013d, 0x013b, 0x0143, 0x0147, 0x0145, 0x00d1, 0x00d3,
-0x00d2, 0x00d6, 0x00d4, 0x01d1, 0x0150, 0x014c, 0x00d5, 0x0154,
-0x0158, 0x0156, 0x015a, 0x015c, 0x0160, 0x015e, 0x0164, 0x0162,
-0x00da, 0x00d9, 0x00dc, 0x00db, 0x016c, 0x01d3, 0x0170, 0x016a,
-0x0172, 0x016e, 0x0168, 0x01d7, 0x01db, 0x01d9, 0x01d5, 0x0174,
-0x00dd, 0x0178, 0x0176, 0x0179, 0x017d, 0x017b,
-27, 0x2b21,
-0x00e1, 0x00e0, 0x00e4, 0x00e2, 0x0103, 0x01ce, 0x0101, 0x0105,
-0x00e5, 0x00e3, 0x0107, 0x0109, 0x010d, 0x00e7, 0x010b, 0x010f,
-0x00e9, 0x00e8, 0x00eb, 0x00ea, 0x011b, 0x0117, 0x0113, 0x0119,
-0x01f5, 0x011d, 0x011f,
-7, 0x2b3d,
-0x0121, 0x0125, 0x00ed, 0x00ec, 0x00ef, 0x00ee, 0x01d0,
-51, 0x2b45,
-0x012b, 0x012f, 0x0129, 0x0135, 0x0137, 0x013a, 0x013e, 0x013c,
-0x0144, 0x0148, 0x0146, 0x00f1, 0x00f3, 0x00f2, 0x00f6, 0x00f4,
-0x01d2, 0x0151, 0x014d, 0x00f5, 0x0155, 0x0159, 0x0157, 0x015b,
-0x015d, 0x0161, 0x015f, 0x0165, 0x0163, 0x00fa, 0x00f9, 0x00fc,
-0x00fb, 0x016d, 0x01d4, 0x0171, 0x016b, 0x0173, 0x016f, 0x0169,
-0x01d8, 0x01dc, 0x01da, 0x01d6, 0x0175, 0x00fd, 0x00ff, 0x0177,
-0x017a, 0x017e, 0x017c,
-94, 0x3021,
-0x4e02, 0x4e04, 0x4e05, 0x4e0c, 0x4e12, 0x4e1f, 0x4e23, 0x4e24,
-0x4e28, 0x4e2b, 0x4e2e, 0x4e2f, 0x4e30, 0x4e35, 0x4e40, 0x4e41,
-0x4e44, 0x4e47, 0x4e51, 0x4e5a, 0x4e5c, 0x4e63, 0x4e68, 0x4e69,
-0x4e74, 0x4e75, 0x4e79, 0x4e7f, 0x4e8d, 0x4e96, 0x4e97, 0x4e9d,
-0x4eaf, 0x4eb9, 0x4ec3, 0x4ed0, 0x4eda, 0x4edb, 0x4ee0, 0x4ee1,
-0x4ee2, 0x4ee8, 0x4eef, 0x4ef1, 0x4ef3, 0x4ef5, 0x4efd, 0x4efe,
-0x4eff, 0x4f00, 0x4f02, 0x4f03, 0x4f08, 0x4f0b, 0x4f0c, 0x4f12,
-0x4f15, 0x4f16, 0x4f17, 0x4f19, 0x4f2e, 0x4f31, 0x4f60, 0x4f33,
-0x4f35, 0x4f37, 0x4f39, 0x4f3b, 0x4f3e, 0x4f40, 0x4f42, 0x4f48,
-0x4f49, 0x4f4b, 0x4f4c, 0x4f52, 0x4f54, 0x4f56, 0x4f58, 0x4f5f,
-0x4f63, 0x4f6a, 0x4f6c, 0x4f6e, 0x4f71, 0x4f77, 0x4f78, 0x4f79,
-0x4f7a, 0x4f7d, 0x4f7e, 0x4f81, 0x4f82, 0x4f84,
-94, 0x3121,
-0x4f85, 0x4f89, 0x4f8a, 0x4f8c, 0x4f8e, 0x4f90, 0x4f92, 0x4f93,
-0x4f94, 0x4f97, 0x4f99, 0x4f9a, 0x4f9e, 0x4f9f, 0x4fb2, 0x4fb7,
-0x4fb9, 0x4fbb, 0x4fbc, 0x4fbd, 0x4fbe, 0x4fc0, 0x4fc1, 0x4fc5,
-0x4fc6, 0x4fc8, 0x4fc9, 0x4fcb, 0x4fcc, 0x4fcd, 0x4fcf, 0x4fd2,
-0x4fdc, 0x4fe0, 0x4fe2, 0x4ff0, 0x4ff2, 0x4ffc, 0x4ffd, 0x4fff,
-0x5000, 0x5001, 0x5004, 0x5007, 0x500a, 0x500c, 0x500e, 0x5010,
-0x5013, 0x5017, 0x5018, 0x501b, 0x501c, 0x501d, 0x501e, 0x5022,
-0x5027, 0x502e, 0x5030, 0x5032, 0x5033, 0x5035, 0x5040, 0x5041,
-0x5042, 0x5045, 0x5046, 0x504a, 0x504c, 0x504e, 0x5051, 0x5052,
-0x5053, 0x5057, 0x5059, 0x505f, 0x5060, 0x5062, 0x5063, 0x5066,
-0x5067, 0x506a, 0x506d, 0x5070, 0x5071, 0x503b, 0x5081, 0x5083,
-0x5084, 0x5086, 0x508a, 0x508e, 0x508f, 0x5090,
-94, 0x3221,
-0x5092, 0x5093, 0x5094, 0x5096, 0x509b, 0x509c, 0x509e, 0x509f,
-0x50a0, 0x50a1, 0x50a2, 0x50aa, 0x50af, 0x50b0, 0x50b9, 0x50ba,
-0x50bd, 0x50c0, 0x50c3, 0x50c4, 0x50c7, 0x50cc, 0x50ce, 0x50d0,
-0x50d3, 0x50d4, 0x50d8, 0x50dc, 0x50dd, 0x50df, 0x50e2, 0x50e4,
-0x50e6, 0x50e8, 0x50e9, 0x50ef, 0x50f1, 0x50f6, 0x50fa, 0x50fe,
-0x5103, 0x5106, 0x5107, 0x5108, 0x510b, 0x510c, 0x510d, 0x510e,
-0x50f2, 0x5110, 0x5117, 0x5119, 0x511b, 0x511c, 0x511d, 0x511e,
-0x5123, 0x5127, 0x5128, 0x512c, 0x512d, 0x512f, 0x5131, 0x5133,
-0x5134, 0x5135, 0x5138, 0x5139, 0x5142, 0x514a, 0x514f, 0x5153,
-0x5155, 0x5157, 0x5158, 0x515f, 0x5164, 0x5166, 0x517e, 0x5183,
-0x5184, 0x518b, 0x518e, 0x5198, 0x519d, 0x51a1, 0x51a3, 0x51ad,
-0x51b8, 0x51ba, 0x51bc, 0x51be, 0x51bf, 0x51c2,
-94, 0x3321,
-0x51c8, 0x51cf, 0x51d1, 0x51d2, 0x51d3, 0x51d5, 0x51d8, 0x51de,
-0x51e2, 0x51e5, 0x51ee, 0x51f2, 0x51f3, 0x51f4, 0x51f7, 0x5201,
-0x5202, 0x5205, 0x5212, 0x5213, 0x5215, 0x5216, 0x5218, 0x5222,
-0x5228, 0x5231, 0x5232, 0x5235, 0x523c, 0x5245, 0x5249, 0x5255,
-0x5257, 0x5258, 0x525a, 0x525c, 0x525f, 0x5260, 0x5261, 0x5266,
-0x526e, 0x5277, 0x5278, 0x5279, 0x5280, 0x5282, 0x5285, 0x528a,
-0x528c, 0x5293, 0x5295, 0x5296, 0x5297, 0x5298, 0x529a, 0x529c,
-0x52a4, 0x52a5, 0x52a6, 0x52a7, 0x52af, 0x52b0, 0x52b6, 0x52b7,
-0x52b8, 0x52ba, 0x52bb, 0x52bd, 0x52c0, 0x52c4, 0x52c6, 0x52c8,
-0x52cc, 0x52cf, 0x52d1, 0x52d4, 0x52d6, 0x52db, 0x52dc, 0x52e1,
-0x52e5, 0x52e8, 0x52e9, 0x52ea, 0x52ec, 0x52f0, 0x52f1, 0x52f4,
-0x52f6, 0x52f7, 0x5300, 0x5303, 0x530a, 0x530b,
-94, 0x3421,
-0x530c, 0x5311, 0x5313, 0x5318, 0x531b, 0x531c, 0x531e, 0x531f,
-0x5325, 0x5327, 0x5328, 0x5329, 0x532b, 0x532c, 0x532d, 0x5330,
-0x5332, 0x5335, 0x533c, 0x533d, 0x533e, 0x5342, 0x534c, 0x534b,
-0x5359, 0x535b, 0x5361, 0x5363, 0x5365, 0x536c, 0x536d, 0x5372,
-0x5379, 0x537e, 0x5383, 0x5387, 0x5388, 0x538e, 0x5393, 0x5394,
-0x5399, 0x539d, 0x53a1, 0x53a4, 0x53aa, 0x53ab, 0x53af, 0x53b2,
-0x53b4, 0x53b5, 0x53b7, 0x53b8, 0x53ba, 0x53bd, 0x53c0, 0x53c5,
-0x53cf, 0x53d2, 0x53d3, 0x53d5, 0x53da, 0x53dd, 0x53de, 0x53e0,
-0x53e6, 0x53e7, 0x53f5, 0x5402, 0x5413, 0x541a, 0x5421, 0x5427,
-0x5428, 0x542a, 0x542f, 0x5431, 0x5434, 0x5435, 0x5443, 0x5444,
-0x5447, 0x544d, 0x544f, 0x545e, 0x5462, 0x5464, 0x5466, 0x5467,
-0x5469, 0x546b, 0x546d, 0x546e, 0x5474, 0x547f,
-94, 0x3521,
-0x5481, 0x5483, 0x5485, 0x5488, 0x5489, 0x548d, 0x5491, 0x5495,
-0x5496, 0x549c, 0x549f, 0x54a1, 0x54a6, 0x54a7, 0x54a9, 0x54aa,
-0x54ad, 0x54ae, 0x54b1, 0x54b7, 0x54b9, 0x54ba, 0x54bb, 0x54bf,
-0x54c6, 0x54ca, 0x54cd, 0x54ce, 0x54e0, 0x54ea, 0x54ec, 0x54ef,
-0x54f6, 0x54fc, 0x54fe, 0x54ff, 0x5500, 0x5501, 0x5505, 0x5508,
-0x5509, 0x550c, 0x550d, 0x550e, 0x5515, 0x552a, 0x552b, 0x5532,
-0x5535, 0x5536, 0x553b, 0x553c, 0x553d, 0x5541, 0x5547, 0x5549,
-0x554a, 0x554d, 0x5550, 0x5551, 0x5558, 0x555a, 0x555b, 0x555e,
-0x5560, 0x5561, 0x5564, 0x5566, 0x557f, 0x5581, 0x5582, 0x5586,
-0x5588, 0x558e, 0x558f, 0x5591, 0x5592, 0x5593, 0x5594, 0x5597,
-0x55a3, 0x55a4, 0x55ad, 0x55b2, 0x55bf, 0x55c1, 0x55c3, 0x55c6,
-0x55c9, 0x55cb, 0x55cc, 0x55ce, 0x55d1, 0x55d2,
-94, 0x3621,
-0x55d3, 0x55d7, 0x55d8, 0x55db, 0x55de, 0x55e2, 0x55e9, 0x55f6,
-0x55ff, 0x5605, 0x5608, 0x560a, 0x560d, 0x560e, 0x560f, 0x5610,
-0x5611, 0x5612, 0x5619, 0x562c, 0x5630, 0x5633, 0x5635, 0x5637,
-0x5639, 0x563b, 0x563c, 0x563d, 0x563f, 0x5640, 0x5641, 0x5643,
-0x5644, 0x5646, 0x5649, 0x564b, 0x564d, 0x564f, 0x5654, 0x565e,
-0x5660, 0x5661, 0x5662, 0x5663, 0x5666, 0x5669, 0x566d, 0x566f,
-0x5671, 0x5672, 0x5675, 0x5684, 0x5685, 0x5688, 0x568b, 0x568c,
-0x5695, 0x5699, 0x569a, 0x569d, 0x569e, 0x569f, 0x56a6, 0x56a7,
-0x56a8, 0x56a9, 0x56ab, 0x56ac, 0x56ad, 0x56b1, 0x56b3, 0x56b7,
-0x56be, 0x56c5, 0x56c9, 0x56ca, 0x56cb, 0x56cf, 0x56d0, 0x56cc,
-0x56cd, 0x56d9, 0x56dc, 0x56dd, 0x56df, 0x56e1, 0x56e4, 0x56e5,
-0x56e6, 0x56e7, 0x56e8, 0x56f1, 0x56eb, 0x56ed,
-94, 0x3721,
-0x56f6, 0x56f7, 0x5701, 0x5702, 0x5707, 0x570a, 0x570c, 0x5711,
-0x5715, 0x571a, 0x571b, 0x571d, 0x5720, 0x5722, 0x5723, 0x5724,
-0x5725, 0x5729, 0x572a, 0x572c, 0x572e, 0x572f, 0x5733, 0x5734,
-0x573d, 0x573e, 0x573f, 0x5745, 0x5746, 0x574c, 0x574d, 0x5752,
-0x5762, 0x5765, 0x5767, 0x5768, 0x576b, 0x576d, 0x576e, 0x576f,
-0x5770, 0x5771, 0x5773, 0x5774, 0x5775, 0x5777, 0x5779, 0x577a,
-0x577b, 0x577c, 0x577e, 0x5781, 0x5783, 0x578c, 0x5794, 0x5797,
-0x5799, 0x579a, 0x579c, 0x579d, 0x579e, 0x579f, 0x57a1, 0x5795,
-0x57a7, 0x57a8, 0x57a9, 0x57ac, 0x57b8, 0x57bd, 0x57c7, 0x57c8,
-0x57cc, 0x57cf, 0x57d5, 0x57dd, 0x57de, 0x57e4, 0x57e6, 0x57e7,
-0x57e9, 0x57ed, 0x57f0, 0x57f5, 0x57f6, 0x57f8, 0x57fd, 0x57fe,
-0x57ff, 0x5803, 0x5804, 0x5808, 0x5809, 0x57e1,
-94, 0x3821,
-0x580c, 0x580d, 0x581b, 0x581e, 0x581f, 0x5820, 0x5826, 0x5827,
-0x582d, 0x5832, 0x5839, 0x583f, 0x5849, 0x584c, 0x584d, 0x584f,
-0x5850, 0x5855, 0x585f, 0x5861, 0x5864, 0x5867, 0x5868, 0x5878,
-0x587c, 0x587f, 0x5880, 0x5881, 0x5887, 0x5888, 0x5889, 0x588a,
-0x588c, 0x588d, 0x588f, 0x5890, 0x5894, 0x5896, 0x589d, 0x58a0,
-0x58a1, 0x58a2, 0x58a6, 0x58a9, 0x58b1, 0x58b2, 0x58c4, 0x58bc,
-0x58c2, 0x58c8, 0x58cd, 0x58ce, 0x58d0, 0x58d2, 0x58d4, 0x58d6,
-0x58da, 0x58dd, 0x58e1, 0x58e2, 0x58e9, 0x58f3, 0x5905, 0x5906,
-0x590b, 0x590c, 0x5912, 0x5913, 0x5914, 0x8641, 0x591d, 0x5921,
-0x5923, 0x5924, 0x5928, 0x592f, 0x5930, 0x5933, 0x5935, 0x5936,
-0x593f, 0x5943, 0x5946, 0x5952, 0x5953, 0x5959, 0x595b, 0x595d,
-0x595e, 0x595f, 0x5961, 0x5963, 0x596b, 0x596d,
-94, 0x3921,
-0x596f, 0x5972, 0x5975, 0x5976, 0x5979, 0x597b, 0x597c, 0x598b,
-0x598c, 0x598e, 0x5992, 0x5995, 0x5997, 0x599f, 0x59a4, 0x59a7,
-0x59ad, 0x59ae, 0x59af, 0x59b0, 0x59b3, 0x59b7, 0x59ba, 0x59bc,
-0x59c1, 0x59c3, 0x59c4, 0x59c8, 0x59ca, 0x59cd, 0x59d2, 0x59dd,
-0x59de, 0x59df, 0x59e3, 0x59e4, 0x59e7, 0x59ee, 0x59ef, 0x59f1,
-0x59f2, 0x59f4, 0x59f7, 0x5a00, 0x5a04, 0x5a0c, 0x5a0d, 0x5a0e,
-0x5a12, 0x5a13, 0x5a1e, 0x5a23, 0x5a24, 0x5a27, 0x5a28, 0x5a2a,
-0x5a2d, 0x5a30, 0x5a44, 0x5a45, 0x5a47, 0x5a48, 0x5a4c, 0x5a50,
-0x5a55, 0x5a5e, 0x5a63, 0x5a65, 0x5a67, 0x5a6d, 0x5a77, 0x5a7a,
-0x5a7b, 0x5a7e, 0x5a8b, 0x5a90, 0x5a93, 0x5a96, 0x5a99, 0x5a9c,
-0x5a9e, 0x5a9f, 0x5aa0, 0x5aa2, 0x5aa7, 0x5aac, 0x5ab1, 0x5ab2,
-0x5ab3, 0x5ab5, 0x5ab8, 0x5aba, 0x5abb, 0x5abf,
-94, 0x3a21,
-0x5ac4, 0x5ac6, 0x5ac8, 0x5acf, 0x5ada, 0x5adc, 0x5ae0, 0x5ae5,
-0x5aea, 0x5aee, 0x5af5, 0x5af6, 0x5afd, 0x5b00, 0x5b01, 0x5b08,
-0x5b17, 0x5b34, 0x5b19, 0x5b1b, 0x5b1d, 0x5b21, 0x5b25, 0x5b2d,
-0x5b38, 0x5b41, 0x5b4b, 0x5b4c, 0x5b52, 0x5b56, 0x5b5e, 0x5b68,
-0x5b6e, 0x5b6f, 0x5b7c, 0x5b7d, 0x5b7e, 0x5b7f, 0x5b81, 0x5b84,
-0x5b86, 0x5b8a, 0x5b8e, 0x5b90, 0x5b91, 0x5b93, 0x5b94, 0x5b96,
-0x5ba8, 0x5ba9, 0x5bac, 0x5bad, 0x5baf, 0x5bb1, 0x5bb2, 0x5bb7,
-0x5bba, 0x5bbc, 0x5bc0, 0x5bc1, 0x5bcd, 0x5bcf, 0x5bd6, 0x5bd7,
-0x5bd8, 0x5bd9, 0x5bda, 0x5be0, 0x5bef, 0x5bf1, 0x5bf4, 0x5bfd,
-0x5c0c, 0x5c17, 0x5c1e, 0x5c1f, 0x5c23, 0x5c26, 0x5c29, 0x5c2b,
-0x5c2c, 0x5c2e, 0x5c30, 0x5c32, 0x5c35, 0x5c36, 0x5c59, 0x5c5a,
-0x5c5c, 0x5c62, 0x5c63, 0x5c67, 0x5c68, 0x5c69,
-94, 0x3b21,
-0x5c6d, 0x5c70, 0x5c74, 0x5c75, 0x5c7a, 0x5c7b, 0x5c7c, 0x5c7d,
-0x5c87, 0x5c88, 0x5c8a, 0x5c8f, 0x5c92, 0x5c9d, 0x5c9f, 0x5ca0,
-0x5ca2, 0x5ca3, 0x5ca6, 0x5caa, 0x5cb2, 0x5cb4, 0x5cb5, 0x5cba,
-0x5cc9, 0x5ccb, 0x5cd2, 0x5cdd, 0x5cd7, 0x5cee, 0x5cf1, 0x5cf2,
-0x5cf4, 0x5d01, 0x5d06, 0x5d0d, 0x5d12, 0x5d2b, 0x5d23, 0x5d24,
-0x5d26, 0x5d27, 0x5d31, 0x5d34, 0x5d39, 0x5d3d, 0x5d3f, 0x5d42,
-0x5d43, 0x5d46, 0x5d48, 0x5d55, 0x5d51, 0x5d59, 0x5d4a, 0x5d5f,
-0x5d60, 0x5d61, 0x5d62, 0x5d64, 0x5d6a, 0x5d6d, 0x5d70, 0x5d79,
-0x5d7a, 0x5d7e, 0x5d7f, 0x5d81, 0x5d83, 0x5d88, 0x5d8a, 0x5d92,
-0x5d93, 0x5d94, 0x5d95, 0x5d99, 0x5d9b, 0x5d9f, 0x5da0, 0x5da7,
-0x5dab, 0x5db0, 0x5db4, 0x5db8, 0x5db9, 0x5dc3, 0x5dc7, 0x5dcb,
-0x5dd0, 0x5dce, 0x5dd8, 0x5dd9, 0x5de0, 0x5de4,
-94, 0x3c21,
-0x5de9, 0x5df8, 0x5df9, 0x5e00, 0x5e07, 0x5e0d, 0x5e12, 0x5e14,
-0x5e15, 0x5e18, 0x5e1f, 0x5e20, 0x5e2e, 0x5e28, 0x5e32, 0x5e35,
-0x5e3e, 0x5e4b, 0x5e50, 0x5e49, 0x5e51, 0x5e56, 0x5e58, 0x5e5b,
-0x5e5c, 0x5e5e, 0x5e68, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e,
-0x5e70, 0x5e80, 0x5e8b, 0x5e8e, 0x5ea2, 0x5ea4, 0x5ea5, 0x5ea8,
-0x5eaa, 0x5eac, 0x5eb1, 0x5eb3, 0x5ebd, 0x5ebe, 0x5ebf, 0x5ec6,
-0x5ecc, 0x5ecb, 0x5ece, 0x5ed1, 0x5ed2, 0x5ed4, 0x5ed5, 0x5edc,
-0x5ede, 0x5ee5, 0x5eeb, 0x5f02, 0x5f06, 0x5f07, 0x5f08, 0x5f0e,
-0x5f19, 0x5f1c, 0x5f1d, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0x5f28,
-0x5f2b, 0x5f2c, 0x5f2e, 0x5f30, 0x5f34, 0x5f36, 0x5f3b, 0x5f3d,
-0x5f3f, 0x5f40, 0x5f44, 0x5f45, 0x5f47, 0x5f4d, 0x5f50, 0x5f54,
-0x5f58, 0x5f5b, 0x5f60, 0x5f63, 0x5f64, 0x5f67,
-94, 0x3d21,
-0x5f6f, 0x5f72, 0x5f74, 0x5f75, 0x5f78, 0x5f7a, 0x5f7d, 0x5f7e,
-0x5f89, 0x5f8d, 0x5f8f, 0x5f96, 0x5f9c, 0x5f9d, 0x5fa2, 0x5fa7,
-0x5fab, 0x5fa4, 0x5fac, 0x5faf, 0x5fb0, 0x5fb1, 0x5fb8, 0x5fc4,
-0x5fc7, 0x5fc8, 0x5fc9, 0x5fcb, 0x5fd0, 0x5fd1, 0x5fd2, 0x5fd3,
-0x5fd4, 0x5fde, 0x5fe1, 0x5fe2, 0x5fe8, 0x5fe9, 0x5fea, 0x5fec,
-0x5fed, 0x5fee, 0x5fef, 0x5ff2, 0x5ff3, 0x5ff6, 0x5ffa, 0x5ffc,
-0x6007, 0x600a, 0x600d, 0x6013, 0x6014, 0x6017, 0x6018, 0x601a,
-0x601f, 0x6024, 0x602d, 0x6033, 0x6035, 0x6040, 0x6047, 0x6048,
-0x6049, 0x604c, 0x6051, 0x6054, 0x6056, 0x6057, 0x605d, 0x6061,
-0x6067, 0x6071, 0x607e, 0x607f, 0x6082, 0x6086, 0x6088, 0x608a,
-0x608e, 0x6091, 0x6093, 0x6095, 0x6098, 0x609d, 0x609e, 0x60a2,
-0x60a4, 0x60a5, 0x60a8, 0x60b0, 0x60b1, 0x60b7,
-94, 0x3e21,
-0x60bb, 0x60be, 0x60c2, 0x60c4, 0x60c8, 0x60c9, 0x60ca, 0x60cb,
-0x60ce, 0x60cf, 0x60d4, 0x60d5, 0x60d9, 0x60db, 0x60dd, 0x60de,
-0x60e2, 0x60e5, 0x60f2, 0x60f5, 0x60f8, 0x60fc, 0x60fd, 0x6102,
-0x6107, 0x610a, 0x610c, 0x6110, 0x6111, 0x6112, 0x6113, 0x6114,
-0x6116, 0x6117, 0x6119, 0x611c, 0x611e, 0x6122, 0x612a, 0x612b,
-0x6130, 0x6131, 0x6135, 0x6136, 0x6137, 0x6139, 0x6141, 0x6145,
-0x6146, 0x6149, 0x615e, 0x6160, 0x616c, 0x6172, 0x6178, 0x617b,
-0x617c, 0x617f, 0x6180, 0x6181, 0x6183, 0x6184, 0x618b, 0x618d,
-0x6192, 0x6193, 0x6197, 0x6198, 0x619c, 0x619d, 0x619f, 0x61a0,
-0x61a5, 0x61a8, 0x61aa, 0x61ad, 0x61b8, 0x61b9, 0x61bc, 0x61c0,
-0x61c1, 0x61c2, 0x61ce, 0x61cf, 0x61d5, 0x61dc, 0x61dd, 0x61de,
-0x61df, 0x61e1, 0x61e2, 0x61e7, 0x61e9, 0x61e5,
-94, 0x3f21,
-0x61ec, 0x61ed, 0x61ef, 0x6201, 0x6203, 0x6204, 0x6207, 0x6213,
-0x6215, 0x621c, 0x6220, 0x6222, 0x6223, 0x6227, 0x6229, 0x622b,
-0x6239, 0x623d, 0x6242, 0x6243, 0x6244, 0x6246, 0x624c, 0x6250,
-0x6251, 0x6252, 0x6254, 0x6256, 0x625a, 0x625c, 0x6264, 0x626d,
-0x626f, 0x6273, 0x627a, 0x627d, 0x628d, 0x628e, 0x628f, 0x6290,
-0x62a6, 0x62a8, 0x62b3, 0x62b6, 0x62b7, 0x62ba, 0x62be, 0x62bf,
-0x62c4, 0x62ce, 0x62d5, 0x62d6, 0x62da, 0x62ea, 0x62f2, 0x62f4,
-0x62fc, 0x62fd, 0x6303, 0x6304, 0x630a, 0x630b, 0x630d, 0x6310,
-0x6313, 0x6316, 0x6318, 0x6329, 0x632a, 0x632d, 0x6335, 0x6336,
-0x6339, 0x633c, 0x6341, 0x6342, 0x6343, 0x6344, 0x6346, 0x634a,
-0x634b, 0x634e, 0x6352, 0x6353, 0x6354, 0x6358, 0x635b, 0x6365,
-0x6366, 0x636c, 0x636d, 0x6371, 0x6374, 0x6375,
-94, 0x4021,
-0x6378, 0x637c, 0x637d, 0x637f, 0x6382, 0x6384, 0x6387, 0x638a,
-0x6390, 0x6394, 0x6395, 0x6399, 0x639a, 0x639e, 0x63a4, 0x63a6,
-0x63ad, 0x63ae, 0x63af, 0x63bd, 0x63c1, 0x63c5, 0x63c8, 0x63ce,
-0x63d1, 0x63d3, 0x63d4, 0x63d5, 0x63dc, 0x63e0, 0x63e5, 0x63ea,
-0x63ec, 0x63f2, 0x63f3, 0x63f5, 0x63f8, 0x63f9, 0x6409, 0x640a,
-0x6410, 0x6412, 0x6414, 0x6418, 0x641e, 0x6420, 0x6422, 0x6424,
-0x6425, 0x6429, 0x642a, 0x642f, 0x6430, 0x6435, 0x643d, 0x643f,
-0x644b, 0x644f, 0x6451, 0x6452, 0x6453, 0x6454, 0x645a, 0x645b,
-0x645c, 0x645d, 0x645f, 0x6460, 0x6461, 0x6463, 0x646d, 0x6473,
-0x6474, 0x647b, 0x647d, 0x6485, 0x6487, 0x648f, 0x6490, 0x6491,
-0x6498, 0x6499, 0x649b, 0x649d, 0x649f, 0x64a1, 0x64a3, 0x64a6,
-0x64a8, 0x64ac, 0x64b3, 0x64bd, 0x64be, 0x64bf,
-94, 0x4121,
-0x64c4, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64ce, 0x64d0, 0x64d1,
-0x64d5, 0x64d7, 0x64e4, 0x64e5, 0x64e9, 0x64ea, 0x64ed, 0x64f0,
-0x64f5, 0x64f7, 0x64fb, 0x64ff, 0x6501, 0x6504, 0x6508, 0x6509,
-0x650a, 0x650f, 0x6513, 0x6514, 0x6516, 0x6519, 0x651b, 0x651e,
-0x651f, 0x6522, 0x6526, 0x6529, 0x652e, 0x6531, 0x653a, 0x653c,
-0x653d, 0x6543, 0x6547, 0x6549, 0x6550, 0x6552, 0x6554, 0x655f,
-0x6560, 0x6567, 0x656b, 0x657a, 0x657d, 0x6581, 0x6585, 0x658a,
-0x6592, 0x6595, 0x6598, 0x659d, 0x65a0, 0x65a3, 0x65a6, 0x65ae,
-0x65b2, 0x65b3, 0x65b4, 0x65bf, 0x65c2, 0x65c8, 0x65c9, 0x65ce,
-0x65d0, 0x65d4, 0x65d6, 0x65d8, 0x65df, 0x65f0, 0x65f2, 0x65f4,
-0x65f5, 0x65f9, 0x65fe, 0x65ff, 0x6600, 0x6604, 0x6608, 0x6609,
-0x660d, 0x6611, 0x6612, 0x6615, 0x6616, 0x661d,
-94, 0x4221,
-0x661e, 0x6621, 0x6622, 0x6623, 0x6624, 0x6626, 0x6629, 0x662a,
-0x662b, 0x662c, 0x662e, 0x6630, 0x6631, 0x6633, 0x6639, 0x6637,
-0x6640, 0x6645, 0x6646, 0x664a, 0x664c, 0x6651, 0x664e, 0x6657,
-0x6658, 0x6659, 0x665b, 0x665c, 0x6660, 0x6661, 0x66fb, 0x666a,
-0x666b, 0x666c, 0x667e, 0x6673, 0x6675, 0x667f, 0x6677, 0x6678,
-0x6679, 0x667b, 0x6680, 0x667c, 0x668b, 0x668c, 0x668d, 0x6690,
-0x6692, 0x6699, 0x669a, 0x669b, 0x669c, 0x669f, 0x66a0, 0x66a4,
-0x66ad, 0x66b1, 0x66b2, 0x66b5, 0x66bb, 0x66bf, 0x66c0, 0x66c2,
-0x66c3, 0x66c8, 0x66cc, 0x66ce, 0x66cf, 0x66d4, 0x66db, 0x66df,
-0x66e8, 0x66eb, 0x66ec, 0x66ee, 0x66fa, 0x6705, 0x6707, 0x670e,
-0x6713, 0x6719, 0x671c, 0x6720, 0x6722, 0x6733, 0x673e, 0x6745,
-0x6747, 0x6748, 0x674c, 0x6754, 0x6755, 0x675d,
-94, 0x4321,
-0x6766, 0x676c, 0x676e, 0x6774, 0x6776, 0x677b, 0x6781, 0x6784,
-0x678e, 0x678f, 0x6791, 0x6793, 0x6796, 0x6798, 0x6799, 0x679b,
-0x67b0, 0x67b1, 0x67b2, 0x67b5, 0x67bb, 0x67bc, 0x67bd, 0x67f9,
-0x67c0, 0x67c2, 0x67c3, 0x67c5, 0x67c8, 0x67c9, 0x67d2, 0x67d7,
-0x67d9, 0x67dc, 0x67e1, 0x67e6, 0x67f0, 0x67f2, 0x67f6, 0x67f7,
-0x6852, 0x6814, 0x6819, 0x681d, 0x681f, 0x6828, 0x6827, 0x682c,
-0x682d, 0x682f, 0x6830, 0x6831, 0x6833, 0x683b, 0x683f, 0x6844,
-0x6845, 0x684a, 0x684c, 0x6855, 0x6857, 0x6858, 0x685b, 0x686b,
-0x686e, 0x686f, 0x6870, 0x6871, 0x6872, 0x6875, 0x6879, 0x687a,
-0x687b, 0x687c, 0x6882, 0x6884, 0x6886, 0x6888, 0x6896, 0x6898,
-0x689a, 0x689c, 0x68a1, 0x68a3, 0x68a5, 0x68a9, 0x68aa, 0x68ae,
-0x68b2, 0x68bb, 0x68c5, 0x68c8, 0x68cc, 0x68cf,
-94, 0x4421,
-0x68d0, 0x68d1, 0x68d3, 0x68d6, 0x68d9, 0x68dc, 0x68dd, 0x68e5,
-0x68e8, 0x68ea, 0x68eb, 0x68ec, 0x68ed, 0x68f0, 0x68f1, 0x68f5,
-0x68f6, 0x68fb, 0x68fc, 0x68fd, 0x6906, 0x6909, 0x690a, 0x6910,
-0x6911, 0x6913, 0x6916, 0x6917, 0x6931, 0x6933, 0x6935, 0x6938,
-0x693b, 0x6942, 0x6945, 0x6949, 0x694e, 0x6957, 0x695b, 0x6963,
-0x6964, 0x6965, 0x6966, 0x6968, 0x6969, 0x696c, 0x6970, 0x6971,
-0x6972, 0x697a, 0x697b, 0x697f, 0x6980, 0x698d, 0x6992, 0x6996,
-0x6998, 0x69a1, 0x69a5, 0x69a6, 0x69a8, 0x69ab, 0x69ad, 0x69af,
-0x69b7, 0x69b8, 0x69ba, 0x69bc, 0x69c5, 0x69c8, 0x69d1, 0x69d6,
-0x69d7, 0x69e2, 0x69e5, 0x69ee, 0x69ef, 0x69f1, 0x69f3, 0x69f5,
-0x69fe, 0x6a00, 0x6a01, 0x6a03, 0x6a0f, 0x6a11, 0x6a15, 0x6a1a,
-0x6a1d, 0x6a20, 0x6a24, 0x6a28, 0x6a30, 0x6a32,
-94, 0x4521,
-0x6a34, 0x6a37, 0x6a3b, 0x6a3e, 0x6a3f, 0x6a45, 0x6a46, 0x6a49,
-0x6a4a, 0x6a4e, 0x6a50, 0x6a51, 0x6a52, 0x6a55, 0x6a56, 0x6a5b,
-0x6a64, 0x6a67, 0x6a6a, 0x6a71, 0x6a73, 0x6a7e, 0x6a81, 0x6a83,
-0x6a86, 0x6a87, 0x6a89, 0x6a8b, 0x6a91, 0x6a9b, 0x6a9d, 0x6a9e,
-0x6a9f, 0x6aa5, 0x6aab, 0x6aaf, 0x6ab0, 0x6ab1, 0x6ab4, 0x6abd,
-0x6abe, 0x6abf, 0x6ac6, 0x6ac9, 0x6ac8, 0x6acc, 0x6ad0, 0x6ad4,
-0x6ad5, 0x6ad6, 0x6adc, 0x6add, 0x6ae4, 0x6ae7, 0x6aec, 0x6af0,
-0x6af1, 0x6af2, 0x6afc, 0x6afd, 0x6b02, 0x6b03, 0x6b06, 0x6b07,
-0x6b09, 0x6b0f, 0x6b10, 0x6b11, 0x6b17, 0x6b1b, 0x6b1e, 0x6b24,
-0x6b28, 0x6b2b, 0x6b2c, 0x6b2f, 0x6b35, 0x6b36, 0x6b3b, 0x6b3f,
-0x6b46, 0x6b4a, 0x6b4d, 0x6b52, 0x6b56, 0x6b58, 0x6b5d, 0x6b60,
-0x6b67, 0x6b6b, 0x6b6e, 0x6b70, 0x6b75, 0x6b7d,
-94, 0x4621,
-0x6b7e, 0x6b82, 0x6b85, 0x6b97, 0x6b9b, 0x6b9f, 0x6ba0, 0x6ba2,
-0x6ba3, 0x6ba8, 0x6ba9, 0x6bac, 0x6bad, 0x6bae, 0x6bb0, 0x6bb8,
-0x6bb9, 0x6bbd, 0x6bbe, 0x6bc3, 0x6bc4, 0x6bc9, 0x6bcc, 0x6bd6,
-0x6bda, 0x6be1, 0x6be3, 0x6be6, 0x6be7, 0x6bee, 0x6bf1, 0x6bf7,
-0x6bf9, 0x6bff, 0x6c02, 0x6c04, 0x6c05, 0x6c09, 0x6c0d, 0x6c0e,
-0x6c10, 0x6c12, 0x6c19, 0x6c1f, 0x6c26, 0x6c27, 0x6c28, 0x6c2c,
-0x6c2e, 0x6c33, 0x6c35, 0x6c36, 0x6c3a, 0x6c3b, 0x6c3f, 0x6c4a,
-0x6c4b, 0x6c4d, 0x6c4f, 0x6c52, 0x6c54, 0x6c59, 0x6c5b, 0x6c5c,
-0x6c6b, 0x6c6d, 0x6c6f, 0x6c74, 0x6c76, 0x6c78, 0x6c79, 0x6c7b,
-0x6c85, 0x6c86, 0x6c87, 0x6c89, 0x6c94, 0x6c95, 0x6c97, 0x6c98,
-0x6c9c, 0x6c9f, 0x6cb0, 0x6cb2, 0x6cb4, 0x6cc2, 0x6cc6, 0x6ccd,
-0x6ccf, 0x6cd0, 0x6cd1, 0x6cd2, 0x6cd4, 0x6cd6,
-94, 0x4721,
-0x6cda, 0x6cdc, 0x6ce0, 0x6ce7, 0x6ce9, 0x6ceb, 0x6cec, 0x6cee,
-0x6cf2, 0x6cf4, 0x6d04, 0x6d07, 0x6d0a, 0x6d0e, 0x6d0f, 0x6d11,
-0x6d13, 0x6d1a, 0x6d26, 0x6d27, 0x6d28, 0x6c67, 0x6d2e, 0x6d2f,
-0x6d31, 0x6d39, 0x6d3c, 0x6d3f, 0x6d57, 0x6d5e, 0x6d5f, 0x6d61,
-0x6d65, 0x6d67, 0x6d6f, 0x6d70, 0x6d7c, 0x6d82, 0x6d87, 0x6d91,
-0x6d92, 0x6d94, 0x6d96, 0x6d97, 0x6d98, 0x6daa, 0x6dac, 0x6db4,
-0x6db7, 0x6db9, 0x6dbd, 0x6dbf, 0x6dc4, 0x6dc8, 0x6dca, 0x6dce,
-0x6dcf, 0x6dd6, 0x6ddb, 0x6ddd, 0x6ddf, 0x6de0, 0x6de2, 0x6de5,
-0x6de9, 0x6def, 0x6df0, 0x6df4, 0x6df6, 0x6dfc, 0x6e00, 0x6e04,
-0x6e1e, 0x6e22, 0x6e27, 0x6e32, 0x6e36, 0x6e39, 0x6e3b, 0x6e3c,
-0x6e44, 0x6e45, 0x6e48, 0x6e49, 0x6e4b, 0x6e4f, 0x6e51, 0x6e52,
-0x6e53, 0x6e54, 0x6e57, 0x6e5c, 0x6e5d, 0x6e5e,
-94, 0x4821,
-0x6e62, 0x6e63, 0x6e68, 0x6e73, 0x6e7b, 0x6e7d, 0x6e8d, 0x6e93,
-0x6e99, 0x6ea0, 0x6ea7, 0x6ead, 0x6eae, 0x6eb1, 0x6eb3, 0x6ebb,
-0x6ebf, 0x6ec0, 0x6ec1, 0x6ec3, 0x6ec7, 0x6ec8, 0x6eca, 0x6ecd,
-0x6ece, 0x6ecf, 0x6eeb, 0x6eed, 0x6eee, 0x6ef9, 0x6efb, 0x6efd,
-0x6f04, 0x6f08, 0x6f0a, 0x6f0c, 0x6f0d, 0x6f16, 0x6f18, 0x6f1a,
-0x6f1b, 0x6f26, 0x6f29, 0x6f2a, 0x6f2f, 0x6f30, 0x6f33, 0x6f36,
-0x6f3b, 0x6f3c, 0x6f2d, 0x6f4f, 0x6f51, 0x6f52, 0x6f53, 0x6f57,
-0x6f59, 0x6f5a, 0x6f5d, 0x6f5e, 0x6f61, 0x6f62, 0x6f68, 0x6f6c,
-0x6f7d, 0x6f7e, 0x6f83, 0x6f87, 0x6f88, 0x6f8b, 0x6f8c, 0x6f8d,
-0x6f90, 0x6f92, 0x6f93, 0x6f94, 0x6f96, 0x6f9a, 0x6f9f, 0x6fa0,
-0x6fa5, 0x6fa6, 0x6fa7, 0x6fa8, 0x6fae, 0x6faf, 0x6fb0, 0x6fb5,
-0x6fb6, 0x6fbc, 0x6fc5, 0x6fc7, 0x6fc8, 0x6fca,
-94, 0x4921,
-0x6fda, 0x6fde, 0x6fe8, 0x6fe9, 0x6ff0, 0x6ff5, 0x6ff9, 0x6ffc,
-0x6ffd, 0x7000, 0x7005, 0x7006, 0x7007, 0x700d, 0x7017, 0x7020,
-0x7023, 0x702f, 0x7034, 0x7037, 0x7039, 0x703c, 0x7043, 0x7044,
-0x7048, 0x7049, 0x704a, 0x704b, 0x7054, 0x7055, 0x705d, 0x705e,
-0x704e, 0x7064, 0x7065, 0x706c, 0x706e, 0x7075, 0x7076, 0x707e,
-0x7081, 0x7085, 0x7086, 0x7094, 0x7095, 0x7096, 0x7097, 0x7098,
-0x709b, 0x70a4, 0x70ab, 0x70b0, 0x70b1, 0x70b4, 0x70b7, 0x70ca,
-0x70d1, 0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d8, 0x70dc, 0x70e4,
-0x70fa, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x710b, 0x710c,
-0x710f, 0x711e, 0x7120, 0x712b, 0x712d, 0x712f, 0x7130, 0x7131,
-0x7138, 0x7141, 0x7145, 0x7146, 0x7147, 0x714a, 0x714b, 0x7150,
-0x7152, 0x7157, 0x715a, 0x715c, 0x715e, 0x7160,
-94, 0x4a21,
-0x7168, 0x7179, 0x7180, 0x7185, 0x7187, 0x718c, 0x7192, 0x719a,
-0x719b, 0x71a0, 0x71a2, 0x71af, 0x71b0, 0x71b2, 0x71b3, 0x71ba,
-0x71bf, 0x71c0, 0x71c1, 0x71c4, 0x71cb, 0x71cc, 0x71d3, 0x71d6,
-0x71d9, 0x71da, 0x71dc, 0x71f8, 0x71fe, 0x7200, 0x7207, 0x7208,
-0x7209, 0x7213, 0x7217, 0x721a, 0x721d, 0x721f, 0x7224, 0x722b,
-0x722f, 0x7234, 0x7238, 0x7239, 0x7241, 0x7242, 0x7243, 0x7245,
-0x724e, 0x724f, 0x7250, 0x7253, 0x7255, 0x7256, 0x725a, 0x725c,
-0x725e, 0x7260, 0x7263, 0x7268, 0x726b, 0x726e, 0x726f, 0x7271,
-0x7277, 0x7278, 0x727b, 0x727c, 0x727f, 0x7284, 0x7289, 0x728d,
-0x728e, 0x7293, 0x729b, 0x72a8, 0x72ad, 0x72ae, 0x72b1, 0x72b4,
-0x72be, 0x72c1, 0x72c7, 0x72c9, 0x72cc, 0x72d5, 0x72d6, 0x72d8,
-0x72df, 0x72e5, 0x72f3, 0x72f4, 0x72fa, 0x72fb,
-94, 0x4b21,
-0x72fe, 0x7302, 0x7304, 0x7305, 0x7307, 0x730b, 0x730d, 0x7312,
-0x7313, 0x7318, 0x7319, 0x731e, 0x7322, 0x7324, 0x7327, 0x7328,
-0x732c, 0x7331, 0x7332, 0x7335, 0x733a, 0x733b, 0x733d, 0x7343,
-0x734d, 0x7350, 0x7352, 0x7356, 0x7358, 0x735d, 0x735e, 0x735f,
-0x7360, 0x7366, 0x7367, 0x7369, 0x736b, 0x736c, 0x736e, 0x736f,
-0x7371, 0x7377, 0x7379, 0x737c, 0x7380, 0x7381, 0x7383, 0x7385,
-0x7386, 0x738e, 0x7390, 0x7393, 0x7395, 0x7397, 0x7398, 0x739c,
-0x739e, 0x739f, 0x73a0, 0x73a2, 0x73a5, 0x73a6, 0x73aa, 0x73ab,
-0x73ad, 0x73b5, 0x73b7, 0x73b9, 0x73bc, 0x73bd, 0x73bf, 0x73c5,
-0x73c6, 0x73c9, 0x73cb, 0x73cc, 0x73cf, 0x73d2, 0x73d3, 0x73d6,
-0x73d9, 0x73dd, 0x73e1, 0x73e3, 0x73e6, 0x73e7, 0x73e9, 0x73f4,
-0x73f5, 0x73f7, 0x73f9, 0x73fa, 0x73fb, 0x73fd,
-94, 0x4c21,
-0x73ff, 0x7400, 0x7401, 0x7404, 0x7407, 0x740a, 0x7411, 0x741a,
-0x741b, 0x7424, 0x7426, 0x7428, 0x7429, 0x742a, 0x742b, 0x742c,
-0x742d, 0x742e, 0x742f, 0x7430, 0x7431, 0x7439, 0x7440, 0x7443,
-0x7444, 0x7446, 0x7447, 0x744b, 0x744d, 0x7451, 0x7452, 0x7457,
-0x745d, 0x7462, 0x7466, 0x7467, 0x7468, 0x746b, 0x746d, 0x746e,
-0x7471, 0x7472, 0x7480, 0x7481, 0x7485, 0x7486, 0x7487, 0x7489,
-0x748f, 0x7490, 0x7491, 0x7492, 0x7498, 0x7499, 0x749a, 0x749c,
-0x749f, 0x74a0, 0x74a1, 0x74a3, 0x74a6, 0x74a8, 0x74a9, 0x74aa,
-0x74ab, 0x74ae, 0x74af, 0x74b1, 0x74b2, 0x74b5, 0x74b9, 0x74bb,
-0x74bf, 0x74c8, 0x74c9, 0x74cc, 0x74d0, 0x74d3, 0x74d8, 0x74da,
-0x74db, 0x74de, 0x74df, 0x74e4, 0x74e8, 0x74ea, 0x74eb, 0x74ef,
-0x74f4, 0x74fa, 0x74fb, 0x74fc, 0x74ff, 0x7506,
-94, 0x4d21,
-0x7512, 0x7516, 0x7517, 0x7520, 0x7521, 0x7524, 0x7527, 0x7529,
-0x752a, 0x752f, 0x7536, 0x7539, 0x753d, 0x753e, 0x753f, 0x7540,
-0x7543, 0x7547, 0x7548, 0x754e, 0x7550, 0x7552, 0x7557, 0x755e,
-0x755f, 0x7561, 0x756f, 0x7571, 0x7579, 0x757a, 0x757b, 0x757c,
-0x757d, 0x757e, 0x7581, 0x7585, 0x7590, 0x7592, 0x7593, 0x7595,
-0x7599, 0x759c, 0x75a2, 0x75a4, 0x75b4, 0x75ba, 0x75bf, 0x75c0,
-0x75c1, 0x75c4, 0x75c6, 0x75cc, 0x75ce, 0x75cf, 0x75d7, 0x75dc,
-0x75df, 0x75e0, 0x75e1, 0x75e4, 0x75e7, 0x75ec, 0x75ee, 0x75ef,
-0x75f1, 0x75f9, 0x7600, 0x7602, 0x7603, 0x7604, 0x7607, 0x7608,
-0x760a, 0x760c, 0x760f, 0x7612, 0x7613, 0x7615, 0x7616, 0x7619,
-0x761b, 0x761c, 0x761d, 0x761e, 0x7623, 0x7625, 0x7626, 0x7629,
-0x762d, 0x7632, 0x7633, 0x7635, 0x7638, 0x7639,
-94, 0x4e21,
-0x763a, 0x763c, 0x764a, 0x7640, 0x7641, 0x7643, 0x7644, 0x7645,
-0x7649, 0x764b, 0x7655, 0x7659, 0x765f, 0x7664, 0x7665, 0x766d,
-0x766e, 0x766f, 0x7671, 0x7674, 0x7681, 0x7685, 0x768c, 0x768d,
-0x7695, 0x769b, 0x769c, 0x769d, 0x769f, 0x76a0, 0x76a2, 0x76a3,
-0x76a4, 0x76a5, 0x76a6, 0x76a7, 0x76a8, 0x76aa, 0x76ad, 0x76bd,
-0x76c1, 0x76c5, 0x76c9, 0x76cb, 0x76cc, 0x76ce, 0x76d4, 0x76d9,
-0x76e0, 0x76e6, 0x76e8, 0x76ec, 0x76f0, 0x76f1, 0x76f6, 0x76f9,
-0x76fc, 0x7700, 0x7706, 0x770a, 0x770e, 0x7712, 0x7714, 0x7715,
-0x7717, 0x7719, 0x771a, 0x771c, 0x7722, 0x7728, 0x772d, 0x772e,
-0x772f, 0x7734, 0x7735, 0x7736, 0x7739, 0x773d, 0x773e, 0x7742,
-0x7745, 0x7746, 0x774a, 0x774d, 0x774e, 0x774f, 0x7752, 0x7756,
-0x7757, 0x775c, 0x775e, 0x775f, 0x7760, 0x7762,
-94, 0x4f21,
-0x7764, 0x7767, 0x776a, 0x776c, 0x7770, 0x7772, 0x7773, 0x7774,
-0x777a, 0x777d, 0x7780, 0x7784, 0x778c, 0x778d, 0x7794, 0x7795,
-0x7796, 0x779a, 0x779f, 0x77a2, 0x77a7, 0x77aa, 0x77ae, 0x77af,
-0x77b1, 0x77b5, 0x77be, 0x77c3, 0x77c9, 0x77d1, 0x77d2, 0x77d5,
-0x77d9, 0x77de, 0x77df, 0x77e0, 0x77e4, 0x77e6, 0x77ea, 0x77ec,
-0x77f0, 0x77f1, 0x77f4, 0x77f8, 0x77fb, 0x7805, 0x7806, 0x7809,
-0x780d, 0x780e, 0x7811, 0x781d, 0x7821, 0x7822, 0x7823, 0x782d,
-0x782e, 0x7830, 0x7835, 0x7837, 0x7843, 0x7844, 0x7847, 0x7848,
-0x784c, 0x784e, 0x7852, 0x785c, 0x785e, 0x7860, 0x7861, 0x7863,
-0x7864, 0x7868, 0x786a, 0x786e, 0x787a, 0x787e, 0x788a, 0x788f,
-0x7894, 0x7898, 0x78a1, 0x789d, 0x789e, 0x789f, 0x78a4, 0x78a8,
-0x78ac, 0x78ad, 0x78b0, 0x78b1, 0x78b2, 0x78b3,
-94, 0x5021,
-0x78bb, 0x78bd, 0x78bf, 0x78c7, 0x78c8, 0x78c9, 0x78cc, 0x78ce,
-0x78d2, 0x78d3, 0x78d5, 0x78d6, 0x78e4, 0x78db, 0x78df, 0x78e0,
-0x78e1, 0x78e6, 0x78ea, 0x78f2, 0x78f3, 0x7900, 0x78f6, 0x78f7,
-0x78fa, 0x78fb, 0x78ff, 0x7906, 0x790c, 0x7910, 0x791a, 0x791c,
-0x791e, 0x791f, 0x7920, 0x7925, 0x7927, 0x7929, 0x792d, 0x7931,
-0x7934, 0x7935, 0x793b, 0x793d, 0x793f, 0x7944, 0x7945, 0x7946,
-0x794a, 0x794b, 0x794f, 0x7951, 0x7954, 0x7958, 0x795b, 0x795c,
-0x7967, 0x7969, 0x796b, 0x7972, 0x7979, 0x797b, 0x797c, 0x797e,
-0x798b, 0x798c, 0x7991, 0x7993, 0x7994, 0x7995, 0x7996, 0x7998,
-0x799b, 0x799c, 0x79a1, 0x79a8, 0x79a9, 0x79ab, 0x79af, 0x79b1,
-0x79b4, 0x79b8, 0x79bb, 0x79c2, 0x79c4, 0x79c7, 0x79c8, 0x79ca,
-0x79cf, 0x79d4, 0x79d6, 0x79da, 0x79dd, 0x79de,
-94, 0x5121,
-0x79e0, 0x79e2, 0x79e5, 0x79ea, 0x79eb, 0x79ed, 0x79f1, 0x79f8,
-0x79fc, 0x7a02, 0x7a03, 0x7a07, 0x7a09, 0x7a0a, 0x7a0c, 0x7a11,
-0x7a15, 0x7a1b, 0x7a1e, 0x7a21, 0x7a27, 0x7a2b, 0x7a2d, 0x7a2f,
-0x7a30, 0x7a34, 0x7a35, 0x7a38, 0x7a39, 0x7a3a, 0x7a44, 0x7a45,
-0x7a47, 0x7a48, 0x7a4c, 0x7a55, 0x7a56, 0x7a59, 0x7a5c, 0x7a5d,
-0x7a5f, 0x7a60, 0x7a65, 0x7a67, 0x7a6a, 0x7a6d, 0x7a75, 0x7a78,
-0x7a7e, 0x7a80, 0x7a82, 0x7a85, 0x7a86, 0x7a8a, 0x7a8b, 0x7a90,
-0x7a91, 0x7a94, 0x7a9e, 0x7aa0, 0x7aa3, 0x7aac, 0x7ab3, 0x7ab5,
-0x7ab9, 0x7abb, 0x7abc, 0x7ac6, 0x7ac9, 0x7acc, 0x7ace, 0x7ad1,
-0x7adb, 0x7ae8, 0x7ae9, 0x7aeb, 0x7aec, 0x7af1, 0x7af4, 0x7afb,
-0x7afd, 0x7afe, 0x7b07, 0x7b14, 0x7b1f, 0x7b23, 0x7b27, 0x7b29,
-0x7b2a, 0x7b2b, 0x7b2d, 0x7b2e, 0x7b2f, 0x7b30,
-94, 0x5221,
-0x7b31, 0x7b34, 0x7b3d, 0x7b3f, 0x7b40, 0x7b41, 0x7b47, 0x7b4e,
-0x7b55, 0x7b60, 0x7b64, 0x7b66, 0x7b69, 0x7b6a, 0x7b6d, 0x7b6f,
-0x7b72, 0x7b73, 0x7b77, 0x7b84, 0x7b89, 0x7b8e, 0x7b90, 0x7b91,
-0x7b96, 0x7b9b, 0x7b9e, 0x7ba0, 0x7ba5, 0x7bac, 0x7baf, 0x7bb0,
-0x7bb2, 0x7bb5, 0x7bb6, 0x7bba, 0x7bbb, 0x7bbc, 0x7bbd, 0x7bc2,
-0x7bc5, 0x7bc8, 0x7bca, 0x7bd4, 0x7bd6, 0x7bd7, 0x7bd9, 0x7bda,
-0x7bdb, 0x7be8, 0x7bea, 0x7bf2, 0x7bf4, 0x7bf5, 0x7bf8, 0x7bf9,
-0x7bfa, 0x7bfc, 0x7bfe, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c06,
-0x7c09, 0x7c0b, 0x7c0c, 0x7c0e, 0x7c0f, 0x7c19, 0x7c1b, 0x7c20,
-0x7c25, 0x7c26, 0x7c28, 0x7c2c, 0x7c31, 0x7c33, 0x7c34, 0x7c36,
-0x7c39, 0x7c3a, 0x7c46, 0x7c4a, 0x7c55, 0x7c51, 0x7c52, 0x7c53,
-0x7c59, 0x7c5a, 0x7c5b, 0x7c5c, 0x7c5d, 0x7c5e,
-94, 0x5321,
-0x7c61, 0x7c63, 0x7c67, 0x7c69, 0x7c6d, 0x7c6e, 0x7c70, 0x7c72,
-0x7c79, 0x7c7c, 0x7c7d, 0x7c86, 0x7c87, 0x7c8f, 0x7c94, 0x7c9e,
-0x7ca0, 0x7ca6, 0x7cb0, 0x7cb6, 0x7cb7, 0x7cba, 0x7cbb, 0x7cbc,
-0x7cbf, 0x7cc4, 0x7cc7, 0x7cc8, 0x7cc9, 0x7ccd, 0x7ccf, 0x7cd3,
-0x7cd4, 0x7cd5, 0x7cd7, 0x7cd9, 0x7cda, 0x7cdd, 0x7ce6, 0x7ce9,
-0x7ceb, 0x7cf5, 0x7d03, 0x7d07, 0x7d08, 0x7d09, 0x7d0f, 0x7d11,
-0x7d12, 0x7d13, 0x7d16, 0x7d1d, 0x7d1e, 0x7d23, 0x7d26, 0x7d2a,
-0x7d2d, 0x7d31, 0x7d3c, 0x7d3d, 0x7d3e, 0x7d40, 0x7d41, 0x7d47,
-0x7d48, 0x7d4d, 0x7d51, 0x7d53, 0x7d57, 0x7d59, 0x7d5a, 0x7d5c,
-0x7d5d, 0x7d65, 0x7d67, 0x7d6a, 0x7d70, 0x7d78, 0x7d7a, 0x7d7b,
-0x7d7f, 0x7d81, 0x7d82, 0x7d83, 0x7d85, 0x7d86, 0x7d88, 0x7d8b,
-0x7d8c, 0x7d8d, 0x7d91, 0x7d96, 0x7d97, 0x7d9d,
-94, 0x5421,
-0x7d9e, 0x7da6, 0x7da7, 0x7daa, 0x7db3, 0x7db6, 0x7db7, 0x7db9,
-0x7dc2, 0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dcc, 0x7dcd, 0x7dce,
-0x7dd7, 0x7dd9, 0x7e00, 0x7de2, 0x7de5, 0x7de6, 0x7dea, 0x7deb,
-0x7ded, 0x7df1, 0x7df5, 0x7df6, 0x7df9, 0x7dfa, 0x7e08, 0x7e10,
-0x7e11, 0x7e15, 0x7e17, 0x7e1c, 0x7e1d, 0x7e20, 0x7e27, 0x7e28,
-0x7e2c, 0x7e2d, 0x7e2f, 0x7e33, 0x7e36, 0x7e3f, 0x7e44, 0x7e45,
-0x7e47, 0x7e4e, 0x7e50, 0x7e52, 0x7e58, 0x7e5f, 0x7e61, 0x7e62,
-0x7e65, 0x7e6b, 0x7e6e, 0x7e6f, 0x7e73, 0x7e78, 0x7e7e, 0x7e81,
-0x7e86, 0x7e87, 0x7e8a, 0x7e8d, 0x7e91, 0x7e95, 0x7e98, 0x7e9a,
-0x7e9d, 0x7e9e, 0x7f3c, 0x7f3b, 0x7f3d, 0x7f3e, 0x7f3f, 0x7f43,
-0x7f44, 0x7f47, 0x7f4f, 0x7f52, 0x7f53, 0x7f5b, 0x7f5c, 0x7f5d,
-0x7f61, 0x7f63, 0x7f64, 0x7f65, 0x7f66, 0x7f6d,
-94, 0x5521,
-0x7f71, 0x7f7d, 0x7f7e, 0x7f7f, 0x7f80, 0x7f8b, 0x7f8d, 0x7f8f,
-0x7f90, 0x7f91, 0x7f96, 0x7f97, 0x7f9c, 0x7fa1, 0x7fa2, 0x7fa6,
-0x7faa, 0x7fad, 0x7fb4, 0x7fbc, 0x7fbf, 0x7fc0, 0x7fc3, 0x7fc8,
-0x7fce, 0x7fcf, 0x7fdb, 0x7fdf, 0x7fe3, 0x7fe5, 0x7fe8, 0x7fec,
-0x7fee, 0x7fef, 0x7ff2, 0x7ffa, 0x7ffd, 0x7ffe, 0x7fff, 0x8007,
-0x8008, 0x800a, 0x800d, 0x800e, 0x800f, 0x8011, 0x8013, 0x8014,
-0x8016, 0x801d, 0x801e, 0x801f, 0x8020, 0x8024, 0x8026, 0x802c,
-0x802e, 0x8030, 0x8034, 0x8035, 0x8037, 0x8039, 0x803a, 0x803c,
-0x803e, 0x8040, 0x8044, 0x8060, 0x8064, 0x8066, 0x806d, 0x8071,
-0x8075, 0x8081, 0x8088, 0x808e, 0x809c, 0x809e, 0x80a6, 0x80a7,
-0x80ab, 0x80b8, 0x80b9, 0x80c8, 0x80cd, 0x80cf, 0x80d2, 0x80d4,
-0x80d5, 0x80d7, 0x80d8, 0x80e0, 0x80ed, 0x80ee,
-94, 0x5621,
-0x80f0, 0x80f2, 0x80f3, 0x80f6, 0x80f9, 0x80fa, 0x80fe, 0x8103,
-0x810b, 0x8116, 0x8117, 0x8118, 0x811c, 0x811e, 0x8120, 0x8124,
-0x8127, 0x812c, 0x8130, 0x8135, 0x813a, 0x813c, 0x8145, 0x8147,
-0x814a, 0x814c, 0x8152, 0x8157, 0x8160, 0x8161, 0x8167, 0x8168,
-0x8169, 0x816d, 0x816f, 0x8177, 0x8181, 0x8190, 0x8184, 0x8185,
-0x8186, 0x818b, 0x818e, 0x8196, 0x8198, 0x819b, 0x819e, 0x81a2,
-0x81ae, 0x81b2, 0x81b4, 0x81bb, 0x81cb, 0x81c3, 0x81c5, 0x81ca,
-0x81ce, 0x81cf, 0x81d5, 0x81d7, 0x81db, 0x81dd, 0x81de, 0x81e1,
-0x81e4, 0x81eb, 0x81ec, 0x81f0, 0x81f1, 0x81f2, 0x81f5, 0x81f6,
-0x81f8, 0x81f9, 0x81fd, 0x81ff, 0x8200, 0x8203, 0x820f, 0x8213,
-0x8214, 0x8219, 0x821a, 0x821d, 0x8221, 0x8222, 0x8228, 0x8232,
-0x8234, 0x823a, 0x8243, 0x8244, 0x8245, 0x8246,
-94, 0x5721,
-0x824b, 0x824e, 0x824f, 0x8251, 0x8256, 0x825c, 0x8260, 0x8263,
-0x8267, 0x826d, 0x8274, 0x827b, 0x827d, 0x827f, 0x8280, 0x8281,
-0x8283, 0x8284, 0x8287, 0x8289, 0x828a, 0x828e, 0x8291, 0x8294,
-0x8296, 0x8298, 0x829a, 0x829b, 0x82a0, 0x82a1, 0x82a3, 0x82a4,
-0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ae, 0x82b0, 0x82b2, 0x82b4,
-0x82b7, 0x82ba, 0x82bc, 0x82be, 0x82bf, 0x82c6, 0x82d0, 0x82d5,
-0x82da, 0x82e0, 0x82e2, 0x82e4, 0x82e8, 0x82ea, 0x82ed, 0x82ef,
-0x82f6, 0x82f7, 0x82fd, 0x82fe, 0x8300, 0x8301, 0x8307, 0x8308,
-0x830a, 0x830b, 0x8354, 0x831b, 0x831d, 0x831e, 0x831f, 0x8321,
-0x8322, 0x832c, 0x832d, 0x832e, 0x8330, 0x8333, 0x8337, 0x833a,
-0x833c, 0x833d, 0x8342, 0x8343, 0x8344, 0x8347, 0x834d, 0x834e,
-0x8351, 0x8355, 0x8356, 0x8357, 0x8370, 0x8378,
-94, 0x5821,
-0x837d, 0x837f, 0x8380, 0x8382, 0x8384, 0x8386, 0x838d, 0x8392,
-0x8394, 0x8395, 0x8398, 0x8399, 0x839b, 0x839c, 0x839d, 0x83a6,
-0x83a7, 0x83a9, 0x83ac, 0x83be, 0x83bf, 0x83c0, 0x83c7, 0x83c9,
-0x83cf, 0x83d0, 0x83d1, 0x83d4, 0x83dd, 0x8353, 0x83e8, 0x83ea,
-0x83f6, 0x83f8, 0x83f9, 0x83fc, 0x8401, 0x8406, 0x840a, 0x840f,
-0x8411, 0x8415, 0x8419, 0x83ad, 0x842f, 0x8439, 0x8445, 0x8447,
-0x8448, 0x844a, 0x844d, 0x844f, 0x8451, 0x8452, 0x8456, 0x8458,
-0x8459, 0x845a, 0x845c, 0x8460, 0x8464, 0x8465, 0x8467, 0x846a,
-0x8470, 0x8473, 0x8474, 0x8476, 0x8478, 0x847c, 0x847d, 0x8481,
-0x8485, 0x8492, 0x8493, 0x8495, 0x849e, 0x84a6, 0x84a8, 0x84a9,
-0x84aa, 0x84af, 0x84b1, 0x84b4, 0x84ba, 0x84bd, 0x84be, 0x84c0,
-0x84c2, 0x84c7, 0x84c8, 0x84cc, 0x84cf, 0x84d3,
-94, 0x5921,
-0x84dc, 0x84e7, 0x84ea, 0x84ef, 0x84f0, 0x84f1, 0x84f2, 0x84f7,
-0x8532, 0x84fa, 0x84fb, 0x84fd, 0x8502, 0x8503, 0x8507, 0x850c,
-0x850e, 0x8510, 0x851c, 0x851e, 0x8522, 0x8523, 0x8524, 0x8525,
-0x8527, 0x852a, 0x852b, 0x852f, 0x8533, 0x8534, 0x8536, 0x853f,
-0x8546, 0x854f, 0x8550, 0x8551, 0x8552, 0x8553, 0x8556, 0x8559,
-0x855c, 0x855d, 0x855e, 0x855f, 0x8560, 0x8561, 0x8562, 0x8564,
-0x856b, 0x856f, 0x8579, 0x857a, 0x857b, 0x857d, 0x857f, 0x8581,
-0x8585, 0x8586, 0x8589, 0x858b, 0x858c, 0x858f, 0x8593, 0x8598,
-0x859d, 0x859f, 0x85a0, 0x85a2, 0x85a5, 0x85a7, 0x85b4, 0x85b6,
-0x85b7, 0x85b8, 0x85bc, 0x85bd, 0x85be, 0x85bf, 0x85c2, 0x85c7,
-0x85ca, 0x85cb, 0x85ce, 0x85ad, 0x85d8, 0x85da, 0x85df, 0x85e0,
-0x85e6, 0x85e8, 0x85ed, 0x85f3, 0x85f6, 0x85fc,
-94, 0x5a21,
-0x85ff, 0x8600, 0x8604, 0x8605, 0x860d, 0x860e, 0x8610, 0x8611,
-0x8612, 0x8618, 0x8619, 0x861b, 0x861e, 0x8621, 0x8627, 0x8629,
-0x8636, 0x8638, 0x863a, 0x863c, 0x863d, 0x8640, 0x8642, 0x8646,
-0x8652, 0x8653, 0x8656, 0x8657, 0x8658, 0x8659, 0x865d, 0x8660,
-0x8661, 0x8662, 0x8663, 0x8664, 0x8669, 0x866c, 0x866f, 0x8675,
-0x8676, 0x8677, 0x867a, 0x868d, 0x8691, 0x8696, 0x8698, 0x869a,
-0x869c, 0x86a1, 0x86a6, 0x86a7, 0x86a8, 0x86ad, 0x86b1, 0x86b3,
-0x86b4, 0x86b5, 0x86b7, 0x86b8, 0x86b9, 0x86bf, 0x86c0, 0x86c1,
-0x86c3, 0x86c5, 0x86d1, 0x86d2, 0x86d5, 0x86d7, 0x86da, 0x86dc,
-0x86e0, 0x86e3, 0x86e5, 0x86e7, 0x8688, 0x86fa, 0x86fc, 0x86fd,
-0x8704, 0x8705, 0x8707, 0x870b, 0x870e, 0x870f, 0x8710, 0x8713,
-0x8714, 0x8719, 0x871e, 0x871f, 0x8721, 0x8723,
-94, 0x5b21,
-0x8728, 0x872e, 0x872f, 0x8731, 0x8732, 0x8739, 0x873a, 0x873c,
-0x873d, 0x873e, 0x8740, 0x8743, 0x8745, 0x874d, 0x8758, 0x875d,
-0x8761, 0x8764, 0x8765, 0x876f, 0x8771, 0x8772, 0x877b, 0x8783,
-0x8784, 0x8785, 0x8786, 0x8787, 0x8788, 0x8789, 0x878b, 0x878c,
-0x8790, 0x8793, 0x8795, 0x8797, 0x8798, 0x8799, 0x879e, 0x87a0,
-0x87a3, 0x87a7, 0x87ac, 0x87ad, 0x87ae, 0x87b1, 0x87b5, 0x87be,
-0x87bf, 0x87c1, 0x87c8, 0x87c9, 0x87ca, 0x87ce, 0x87d5, 0x87d6,
-0x87d9, 0x87da, 0x87dc, 0x87df, 0x87e2, 0x87e3, 0x87e4, 0x87ea,
-0x87eb, 0x87ed, 0x87f1, 0x87f3, 0x87f8, 0x87fa, 0x87ff, 0x8801,
-0x8803, 0x8806, 0x8809, 0x880a, 0x880b, 0x8810, 0x8819, 0x8812,
-0x8813, 0x8814, 0x8818, 0x881a, 0x881b, 0x881c, 0x881e, 0x881f,
-0x8828, 0x882d, 0x882e, 0x8830, 0x8832, 0x8835,
-94, 0x5c21,
-0x883a, 0x883c, 0x8841, 0x8843, 0x8845, 0x8848, 0x8849, 0x884a,
-0x884b, 0x884e, 0x8851, 0x8855, 0x8856, 0x8858, 0x885a, 0x885c,
-0x885f, 0x8860, 0x8864, 0x8869, 0x8871, 0x8879, 0x887b, 0x8880,
-0x8898, 0x889a, 0x889b, 0x889c, 0x889f, 0x88a0, 0x88a8, 0x88aa,
-0x88ba, 0x88bd, 0x88be, 0x88c0, 0x88ca, 0x88cb, 0x88cc, 0x88cd,
-0x88ce, 0x88d1, 0x88d2, 0x88d3, 0x88db, 0x88de, 0x88e7, 0x88ef,
-0x88f0, 0x88f1, 0x88f5, 0x88f7, 0x8901, 0x8906, 0x890d, 0x890e,
-0x890f, 0x8915, 0x8916, 0x8918, 0x8919, 0x891a, 0x891c, 0x8920,
-0x8926, 0x8927, 0x8928, 0x8930, 0x8931, 0x8932, 0x8935, 0x8939,
-0x893a, 0x893e, 0x8940, 0x8942, 0x8945, 0x8946, 0x8949, 0x894f,
-0x8952, 0x8957, 0x895a, 0x895b, 0x895c, 0x8961, 0x8962, 0x8963,
-0x896b, 0x896e, 0x8970, 0x8973, 0x8975, 0x897a,
-94, 0x5d21,
-0x897b, 0x897c, 0x897d, 0x8989, 0x898d, 0x8990, 0x8994, 0x8995,
-0x899b, 0x899c, 0x899f, 0x89a0, 0x89a5, 0x89b0, 0x89b4, 0x89b5,
-0x89b6, 0x89b7, 0x89bc, 0x89d4, 0x89d5, 0x89d6, 0x89d7, 0x89d8,
-0x89e5, 0x89e9, 0x89eb, 0x89ed, 0x89f1, 0x89f3, 0x89f6, 0x89f9,
-0x89fd, 0x89ff, 0x8a04, 0x8a05, 0x8a07, 0x8a0f, 0x8a11, 0x8a12,
-0x8a14, 0x8a15, 0x8a1e, 0x8a20, 0x8a22, 0x8a24, 0x8a26, 0x8a2b,
-0x8a2c, 0x8a2f, 0x8a35, 0x8a37, 0x8a3d, 0x8a3e, 0x8a40, 0x8a43,
-0x8a45, 0x8a47, 0x8a49, 0x8a4d, 0x8a4e, 0x8a53, 0x8a56, 0x8a57,
-0x8a58, 0x8a5c, 0x8a5d, 0x8a61, 0x8a65, 0x8a67, 0x8a75, 0x8a76,
-0x8a77, 0x8a79, 0x8a7a, 0x8a7b, 0x8a7e, 0x8a7f, 0x8a80, 0x8a83,
-0x8a86, 0x8a8b, 0x8a8f, 0x8a90, 0x8a92, 0x8a96, 0x8a97, 0x8a99,
-0x8a9f, 0x8aa7, 0x8aa9, 0x8aae, 0x8aaf, 0x8ab3,
-94, 0x5e21,
-0x8ab6, 0x8ab7, 0x8abb, 0x8abe, 0x8ac3, 0x8ac6, 0x8ac8, 0x8ac9,
-0x8aca, 0x8ad1, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad7, 0x8add, 0x8adf,
-0x8aec, 0x8af0, 0x8af4, 0x8af5, 0x8af6, 0x8afc, 0x8aff, 0x8b05,
-0x8b06, 0x8b0b, 0x8b11, 0x8b1c, 0x8b1e, 0x8b1f, 0x8b0a, 0x8b2d,
-0x8b30, 0x8b37, 0x8b3c, 0x8b42, 0x8b43, 0x8b44, 0x8b45, 0x8b46,
-0x8b48, 0x8b52, 0x8b53, 0x8b54, 0x8b59, 0x8b4d, 0x8b5e, 0x8b63,
-0x8b6d, 0x8b76, 0x8b78, 0x8b79, 0x8b7c, 0x8b7e, 0x8b81, 0x8b84,
-0x8b85, 0x8b8b, 0x8b8d, 0x8b8f, 0x8b94, 0x8b95, 0x8b9c, 0x8b9e,
-0x8b9f, 0x8c38, 0x8c39, 0x8c3d, 0x8c3e, 0x8c45, 0x8c47, 0x8c49,
-0x8c4b, 0x8c4f, 0x8c51, 0x8c53, 0x8c54, 0x8c57, 0x8c58, 0x8c5b,
-0x8c5d, 0x8c59, 0x8c63, 0x8c64, 0x8c66, 0x8c68, 0x8c69, 0x8c6d,
-0x8c73, 0x8c75, 0x8c76, 0x8c7b, 0x8c7e, 0x8c86,
-94, 0x5f21,
-0x8c87, 0x8c8b, 0x8c90, 0x8c92, 0x8c93, 0x8c99, 0x8c9b, 0x8c9c,
-0x8ca4, 0x8cb9, 0x8cba, 0x8cc5, 0x8cc6, 0x8cc9, 0x8ccb, 0x8ccf,
-0x8cd6, 0x8cd5, 0x8cd9, 0x8cdd, 0x8ce1, 0x8ce8, 0x8cec, 0x8cef,
-0x8cf0, 0x8cf2, 0x8cf5, 0x8cf7, 0x8cf8, 0x8cfe, 0x8cff, 0x8d01,
-0x8d03, 0x8d09, 0x8d12, 0x8d17, 0x8d1b, 0x8d65, 0x8d69, 0x8d6c,
-0x8d6e, 0x8d7f, 0x8d82, 0x8d84, 0x8d88, 0x8d8d, 0x8d90, 0x8d91,
-0x8d95, 0x8d9e, 0x8d9f, 0x8da0, 0x8da6, 0x8dab, 0x8dac, 0x8daf,
-0x8db2, 0x8db5, 0x8db7, 0x8db9, 0x8dbb, 0x8dc0, 0x8dc5, 0x8dc6,
-0x8dc7, 0x8dc8, 0x8dca, 0x8dce, 0x8dd1, 0x8dd4, 0x8dd5, 0x8dd7,
-0x8dd9, 0x8de4, 0x8de5, 0x8de7, 0x8dec, 0x8df0, 0x8dbc, 0x8df1,
-0x8df2, 0x8df4, 0x8dfd, 0x8e01, 0x8e04, 0x8e05, 0x8e06, 0x8e0b,
-0x8e11, 0x8e14, 0x8e16, 0x8e20, 0x8e21, 0x8e22,
-94, 0x6021,
-0x8e23, 0x8e26, 0x8e27, 0x8e31, 0x8e33, 0x8e36, 0x8e37, 0x8e38,
-0x8e39, 0x8e3d, 0x8e40, 0x8e41, 0x8e4b, 0x8e4d, 0x8e4e, 0x8e4f,
-0x8e54, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, 0x8e61, 0x8e62, 0x8e69,
-0x8e6c, 0x8e6d, 0x8e6f, 0x8e70, 0x8e71, 0x8e79, 0x8e7a, 0x8e7b,
-0x8e82, 0x8e83, 0x8e89, 0x8e90, 0x8e92, 0x8e95, 0x8e9a, 0x8e9b,
-0x8e9d, 0x8e9e, 0x8ea2, 0x8ea7, 0x8ea9, 0x8ead, 0x8eae, 0x8eb3,
-0x8eb5, 0x8eba, 0x8ebb, 0x8ec0, 0x8ec1, 0x8ec3, 0x8ec4, 0x8ec7,
-0x8ecf, 0x8ed1, 0x8ed4, 0x8edc, 0x8ee8, 0x8eee, 0x8ef0, 0x8ef1,
-0x8ef7, 0x8ef9, 0x8efa, 0x8eed, 0x8f00, 0x8f02, 0x8f07, 0x8f08,
-0x8f0f, 0x8f10, 0x8f16, 0x8f17, 0x8f18, 0x8f1e, 0x8f20, 0x8f21,
-0x8f23, 0x8f25, 0x8f27, 0x8f28, 0x8f2c, 0x8f2d, 0x8f2e, 0x8f34,
-0x8f35, 0x8f36, 0x8f37, 0x8f3a, 0x8f40, 0x8f41,
-94, 0x6121,
-0x8f43, 0x8f47, 0x8f4f, 0x8f51, 0x8f52, 0x8f53, 0x8f54, 0x8f55,
-0x8f58, 0x8f5d, 0x8f5e, 0x8f65, 0x8f9d, 0x8fa0, 0x8fa1, 0x8fa4,
-0x8fa5, 0x8fa6, 0x8fb5, 0x8fb6, 0x8fb8, 0x8fbe, 0x8fc0, 0x8fc1,
-0x8fc6, 0x8fca, 0x8fcb, 0x8fcd, 0x8fd0, 0x8fd2, 0x8fd3, 0x8fd5,
-0x8fe0, 0x8fe3, 0x8fe4, 0x8fe8, 0x8fee, 0x8ff1, 0x8ff5, 0x8ff6,
-0x8ffb, 0x8ffe, 0x9002, 0x9004, 0x9008, 0x900c, 0x9018, 0x901b,
-0x9028, 0x9029, 0x902f, 0x902a, 0x902c, 0x902d, 0x9033, 0x9034,
-0x9037, 0x903f, 0x9043, 0x9044, 0x904c, 0x905b, 0x905d, 0x9062,
-0x9066, 0x9067, 0x906c, 0x9070, 0x9074, 0x9079, 0x9085, 0x9088,
-0x908b, 0x908c, 0x908e, 0x9090, 0x9095, 0x9097, 0x9098, 0x9099,
-0x909b, 0x90a0, 0x90a1, 0x90a2, 0x90a5, 0x90b0, 0x90b2, 0x90b3,
-0x90b4, 0x90b6, 0x90bd, 0x90cc, 0x90be, 0x90c3,
-94, 0x6221,
-0x90c4, 0x90c5, 0x90c7, 0x90c8, 0x90d5, 0x90d7, 0x90d8, 0x90d9,
-0x90dc, 0x90dd, 0x90df, 0x90e5, 0x90d2, 0x90f6, 0x90eb, 0x90ef,
-0x90f0, 0x90f4, 0x90fe, 0x90ff, 0x9100, 0x9104, 0x9105, 0x9106,
-0x9108, 0x910d, 0x9110, 0x9114, 0x9116, 0x9117, 0x9118, 0x911a,
-0x911c, 0x911e, 0x9120, 0x9125, 0x9122, 0x9123, 0x9127, 0x9129,
-0x912e, 0x912f, 0x9131, 0x9134, 0x9136, 0x9137, 0x9139, 0x913a,
-0x913c, 0x913d, 0x9143, 0x9147, 0x9148, 0x914f, 0x9153, 0x9157,
-0x9159, 0x915a, 0x915b, 0x9161, 0x9164, 0x9167, 0x916d, 0x9174,
-0x9179, 0x917a, 0x917b, 0x9181, 0x9183, 0x9185, 0x9186, 0x918a,
-0x918e, 0x9191, 0x9193, 0x9194, 0x9195, 0x9198, 0x919e, 0x91a1,
-0x91a6, 0x91a8, 0x91ac, 0x91ad, 0x91ae, 0x91b0, 0x91b1, 0x91b2,
-0x91b3, 0x91b6, 0x91bb, 0x91bc, 0x91bd, 0x91bf,
-94, 0x6321,
-0x91c2, 0x91c3, 0x91c5, 0x91d3, 0x91d4, 0x91d7, 0x91d9, 0x91da,
-0x91de, 0x91e4, 0x91e5, 0x91e9, 0x91ea, 0x91ec, 0x91ed, 0x91ee,
-0x91ef, 0x91f0, 0x91f1, 0x91f7, 0x91f9, 0x91fb, 0x91fd, 0x9200,
-0x9201, 0x9204, 0x9205, 0x9206, 0x9207, 0x9209, 0x920a, 0x920c,
-0x9210, 0x9212, 0x9213, 0x9216, 0x9218, 0x921c, 0x921d, 0x9223,
-0x9224, 0x9225, 0x9226, 0x9228, 0x922e, 0x922f, 0x9230, 0x9233,
-0x9235, 0x9236, 0x9238, 0x9239, 0x923a, 0x923c, 0x923e, 0x9240,
-0x9242, 0x9243, 0x9246, 0x9247, 0x924a, 0x924d, 0x924e, 0x924f,
-0x9251, 0x9258, 0x9259, 0x925c, 0x925d, 0x9260, 0x9261, 0x9265,
-0x9267, 0x9268, 0x9269, 0x926e, 0x926f, 0x9270, 0x9275, 0x9276,
-0x9277, 0x9278, 0x9279, 0x927b, 0x927c, 0x927d, 0x927f, 0x9288,
-0x9289, 0x928a, 0x928d, 0x928e, 0x9292, 0x9297,
-94, 0x6421,
-0x9299, 0x929f, 0x92a0, 0x92a4, 0x92a5, 0x92a7, 0x92a8, 0x92ab,
-0x92af, 0x92b2, 0x92b6, 0x92b8, 0x92ba, 0x92bb, 0x92bc, 0x92bd,
-0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c5, 0x92c6, 0x92c7,
-0x92c8, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92d0, 0x92d3, 0x92d5,
-0x92d7, 0x92d8, 0x92d9, 0x92dc, 0x92dd, 0x92df, 0x92e0, 0x92e1,
-0x92e3, 0x92e5, 0x92e7, 0x92e8, 0x92ec, 0x92ee, 0x92f0, 0x92f9,
-0x92fb, 0x92ff, 0x9300, 0x9302, 0x9308, 0x930d, 0x9311, 0x9314,
-0x9315, 0x931c, 0x931d, 0x931e, 0x931f, 0x9321, 0x9324, 0x9325,
-0x9327, 0x9329, 0x932a, 0x9333, 0x9334, 0x9336, 0x9337, 0x9347,
-0x9348, 0x9349, 0x9350, 0x9351, 0x9352, 0x9355, 0x9357, 0x9358,
-0x935a, 0x935e, 0x9364, 0x9365, 0x9367, 0x9369, 0x936a, 0x936d,
-0x936f, 0x9370, 0x9371, 0x9373, 0x9374, 0x9376,
-94, 0x6521,
-0x937a, 0x937d, 0x937f, 0x9380, 0x9381, 0x9382, 0x9388, 0x938a,
-0x938b, 0x938d, 0x938f, 0x9392, 0x9395, 0x9398, 0x939b, 0x939e,
-0x93a1, 0x93a3, 0x93a4, 0x93a6, 0x93a8, 0x93ab, 0x93b4, 0x93b5,
-0x93b6, 0x93ba, 0x93a9, 0x93c1, 0x93c4, 0x93c5, 0x93c6, 0x93c7,
-0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, 0x93d3, 0x93d9, 0x93dc,
-0x93de, 0x93df, 0x93e2, 0x93e6, 0x93e7, 0x93f9, 0x93f7, 0x93f8,
-0x93fa, 0x93fb, 0x93fd, 0x9401, 0x9402, 0x9404, 0x9408, 0x9409,
-0x940d, 0x940e, 0x940f, 0x9415, 0x9416, 0x9417, 0x941f, 0x942e,
-0x942f, 0x9431, 0x9432, 0x9433, 0x9434, 0x943b, 0x943f, 0x943d,
-0x9443, 0x9445, 0x9448, 0x944a, 0x944c, 0x9455, 0x9459, 0x945c,
-0x945f, 0x9461, 0x9463, 0x9468, 0x946b, 0x946d, 0x946e, 0x946f,
-0x9471, 0x9472, 0x9484, 0x9483, 0x9578, 0x9579,
-94, 0x6621,
-0x957e, 0x9584, 0x9588, 0x958c, 0x958d, 0x958e, 0x959d, 0x959e,
-0x959f, 0x95a1, 0x95a6, 0x95a9, 0x95ab, 0x95ac, 0x95b4, 0x95b6,
-0x95ba, 0x95bd, 0x95bf, 0x95c6, 0x95c8, 0x95c9, 0x95cb, 0x95d0,
-0x95d1, 0x95d2, 0x95d3, 0x95d9, 0x95da, 0x95dd, 0x95de, 0x95df,
-0x95e0, 0x95e4, 0x95e6, 0x961d, 0x961e, 0x9622, 0x9624, 0x9625,
-0x9626, 0x962c, 0x9631, 0x9633, 0x9637, 0x9638, 0x9639, 0x963a,
-0x963c, 0x963d, 0x9641, 0x9652, 0x9654, 0x9656, 0x9657, 0x9658,
-0x9661, 0x966e, 0x9674, 0x967b, 0x967c, 0x967e, 0x967f, 0x9681,
-0x9682, 0x9683, 0x9684, 0x9689, 0x9691, 0x9696, 0x969a, 0x969d,
-0x969f, 0x96a4, 0x96a5, 0x96a6, 0x96a9, 0x96ae, 0x96af, 0x96b3,
-0x96ba, 0x96ca, 0x96d2, 0x5db2, 0x96d8, 0x96da, 0x96dd, 0x96de,
-0x96df, 0x96e9, 0x96ef, 0x96f1, 0x96fa, 0x9702,
-94, 0x6721,
-0x9703, 0x9705, 0x9709, 0x971a, 0x971b, 0x971d, 0x9721, 0x9722,
-0x9723, 0x9728, 0x9731, 0x9733, 0x9741, 0x9743, 0x974a, 0x974e,
-0x974f, 0x9755, 0x9757, 0x9758, 0x975a, 0x975b, 0x9763, 0x9767,
-0x976a, 0x976e, 0x9773, 0x9776, 0x9777, 0x9778, 0x977b, 0x977d,
-0x977f, 0x9780, 0x9789, 0x9795, 0x9796, 0x9797, 0x9799, 0x979a,
-0x979e, 0x979f, 0x97a2, 0x97ac, 0x97ae, 0x97b1, 0x97b2, 0x97b5,
-0x97b6, 0x97b8, 0x97b9, 0x97ba, 0x97bc, 0x97be, 0x97bf, 0x97c1,
-0x97c4, 0x97c5, 0x97c7, 0x97c9, 0x97ca, 0x97cc, 0x97cd, 0x97ce,
-0x97d0, 0x97d1, 0x97d4, 0x97d7, 0x97d8, 0x97d9, 0x97dd, 0x97de,
-0x97e0, 0x97db, 0x97e1, 0x97e4, 0x97ef, 0x97f1, 0x97f4, 0x97f7,
-0x97f8, 0x97fa, 0x9807, 0x980a, 0x9819, 0x980d, 0x980e, 0x9814,
-0x9816, 0x981c, 0x981e, 0x9820, 0x9823, 0x9826,
-94, 0x6821,
-0x982b, 0x982e, 0x982f, 0x9830, 0x9832, 0x9833, 0x9835, 0x9825,
-0x983e, 0x9844, 0x9847, 0x984a, 0x9851, 0x9852, 0x9853, 0x9856,
-0x9857, 0x9859, 0x985a, 0x9862, 0x9863, 0x9865, 0x9866, 0x986a,
-0x986c, 0x98ab, 0x98ad, 0x98ae, 0x98b0, 0x98b4, 0x98b7, 0x98b8,
-0x98ba, 0x98bb, 0x98bf, 0x98c2, 0x98c5, 0x98c8, 0x98cc, 0x98e1,
-0x98e3, 0x98e5, 0x98e6, 0x98e7, 0x98ea, 0x98f3, 0x98f6, 0x9902,
-0x9907, 0x9908, 0x9911, 0x9915, 0x9916, 0x9917, 0x991a, 0x991b,
-0x991c, 0x991f, 0x9922, 0x9926, 0x9927, 0x992b, 0x9931, 0x9932,
-0x9933, 0x9934, 0x9935, 0x9939, 0x993a, 0x993b, 0x993c, 0x9940,
-0x9941, 0x9946, 0x9947, 0x9948, 0x994d, 0x994e, 0x9954, 0x9958,
-0x9959, 0x995b, 0x995c, 0x995e, 0x995f, 0x9960, 0x999b, 0x999d,
-0x999f, 0x99a6, 0x99b0, 0x99b1, 0x99b2, 0x99b5,
-94, 0x6921,
-0x99b9, 0x99ba, 0x99bd, 0x99bf, 0x99c3, 0x99c9, 0x99d3, 0x99d4,
-0x99d9, 0x99da, 0x99dc, 0x99de, 0x99e7, 0x99ea, 0x99eb, 0x99ec,
-0x99f0, 0x99f4, 0x99f5, 0x99f9, 0x99fd, 0x99fe, 0x9a02, 0x9a03,
-0x9a04, 0x9a0b, 0x9a0c, 0x9a10, 0x9a11, 0x9a16, 0x9a1e, 0x9a20,
-0x9a22, 0x9a23, 0x9a24, 0x9a27, 0x9a2d, 0x9a2e, 0x9a33, 0x9a35,
-0x9a36, 0x9a38, 0x9a47, 0x9a41, 0x9a44, 0x9a4a, 0x9a4b, 0x9a4c,
-0x9a4e, 0x9a51, 0x9a54, 0x9a56, 0x9a5d, 0x9aaa, 0x9aac, 0x9aae,
-0x9aaf, 0x9ab2, 0x9ab4, 0x9ab5, 0x9ab6, 0x9ab9, 0x9abb, 0x9abe,
-0x9abf, 0x9ac1, 0x9ac3, 0x9ac6, 0x9ac8, 0x9ace, 0x9ad0, 0x9ad2,
-0x9ad5, 0x9ad6, 0x9ad7, 0x9adb, 0x9adc, 0x9ae0, 0x9ae4, 0x9ae5,
-0x9ae7, 0x9ae9, 0x9aec, 0x9af2, 0x9af3, 0x9af5, 0x9af9, 0x9afa,
-0x9afd, 0x9aff, 0x9b00, 0x9b01, 0x9b02, 0x9b03,
-94, 0x6a21,
-0x9b04, 0x9b05, 0x9b08, 0x9b09, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e,
-0x9b10, 0x9b12, 0x9b16, 0x9b19, 0x9b1b, 0x9b1c, 0x9b20, 0x9b26,
-0x9b2b, 0x9b2d, 0x9b33, 0x9b34, 0x9b35, 0x9b37, 0x9b39, 0x9b3a,
-0x9b3d, 0x9b48, 0x9b4b, 0x9b4c, 0x9b55, 0x9b56, 0x9b57, 0x9b5b,
-0x9b5e, 0x9b61, 0x9b63, 0x9b65, 0x9b66, 0x9b68, 0x9b6a, 0x9b6b,
-0x9b6c, 0x9b6d, 0x9b6e, 0x9b73, 0x9b75, 0x9b77, 0x9b78, 0x9b79,
-0x9b7f, 0x9b80, 0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b89, 0x9b8a,
-0x9b8b, 0x9b8d, 0x9b8f, 0x9b90, 0x9b94, 0x9b9a, 0x9b9d, 0x9b9e,
-0x9ba6, 0x9ba7, 0x9ba9, 0x9bac, 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb7,
-0x9bb8, 0x9bbb, 0x9bbc, 0x9bbe, 0x9bbf, 0x9bc1, 0x9bc7, 0x9bc8,
-0x9bce, 0x9bd0, 0x9bd7, 0x9bd8, 0x9bdd, 0x9bdf, 0x9be5, 0x9be7,
-0x9bea, 0x9beb, 0x9bef, 0x9bf3, 0x9bf7, 0x9bf8,
-94, 0x6b21,
-0x9bf9, 0x9bfa, 0x9bfd, 0x9bff, 0x9c00, 0x9c02, 0x9c0b, 0x9c0f,
-0x9c11, 0x9c16, 0x9c18, 0x9c19, 0x9c1a, 0x9c1c, 0x9c1e, 0x9c22,
-0x9c23, 0x9c26, 0x9c27, 0x9c28, 0x9c29, 0x9c2a, 0x9c31, 0x9c35,
-0x9c36, 0x9c37, 0x9c3d, 0x9c41, 0x9c43, 0x9c44, 0x9c45, 0x9c49,
-0x9c4a, 0x9c4e, 0x9c4f, 0x9c50, 0x9c53, 0x9c54, 0x9c56, 0x9c58,
-0x9c5b, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c63, 0x9c69, 0x9c6a, 0x9c5c,
-0x9c6b, 0x9c68, 0x9c6e, 0x9c70, 0x9c72, 0x9c75, 0x9c77, 0x9c7b,
-0x9ce6, 0x9cf2, 0x9cf7, 0x9cf9, 0x9d0b, 0x9d02, 0x9d11, 0x9d17,
-0x9d18, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d2f, 0x9d30, 0x9d32, 0x9d33,
-0x9d34, 0x9d3a, 0x9d3c, 0x9d45, 0x9d3d, 0x9d42, 0x9d43, 0x9d47,
-0x9d4a, 0x9d53, 0x9d54, 0x9d5f, 0x9d63, 0x9d62, 0x9d65, 0x9d69,
-0x9d6a, 0x9d6b, 0x9d70, 0x9d76, 0x9d77, 0x9d7b,
-94, 0x6c21,
-0x9d7c, 0x9d7e, 0x9d83, 0x9d84, 0x9d86, 0x9d8a, 0x9d8d, 0x9d8e,
-0x9d92, 0x9d93, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9da1, 0x9daa,
-0x9dac, 0x9dae, 0x9db1, 0x9db5, 0x9db9, 0x9dbc, 0x9dbf, 0x9dc3,
-0x9dc7, 0x9dc9, 0x9dca, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dda,
-0x9dde, 0x9ddf, 0x9de0, 0x9de5, 0x9de7, 0x9de9, 0x9deb, 0x9dee,
-0x9df0, 0x9df3, 0x9df4, 0x9dfe, 0x9e0a, 0x9e02, 0x9e07, 0x9e0e,
-0x9e10, 0x9e11, 0x9e12, 0x9e15, 0x9e16, 0x9e19, 0x9e1c, 0x9e1d,
-0x9e7a, 0x9e7b, 0x9e7c, 0x9e80, 0x9e82, 0x9e83, 0x9e84, 0x9e85,
-0x9e87, 0x9e8e, 0x9e8f, 0x9e96, 0x9e98, 0x9e9b, 0x9e9e, 0x9ea4,
-0x9ea8, 0x9eac, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb3, 0x9eb4, 0x9eb5,
-0x9ec6, 0x9ec8, 0x9ecb, 0x9ed5, 0x9edf, 0x9ee4, 0x9ee7, 0x9eec,
-0x9eed, 0x9eee, 0x9ef0, 0x9ef1, 0x9ef2, 0x9ef5,
-67, 0x6d21,
-0x9ef8, 0x9eff, 0x9f02, 0x9f03, 0x9f09, 0x9f0f, 0x9f10, 0x9f11,
-0x9f12, 0x9f14, 0x9f16, 0x9f17, 0x9f19, 0x9f1a, 0x9f1b, 0x9f1f,
-0x9f22, 0x9f26, 0x9f2a, 0x9f2b, 0x9f2f, 0x9f31, 0x9f32, 0x9f34,
-0x9f37, 0x9f39, 0x9f3a, 0x9f3c, 0x9f3d, 0x9f3f, 0x9f41, 0x9f43,
-0x9f44, 0x9f45, 0x9f46, 0x9f47, 0x9f53, 0x9f55, 0x9f56, 0x9f57,
-0x9f58, 0x9f5a, 0x9f5d, 0x9f5e, 0x9f68, 0x9f69, 0x9f6d, 0x9f6e,
-0x9f6f, 0x9f70, 0x9f71, 0x9f73, 0x9f75, 0x9f7a, 0x9f7d, 0x9f8f,
-0x9f90, 0x9f91, 0x9f92, 0x9f94, 0x9f96, 0x9f97, 0x9f9e, 0x9fa1,
-0x9fa2, 0x9fa3, 0x9fa5,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/ksc5601.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/ksc5601.h
deleted file mode 100644
index bc1d71b3c6..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/ksc5601.h
+++ /dev/null
@@ -1,1152 +0,0 @@
-94, 0x2121,
-0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, 0x3003,
-0x00ad, 0x2015, 0x2225, 0xff3c, 0x223c, 0x2018, 0x2019, 0x201c,
-0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c,
-0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0x00b1, 0x00d7, 0x00f7,
-0x2260, 0x2264, 0x2265, 0x221e, 0x2234, 0x00b0, 0x2032, 0x2033,
-0x2103, 0x212b, 0xffe0, 0xffe1, 0xffe5, 0x2642, 0x2640, 0x2220,
-0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x00a7, 0x203b,
-0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1,
-0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x2192, 0x2190, 0x2191,
-0x2193, 0x2194, 0x3013, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d,
-0x2235, 0x222b, 0x222c, 0x2208, 0x220b, 0x2286, 0x2287, 0x2282,
-0x2283, 0x222a, 0x2229, 0x2227, 0x2228, 0xffe2,
-69, 0x2221,
-0x21d2, 0x21d4, 0x2200, 0x2203, 0x00b4, 0xff5e, 0x02c7, 0x02d8,
-0x02dd, 0x02da, 0x02d9, 0x00b8, 0x02db, 0x00a1, 0x00bf, 0x02d0,
-0x222e, 0x2211, 0x220f, 0x00a4, 0x2109, 0x2030, 0x25c1, 0x25c0,
-0x25b7, 0x25b6, 0x2664, 0x2660, 0x2661, 0x2665, 0x2667, 0x2663,
-0x2299, 0x25c8, 0x25a3, 0x25d0, 0x25d1, 0x2592, 0x25a4, 0x25a5,
-0x25a8, 0x25a7, 0x25a6, 0x25a9, 0x2668, 0x260f, 0x260e, 0x261c,
-0x261e, 0x00b6, 0x2020, 0x2021, 0x2195, 0x2197, 0x2199, 0x2196,
-0x2198, 0x266d, 0x2669, 0x266a, 0x266c, 0x327f, 0x321c, 0x2116,
-0x33c7, 0x2122, 0x33c2, 0x33d8, 0x2121,
-94, 0x2321,
-0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, 0xff08,
-0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10,
-0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
-0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20,
-0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28,
-0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30,
-0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38,
-0xff39, 0xff3a, 0xff3b, 0xffe6, 0xff3d, 0xff3e, 0xff3f, 0xff40,
-0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48,
-0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50,
-0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58,
-0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3,
-94, 0x2421,
-0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138,
-0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140,
-0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
-0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150,
-0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158,
-0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160,
-0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, 0x3168,
-0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, 0x3170,
-0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, 0x3178,
-0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, 0x3180,
-0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, 0x3188,
-0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e,
-10, 0x2521,
-0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
-0x2178, 0x2179,
-10, 0x2530,
-0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167,
-0x2168, 0x2169,
-24, 0x2541,
-0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
-0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
-0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
-24, 0x2561,
-0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
-0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
-0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
-68, 0x2621,
-0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c,
-0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b,
-0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f,
-0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542,
-0x2512, 0x2511, 0x251a, 0x2519, 0x2516, 0x2515, 0x250e, 0x250d,
-0x251e, 0x251f, 0x2521, 0x2522, 0x2526, 0x2527, 0x2529, 0x252a,
-0x252d, 0x252e, 0x2531, 0x2532, 0x2535, 0x2536, 0x2539, 0x253a,
-0x253d, 0x253e, 0x2540, 0x2541, 0x2543, 0x2544, 0x2545, 0x2546,
-0x2547, 0x2548, 0x2549, 0x254a,
-79, 0x2721,
-0x3395, 0x3396, 0x3397, 0x2113, 0x3398, 0x33c4, 0x33a3, 0x33a4,
-0x33a5, 0x33a6, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, 0x339e,
-0x339f, 0x33a0, 0x33a1, 0x33a2, 0x33ca, 0x338d, 0x338e, 0x338f,
-0x33cf, 0x3388, 0x3389, 0x33c8, 0x33a7, 0x33a8, 0x33b0, 0x33b1,
-0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, 0x33b8, 0x33b9,
-0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x33ba, 0x33bb, 0x33bc,
-0x33bd, 0x33be, 0x33bf, 0x3390, 0x3391, 0x3392, 0x3393, 0x3394,
-0x2126, 0x33c0, 0x33c1, 0x338a, 0x338b, 0x338c, 0x33d6, 0x33c5,
-0x33ad, 0x33ae, 0x33af, 0x33db, 0x33a9, 0x33aa, 0x33ab, 0x33ac,
-0x33dd, 0x33d0, 0x33d3, 0x33c3, 0x33c9, 0x33dc, 0x33c6,
-4, 0x2821,
-0x00c6, 0x00d0, 0x00aa, 0x0126,
-1, 0x2826,
-0x0132,
-8, 0x2828,
-0x013f, 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a,
-78, 0x2831,
-0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, 0x3267,
-0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, 0x326f,
-0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, 0x3277,
-0x3278, 0x3279, 0x327a, 0x327b, 0x24d0, 0x24d1, 0x24d2, 0x24d3,
-0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, 0x24da, 0x24db,
-0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, 0x24e2, 0x24e3,
-0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, 0x2460, 0x2461,
-0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469,
-0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x00bd, 0x2153, 0x2154,
-0x00bc, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e,
-94, 0x2921,
-0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, 0x0140,
-0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0x0149,
-0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, 0x3207,
-0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, 0x320f,
-0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, 0x3217,
-0x3218, 0x3219, 0x321a, 0x321b, 0x249c, 0x249d, 0x249e, 0x249f,
-0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7,
-0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af,
-0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x2474, 0x2475,
-0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d,
-0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x00b9, 0x00b2, 0x00b3,
-0x2074, 0x207f, 0x2081, 0x2082, 0x2083, 0x2084,
-83, 0x2a21,
-0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
-0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
-0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
-0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
-0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
-0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
-0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
-0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
-0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
-0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
-0x3091, 0x3092, 0x3093,
-86, 0x2b21,
-0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
-0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
-0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
-0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
-0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
-0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
-0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
-0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
-0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
-0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
-0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6,
-33, 0x2c21,
-0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416,
-0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
-0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426,
-0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e,
-0x042f,
-33, 0x2c51,
-0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436,
-0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
-0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446,
-0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e,
-0x044f,
-94, 0x3021,
-0xac00, 0xac01, 0xac04, 0xac07, 0xac08, 0xac09, 0xac0a, 0xac10,
-0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, 0xac19,
-0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac20, 0xac24, 0xac2c, 0xac2d,
-0xac2f, 0xac30, 0xac31, 0xac38, 0xac39, 0xac3c, 0xac40, 0xac4b,
-0xac4d, 0xac54, 0xac58, 0xac5c, 0xac70, 0xac71, 0xac74, 0xac77,
-0xac78, 0xac7a, 0xac80, 0xac81, 0xac83, 0xac84, 0xac85, 0xac86,
-0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac90, 0xac94, 0xac9c, 0xac9d,
-0xac9f, 0xaca0, 0xaca1, 0xaca8, 0xaca9, 0xacaa, 0xacac, 0xacaf,
-0xacb0, 0xacb8, 0xacb9, 0xacbb, 0xacbc, 0xacbd, 0xacc1, 0xacc4,
-0xacc8, 0xaccc, 0xacd5, 0xacd7, 0xace0, 0xace1, 0xace4, 0xace7,
-0xace8, 0xacea, 0xacec, 0xacef, 0xacf0, 0xacf1, 0xacf3, 0xacf5,
-0xacf6, 0xacfc, 0xacfd, 0xad00, 0xad04, 0xad06,
-94, 0x3121,
-0xad0c, 0xad0d, 0xad0f, 0xad11, 0xad18, 0xad1c, 0xad20, 0xad29,
-0xad2c, 0xad2d, 0xad34, 0xad35, 0xad38, 0xad3c, 0xad44, 0xad45,
-0xad47, 0xad49, 0xad50, 0xad54, 0xad58, 0xad61, 0xad63, 0xad6c,
-0xad6d, 0xad70, 0xad73, 0xad74, 0xad75, 0xad76, 0xad7b, 0xad7c,
-0xad7d, 0xad7f, 0xad81, 0xad82, 0xad88, 0xad89, 0xad8c, 0xad90,
-0xad9c, 0xad9d, 0xada4, 0xadb7, 0xadc0, 0xadc1, 0xadc4, 0xadc8,
-0xadd0, 0xadd1, 0xadd3, 0xaddc, 0xade0, 0xade4, 0xadf8, 0xadf9,
-0xadfc, 0xadff, 0xae00, 0xae01, 0xae08, 0xae09, 0xae0b, 0xae0d,
-0xae14, 0xae30, 0xae31, 0xae34, 0xae37, 0xae38, 0xae3a, 0xae40,
-0xae41, 0xae43, 0xae45, 0xae46, 0xae4a, 0xae4c, 0xae4d, 0xae4e,
-0xae50, 0xae54, 0xae56, 0xae5c, 0xae5d, 0xae5f, 0xae60, 0xae61,
-0xae65, 0xae68, 0xae69, 0xae6c, 0xae70, 0xae78,
-94, 0x3221,
-0xae79, 0xae7b, 0xae7c, 0xae7d, 0xae84, 0xae85, 0xae8c, 0xaebc,
-0xaebd, 0xaebe, 0xaec0, 0xaec4, 0xaecc, 0xaecd, 0xaecf, 0xaed0,
-0xaed1, 0xaed8, 0xaed9, 0xaedc, 0xaee8, 0xaeeb, 0xaeed, 0xaef4,
-0xaef8, 0xaefc, 0xaf07, 0xaf08, 0xaf0d, 0xaf10, 0xaf2c, 0xaf2d,
-0xaf30, 0xaf32, 0xaf34, 0xaf3c, 0xaf3d, 0xaf3f, 0xaf41, 0xaf42,
-0xaf43, 0xaf48, 0xaf49, 0xaf50, 0xaf5c, 0xaf5d, 0xaf64, 0xaf65,
-0xaf79, 0xaf80, 0xaf84, 0xaf88, 0xaf90, 0xaf91, 0xaf95, 0xaf9c,
-0xafb8, 0xafb9, 0xafbc, 0xafc0, 0xafc7, 0xafc8, 0xafc9, 0xafcb,
-0xafcd, 0xafce, 0xafd4, 0xafdc, 0xafe8, 0xafe9, 0xaff0, 0xaff1,
-0xaff4, 0xaff8, 0xb000, 0xb001, 0xb004, 0xb00c, 0xb010, 0xb014,
-0xb01c, 0xb01d, 0xb028, 0xb044, 0xb045, 0xb048, 0xb04a, 0xb04c,
-0xb04e, 0xb053, 0xb054, 0xb055, 0xb057, 0xb059,
-94, 0x3321,
-0xb05d, 0xb07c, 0xb07d, 0xb080, 0xb084, 0xb08c, 0xb08d, 0xb08f,
-0xb091, 0xb098, 0xb099, 0xb09a, 0xb09c, 0xb09f, 0xb0a0, 0xb0a1,
-0xb0a2, 0xb0a8, 0xb0a9, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af,
-0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b8, 0xb0bc, 0xb0c4, 0xb0c5,
-0xb0c7, 0xb0c8, 0xb0c9, 0xb0d0, 0xb0d1, 0xb0d4, 0xb0d8, 0xb0e0,
-0xb0e5, 0xb108, 0xb109, 0xb10b, 0xb10c, 0xb110, 0xb112, 0xb113,
-0xb118, 0xb119, 0xb11b, 0xb11c, 0xb11d, 0xb123, 0xb124, 0xb125,
-0xb128, 0xb12c, 0xb134, 0xb135, 0xb137, 0xb138, 0xb139, 0xb140,
-0xb141, 0xb144, 0xb148, 0xb150, 0xb151, 0xb154, 0xb155, 0xb158,
-0xb15c, 0xb160, 0xb178, 0xb179, 0xb17c, 0xb180, 0xb182, 0xb188,
-0xb189, 0xb18b, 0xb18d, 0xb192, 0xb193, 0xb194, 0xb198, 0xb19c,
-0xb1a8, 0xb1cc, 0xb1d0, 0xb1d4, 0xb1dc, 0xb1dd,
-94, 0x3421,
-0xb1df, 0xb1e8, 0xb1e9, 0xb1ec, 0xb1f0, 0xb1f9, 0xb1fb, 0xb1fd,
-0xb204, 0xb205, 0xb208, 0xb20b, 0xb20c, 0xb214, 0xb215, 0xb217,
-0xb219, 0xb220, 0xb234, 0xb23c, 0xb258, 0xb25c, 0xb260, 0xb268,
-0xb269, 0xb274, 0xb275, 0xb27c, 0xb284, 0xb285, 0xb289, 0xb290,
-0xb291, 0xb294, 0xb298, 0xb299, 0xb29a, 0xb2a0, 0xb2a1, 0xb2a3,
-0xb2a5, 0xb2a6, 0xb2aa, 0xb2ac, 0xb2b0, 0xb2b4, 0xb2c8, 0xb2c9,
-0xb2cc, 0xb2d0, 0xb2d2, 0xb2d8, 0xb2d9, 0xb2db, 0xb2dd, 0xb2e2,
-0xb2e4, 0xb2e5, 0xb2e6, 0xb2e8, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee,
-0xb2ef, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f7, 0xb2f8, 0xb2f9, 0xb2fa,
-0xb2fb, 0xb2ff, 0xb300, 0xb301, 0xb304, 0xb308, 0xb310, 0xb311,
-0xb313, 0xb314, 0xb315, 0xb31c, 0xb354, 0xb355, 0xb356, 0xb358,
-0xb35b, 0xb35c, 0xb35e, 0xb35f, 0xb364, 0xb365,
-94, 0x3521,
-0xb367, 0xb369, 0xb36b, 0xb36e, 0xb370, 0xb371, 0xb374, 0xb378,
-0xb380, 0xb381, 0xb383, 0xb384, 0xb385, 0xb38c, 0xb390, 0xb394,
-0xb3a0, 0xb3a1, 0xb3a8, 0xb3ac, 0xb3c4, 0xb3c5, 0xb3c8, 0xb3cb,
-0xb3cc, 0xb3ce, 0xb3d0, 0xb3d4, 0xb3d5, 0xb3d7, 0xb3d9, 0xb3db,
-0xb3dd, 0xb3e0, 0xb3e4, 0xb3e8, 0xb3fc, 0xb410, 0xb418, 0xb41c,
-0xb420, 0xb428, 0xb429, 0xb42b, 0xb434, 0xb450, 0xb451, 0xb454,
-0xb458, 0xb460, 0xb461, 0xb463, 0xb465, 0xb46c, 0xb480, 0xb488,
-0xb49d, 0xb4a4, 0xb4a8, 0xb4ac, 0xb4b5, 0xb4b7, 0xb4b9, 0xb4c0,
-0xb4c4, 0xb4c8, 0xb4d0, 0xb4d5, 0xb4dc, 0xb4dd, 0xb4e0, 0xb4e3,
-0xb4e4, 0xb4e6, 0xb4ec, 0xb4ed, 0xb4ef, 0xb4f1, 0xb4f8, 0xb514,
-0xb515, 0xb518, 0xb51b, 0xb51c, 0xb524, 0xb525, 0xb527, 0xb528,
-0xb529, 0xb52a, 0xb530, 0xb531, 0xb534, 0xb538,
-94, 0x3621,
-0xb540, 0xb541, 0xb543, 0xb544, 0xb545, 0xb54b, 0xb54c, 0xb54d,
-0xb550, 0xb554, 0xb55c, 0xb55d, 0xb55f, 0xb560, 0xb561, 0xb5a0,
-0xb5a1, 0xb5a4, 0xb5a8, 0xb5aa, 0xb5ab, 0xb5b0, 0xb5b1, 0xb5b3,
-0xb5b4, 0xb5b5, 0xb5bb, 0xb5bc, 0xb5bd, 0xb5c0, 0xb5c4, 0xb5cc,
-0xb5cd, 0xb5cf, 0xb5d0, 0xb5d1, 0xb5d8, 0xb5ec, 0xb610, 0xb611,
-0xb614, 0xb618, 0xb625, 0xb62c, 0xb634, 0xb648, 0xb664, 0xb668,
-0xb69c, 0xb69d, 0xb6a0, 0xb6a4, 0xb6ab, 0xb6ac, 0xb6b1, 0xb6d4,
-0xb6f0, 0xb6f4, 0xb6f8, 0xb700, 0xb701, 0xb705, 0xb728, 0xb729,
-0xb72c, 0xb72f, 0xb730, 0xb738, 0xb739, 0xb73b, 0xb744, 0xb748,
-0xb74c, 0xb754, 0xb755, 0xb760, 0xb764, 0xb768, 0xb770, 0xb771,
-0xb773, 0xb775, 0xb77c, 0xb77d, 0xb780, 0xb784, 0xb78c, 0xb78d,
-0xb78f, 0xb790, 0xb791, 0xb792, 0xb796, 0xb797,
-94, 0x3721,
-0xb798, 0xb799, 0xb79c, 0xb7a0, 0xb7a8, 0xb7a9, 0xb7ab, 0xb7ac,
-0xb7ad, 0xb7b4, 0xb7b5, 0xb7b8, 0xb7c7, 0xb7c9, 0xb7ec, 0xb7ed,
-0xb7f0, 0xb7f4, 0xb7fc, 0xb7fd, 0xb7ff, 0xb800, 0xb801, 0xb807,
-0xb808, 0xb809, 0xb80c, 0xb810, 0xb818, 0xb819, 0xb81b, 0xb81d,
-0xb824, 0xb825, 0xb828, 0xb82c, 0xb834, 0xb835, 0xb837, 0xb838,
-0xb839, 0xb840, 0xb844, 0xb851, 0xb853, 0xb85c, 0xb85d, 0xb860,
-0xb864, 0xb86c, 0xb86d, 0xb86f, 0xb871, 0xb878, 0xb87c, 0xb88d,
-0xb8a8, 0xb8b0, 0xb8b4, 0xb8b8, 0xb8c0, 0xb8c1, 0xb8c3, 0xb8c5,
-0xb8cc, 0xb8d0, 0xb8d4, 0xb8dd, 0xb8df, 0xb8e1, 0xb8e8, 0xb8e9,
-0xb8ec, 0xb8f0, 0xb8f8, 0xb8f9, 0xb8fb, 0xb8fd, 0xb904, 0xb918,
-0xb920, 0xb93c, 0xb93d, 0xb940, 0xb944, 0xb94c, 0xb94f, 0xb951,
-0xb958, 0xb959, 0xb95c, 0xb960, 0xb968, 0xb969,
-94, 0x3821,
-0xb96b, 0xb96d, 0xb974, 0xb975, 0xb978, 0xb97c, 0xb984, 0xb985,
-0xb987, 0xb989, 0xb98a, 0xb98d, 0xb98e, 0xb9ac, 0xb9ad, 0xb9b0,
-0xb9b4, 0xb9bc, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c8, 0xb9c9, 0xb9cc,
-0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d8, 0xb9d9, 0xb9db,
-0xb9dd, 0xb9de, 0xb9e1, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e8, 0xb9ec,
-0xb9f4, 0xb9f5, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9fa, 0xba00, 0xba01,
-0xba08, 0xba15, 0xba38, 0xba39, 0xba3c, 0xba40, 0xba42, 0xba48,
-0xba49, 0xba4b, 0xba4d, 0xba4e, 0xba53, 0xba54, 0xba55, 0xba58,
-0xba5c, 0xba64, 0xba65, 0xba67, 0xba68, 0xba69, 0xba70, 0xba71,
-0xba74, 0xba78, 0xba83, 0xba84, 0xba85, 0xba87, 0xba8c, 0xbaa8,
-0xbaa9, 0xbaab, 0xbaac, 0xbab0, 0xbab2, 0xbab8, 0xbab9, 0xbabb,
-0xbabd, 0xbac4, 0xbac8, 0xbad8, 0xbad9, 0xbafc,
-94, 0x3921,
-0xbb00, 0xbb04, 0xbb0d, 0xbb0f, 0xbb11, 0xbb18, 0xbb1c, 0xbb20,
-0xbb29, 0xbb2b, 0xbb34, 0xbb35, 0xbb36, 0xbb38, 0xbb3b, 0xbb3c,
-0xbb3d, 0xbb3e, 0xbb44, 0xbb45, 0xbb47, 0xbb49, 0xbb4d, 0xbb4f,
-0xbb50, 0xbb54, 0xbb58, 0xbb61, 0xbb63, 0xbb6c, 0xbb88, 0xbb8c,
-0xbb90, 0xbba4, 0xbba8, 0xbbac, 0xbbb4, 0xbbb7, 0xbbc0, 0xbbc4,
-0xbbc8, 0xbbd0, 0xbbd3, 0xbbf8, 0xbbf9, 0xbbfc, 0xbbff, 0xbc00,
-0xbc02, 0xbc08, 0xbc09, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0f, 0xbc11,
-0xbc14, 0xbc15, 0xbc16, 0xbc17, 0xbc18, 0xbc1b, 0xbc1c, 0xbc1d,
-0xbc1e, 0xbc1f, 0xbc24, 0xbc25, 0xbc27, 0xbc29, 0xbc2d, 0xbc30,
-0xbc31, 0xbc34, 0xbc38, 0xbc40, 0xbc41, 0xbc43, 0xbc44, 0xbc45,
-0xbc49, 0xbc4c, 0xbc4d, 0xbc50, 0xbc5d, 0xbc84, 0xbc85, 0xbc88,
-0xbc8b, 0xbc8c, 0xbc8e, 0xbc94, 0xbc95, 0xbc97,
-94, 0x3a21,
-0xbc99, 0xbc9a, 0xbca0, 0xbca1, 0xbca4, 0xbca7, 0xbca8, 0xbcb0,
-0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5, 0xbcbc, 0xbcbd, 0xbcc0, 0xbcc4,
-0xbccd, 0xbccf, 0xbcd0, 0xbcd1, 0xbcd5, 0xbcd8, 0xbcdc, 0xbcf4,
-0xbcf5, 0xbcf6, 0xbcf8, 0xbcfc, 0xbd04, 0xbd05, 0xbd07, 0xbd09,
-0xbd10, 0xbd14, 0xbd24, 0xbd2c, 0xbd40, 0xbd48, 0xbd49, 0xbd4c,
-0xbd50, 0xbd58, 0xbd59, 0xbd64, 0xbd68, 0xbd80, 0xbd81, 0xbd84,
-0xbd87, 0xbd88, 0xbd89, 0xbd8a, 0xbd90, 0xbd91, 0xbd93, 0xbd95,
-0xbd99, 0xbd9a, 0xbd9c, 0xbda4, 0xbdb0, 0xbdb8, 0xbdd4, 0xbdd5,
-0xbdd8, 0xbddc, 0xbde9, 0xbdf0, 0xbdf4, 0xbdf8, 0xbe00, 0xbe03,
-0xbe05, 0xbe0c, 0xbe0d, 0xbe10, 0xbe14, 0xbe1c, 0xbe1d, 0xbe1f,
-0xbe44, 0xbe45, 0xbe48, 0xbe4c, 0xbe4e, 0xbe54, 0xbe55, 0xbe57,
-0xbe59, 0xbe5a, 0xbe5b, 0xbe60, 0xbe61, 0xbe64,
-94, 0x3b21,
-0xbe68, 0xbe6a, 0xbe70, 0xbe71, 0xbe73, 0xbe74, 0xbe75, 0xbe7b,
-0xbe7c, 0xbe7d, 0xbe80, 0xbe84, 0xbe8c, 0xbe8d, 0xbe8f, 0xbe90,
-0xbe91, 0xbe98, 0xbe99, 0xbea8, 0xbed0, 0xbed1, 0xbed4, 0xbed7,
-0xbed8, 0xbee0, 0xbee3, 0xbee4, 0xbee5, 0xbeec, 0xbf01, 0xbf08,
-0xbf09, 0xbf18, 0xbf19, 0xbf1b, 0xbf1c, 0xbf1d, 0xbf40, 0xbf41,
-0xbf44, 0xbf48, 0xbf50, 0xbf51, 0xbf55, 0xbf94, 0xbfb0, 0xbfc5,
-0xbfcc, 0xbfcd, 0xbfd0, 0xbfd4, 0xbfdc, 0xbfdf, 0xbfe1, 0xc03c,
-0xc051, 0xc058, 0xc05c, 0xc060, 0xc068, 0xc069, 0xc090, 0xc091,
-0xc094, 0xc098, 0xc0a0, 0xc0a1, 0xc0a3, 0xc0a5, 0xc0ac, 0xc0ad,
-0xc0af, 0xc0b0, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0bc, 0xc0bd,
-0xc0bf, 0xc0c0, 0xc0c1, 0xc0c5, 0xc0c8, 0xc0c9, 0xc0cc, 0xc0d0,
-0xc0d8, 0xc0d9, 0xc0db, 0xc0dc, 0xc0dd, 0xc0e4,
-94, 0x3c21,
-0xc0e5, 0xc0e8, 0xc0ec, 0xc0f4, 0xc0f5, 0xc0f7, 0xc0f9, 0xc100,
-0xc104, 0xc108, 0xc110, 0xc115, 0xc11c, 0xc11d, 0xc11e, 0xc11f,
-0xc120, 0xc123, 0xc124, 0xc126, 0xc127, 0xc12c, 0xc12d, 0xc12f,
-0xc130, 0xc131, 0xc136, 0xc138, 0xc139, 0xc13c, 0xc140, 0xc148,
-0xc149, 0xc14b, 0xc14c, 0xc14d, 0xc154, 0xc155, 0xc158, 0xc15c,
-0xc164, 0xc165, 0xc167, 0xc168, 0xc169, 0xc170, 0xc174, 0xc178,
-0xc185, 0xc18c, 0xc18d, 0xc18e, 0xc190, 0xc194, 0xc196, 0xc19c,
-0xc19d, 0xc19f, 0xc1a1, 0xc1a5, 0xc1a8, 0xc1a9, 0xc1ac, 0xc1b0,
-0xc1bd, 0xc1c4, 0xc1c8, 0xc1cc, 0xc1d4, 0xc1d7, 0xc1d8, 0xc1e0,
-0xc1e4, 0xc1e8, 0xc1f0, 0xc1f1, 0xc1f3, 0xc1fc, 0xc1fd, 0xc200,
-0xc204, 0xc20c, 0xc20d, 0xc20f, 0xc211, 0xc218, 0xc219, 0xc21c,
-0xc21f, 0xc220, 0xc228, 0xc229, 0xc22b, 0xc22d,
-94, 0x3d21,
-0xc22f, 0xc231, 0xc232, 0xc234, 0xc248, 0xc250, 0xc251, 0xc254,
-0xc258, 0xc260, 0xc265, 0xc26c, 0xc26d, 0xc270, 0xc274, 0xc27c,
-0xc27d, 0xc27f, 0xc281, 0xc288, 0xc289, 0xc290, 0xc298, 0xc29b,
-0xc29d, 0xc2a4, 0xc2a5, 0xc2a8, 0xc2ac, 0xc2ad, 0xc2b4, 0xc2b5,
-0xc2b7, 0xc2b9, 0xc2dc, 0xc2dd, 0xc2e0, 0xc2e3, 0xc2e4, 0xc2eb,
-0xc2ec, 0xc2ed, 0xc2ef, 0xc2f1, 0xc2f6, 0xc2f8, 0xc2f9, 0xc2fb,
-0xc2fc, 0xc300, 0xc308, 0xc309, 0xc30c, 0xc30d, 0xc313, 0xc314,
-0xc315, 0xc318, 0xc31c, 0xc324, 0xc325, 0xc328, 0xc329, 0xc345,
-0xc368, 0xc369, 0xc36c, 0xc370, 0xc372, 0xc378, 0xc379, 0xc37c,
-0xc37d, 0xc384, 0xc388, 0xc38c, 0xc3c0, 0xc3d8, 0xc3d9, 0xc3dc,
-0xc3df, 0xc3e0, 0xc3e2, 0xc3e8, 0xc3e9, 0xc3ed, 0xc3f4, 0xc3f5,
-0xc3f8, 0xc408, 0xc410, 0xc424, 0xc42c, 0xc430,
-94, 0x3e21,
-0xc434, 0xc43c, 0xc43d, 0xc448, 0xc464, 0xc465, 0xc468, 0xc46c,
-0xc474, 0xc475, 0xc479, 0xc480, 0xc494, 0xc49c, 0xc4b8, 0xc4bc,
-0xc4e9, 0xc4f0, 0xc4f1, 0xc4f4, 0xc4f8, 0xc4fa, 0xc4ff, 0xc500,
-0xc501, 0xc50c, 0xc510, 0xc514, 0xc51c, 0xc528, 0xc529, 0xc52c,
-0xc530, 0xc538, 0xc539, 0xc53b, 0xc53d, 0xc544, 0xc545, 0xc548,
-0xc549, 0xc54a, 0xc54c, 0xc54d, 0xc54e, 0xc553, 0xc554, 0xc555,
-0xc557, 0xc558, 0xc559, 0xc55d, 0xc55e, 0xc560, 0xc561, 0xc564,
-0xc568, 0xc570, 0xc571, 0xc573, 0xc574, 0xc575, 0xc57c, 0xc57d,
-0xc580, 0xc584, 0xc587, 0xc58c, 0xc58d, 0xc58f, 0xc591, 0xc595,
-0xc597, 0xc598, 0xc59c, 0xc5a0, 0xc5a9, 0xc5b4, 0xc5b5, 0xc5b8,
-0xc5b9, 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5c4, 0xc5c5, 0xc5c6,
-0xc5c7, 0xc5c8, 0xc5c9, 0xc5ca, 0xc5cc, 0xc5ce,
-94, 0x3f21,
-0xc5d0, 0xc5d1, 0xc5d4, 0xc5d8, 0xc5e0, 0xc5e1, 0xc5e3, 0xc5e5,
-0xc5ec, 0xc5ed, 0xc5ee, 0xc5f0, 0xc5f4, 0xc5f6, 0xc5f7, 0xc5fc,
-0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, 0xc605, 0xc606, 0xc607,
-0xc608, 0xc60c, 0xc610, 0xc618, 0xc619, 0xc61b, 0xc61c, 0xc624,
-0xc625, 0xc628, 0xc62c, 0xc62d, 0xc62e, 0xc630, 0xc633, 0xc634,
-0xc635, 0xc637, 0xc639, 0xc63b, 0xc640, 0xc641, 0xc644, 0xc648,
-0xc650, 0xc651, 0xc653, 0xc654, 0xc655, 0xc65c, 0xc65d, 0xc660,
-0xc66c, 0xc66f, 0xc671, 0xc678, 0xc679, 0xc67c, 0xc680, 0xc688,
-0xc689, 0xc68b, 0xc68d, 0xc694, 0xc695, 0xc698, 0xc69c, 0xc6a4,
-0xc6a5, 0xc6a7, 0xc6a9, 0xc6b0, 0xc6b1, 0xc6b4, 0xc6b8, 0xc6b9,
-0xc6ba, 0xc6c0, 0xc6c1, 0xc6c3, 0xc6c5, 0xc6cc, 0xc6cd, 0xc6d0,
-0xc6d4, 0xc6dc, 0xc6dd, 0xc6e0, 0xc6e1, 0xc6e8,
-94, 0x4021,
-0xc6e9, 0xc6ec, 0xc6f0, 0xc6f8, 0xc6f9, 0xc6fd, 0xc704, 0xc705,
-0xc708, 0xc70c, 0xc714, 0xc715, 0xc717, 0xc719, 0xc720, 0xc721,
-0xc724, 0xc728, 0xc730, 0xc731, 0xc733, 0xc735, 0xc737, 0xc73c,
-0xc73d, 0xc740, 0xc744, 0xc74a, 0xc74c, 0xc74d, 0xc74f, 0xc751,
-0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc75c,
-0xc760, 0xc768, 0xc76b, 0xc774, 0xc775, 0xc778, 0xc77c, 0xc77d,
-0xc77e, 0xc783, 0xc784, 0xc785, 0xc787, 0xc788, 0xc789, 0xc78a,
-0xc78e, 0xc790, 0xc791, 0xc794, 0xc796, 0xc797, 0xc798, 0xc79a,
-0xc7a0, 0xc7a1, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7ac, 0xc7ad,
-0xc7b0, 0xc7b4, 0xc7bc, 0xc7bd, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c8,
-0xc7c9, 0xc7cc, 0xc7ce, 0xc7d0, 0xc7d8, 0xc7dd, 0xc7e4, 0xc7e8,
-0xc7ec, 0xc800, 0xc801, 0xc804, 0xc808, 0xc80a,
-94, 0x4121,
-0xc810, 0xc811, 0xc813, 0xc815, 0xc816, 0xc81c, 0xc81d, 0xc820,
-0xc824, 0xc82c, 0xc82d, 0xc82f, 0xc831, 0xc838, 0xc83c, 0xc840,
-0xc848, 0xc849, 0xc84c, 0xc84d, 0xc854, 0xc870, 0xc871, 0xc874,
-0xc878, 0xc87a, 0xc880, 0xc881, 0xc883, 0xc885, 0xc886, 0xc887,
-0xc88b, 0xc88c, 0xc88d, 0xc894, 0xc89d, 0xc89f, 0xc8a1, 0xc8a8,
-0xc8bc, 0xc8bd, 0xc8c4, 0xc8c8, 0xc8cc, 0xc8d4, 0xc8d5, 0xc8d7,
-0xc8d9, 0xc8e0, 0xc8e1, 0xc8e4, 0xc8f5, 0xc8fc, 0xc8fd, 0xc900,
-0xc904, 0xc905, 0xc906, 0xc90c, 0xc90d, 0xc90f, 0xc911, 0xc918,
-0xc92c, 0xc934, 0xc950, 0xc951, 0xc954, 0xc958, 0xc960, 0xc961,
-0xc963, 0xc96c, 0xc970, 0xc974, 0xc97c, 0xc988, 0xc989, 0xc98c,
-0xc990, 0xc998, 0xc999, 0xc99b, 0xc99d, 0xc9c0, 0xc9c1, 0xc9c4,
-0xc9c7, 0xc9c8, 0xc9ca, 0xc9d0, 0xc9d1, 0xc9d3,
-94, 0x4221,
-0xc9d5, 0xc9d6, 0xc9d9, 0xc9da, 0xc9dc, 0xc9dd, 0xc9e0, 0xc9e2,
-0xc9e4, 0xc9e7, 0xc9ec, 0xc9ed, 0xc9ef, 0xc9f0, 0xc9f1, 0xc9f8,
-0xc9f9, 0xc9fc, 0xca00, 0xca08, 0xca09, 0xca0b, 0xca0c, 0xca0d,
-0xca14, 0xca18, 0xca29, 0xca4c, 0xca4d, 0xca50, 0xca54, 0xca5c,
-0xca5d, 0xca5f, 0xca60, 0xca61, 0xca68, 0xca7d, 0xca84, 0xca98,
-0xcabc, 0xcabd, 0xcac0, 0xcac4, 0xcacc, 0xcacd, 0xcacf, 0xcad1,
-0xcad3, 0xcad8, 0xcad9, 0xcae0, 0xcaec, 0xcaf4, 0xcb08, 0xcb10,
-0xcb14, 0xcb18, 0xcb20, 0xcb21, 0xcb41, 0xcb48, 0xcb49, 0xcb4c,
-0xcb50, 0xcb58, 0xcb59, 0xcb5d, 0xcb64, 0xcb78, 0xcb79, 0xcb9c,
-0xcbb8, 0xcbd4, 0xcbe4, 0xcbe7, 0xcbe9, 0xcc0c, 0xcc0d, 0xcc10,
-0xcc14, 0xcc1c, 0xcc1d, 0xcc21, 0xcc22, 0xcc27, 0xcc28, 0xcc29,
-0xcc2c, 0xcc2e, 0xcc30, 0xcc38, 0xcc39, 0xcc3b,
-94, 0x4321,
-0xcc3c, 0xcc3d, 0xcc3e, 0xcc44, 0xcc45, 0xcc48, 0xcc4c, 0xcc54,
-0xcc55, 0xcc57, 0xcc58, 0xcc59, 0xcc60, 0xcc64, 0xcc66, 0xcc68,
-0xcc70, 0xcc75, 0xcc98, 0xcc99, 0xcc9c, 0xcca0, 0xcca8, 0xcca9,
-0xccab, 0xccac, 0xccad, 0xccb4, 0xccb5, 0xccb8, 0xccbc, 0xccc4,
-0xccc5, 0xccc7, 0xccc9, 0xccd0, 0xccd4, 0xcce4, 0xccec, 0xccf0,
-0xcd01, 0xcd08, 0xcd09, 0xcd0c, 0xcd10, 0xcd18, 0xcd19, 0xcd1b,
-0xcd1d, 0xcd24, 0xcd28, 0xcd2c, 0xcd39, 0xcd5c, 0xcd60, 0xcd64,
-0xcd6c, 0xcd6d, 0xcd6f, 0xcd71, 0xcd78, 0xcd88, 0xcd94, 0xcd95,
-0xcd98, 0xcd9c, 0xcda4, 0xcda5, 0xcda7, 0xcda9, 0xcdb0, 0xcdc4,
-0xcdcc, 0xcdd0, 0xcde8, 0xcdec, 0xcdf0, 0xcdf8, 0xcdf9, 0xcdfb,
-0xcdfd, 0xce04, 0xce08, 0xce0c, 0xce14, 0xce19, 0xce20, 0xce21,
-0xce24, 0xce28, 0xce30, 0xce31, 0xce33, 0xce35,
-94, 0x4421,
-0xce58, 0xce59, 0xce5c, 0xce5f, 0xce60, 0xce61, 0xce68, 0xce69,
-0xce6b, 0xce6d, 0xce74, 0xce75, 0xce78, 0xce7c, 0xce84, 0xce85,
-0xce87, 0xce89, 0xce90, 0xce91, 0xce94, 0xce98, 0xcea0, 0xcea1,
-0xcea3, 0xcea4, 0xcea5, 0xceac, 0xcead, 0xcec1, 0xcee4, 0xcee5,
-0xcee8, 0xceeb, 0xceec, 0xcef4, 0xcef5, 0xcef7, 0xcef8, 0xcef9,
-0xcf00, 0xcf01, 0xcf04, 0xcf08, 0xcf10, 0xcf11, 0xcf13, 0xcf15,
-0xcf1c, 0xcf20, 0xcf24, 0xcf2c, 0xcf2d, 0xcf2f, 0xcf30, 0xcf31,
-0xcf38, 0xcf54, 0xcf55, 0xcf58, 0xcf5c, 0xcf64, 0xcf65, 0xcf67,
-0xcf69, 0xcf70, 0xcf71, 0xcf74, 0xcf78, 0xcf80, 0xcf85, 0xcf8c,
-0xcfa1, 0xcfa8, 0xcfb0, 0xcfc4, 0xcfe0, 0xcfe1, 0xcfe4, 0xcfe8,
-0xcff0, 0xcff1, 0xcff3, 0xcff5, 0xcffc, 0xd000, 0xd004, 0xd011,
-0xd018, 0xd02d, 0xd034, 0xd035, 0xd038, 0xd03c,
-94, 0x4521,
-0xd044, 0xd045, 0xd047, 0xd049, 0xd050, 0xd054, 0xd058, 0xd060,
-0xd06c, 0xd06d, 0xd070, 0xd074, 0xd07c, 0xd07d, 0xd081, 0xd0a4,
-0xd0a5, 0xd0a8, 0xd0ac, 0xd0b4, 0xd0b5, 0xd0b7, 0xd0b9, 0xd0c0,
-0xd0c1, 0xd0c4, 0xd0c8, 0xd0c9, 0xd0d0, 0xd0d1, 0xd0d3, 0xd0d4,
-0xd0d5, 0xd0dc, 0xd0dd, 0xd0e0, 0xd0e4, 0xd0ec, 0xd0ed, 0xd0ef,
-0xd0f0, 0xd0f1, 0xd0f8, 0xd10d, 0xd130, 0xd131, 0xd134, 0xd138,
-0xd13a, 0xd140, 0xd141, 0xd143, 0xd144, 0xd145, 0xd14c, 0xd14d,
-0xd150, 0xd154, 0xd15c, 0xd15d, 0xd15f, 0xd161, 0xd168, 0xd16c,
-0xd17c, 0xd184, 0xd188, 0xd1a0, 0xd1a1, 0xd1a4, 0xd1a8, 0xd1b0,
-0xd1b1, 0xd1b3, 0xd1b5, 0xd1ba, 0xd1bc, 0xd1c0, 0xd1d8, 0xd1f4,
-0xd1f8, 0xd207, 0xd209, 0xd210, 0xd22c, 0xd22d, 0xd230, 0xd234,
-0xd23c, 0xd23d, 0xd23f, 0xd241, 0xd248, 0xd25c,
-94, 0x4621,
-0xd264, 0xd280, 0xd281, 0xd284, 0xd288, 0xd290, 0xd291, 0xd295,
-0xd29c, 0xd2a0, 0xd2a4, 0xd2ac, 0xd2b1, 0xd2b8, 0xd2b9, 0xd2bc,
-0xd2bf, 0xd2c0, 0xd2c2, 0xd2c8, 0xd2c9, 0xd2cb, 0xd2d4, 0xd2d8,
-0xd2dc, 0xd2e4, 0xd2e5, 0xd2f0, 0xd2f1, 0xd2f4, 0xd2f8, 0xd300,
-0xd301, 0xd303, 0xd305, 0xd30c, 0xd30d, 0xd30e, 0xd310, 0xd314,
-0xd316, 0xd31c, 0xd31d, 0xd31f, 0xd320, 0xd321, 0xd325, 0xd328,
-0xd329, 0xd32c, 0xd330, 0xd338, 0xd339, 0xd33b, 0xd33c, 0xd33d,
-0xd344, 0xd345, 0xd37c, 0xd37d, 0xd380, 0xd384, 0xd38c, 0xd38d,
-0xd38f, 0xd390, 0xd391, 0xd398, 0xd399, 0xd39c, 0xd3a0, 0xd3a8,
-0xd3a9, 0xd3ab, 0xd3ad, 0xd3b4, 0xd3b8, 0xd3bc, 0xd3c4, 0xd3c5,
-0xd3c8, 0xd3c9, 0xd3d0, 0xd3d8, 0xd3e1, 0xd3e3, 0xd3ec, 0xd3ed,
-0xd3f0, 0xd3f4, 0xd3fc, 0xd3fd, 0xd3ff, 0xd401,
-94, 0x4721,
-0xd408, 0xd41d, 0xd440, 0xd444, 0xd45c, 0xd460, 0xd464, 0xd46d,
-0xd46f, 0xd478, 0xd479, 0xd47c, 0xd47f, 0xd480, 0xd482, 0xd488,
-0xd489, 0xd48b, 0xd48d, 0xd494, 0xd4a9, 0xd4cc, 0xd4d0, 0xd4d4,
-0xd4dc, 0xd4df, 0xd4e8, 0xd4ec, 0xd4f0, 0xd4f8, 0xd4fb, 0xd4fd,
-0xd504, 0xd508, 0xd50c, 0xd514, 0xd515, 0xd517, 0xd53c, 0xd53d,
-0xd540, 0xd544, 0xd54c, 0xd54d, 0xd54f, 0xd551, 0xd558, 0xd559,
-0xd55c, 0xd560, 0xd565, 0xd568, 0xd569, 0xd56b, 0xd56d, 0xd574,
-0xd575, 0xd578, 0xd57c, 0xd584, 0xd585, 0xd587, 0xd588, 0xd589,
-0xd590, 0xd5a5, 0xd5c8, 0xd5c9, 0xd5cc, 0xd5d0, 0xd5d2, 0xd5d8,
-0xd5d9, 0xd5db, 0xd5dd, 0xd5e4, 0xd5e5, 0xd5e8, 0xd5ec, 0xd5f4,
-0xd5f5, 0xd5f7, 0xd5f9, 0xd600, 0xd601, 0xd604, 0xd608, 0xd610,
-0xd611, 0xd613, 0xd614, 0xd615, 0xd61c, 0xd620,
-94, 0x4821,
-0xd624, 0xd62d, 0xd638, 0xd639, 0xd63c, 0xd640, 0xd645, 0xd648,
-0xd649, 0xd64b, 0xd64d, 0xd651, 0xd654, 0xd655, 0xd658, 0xd65c,
-0xd667, 0xd669, 0xd670, 0xd671, 0xd674, 0xd683, 0xd685, 0xd68c,
-0xd68d, 0xd690, 0xd694, 0xd69d, 0xd69f, 0xd6a1, 0xd6a8, 0xd6ac,
-0xd6b0, 0xd6b9, 0xd6bb, 0xd6c4, 0xd6c5, 0xd6c8, 0xd6cc, 0xd6d1,
-0xd6d4, 0xd6d7, 0xd6d9, 0xd6e0, 0xd6e4, 0xd6e8, 0xd6f0, 0xd6f5,
-0xd6fc, 0xd6fd, 0xd700, 0xd704, 0xd711, 0xd718, 0xd719, 0xd71c,
-0xd720, 0xd728, 0xd729, 0xd72b, 0xd72d, 0xd734, 0xd735, 0xd738,
-0xd73c, 0xd744, 0xd747, 0xd749, 0xd750, 0xd751, 0xd754, 0xd756,
-0xd757, 0xd758, 0xd759, 0xd760, 0xd761, 0xd763, 0xd765, 0xd769,
-0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788, 0xd789,
-0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d,
-94, 0x4a21,
-0x4f3d, 0x4f73, 0x5047, 0x50f9, 0x52a0, 0x53ef, 0x5475, 0x54e5,
-0x5609, 0x5ac1, 0x5bb6, 0x6687, 0x67b6, 0x67b7, 0x67ef, 0x6b4c,
-0x73c2, 0x75c2, 0x7a3c, 0x82db, 0x8304, 0x8857, 0x8888, 0x8a36,
-0x8cc8, 0x8dcf, 0x8efb, 0x8fe6, 0x99d5, 0x523b, 0x5374, 0x5404,
-0x606a, 0x6164, 0x6bbc, 0x73cf, 0x811a, 0x89ba, 0x89d2, 0x95a3,
-0x4f83, 0x520a, 0x58be, 0x5978, 0x59e6, 0x5e72, 0x5e79, 0x61c7,
-0x63c0, 0x6746, 0x67ec, 0x687f, 0x6f97, 0x764e, 0x770b, 0x78f5,
-0x7a08, 0x7aff, 0x7c21, 0x809d, 0x826e, 0x8271, 0x8aeb, 0x9593,
-0x4e6b, 0x559d, 0x66f7, 0x6e34, 0x78a3, 0x7aed, 0x845b, 0x8910,
-0x874e, 0x97a8, 0x52d8, 0x574e, 0x582a, 0x5d4c, 0x611f, 0x61be,
-0x6221, 0x6562, 0x67d1, 0x6a44, 0x6e1b, 0x7518, 0x75b3, 0x76e3,
-0x77b0, 0x7d3a, 0x90af, 0x9451, 0x9452, 0x9f95,
-94, 0x4b21,
-0x5323, 0x5cac, 0x7532, 0x80db, 0x9240, 0x9598, 0x525b, 0x5808,
-0x59dc, 0x5ca1, 0x5d17, 0x5eb7, 0x5f3a, 0x5f4a, 0x6177, 0x6c5f,
-0x757a, 0x7586, 0x7ce0, 0x7d73, 0x7db1, 0x7f8c, 0x8154, 0x8221,
-0x8591, 0x8941, 0x8b1b, 0x92fc, 0x964d, 0x9c47, 0x4ecb, 0x4ef7,
-0x500b, 0x51f1, 0x584f, 0x6137, 0x613e, 0x6168, 0x6539, 0x69ea,
-0x6f11, 0x75a5, 0x7686, 0x76d6, 0x7b87, 0x82a5, 0x84cb, 0xf900,
-0x93a7, 0x958b, 0x5580, 0x5ba2, 0x5751, 0xf901, 0x7cb3, 0x7fb9,
-0x91b5, 0x5028, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x636e, 0x64da,
-0x64e7, 0x6e20, 0x70ac, 0x795b, 0x8ddd, 0x8e1e, 0xf902, 0x907d,
-0x9245, 0x92f8, 0x4e7e, 0x4ef6, 0x5065, 0x5dfe, 0x5efa, 0x6106,
-0x6957, 0x8171, 0x8654, 0x8e47, 0x9375, 0x9a2b, 0x4e5e, 0x5091,
-0x6770, 0x6840, 0x5109, 0x528d, 0x5292, 0x6aa2,
-94, 0x4c21,
-0x77bc, 0x9210, 0x9ed4, 0x52ab, 0x602f, 0x8ff2, 0x5048, 0x61a9,
-0x63ed, 0x64ca, 0x683c, 0x6a84, 0x6fc0, 0x8188, 0x89a1, 0x9694,
-0x5805, 0x727d, 0x72ac, 0x7504, 0x7d79, 0x7e6d, 0x80a9, 0x898b,
-0x8b74, 0x9063, 0x9d51, 0x6289, 0x6c7a, 0x6f54, 0x7d50, 0x7f3a,
-0x8a23, 0x517c, 0x614a, 0x7b9d, 0x8b19, 0x9257, 0x938c, 0x4eac,
-0x4fd3, 0x501e, 0x50be, 0x5106, 0x52c1, 0x52cd, 0x537f, 0x5770,
-0x5883, 0x5e9a, 0x5f91, 0x6176, 0x61ac, 0x64ce, 0x656c, 0x666f,
-0x66bb, 0x66f4, 0x6897, 0x6d87, 0x7085, 0x70f1, 0x749f, 0x74a5,
-0x74ca, 0x75d9, 0x786c, 0x78ec, 0x7adf, 0x7af6, 0x7d45, 0x7d93,
-0x8015, 0x803f, 0x811b, 0x8396, 0x8b66, 0x8f15, 0x9015, 0x93e1,
-0x9803, 0x9838, 0x9a5a, 0x9be8, 0x4fc2, 0x5553, 0x583a, 0x5951,
-0x5b63, 0x5c46, 0x60b8, 0x6212, 0x6842, 0x68b0,
-94, 0x4d21,
-0x68e8, 0x6eaa, 0x754c, 0x7678, 0x78ce, 0x7a3d, 0x7cfb, 0x7e6b,
-0x7e7c, 0x8a08, 0x8aa1, 0x8c3f, 0x968e, 0x9dc4, 0x53e4, 0x53e9,
-0x544a, 0x5471, 0x56fa, 0x59d1, 0x5b64, 0x5c3b, 0x5eab, 0x62f7,
-0x6537, 0x6545, 0x6572, 0x66a0, 0x67af, 0x69c1, 0x6cbd, 0x75fc,
-0x7690, 0x777e, 0x7a3f, 0x7f94, 0x8003, 0x80a1, 0x818f, 0x82e6,
-0x82fd, 0x83f0, 0x85c1, 0x8831, 0x88b4, 0x8aa5, 0xf903, 0x8f9c,
-0x932e, 0x96c7, 0x9867, 0x9ad8, 0x9f13, 0x54ed, 0x659b, 0x66f2,
-0x688f, 0x7a40, 0x8c37, 0x9d60, 0x56f0, 0x5764, 0x5d11, 0x6606,
-0x68b1, 0x68cd, 0x6efe, 0x7428, 0x889e, 0x9be4, 0x6c68, 0xf904,
-0x9aa8, 0x4f9b, 0x516c, 0x5171, 0x529f, 0x5b54, 0x5de5, 0x6050,
-0x606d, 0x62f1, 0x63a7, 0x653b, 0x73d9, 0x7a7a, 0x86a3, 0x8ca2,
-0x978f, 0x4e32, 0x5be1, 0x6208, 0x679c, 0x74dc,
-94, 0x4e21,
-0x79d1, 0x83d3, 0x8a87, 0x8ab2, 0x8de8, 0x904e, 0x934b, 0x9846,
-0x5ed3, 0x69e8, 0x85ff, 0x90ed, 0xf905, 0x51a0, 0x5b98, 0x5bec,
-0x6163, 0x68fa, 0x6b3e, 0x704c, 0x742f, 0x74d8, 0x7ba1, 0x7f50,
-0x83c5, 0x89c0, 0x8cab, 0x95dc, 0x9928, 0x522e, 0x605d, 0x62ec,
-0x9002, 0x4f8a, 0x5149, 0x5321, 0x58d9, 0x5ee3, 0x66e0, 0x6d38,
-0x709a, 0x72c2, 0x73d6, 0x7b50, 0x80f1, 0x945b, 0x5366, 0x639b,
-0x7f6b, 0x4e56, 0x5080, 0x584a, 0x58de, 0x602a, 0x6127, 0x62d0,
-0x69d0, 0x9b41, 0x5b8f, 0x7d18, 0x80b1, 0x8f5f, 0x4ea4, 0x50d1,
-0x54ac, 0x55ac, 0x5b0c, 0x5da0, 0x5de7, 0x652a, 0x654e, 0x6821,
-0x6a4b, 0x72e1, 0x768e, 0x77ef, 0x7d5e, 0x7ff9, 0x81a0, 0x854e,
-0x86df, 0x8f03, 0x8f4e, 0x90ca, 0x9903, 0x9a55, 0x9bab, 0x4e18,
-0x4e45, 0x4e5d, 0x4ec7, 0x4ff1, 0x5177, 0x52fe,
-94, 0x4f21,
-0x5340, 0x53e3, 0x53e5, 0x548e, 0x5614, 0x5775, 0x57a2, 0x5bc7,
-0x5d87, 0x5ed0, 0x61fc, 0x62d8, 0x6551, 0x67b8, 0x67e9, 0x69cb,
-0x6b50, 0x6bc6, 0x6bec, 0x6c42, 0x6e9d, 0x7078, 0x72d7, 0x7396,
-0x7403, 0x77bf, 0x77e9, 0x7a76, 0x7d7f, 0x8009, 0x81fc, 0x8205,
-0x820a, 0x82df, 0x8862, 0x8b33, 0x8cfc, 0x8ec0, 0x9011, 0x90b1,
-0x9264, 0x92b6, 0x99d2, 0x9a45, 0x9ce9, 0x9dd7, 0x9f9c, 0x570b,
-0x5c40, 0x83ca, 0x97a0, 0x97ab, 0x9eb4, 0x541b, 0x7a98, 0x7fa4,
-0x88d9, 0x8ecd, 0x90e1, 0x5800, 0x5c48, 0x6398, 0x7a9f, 0x5bae,
-0x5f13, 0x7a79, 0x7aae, 0x828e, 0x8eac, 0x5026, 0x5238, 0x52f8,
-0x5377, 0x5708, 0x62f3, 0x6372, 0x6b0a, 0x6dc3, 0x7737, 0x53a5,
-0x7357, 0x8568, 0x8e76, 0x95d5, 0x673a, 0x6ac3, 0x6f70, 0x8a6d,
-0x8ecc, 0x994b, 0xf906, 0x6677, 0x6b78, 0x8cb4,
-94, 0x5021,
-0x9b3c, 0xf907, 0x53eb, 0x572d, 0x594e, 0x63c6, 0x69fb, 0x73ea,
-0x7845, 0x7aba, 0x7ac5, 0x7cfe, 0x8475, 0x898f, 0x8d73, 0x9035,
-0x95a8, 0x52fb, 0x5747, 0x7547, 0x7b60, 0x83cc, 0x921e, 0xf908,
-0x6a58, 0x514b, 0x524b, 0x5287, 0x621f, 0x68d8, 0x6975, 0x9699,
-0x50c5, 0x52a4, 0x52e4, 0x61c3, 0x65a4, 0x6839, 0x69ff, 0x747e,
-0x7b4b, 0x82b9, 0x83eb, 0x89b2, 0x8b39, 0x8fd1, 0x9949, 0xf909,
-0x4eca, 0x5997, 0x64d2, 0x6611, 0x6a8e, 0x7434, 0x7981, 0x79bd,
-0x82a9, 0x887e, 0x887f, 0x895f, 0xf90a, 0x9326, 0x4f0b, 0x53ca,
-0x6025, 0x6271, 0x6c72, 0x7d1a, 0x7d66, 0x4e98, 0x5162, 0x77dc,
-0x80af, 0x4f01, 0x4f0e, 0x5176, 0x5180, 0x55dc, 0x5668, 0x573b,
-0x57fa, 0x57fc, 0x5914, 0x5947, 0x5993, 0x5bc4, 0x5c90, 0x5d0e,
-0x5df1, 0x5e7e, 0x5fcc, 0x6280, 0x65d7, 0x65e3,
-94, 0x5121,
-0x671e, 0x671f, 0x675e, 0x68cb, 0x68c4, 0x6a5f, 0x6b3a, 0x6c23,
-0x6c7d, 0x6c82, 0x6dc7, 0x7398, 0x7426, 0x742a, 0x7482, 0x74a3,
-0x7578, 0x757f, 0x7881, 0x78ef, 0x7941, 0x7947, 0x7948, 0x797a,
-0x7b95, 0x7d00, 0x7dba, 0x7f88, 0x8006, 0x802d, 0x808c, 0x8a18,
-0x8b4f, 0x8c48, 0x8d77, 0x9321, 0x9324, 0x98e2, 0x9951, 0x9a0e,
-0x9a0f, 0x9a65, 0x9e92, 0x7dca, 0x4f76, 0x5409, 0x62ee, 0x6854,
-0x91d1, 0x55ab, 0x513a, 0xf90b, 0xf90c, 0x5a1c, 0x61e6, 0xf90d,
-0x62cf, 0x62ff, 0xf90e, 0xf90f, 0xf910, 0xf911, 0xf912, 0xf913,
-0x90a3, 0xf914, 0xf915, 0xf916, 0xf917, 0xf918, 0x8afe, 0xf919,
-0xf91a, 0xf91b, 0xf91c, 0x6696, 0xf91d, 0x7156, 0xf91e, 0xf91f,
-0x96e3, 0xf920, 0x634f, 0x637a, 0x5357, 0xf921, 0x678f, 0x6960,
-0x6e73, 0xf922, 0x7537, 0xf923, 0xf924, 0xf925,
-94, 0x5221,
-0x7d0d, 0xf926, 0xf927, 0x8872, 0x56ca, 0x5a18, 0xf928, 0xf929,
-0xf92a, 0xf92b, 0xf92c, 0x4e43, 0xf92d, 0x5167, 0x5948, 0x67f0,
-0x8010, 0xf92e, 0x5973, 0x5e74, 0x649a, 0x79ca, 0x5ff5, 0x606c,
-0x62c8, 0x637b, 0x5be7, 0x5bd7, 0x52aa, 0xf92f, 0x5974, 0x5f29,
-0x6012, 0xf930, 0xf931, 0xf932, 0x7459, 0xf933, 0xf934, 0xf935,
-0xf936, 0xf937, 0xf938, 0x99d1, 0xf939, 0xf93a, 0xf93b, 0xf93c,
-0xf93d, 0xf93e, 0xf93f, 0xf940, 0xf941, 0xf942, 0xf943, 0x6fc3,
-0xf944, 0xf945, 0x81bf, 0x8fb2, 0x60f1, 0xf946, 0xf947, 0x8166,
-0xf948, 0xf949, 0x5c3f, 0xf94a, 0xf94b, 0xf94c, 0xf94d, 0xf94e,
-0xf94f, 0xf950, 0xf951, 0x5ae9, 0x8a25, 0x677b, 0x7d10, 0xf952,
-0xf953, 0xf954, 0xf955, 0xf956, 0xf957, 0x80fd, 0xf958, 0xf959,
-0x5c3c, 0x6ce5, 0x533f, 0x6eba, 0x591a, 0x8336,
-94, 0x5321,
-0x4e39, 0x4eb6, 0x4f46, 0x55ae, 0x5718, 0x58c7, 0x5f56, 0x65b7,
-0x65e6, 0x6a80, 0x6bb5, 0x6e4d, 0x77ed, 0x7aef, 0x7c1e, 0x7dde,
-0x86cb, 0x8892, 0x9132, 0x935b, 0x64bb, 0x6fbe, 0x737a, 0x75b8,
-0x9054, 0x5556, 0x574d, 0x61ba, 0x64d4, 0x66c7, 0x6de1, 0x6e5b,
-0x6f6d, 0x6fb9, 0x75f0, 0x8043, 0x81bd, 0x8541, 0x8983, 0x8ac7,
-0x8b5a, 0x931f, 0x6c93, 0x7553, 0x7b54, 0x8e0f, 0x905d, 0x5510,
-0x5802, 0x5858, 0x5e62, 0x6207, 0x649e, 0x68e0, 0x7576, 0x7cd6,
-0x87b3, 0x9ee8, 0x4ee3, 0x5788, 0x576e, 0x5927, 0x5c0d, 0x5cb1,
-0x5e36, 0x5f85, 0x6234, 0x64e1, 0x73b3, 0x81fa, 0x888b, 0x8cb8,
-0x968a, 0x9edb, 0x5b85, 0x5fb7, 0x60b3, 0x5012, 0x5200, 0x5230,
-0x5716, 0x5835, 0x5857, 0x5c0e, 0x5c60, 0x5cf6, 0x5d8b, 0x5ea6,
-0x5f92, 0x60bc, 0x6311, 0x6389, 0x6417, 0x6843,
-94, 0x5421,
-0x68f9, 0x6ac2, 0x6dd8, 0x6e21, 0x6ed4, 0x6fe4, 0x71fe, 0x76dc,
-0x7779, 0x79b1, 0x7a3b, 0x8404, 0x89a9, 0x8ced, 0x8df3, 0x8e48,
-0x9003, 0x9014, 0x9053, 0x90fd, 0x934d, 0x9676, 0x97dc, 0x6bd2,
-0x7006, 0x7258, 0x72a2, 0x7368, 0x7763, 0x79bf, 0x7be4, 0x7e9b,
-0x8b80, 0x58a9, 0x60c7, 0x6566, 0x65fd, 0x66be, 0x6c8c, 0x711e,
-0x71c9, 0x8c5a, 0x9813, 0x4e6d, 0x7a81, 0x4edd, 0x51ac, 0x51cd,
-0x52d5, 0x540c, 0x61a7, 0x6771, 0x6850, 0x68df, 0x6d1e, 0x6f7c,
-0x75bc, 0x77b3, 0x7ae5, 0x80f4, 0x8463, 0x9285, 0x515c, 0x6597,
-0x675c, 0x6793, 0x75d8, 0x7ac7, 0x8373, 0xf95a, 0x8c46, 0x9017,
-0x982d, 0x5c6f, 0x81c0, 0x829a, 0x9041, 0x906f, 0x920d, 0x5f97,
-0x5d9d, 0x6a59, 0x71c8, 0x767b, 0x7b49, 0x85e4, 0x8b04, 0x9127,
-0x9a30, 0x5587, 0x61f6, 0xf95b, 0x7669, 0x7f85,
-94, 0x5521,
-0x863f, 0x87ba, 0x88f8, 0x908f, 0xf95c, 0x6d1b, 0x70d9, 0x73de,
-0x7d61, 0x843d, 0xf95d, 0x916a, 0x99f1, 0xf95e, 0x4e82, 0x5375,
-0x6b04, 0x6b12, 0x703e, 0x721b, 0x862d, 0x9e1e, 0x524c, 0x8fa3,
-0x5d50, 0x64e5, 0x652c, 0x6b16, 0x6feb, 0x7c43, 0x7e9c, 0x85cd,
-0x8964, 0x89bd, 0x62c9, 0x81d8, 0x881f, 0x5eca, 0x6717, 0x6d6a,
-0x72fc, 0x7405, 0x746f, 0x8782, 0x90de, 0x4f86, 0x5d0d, 0x5fa0,
-0x840a, 0x51b7, 0x63a0, 0x7565, 0x4eae, 0x5006, 0x5169, 0x51c9,
-0x6881, 0x6a11, 0x7cae, 0x7cb1, 0x7ce7, 0x826f, 0x8ad2, 0x8f1b,
-0x91cf, 0x4fb6, 0x5137, 0x52f5, 0x5442, 0x5eec, 0x616e, 0x623e,
-0x65c5, 0x6ada, 0x6ffe, 0x792a, 0x85dc, 0x8823, 0x95ad, 0x9a62,
-0x9a6a, 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x701d, 0x792b,
-0x8f62, 0x9742, 0x6190, 0x6200, 0x6523, 0x6f23,
-94, 0x5621,
-0x7149, 0x7489, 0x7df4, 0x806f, 0x84ee, 0x8f26, 0x9023, 0x934a,
-0x51bd, 0x5217, 0x52a3, 0x6d0c, 0x70c8, 0x88c2, 0x5ec9, 0x6582,
-0x6bae, 0x6fc2, 0x7c3e, 0x7375, 0x4ee4, 0x4f36, 0x56f9, 0xf95f,
-0x5cba, 0x5dba, 0x601c, 0x73b2, 0x7b2d, 0x7f9a, 0x7fce, 0x8046,
-0x901e, 0x9234, 0x96f6, 0x9748, 0x9818, 0x9f61, 0x4f8b, 0x6fa7,
-0x79ae, 0x91b4, 0x96b7, 0x52de, 0xf960, 0x6488, 0x64c4, 0x6ad3,
-0x6f5e, 0x7018, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, 0x8def,
-0x8f05, 0x9732, 0x9b6f, 0x9dfa, 0x9e75, 0x788c, 0x797f, 0x7da0,
-0x83c9, 0x9304, 0x9e7f, 0x9e93, 0x8ad6, 0x58df, 0x5f04, 0x6727,
-0x7027, 0x74cf, 0x7c60, 0x807e, 0x5121, 0x7028, 0x7262, 0x78ca,
-0x8cc2, 0x8cda, 0x8cf4, 0x96f7, 0x4e86, 0x50da, 0x5bee, 0x5ed6,
-0x6599, 0x71ce, 0x7642, 0x77ad, 0x804a, 0x84fc,
-94, 0x5721,
-0x907c, 0x9b27, 0x9f8d, 0x58d8, 0x5a41, 0x5c62, 0x6a13, 0x6dda,
-0x6f0f, 0x763b, 0x7d2f, 0x7e37, 0x851e, 0x8938, 0x93e4, 0x964b,
-0x5289, 0x65d2, 0x67f3, 0x69b4, 0x6d41, 0x6e9c, 0x700f, 0x7409,
-0x7460, 0x7559, 0x7624, 0x786b, 0x8b2c, 0x985e, 0x516d, 0x622e,
-0x9678, 0x4f96, 0x502b, 0x5d19, 0x6dea, 0x7db8, 0x8f2a, 0x5f8b,
-0x6144, 0x6817, 0xf961, 0x9686, 0x52d2, 0x808b, 0x51dc, 0x51cc,
-0x695e, 0x7a1c, 0x7dbe, 0x83f1, 0x9675, 0x4fda, 0x5229, 0x5398,
-0x540f, 0x550e, 0x5c65, 0x60a7, 0x674e, 0x68a8, 0x6d6c, 0x7281,
-0x72f8, 0x7406, 0x7483, 0xf962, 0x75e2, 0x7c6c, 0x7f79, 0x7fb8,
-0x8389, 0x88cf, 0x88e1, 0x91cc, 0x91d0, 0x96e2, 0x9bc9, 0x541d,
-0x6f7e, 0x71d0, 0x7498, 0x85fa, 0x8eaa, 0x96a3, 0x9c57, 0x9e9f,
-0x6797, 0x6dcb, 0x7433, 0x81e8, 0x9716, 0x782c,
-94, 0x5821,
-0x7acb, 0x7b20, 0x7c92, 0x6469, 0x746a, 0x75f2, 0x78bc, 0x78e8,
-0x99ac, 0x9b54, 0x9ebb, 0x5bde, 0x5e55, 0x6f20, 0x819c, 0x83ab,
-0x9088, 0x4e07, 0x534d, 0x5a29, 0x5dd2, 0x5f4e, 0x6162, 0x633d,
-0x6669, 0x66fc, 0x6eff, 0x6f2b, 0x7063, 0x779e, 0x842c, 0x8513,
-0x883b, 0x8f13, 0x9945, 0x9c3b, 0x551c, 0x62b9, 0x672b, 0x6cab,
-0x8309, 0x896a, 0x977a, 0x4ea1, 0x5984, 0x5fd8, 0x5fd9, 0x671b,
-0x7db2, 0x7f54, 0x8292, 0x832b, 0x83bd, 0x8f1e, 0x9099, 0x57cb,
-0x59b9, 0x5a92, 0x5bd0, 0x6627, 0x679a, 0x6885, 0x6bcf, 0x7164,
-0x7f75, 0x8cb7, 0x8ce3, 0x9081, 0x9b45, 0x8108, 0x8c8a, 0x964c,
-0x9a40, 0x9ea5, 0x5b5f, 0x6c13, 0x731b, 0x76f2, 0x76df, 0x840c,
-0x51aa, 0x8993, 0x514d, 0x5195, 0x52c9, 0x68c9, 0x6c94, 0x7704,
-0x7720, 0x7dbf, 0x7dec, 0x9762, 0x9eb5, 0x6ec5,
-94, 0x5921,
-0x8511, 0x51a5, 0x540d, 0x547d, 0x660e, 0x669d, 0x6927, 0x6e9f,
-0x76bf, 0x7791, 0x8317, 0x84c2, 0x879f, 0x9169, 0x9298, 0x9cf4,
-0x8882, 0x4fae, 0x5192, 0x52df, 0x59c6, 0x5e3d, 0x6155, 0x6478,
-0x6479, 0x66ae, 0x67d0, 0x6a21, 0x6bcd, 0x6bdb, 0x725f, 0x7261,
-0x7441, 0x7738, 0x77db, 0x8017, 0x82bc, 0x8305, 0x8b00, 0x8b28,
-0x8c8c, 0x6728, 0x6c90, 0x7267, 0x76ee, 0x7766, 0x7a46, 0x9da9,
-0x6b7f, 0x6c92, 0x5922, 0x6726, 0x8499, 0x536f, 0x5893, 0x5999,
-0x5edf, 0x63cf, 0x6634, 0x6773, 0x6e3a, 0x732b, 0x7ad7, 0x82d7,
-0x9328, 0x52d9, 0x5deb, 0x61ae, 0x61cb, 0x620a, 0x62c7, 0x64ab,
-0x65e0, 0x6959, 0x6b66, 0x6bcb, 0x7121, 0x73f7, 0x755d, 0x7e46,
-0x821e, 0x8302, 0x856a, 0x8aa3, 0x8cbf, 0x9727, 0x9d61, 0x58a8,
-0x9ed8, 0x5011, 0x520e, 0x543b, 0x554f, 0x6587,
-94, 0x5a21,
-0x6c76, 0x7d0a, 0x7d0b, 0x805e, 0x868a, 0x9580, 0x96ef, 0x52ff,
-0x6c95, 0x7269, 0x5473, 0x5a9a, 0x5c3e, 0x5d4b, 0x5f4c, 0x5fae,
-0x672a, 0x68b6, 0x6963, 0x6e3c, 0x6e44, 0x7709, 0x7c73, 0x7f8e,
-0x8587, 0x8b0e, 0x8ff7, 0x9761, 0x9ef4, 0x5cb7, 0x60b6, 0x610d,
-0x61ab, 0x654f, 0x65fb, 0x65fc, 0x6c11, 0x6cef, 0x739f, 0x73c9,
-0x7de1, 0x9594, 0x5bc6, 0x871c, 0x8b10, 0x525d, 0x535a, 0x62cd,
-0x640f, 0x64b2, 0x6734, 0x6a38, 0x6cca, 0x73c0, 0x749e, 0x7b94,
-0x7c95, 0x7e1b, 0x818a, 0x8236, 0x8584, 0x8feb, 0x96f9, 0x99c1,
-0x4f34, 0x534a, 0x53cd, 0x53db, 0x62cc, 0x642c, 0x6500, 0x6591,
-0x69c3, 0x6cee, 0x6f58, 0x73ed, 0x7554, 0x7622, 0x76e4, 0x76fc,
-0x78d0, 0x78fb, 0x792c, 0x7d46, 0x822c, 0x87e0, 0x8fd4, 0x9812,
-0x98ef, 0x52c3, 0x62d4, 0x64a5, 0x6e24, 0x6f51,
-94, 0x5b21,
-0x767c, 0x8dcb, 0x91b1, 0x9262, 0x9aee, 0x9b43, 0x5023, 0x508d,
-0x574a, 0x59a8, 0x5c28, 0x5e47, 0x5f77, 0x623f, 0x653e, 0x65b9,
-0x65c1, 0x6609, 0x678b, 0x699c, 0x6ec2, 0x78c5, 0x7d21, 0x80aa,
-0x8180, 0x822b, 0x82b3, 0x84a1, 0x868c, 0x8a2a, 0x8b17, 0x90a6,
-0x9632, 0x9f90, 0x500d, 0x4ff3, 0xf963, 0x57f9, 0x5f98, 0x62dc,
-0x6392, 0x676f, 0x6e43, 0x7119, 0x76c3, 0x80cc, 0x80da, 0x88f4,
-0x88f5, 0x8919, 0x8ce0, 0x8f29, 0x914d, 0x966a, 0x4f2f, 0x4f70,
-0x5e1b, 0x67cf, 0x6822, 0x767d, 0x767e, 0x9b44, 0x5e61, 0x6a0a,
-0x7169, 0x71d4, 0x756a, 0xf964, 0x7e41, 0x8543, 0x85e9, 0x98dc,
-0x4f10, 0x7b4f, 0x7f70, 0x95a5, 0x51e1, 0x5e06, 0x68b5, 0x6c3e,
-0x6c4e, 0x6cdb, 0x72af, 0x7bc4, 0x8303, 0x6cd5, 0x743a, 0x50fb,
-0x5288, 0x58c1, 0x64d8, 0x6a97, 0x74a7, 0x7656,
-94, 0x5c21,
-0x78a7, 0x8617, 0x95e2, 0x9739, 0xf965, 0x535e, 0x5f01, 0x8b8a,
-0x8fa8, 0x8faf, 0x908a, 0x5225, 0x77a5, 0x9c49, 0x9f08, 0x4e19,
-0x5002, 0x5175, 0x5c5b, 0x5e77, 0x661e, 0x663a, 0x67c4, 0x68c5,
-0x70b3, 0x7501, 0x75c5, 0x79c9, 0x7add, 0x8f27, 0x9920, 0x9a08,
-0x4fdd, 0x5821, 0x5831, 0x5bf6, 0x666e, 0x6b65, 0x6d11, 0x6e7a,
-0x6f7d, 0x73e4, 0x752b, 0x83e9, 0x88dc, 0x8913, 0x8b5c, 0x8f14,
-0x4f0f, 0x50d5, 0x5310, 0x535c, 0x5b93, 0x5fa9, 0x670d, 0x798f,
-0x8179, 0x832f, 0x8514, 0x8907, 0x8986, 0x8f39, 0x8f3b, 0x99a5,
-0x9c12, 0x672c, 0x4e76, 0x4ff8, 0x5949, 0x5c01, 0x5cef, 0x5cf0,
-0x6367, 0x68d2, 0x70fd, 0x71a2, 0x742b, 0x7e2b, 0x84ec, 0x8702,
-0x9022, 0x92d2, 0x9cf3, 0x4e0d, 0x4ed8, 0x4fef, 0x5085, 0x5256,
-0x526f, 0x5426, 0x5490, 0x57e0, 0x592b, 0x5a66,
-94, 0x5d21,
-0x5b5a, 0x5b75, 0x5bcc, 0x5e9c, 0xf966, 0x6276, 0x6577, 0x65a7,
-0x6d6e, 0x6ea5, 0x7236, 0x7b26, 0x7c3f, 0x7f36, 0x8150, 0x8151,
-0x819a, 0x8240, 0x8299, 0x83a9, 0x8a03, 0x8ca0, 0x8ce6, 0x8cfb,
-0x8d74, 0x8dba, 0x90e8, 0x91dc, 0x961c, 0x9644, 0x99d9, 0x9ce7,
-0x5317, 0x5206, 0x5429, 0x5674, 0x58b3, 0x5954, 0x596e, 0x5fff,
-0x61a4, 0x626e, 0x6610, 0x6c7e, 0x711a, 0x76c6, 0x7c89, 0x7cde,
-0x7d1b, 0x82ac, 0x8cc1, 0x96f0, 0xf967, 0x4f5b, 0x5f17, 0x5f7f,
-0x62c2, 0x5d29, 0x670b, 0x68da, 0x787c, 0x7e43, 0x9d6c, 0x4e15,
-0x5099, 0x5315, 0x532a, 0x5351, 0x5983, 0x5a62, 0x5e87, 0x60b2,
-0x618a, 0x6249, 0x6279, 0x6590, 0x6787, 0x69a7, 0x6bd4, 0x6bd6,
-0x6bd7, 0x6bd8, 0x6cb8, 0xf968, 0x7435, 0x75fa, 0x7812, 0x7891,
-0x79d5, 0x79d8, 0x7c83, 0x7dcb, 0x7fe1, 0x80a5,
-94, 0x5e21,
-0x813e, 0x81c2, 0x83f2, 0x871a, 0x88e8, 0x8ab9, 0x8b6c, 0x8cbb,
-0x9119, 0x975e, 0x98db, 0x9f3b, 0x56ac, 0x5b2a, 0x5f6c, 0x658c,
-0x6ab3, 0x6baf, 0x6d5c, 0x6ff1, 0x7015, 0x725d, 0x73ad, 0x8ca7,
-0x8cd3, 0x983b, 0x6191, 0x6c37, 0x8058, 0x9a01, 0x4e4d, 0x4e8b,
-0x4e9b, 0x4ed5, 0x4f3a, 0x4f3c, 0x4f7f, 0x4fdf, 0x50ff, 0x53f2,
-0x53f8, 0x5506, 0x55e3, 0x56db, 0x58eb, 0x5962, 0x5a11, 0x5beb,
-0x5bfa, 0x5c04, 0x5df3, 0x5e2b, 0x5f99, 0x601d, 0x6368, 0x659c,
-0x65af, 0x67f6, 0x67fb, 0x68ad, 0x6b7b, 0x6c99, 0x6cd7, 0x6e23,
-0x7009, 0x7345, 0x7802, 0x793e, 0x7940, 0x7960, 0x79c1, 0x7be9,
-0x7d17, 0x7d72, 0x8086, 0x820d, 0x838e, 0x84d1, 0x86c7, 0x88df,
-0x8a50, 0x8a5e, 0x8b1d, 0x8cdc, 0x8d66, 0x8fad, 0x90aa, 0x98fc,
-0x99df, 0x9e9d, 0x524a, 0xf969, 0x6714, 0xf96a,
-94, 0x5f21,
-0x5098, 0x522a, 0x5c71, 0x6563, 0x6c55, 0x73ca, 0x7523, 0x759d,
-0x7b97, 0x849c, 0x9178, 0x9730, 0x4e77, 0x6492, 0x6bba, 0x715e,
-0x85a9, 0x4e09, 0xf96b, 0x6749, 0x68ee, 0x6e17, 0x829f, 0x8518,
-0x886b, 0x63f7, 0x6f81, 0x9212, 0x98af, 0x4e0a, 0x50b7, 0x50cf,
-0x511f, 0x5546, 0x55aa, 0x5617, 0x5b40, 0x5c19, 0x5ce0, 0x5e38,
-0x5e8a, 0x5ea0, 0x5ec2, 0x60f3, 0x6851, 0x6a61, 0x6e58, 0x723d,
-0x7240, 0x72c0, 0x76f8, 0x7965, 0x7bb1, 0x7fd4, 0x88f3, 0x89f4,
-0x8a73, 0x8c61, 0x8cde, 0x971c, 0x585e, 0x74bd, 0x8cfd, 0x55c7,
-0xf96c, 0x7a61, 0x7d22, 0x8272, 0x7272, 0x751f, 0x7525, 0xf96d,
-0x7b19, 0x5885, 0x58fb, 0x5dbc, 0x5e8f, 0x5eb6, 0x5f90, 0x6055,
-0x6292, 0x637f, 0x654d, 0x6691, 0x66d9, 0x66f8, 0x6816, 0x68f2,
-0x7280, 0x745e, 0x7b6e, 0x7d6e, 0x7dd6, 0x7f72,
-94, 0x6021,
-0x80e5, 0x8212, 0x85af, 0x897f, 0x8a93, 0x901d, 0x92e4, 0x9ecd,
-0x9f20, 0x5915, 0x596d, 0x5e2d, 0x60dc, 0x6614, 0x6673, 0x6790,
-0x6c50, 0x6dc5, 0x6f5f, 0x77f3, 0x78a9, 0x84c6, 0x91cb, 0x932b,
-0x4ed9, 0x50ca, 0x5148, 0x5584, 0x5b0b, 0x5ba3, 0x6247, 0x657e,
-0x65cb, 0x6e32, 0x717d, 0x7401, 0x7444, 0x7487, 0x74bf, 0x766c,
-0x79aa, 0x7dda, 0x7e55, 0x7fa8, 0x817a, 0x81b3, 0x8239, 0x861a,
-0x87ec, 0x8a75, 0x8de3, 0x9078, 0x9291, 0x9425, 0x994d, 0x9bae,
-0x5368, 0x5c51, 0x6954, 0x6cc4, 0x6d29, 0x6e2b, 0x820c, 0x859b,
-0x893b, 0x8a2d, 0x8aaa, 0x96ea, 0x9f67, 0x5261, 0x66b9, 0x6bb2,
-0x7e96, 0x87fe, 0x8d0d, 0x9583, 0x965d, 0x651d, 0x6d89, 0x71ee,
-0xf96e, 0x57ce, 0x59d3, 0x5bac, 0x6027, 0x60fa, 0x6210, 0x661f,
-0x665f, 0x7329, 0x73f9, 0x76db, 0x7701, 0x7b6c,
-94, 0x6121,
-0x8056, 0x8072, 0x8165, 0x8aa0, 0x9192, 0x4e16, 0x52e2, 0x6b72,
-0x6d17, 0x7a05, 0x7b39, 0x7d30, 0xf96f, 0x8cb0, 0x53ec, 0x562f,
-0x5851, 0x5bb5, 0x5c0f, 0x5c11, 0x5de2, 0x6240, 0x6383, 0x6414,
-0x662d, 0x68b3, 0x6cbc, 0x6d88, 0x6eaf, 0x701f, 0x70a4, 0x71d2,
-0x7526, 0x758f, 0x758e, 0x7619, 0x7b11, 0x7be0, 0x7c2b, 0x7d20,
-0x7d39, 0x852c, 0x856d, 0x8607, 0x8a34, 0x900d, 0x9061, 0x90b5,
-0x92b7, 0x97f6, 0x9a37, 0x4fd7, 0x5c6c, 0x675f, 0x6d91, 0x7c9f,
-0x7e8c, 0x8b16, 0x8d16, 0x901f, 0x5b6b, 0x5dfd, 0x640d, 0x84c0,
-0x905c, 0x98e1, 0x7387, 0x5b8b, 0x609a, 0x677e, 0x6dde, 0x8a1f,
-0x8aa6, 0x9001, 0x980c, 0x5237, 0xf970, 0x7051, 0x788e, 0x9396,
-0x8870, 0x91d7, 0x4fee, 0x53d7, 0x55fd, 0x56da, 0x5782, 0x58fd,
-0x5ac2, 0x5b88, 0x5cab, 0x5cc0, 0x5e25, 0x6101,
-94, 0x6221,
-0x620d, 0x624b, 0x6388, 0x641c, 0x6536, 0x6578, 0x6a39, 0x6b8a,
-0x6c34, 0x6d19, 0x6f31, 0x71e7, 0x72e9, 0x7378, 0x7407, 0x74b2,
-0x7626, 0x7761, 0x79c0, 0x7a57, 0x7aea, 0x7cb9, 0x7d8f, 0x7dac,
-0x7e61, 0x7f9e, 0x8129, 0x8331, 0x8490, 0x84da, 0x85ea, 0x8896,
-0x8ab0, 0x8b90, 0x8f38, 0x9042, 0x9083, 0x916c, 0x9296, 0x92b9,
-0x968b, 0x96a7, 0x96a8, 0x96d6, 0x9700, 0x9808, 0x9996, 0x9ad3,
-0x9b1a, 0x53d4, 0x587e, 0x5919, 0x5b70, 0x5bbf, 0x6dd1, 0x6f5a,
-0x719f, 0x7421, 0x74b9, 0x8085, 0x83fd, 0x5de1, 0x5f87, 0x5faa,
-0x6042, 0x65ec, 0x6812, 0x696f, 0x6a53, 0x6b89, 0x6d35, 0x6df3,
-0x73e3, 0x76fe, 0x77ac, 0x7b4d, 0x7d14, 0x8123, 0x821c, 0x8340,
-0x84f4, 0x8563, 0x8a62, 0x8ac4, 0x9187, 0x931e, 0x9806, 0x99b4,
-0x620c, 0x8853, 0x8ff0, 0x9265, 0x5d07, 0x5d27,
-94, 0x6321,
-0x5d69, 0x745f, 0x819d, 0x8768, 0x6fd5, 0x62fe, 0x7fd2, 0x8936,
-0x8972, 0x4e1e, 0x4e58, 0x50e7, 0x52dd, 0x5347, 0x627f, 0x6607,
-0x7e69, 0x8805, 0x965e, 0x4f8d, 0x5319, 0x5636, 0x59cb, 0x5aa4,
-0x5c38, 0x5c4e, 0x5c4d, 0x5e02, 0x5f11, 0x6043, 0x65bd, 0x662f,
-0x6642, 0x67be, 0x67f4, 0x731c, 0x77e2, 0x793a, 0x7fc5, 0x8494,
-0x84cd, 0x8996, 0x8a66, 0x8a69, 0x8ae1, 0x8c55, 0x8c7a, 0x57f4,
-0x5bd4, 0x5f0f, 0x606f, 0x62ed, 0x690d, 0x6b96, 0x6e5c, 0x7184,
-0x7bd2, 0x8755, 0x8b58, 0x8efe, 0x98df, 0x98fe, 0x4f38, 0x4f81,
-0x4fe1, 0x547b, 0x5a20, 0x5bb8, 0x613c, 0x65b0, 0x6668, 0x71fc,
-0x7533, 0x795e, 0x7d33, 0x814e, 0x81e3, 0x8398, 0x85aa, 0x85ce,
-0x8703, 0x8a0a, 0x8eab, 0x8f9b, 0xf971, 0x8fc5, 0x5931, 0x5ba4,
-0x5be6, 0x6089, 0x5be9, 0x5c0b, 0x5fc3, 0x6c81,
-94, 0x6421,
-0xf972, 0x6df1, 0x700b, 0x751a, 0x82af, 0x8af6, 0x4ec0, 0x5341,
-0xf973, 0x96d9, 0x6c0f, 0x4e9e, 0x4fc4, 0x5152, 0x555e, 0x5a25,
-0x5ce8, 0x6211, 0x7259, 0x82bd, 0x83aa, 0x86fe, 0x8859, 0x8a1d,
-0x963f, 0x96c5, 0x9913, 0x9d09, 0x9d5d, 0x580a, 0x5cb3, 0x5dbd,
-0x5e44, 0x60e1, 0x6115, 0x63e1, 0x6a02, 0x6e25, 0x9102, 0x9354,
-0x984e, 0x9c10, 0x9f77, 0x5b89, 0x5cb8, 0x6309, 0x664f, 0x6848,
-0x773c, 0x96c1, 0x978d, 0x9854, 0x9b9f, 0x65a1, 0x8b01, 0x8ecb,
-0x95bc, 0x5535, 0x5ca9, 0x5dd6, 0x5eb5, 0x6697, 0x764c, 0x83f4,
-0x95c7, 0x58d3, 0x62bc, 0x72ce, 0x9d28, 0x4ef0, 0x592e, 0x600f,
-0x663b, 0x6b83, 0x79e7, 0x9d26, 0x5393, 0x54c0, 0x57c3, 0x5d16,
-0x611b, 0x66d6, 0x6daf, 0x788d, 0x827e, 0x9698, 0x9744, 0x5384,
-0x627c, 0x6396, 0x6db2, 0x7e0a, 0x814b, 0x984d,
-94, 0x6521,
-0x6afb, 0x7f4c, 0x9daf, 0x9e1a, 0x4e5f, 0x503b, 0x51b6, 0x591c,
-0x60f9, 0x63f6, 0x6930, 0x723a, 0x8036, 0xf974, 0x91ce, 0x5f31,
-0xf975, 0xf976, 0x7d04, 0x82e5, 0x846f, 0x84bb, 0x85e5, 0x8e8d,
-0xf977, 0x4f6f, 0xf978, 0xf979, 0x58e4, 0x5b43, 0x6059, 0x63da,
-0x6518, 0x656d, 0x6698, 0xf97a, 0x694a, 0x6a23, 0x6d0b, 0x7001,
-0x716c, 0x75d2, 0x760d, 0x79b3, 0x7a70, 0xf97b, 0x7f8a, 0xf97c,
-0x8944, 0xf97d, 0x8b93, 0x91c0, 0x967d, 0xf97e, 0x990a, 0x5704,
-0x5fa1, 0x65bc, 0x6f01, 0x7600, 0x79a6, 0x8a9e, 0x99ad, 0x9b5a,
-0x9f6c, 0x5104, 0x61b6, 0x6291, 0x6a8d, 0x81c6, 0x5043, 0x5830,
-0x5f66, 0x7109, 0x8a00, 0x8afa, 0x5b7c, 0x8616, 0x4ffa, 0x513c,
-0x56b4, 0x5944, 0x63a9, 0x6df9, 0x5daa, 0x696d, 0x5186, 0x4e88,
-0x4f59, 0xf97f, 0xf980, 0xf981, 0x5982, 0xf982,
-94, 0x6621,
-0xf983, 0x6b5f, 0x6c5d, 0xf984, 0x74b5, 0x7916, 0xf985, 0x8207,
-0x8245, 0x8339, 0x8f3f, 0x8f5d, 0xf986, 0x9918, 0xf987, 0xf988,
-0xf989, 0x4ea6, 0xf98a, 0x57df, 0x5f79, 0x6613, 0xf98b, 0xf98c,
-0x75ab, 0x7e79, 0x8b6f, 0xf98d, 0x9006, 0x9a5b, 0x56a5, 0x5827,
-0x59f8, 0x5a1f, 0x5bb4, 0xf98e, 0x5ef6, 0xf98f, 0xf990, 0x6350,
-0x633b, 0xf991, 0x693d, 0x6c87, 0x6cbf, 0x6d8e, 0x6d93, 0x6df5,
-0x6f14, 0xf992, 0x70df, 0x7136, 0x7159, 0xf993, 0x71c3, 0x71d5,
-0xf994, 0x784f, 0x786f, 0xf995, 0x7b75, 0x7de3, 0xf996, 0x7e2f,
-0xf997, 0x884d, 0x8edf, 0xf998, 0xf999, 0xf99a, 0x925b, 0xf99b,
-0x9cf6, 0xf99c, 0xf99d, 0xf99e, 0x6085, 0x6d85, 0xf99f, 0x71b1,
-0xf9a0, 0xf9a1, 0x95b1, 0x53ad, 0xf9a2, 0xf9a3, 0xf9a4, 0x67d3,
-0xf9a5, 0x708e, 0x7130, 0x7430, 0x8276, 0x82d2,
-94, 0x6721,
-0xf9a6, 0x95bb, 0x9ae5, 0x9e7d, 0x66c4, 0xf9a7, 0x71c1, 0x8449,
-0xf9a8, 0xf9a9, 0x584b, 0xf9aa, 0xf9ab, 0x5db8, 0x5f71, 0xf9ac,
-0x6620, 0x668e, 0x6979, 0x69ae, 0x6c38, 0x6cf3, 0x6e36, 0x6f41,
-0x6fda, 0x701b, 0x702f, 0x7150, 0x71df, 0x7370, 0xf9ad, 0x745b,
-0xf9ae, 0x74d4, 0x76c8, 0x7a4e, 0x7e93, 0xf9af, 0xf9b0, 0x82f1,
-0x8a60, 0x8fce, 0xf9b1, 0x9348, 0xf9b2, 0x9719, 0xf9b3, 0xf9b4,
-0x4e42, 0x502a, 0xf9b5, 0x5208, 0x53e1, 0x66f3, 0x6c6d, 0x6fca,
-0x730a, 0x777f, 0x7a62, 0x82ae, 0x85dd, 0x8602, 0xf9b6, 0x88d4,
-0x8a63, 0x8b7d, 0x8c6b, 0xf9b7, 0x92b3, 0xf9b8, 0x9713, 0x9810,
-0x4e94, 0x4f0d, 0x4fc9, 0x50b2, 0x5348, 0x543e, 0x5433, 0x55da,
-0x5862, 0x58ba, 0x5967, 0x5a1b, 0x5be4, 0x609f, 0xf9b9, 0x61ca,
-0x6556, 0x65ff, 0x6664, 0x68a7, 0x6c5a, 0x6fb3,
-94, 0x6821,
-0x70cf, 0x71ac, 0x7352, 0x7b7d, 0x8708, 0x8aa4, 0x9c32, 0x9f07,
-0x5c4b, 0x6c83, 0x7344, 0x7389, 0x923a, 0x6eab, 0x7465, 0x761f,
-0x7a69, 0x7e15, 0x860a, 0x5140, 0x58c5, 0x64c1, 0x74ee, 0x7515,
-0x7670, 0x7fc1, 0x9095, 0x96cd, 0x9954, 0x6e26, 0x74e6, 0x7aa9,
-0x7aaa, 0x81e5, 0x86d9, 0x8778, 0x8a1b, 0x5a49, 0x5b8c, 0x5b9b,
-0x68a1, 0x6900, 0x6d63, 0x73a9, 0x7413, 0x742c, 0x7897, 0x7de9,
-0x7feb, 0x8118, 0x8155, 0x839e, 0x8c4c, 0x962e, 0x9811, 0x66f0,
-0x5f80, 0x65fa, 0x6789, 0x6c6a, 0x738b, 0x502d, 0x5a03, 0x6b6a,
-0x77ee, 0x5916, 0x5d6c, 0x5dcd, 0x7325, 0x754f, 0xf9ba, 0xf9bb,
-0x50e5, 0x51f9, 0x582f, 0x592d, 0x5996, 0x59da, 0x5be5, 0xf9bc,
-0xf9bd, 0x5da2, 0x62d7, 0x6416, 0x6493, 0x64fe, 0xf9be, 0x66dc,
-0xf9bf, 0x6a48, 0xf9c0, 0x71ff, 0x7464, 0xf9c1,
-94, 0x6921,
-0x7a88, 0x7aaf, 0x7e47, 0x7e5e, 0x8000, 0x8170, 0xf9c2, 0x87ef,
-0x8981, 0x8b20, 0x9059, 0xf9c3, 0x9080, 0x9952, 0x617e, 0x6b32,
-0x6d74, 0x7e1f, 0x8925, 0x8fb1, 0x4fd1, 0x50ad, 0x5197, 0x52c7,
-0x57c7, 0x5889, 0x5bb9, 0x5eb8, 0x6142, 0x6995, 0x6d8c, 0x6e67,
-0x6eb6, 0x7194, 0x7462, 0x7528, 0x752c, 0x8073, 0x8338, 0x84c9,
-0x8e0a, 0x9394, 0x93de, 0xf9c4, 0x4e8e, 0x4f51, 0x5076, 0x512a,
-0x53c8, 0x53cb, 0x53f3, 0x5b87, 0x5bd3, 0x5c24, 0x611a, 0x6182,
-0x65f4, 0x725b, 0x7397, 0x7440, 0x76c2, 0x7950, 0x7991, 0x79b9,
-0x7d06, 0x7fbd, 0x828b, 0x85d5, 0x865e, 0x8fc2, 0x9047, 0x90f5,
-0x91ea, 0x9685, 0x96e8, 0x96e9, 0x52d6, 0x5f67, 0x65ed, 0x6631,
-0x682f, 0x715c, 0x7a36, 0x90c1, 0x980a, 0x4e91, 0xf9c5, 0x6a52,
-0x6b9e, 0x6f90, 0x7189, 0x8018, 0x82b8, 0x8553,
-94, 0x6a21,
-0x904b, 0x9695, 0x96f2, 0x97fb, 0x851a, 0x9b31, 0x4e90, 0x718a,
-0x96c4, 0x5143, 0x539f, 0x54e1, 0x5713, 0x5712, 0x57a3, 0x5a9b,
-0x5ac4, 0x5bc3, 0x6028, 0x613f, 0x63f4, 0x6c85, 0x6d39, 0x6e72,
-0x6e90, 0x7230, 0x733f, 0x7457, 0x82d1, 0x8881, 0x8f45, 0x9060,
-0xf9c6, 0x9662, 0x9858, 0x9d1b, 0x6708, 0x8d8a, 0x925e, 0x4f4d,
-0x5049, 0x50de, 0x5371, 0x570d, 0x59d4, 0x5a01, 0x5c09, 0x6170,
-0x6690, 0x6e2d, 0x7232, 0x744b, 0x7def, 0x80c3, 0x840e, 0x8466,
-0x853f, 0x875f, 0x885b, 0x8918, 0x8b02, 0x9055, 0x97cb, 0x9b4f,
-0x4e73, 0x4f91, 0x5112, 0x516a, 0xf9c7, 0x552f, 0x55a9, 0x5b7a,
-0x5ba5, 0x5e7c, 0x5e7d, 0x5ebe, 0x60a0, 0x60df, 0x6108, 0x6109,
-0x63c4, 0x6538, 0x6709, 0xf9c8, 0x67d4, 0x67da, 0xf9c9, 0x6961,
-0x6962, 0x6cb9, 0x6d27, 0xf9ca, 0x6e38, 0xf9cb,
-94, 0x6b21,
-0x6fe1, 0x7336, 0x7337, 0xf9cc, 0x745c, 0x7531, 0xf9cd, 0x7652,
-0xf9ce, 0xf9cf, 0x7dad, 0x81fe, 0x8438, 0x88d5, 0x8a98, 0x8adb,
-0x8aed, 0x8e30, 0x8e42, 0x904a, 0x903e, 0x907a, 0x9149, 0x91c9,
-0x936e, 0xf9d0, 0xf9d1, 0x5809, 0xf9d2, 0x6bd3, 0x8089, 0x80b2,
-0xf9d3, 0xf9d4, 0x5141, 0x596b, 0x5c39, 0xf9d5, 0xf9d6, 0x6f64,
-0x73a7, 0x80e4, 0x8d07, 0xf9d7, 0x9217, 0x958f, 0xf9d8, 0xf9d9,
-0xf9da, 0xf9db, 0x807f, 0x620e, 0x701c, 0x7d68, 0x878d, 0xf9dc,
-0x57a0, 0x6069, 0x6147, 0x6bb7, 0x8abe, 0x9280, 0x96b1, 0x4e59,
-0x541f, 0x6deb, 0x852d, 0x9670, 0x97f3, 0x98ee, 0x63d6, 0x6ce3,
-0x9091, 0x51dd, 0x61c9, 0x81ba, 0x9df9, 0x4f9d, 0x501a, 0x5100,
-0x5b9c, 0x610f, 0x61ff, 0x64ec, 0x6905, 0x6bc5, 0x7591, 0x77e3,
-0x7fa9, 0x8264, 0x858f, 0x87fb, 0x8863, 0x8abc,
-94, 0x6c21,
-0x8b70, 0x91ab, 0x4e8c, 0x4ee5, 0x4f0a, 0xf9dd, 0xf9de, 0x5937,
-0x59e8, 0xf9df, 0x5df2, 0x5f1b, 0x5f5b, 0x6021, 0xf9e0, 0xf9e1,
-0xf9e2, 0xf9e3, 0x723e, 0x73e5, 0xf9e4, 0x7570, 0x75cd, 0xf9e5,
-0x79fb, 0xf9e6, 0x800c, 0x8033, 0x8084, 0x82e1, 0x8351, 0xf9e7,
-0xf9e8, 0x8cbd, 0x8cb3, 0x9087, 0xf9e9, 0xf9ea, 0x98f4, 0x990c,
-0xf9eb, 0xf9ec, 0x7037, 0x76ca, 0x7fca, 0x7fcc, 0x7ffc, 0x8b1a,
-0x4eba, 0x4ec1, 0x5203, 0x5370, 0xf9ed, 0x54bd, 0x56e0, 0x59fb,
-0x5bc5, 0x5f15, 0x5fcd, 0x6e6e, 0xf9ee, 0xf9ef, 0x7d6a, 0x8335,
-0xf9f0, 0x8693, 0x8a8d, 0xf9f1, 0x976d, 0x9777, 0xf9f2, 0xf9f3,
-0x4e00, 0x4f5a, 0x4f7e, 0x58f9, 0x65e5, 0x6ea2, 0x9038, 0x93b0,
-0x99b9, 0x4efb, 0x58ec, 0x598a, 0x59d9, 0x6041, 0xf9f4, 0xf9f5,
-0x7a14, 0xf9f6, 0x834f, 0x8cc3, 0x5165, 0x5344,
-94, 0x6d21,
-0xf9f7, 0xf9f8, 0xf9f9, 0x4ecd, 0x5269, 0x5b55, 0x82bf, 0x4ed4,
-0x523a, 0x54a8, 0x59c9, 0x59ff, 0x5b50, 0x5b57, 0x5b5c, 0x6063,
-0x6148, 0x6ecb, 0x7099, 0x716e, 0x7386, 0x74f7, 0x75b5, 0x78c1,
-0x7d2b, 0x8005, 0x81ea, 0x8328, 0x8517, 0x85c9, 0x8aee, 0x8cc7,
-0x96cc, 0x4f5c, 0x52fa, 0x56bc, 0x65ab, 0x6628, 0x707c, 0x70b8,
-0x7235, 0x7dbd, 0x828d, 0x914c, 0x96c0, 0x9d72, 0x5b71, 0x68e7,
-0x6b98, 0x6f7a, 0x76de, 0x5c91, 0x66ab, 0x6f5b, 0x7bb4, 0x7c2a,
-0x8836, 0x96dc, 0x4e08, 0x4ed7, 0x5320, 0x5834, 0x58bb, 0x58ef,
-0x596c, 0x5c07, 0x5e33, 0x5e84, 0x5f35, 0x638c, 0x66b2, 0x6756,
-0x6a1f, 0x6aa3, 0x6b0c, 0x6f3f, 0x7246, 0xf9fa, 0x7350, 0x748b,
-0x7ae0, 0x7ca7, 0x8178, 0x81df, 0x81e7, 0x838a, 0x846c, 0x8523,
-0x8594, 0x85cf, 0x88dd, 0x8d13, 0x91ac, 0x9577,
-94, 0x6e21,
-0x969c, 0x518d, 0x54c9, 0x5728, 0x5bb0, 0x624d, 0x6750, 0x683d,
-0x6893, 0x6e3d, 0x6ed3, 0x707d, 0x7e21, 0x88c1, 0x8ca1, 0x8f09,
-0x9f4b, 0x9f4e, 0x722d, 0x7b8f, 0x8acd, 0x931a, 0x4f47, 0x4f4e,
-0x5132, 0x5480, 0x59d0, 0x5e95, 0x62b5, 0x6775, 0x696e, 0x6a17,
-0x6cae, 0x6e1a, 0x72d9, 0x732a, 0x75bd, 0x7bb8, 0x7d35, 0x82e7,
-0x83f9, 0x8457, 0x85f7, 0x8a5b, 0x8caf, 0x8e87, 0x9019, 0x90b8,
-0x96ce, 0x9f5f, 0x52e3, 0x540a, 0x5ae1, 0x5bc2, 0x6458, 0x6575,
-0x6ef4, 0x72c4, 0xf9fb, 0x7684, 0x7a4d, 0x7b1b, 0x7c4d, 0x7e3e,
-0x7fdf, 0x837b, 0x8b2b, 0x8cca, 0x8d64, 0x8de1, 0x8e5f, 0x8fea,
-0x8ff9, 0x9069, 0x93d1, 0x4f43, 0x4f7a, 0x50b3, 0x5168, 0x5178,
-0x524d, 0x526a, 0x5861, 0x587c, 0x5960, 0x5c08, 0x5c55, 0x5edb,
-0x609b, 0x6230, 0x6813, 0x6bbf, 0x6c08, 0x6fb1,
-94, 0x6f21,
-0x714e, 0x7420, 0x7530, 0x7538, 0x7551, 0x7672, 0x7b4c, 0x7b8b,
-0x7bad, 0x7bc6, 0x7e8f, 0x8a6e, 0x8f3e, 0x8f49, 0x923f, 0x9293,
-0x9322, 0x942b, 0x96fb, 0x985a, 0x986b, 0x991e, 0x5207, 0x622a,
-0x6298, 0x6d59, 0x7664, 0x7aca, 0x7bc0, 0x7d76, 0x5360, 0x5cbe,
-0x5e97, 0x6f38, 0x70b9, 0x7c98, 0x9711, 0x9b8e, 0x9ede, 0x63a5,
-0x647a, 0x8776, 0x4e01, 0x4e95, 0x4ead, 0x505c, 0x5075, 0x5448,
-0x59c3, 0x5b9a, 0x5e40, 0x5ead, 0x5ef7, 0x5f81, 0x60c5, 0x633a,
-0x653f, 0x6574, 0x65cc, 0x6676, 0x6678, 0x67fe, 0x6968, 0x6a89,
-0x6b63, 0x6c40, 0x6dc0, 0x6de8, 0x6e1f, 0x6e5e, 0x701e, 0x70a1,
-0x738e, 0x73fd, 0x753a, 0x775b, 0x7887, 0x798e, 0x7a0b, 0x7a7d,
-0x7cbe, 0x7d8e, 0x8247, 0x8a02, 0x8aea, 0x8c9e, 0x912d, 0x914a,
-0x91d8, 0x9266, 0x92cc, 0x9320, 0x9706, 0x9756,
-94, 0x7021,
-0x975c, 0x9802, 0x9f0e, 0x5236, 0x5291, 0x557c, 0x5824, 0x5e1d,
-0x5f1f, 0x608c, 0x63d0, 0x68af, 0x6fdf, 0x796d, 0x7b2c, 0x81cd,
-0x85ba, 0x88fd, 0x8af8, 0x8e44, 0x918d, 0x9664, 0x969b, 0x973d,
-0x984c, 0x9f4a, 0x4fce, 0x5146, 0x51cb, 0x52a9, 0x5632, 0x5f14,
-0x5f6b, 0x63aa, 0x64cd, 0x65e9, 0x6641, 0x66fa, 0x66f9, 0x671d,
-0x689d, 0x68d7, 0x69fd, 0x6f15, 0x6f6e, 0x7167, 0x71e5, 0x722a,
-0x74aa, 0x773a, 0x7956, 0x795a, 0x79df, 0x7a20, 0x7a95, 0x7c97,
-0x7cdf, 0x7d44, 0x7e70, 0x8087, 0x85fb, 0x86a4, 0x8a54, 0x8abf,
-0x8d99, 0x8e81, 0x9020, 0x906d, 0x91e3, 0x963b, 0x96d5, 0x9ce5,
-0x65cf, 0x7c07, 0x8db3, 0x93c3, 0x5b58, 0x5c0a, 0x5352, 0x62d9,
-0x731d, 0x5027, 0x5b97, 0x5f9e, 0x60b0, 0x616b, 0x68d5, 0x6dd9,
-0x742e, 0x7a2e, 0x7d42, 0x7d9c, 0x7e31, 0x816b,
-94, 0x7121,
-0x8e2a, 0x8e35, 0x937e, 0x9418, 0x4f50, 0x5750, 0x5de6, 0x5ea7,
-0x632b, 0x7f6a, 0x4e3b, 0x4f4f, 0x4f8f, 0x505a, 0x59dd, 0x80c4,
-0x546a, 0x5468, 0x55fe, 0x594f, 0x5b99, 0x5dde, 0x5eda, 0x665d,
-0x6731, 0x67f1, 0x682a, 0x6ce8, 0x6d32, 0x6e4a, 0x6f8d, 0x70b7,
-0x73e0, 0x7587, 0x7c4c, 0x7d02, 0x7d2c, 0x7da2, 0x821f, 0x86db,
-0x8a3b, 0x8a85, 0x8d70, 0x8e8a, 0x8f33, 0x9031, 0x914e, 0x9152,
-0x9444, 0x99d0, 0x7af9, 0x7ca5, 0x4fca, 0x5101, 0x51c6, 0x57c8,
-0x5bef, 0x5cfb, 0x6659, 0x6a3d, 0x6d5a, 0x6e96, 0x6fec, 0x710c,
-0x756f, 0x7ae3, 0x8822, 0x9021, 0x9075, 0x96cb, 0x99ff, 0x8301,
-0x4e2d, 0x4ef2, 0x8846, 0x91cd, 0x537d, 0x6adb, 0x696b, 0x6c41,
-0x847a, 0x589e, 0x618e, 0x66fe, 0x62ef, 0x70dd, 0x7511, 0x75c7,
-0x7e52, 0x84b8, 0x8b49, 0x8d08, 0x4e4b, 0x53ea,
-94, 0x7221,
-0x54ab, 0x5730, 0x5740, 0x5fd7, 0x6301, 0x6307, 0x646f, 0x652f,
-0x65e8, 0x667a, 0x679d, 0x67b3, 0x6b62, 0x6c60, 0x6c9a, 0x6f2c,
-0x77e5, 0x7825, 0x7949, 0x7957, 0x7d19, 0x80a2, 0x8102, 0x81f3,
-0x829d, 0x82b7, 0x8718, 0x8a8c, 0xf9fc, 0x8d04, 0x8dbe, 0x9072,
-0x76f4, 0x7a19, 0x7a37, 0x7e54, 0x8077, 0x5507, 0x55d4, 0x5875,
-0x632f, 0x6422, 0x6649, 0x664b, 0x686d, 0x699b, 0x6b84, 0x6d25,
-0x6eb1, 0x73cd, 0x7468, 0x74a1, 0x755b, 0x75b9, 0x76e1, 0x771e,
-0x778b, 0x79e6, 0x7e09, 0x7e1d, 0x81fb, 0x852f, 0x8897, 0x8a3a,
-0x8cd1, 0x8eeb, 0x8fb0, 0x9032, 0x93ad, 0x9663, 0x9673, 0x9707,
-0x4f84, 0x53f1, 0x59ea, 0x5ac9, 0x5e19, 0x684e, 0x74c6, 0x75be,
-0x79e9, 0x7a92, 0x81a3, 0x86ed, 0x8cea, 0x8dcc, 0x8fed, 0x659f,
-0x6715, 0xf9fd, 0x57f7, 0x6f57, 0x7ddd, 0x8f2f,
-94, 0x7321,
-0x93f6, 0x96c6, 0x5fb5, 0x61f2, 0x6f84, 0x4e14, 0x4f98, 0x501f,
-0x53c9, 0x55df, 0x5d6f, 0x5dee, 0x6b21, 0x6b64, 0x78cb, 0x7b9a,
-0xf9fe, 0x8e49, 0x8eca, 0x906e, 0x6349, 0x643e, 0x7740, 0x7a84,
-0x932f, 0x947f, 0x9f6a, 0x64b0, 0x6faf, 0x71e6, 0x74a8, 0x74da,
-0x7ac4, 0x7c12, 0x7e82, 0x7cb2, 0x7e98, 0x8b9a, 0x8d0a, 0x947d,
-0x9910, 0x994c, 0x5239, 0x5bdf, 0x64e6, 0x672d, 0x7d2e, 0x50ed,
-0x53c3, 0x5879, 0x6158, 0x6159, 0x61fa, 0x65ac, 0x7ad9, 0x8b92,
-0x8b96, 0x5009, 0x5021, 0x5275, 0x5531, 0x5a3c, 0x5ee0, 0x5f70,
-0x6134, 0x655e, 0x660c, 0x6636, 0x66a2, 0x69cd, 0x6ec4, 0x6f32,
-0x7316, 0x7621, 0x7a93, 0x8139, 0x8259, 0x83d6, 0x84bc, 0x50b5,
-0x57f0, 0x5bc0, 0x5be8, 0x5f69, 0x63a1, 0x7826, 0x7db5, 0x83dc,
-0x8521, 0x91c7, 0x91f5, 0x518a, 0x67f5, 0x7b56,
-94, 0x7421,
-0x8cac, 0x51c4, 0x59bb, 0x60bd, 0x8655, 0x501c, 0xf9ff, 0x5254,
-0x5c3a, 0x617d, 0x621a, 0x62d3, 0x64f2, 0x65a5, 0x6ecc, 0x7620,
-0x810a, 0x8e60, 0x965f, 0x96bb, 0x4edf, 0x5343, 0x5598, 0x5929,
-0x5ddd, 0x64c5, 0x6cc9, 0x6dfa, 0x7394, 0x7a7f, 0x821b, 0x85a6,
-0x8ce4, 0x8e10, 0x9077, 0x91e7, 0x95e1, 0x9621, 0x97c6, 0x51f8,
-0x54f2, 0x5586, 0x5fb9, 0x64a4, 0x6f88, 0x7db4, 0x8f1f, 0x8f4d,
-0x9435, 0x50c9, 0x5c16, 0x6cbe, 0x6dfb, 0x751b, 0x77bb, 0x7c3d,
-0x7c64, 0x8a79, 0x8ac2, 0x581e, 0x59be, 0x5e16, 0x6377, 0x7252,
-0x758a, 0x776b, 0x8adc, 0x8cbc, 0x8f12, 0x5ef3, 0x6674, 0x6df8,
-0x807d, 0x83c1, 0x8acb, 0x9751, 0x9bd6, 0xfa00, 0x5243, 0x66ff,
-0x6d95, 0x6eef, 0x7de0, 0x8ae6, 0x902e, 0x905e, 0x9ad4, 0x521d,
-0x527f, 0x54e8, 0x6194, 0x6284, 0x62db, 0x68a2,
-94, 0x7521,
-0x6912, 0x695a, 0x6a35, 0x7092, 0x7126, 0x785d, 0x7901, 0x790e,
-0x79d2, 0x7a0d, 0x8096, 0x8278, 0x82d5, 0x8349, 0x8549, 0x8c82,
-0x8d85, 0x9162, 0x918b, 0x91ae, 0x4fc3, 0x56d1, 0x71ed, 0x77d7,
-0x8700, 0x89f8, 0x5bf8, 0x5fd6, 0x6751, 0x90a8, 0x53e2, 0x585a,
-0x5bf5, 0x60a4, 0x6181, 0x6460, 0x7e3d, 0x8070, 0x8525, 0x9283,
-0x64ae, 0x50ac, 0x5d14, 0x6700, 0x589c, 0x62bd, 0x63a8, 0x690e,
-0x6978, 0x6a1e, 0x6e6b, 0x76ba, 0x79cb, 0x82bb, 0x8429, 0x8acf,
-0x8da8, 0x8ffd, 0x9112, 0x914b, 0x919c, 0x9310, 0x9318, 0x939a,
-0x96db, 0x9a36, 0x9c0d, 0x4e11, 0x755c, 0x795d, 0x7afa, 0x7b51,
-0x7bc9, 0x7e2e, 0x84c4, 0x8e59, 0x8e74, 0x8ef8, 0x9010, 0x6625,
-0x693f, 0x7443, 0x51fa, 0x672e, 0x9edc, 0x5145, 0x5fe0, 0x6c96,
-0x87f2, 0x885d, 0x8877, 0x60b4, 0x81b5, 0x8403,
-94, 0x7621,
-0x8d05, 0x53d6, 0x5439, 0x5634, 0x5a36, 0x5c31, 0x708a, 0x7fe0,
-0x805a, 0x8106, 0x81ed, 0x8da3, 0x9189, 0x9a5f, 0x9df2, 0x5074,
-0x4ec4, 0x53a0, 0x60fb, 0x6e2c, 0x5c64, 0x4f88, 0x5024, 0x55e4,
-0x5cd9, 0x5e5f, 0x6065, 0x6894, 0x6cbb, 0x6dc4, 0x71be, 0x75d4,
-0x75f4, 0x7661, 0x7a1a, 0x7a49, 0x7dc7, 0x7dfb, 0x7f6e, 0x81f4,
-0x86a9, 0x8f1c, 0x96c9, 0x99b3, 0x9f52, 0x5247, 0x52c5, 0x98ed,
-0x89aa, 0x4e03, 0x67d2, 0x6f06, 0x4fb5, 0x5be2, 0x6795, 0x6c88,
-0x6d78, 0x741b, 0x7827, 0x91dd, 0x937c, 0x87c4, 0x79e4, 0x7a31,
-0x5feb, 0x4ed6, 0x54a4, 0x553e, 0x58ae, 0x59a5, 0x60f0, 0x6253,
-0x62d6, 0x6736, 0x6955, 0x8235, 0x9640, 0x99b1, 0x99dd, 0x502c,
-0x5353, 0x5544, 0x577c, 0xfa01, 0x6258, 0xfa02, 0x64e2, 0x666b,
-0x67dd, 0x6fc1, 0x6fef, 0x7422, 0x7438, 0x8a17,
-94, 0x7721,
-0x9438, 0x5451, 0x5606, 0x5766, 0x5f48, 0x619a, 0x6b4e, 0x7058,
-0x70ad, 0x7dbb, 0x8a95, 0x596a, 0x812b, 0x63a2, 0x7708, 0x803d,
-0x8caa, 0x5854, 0x642d, 0x69bb, 0x5b95, 0x5e11, 0x6e6f, 0xfa03,
-0x8569, 0x514c, 0x53f0, 0x592a, 0x6020, 0x614b, 0x6b86, 0x6c70,
-0x6cf0, 0x7b1e, 0x80ce, 0x82d4, 0x8dc6, 0x90b0, 0x98b1, 0xfa04,
-0x64c7, 0x6fa4, 0x6491, 0x6504, 0x514e, 0x5410, 0x571f, 0x8a0e,
-0x615f, 0x6876, 0xfa05, 0x75db, 0x7b52, 0x7d71, 0x901a, 0x5806,
-0x69cc, 0x817f, 0x892a, 0x9000, 0x9839, 0x5078, 0x5957, 0x59ac,
-0x6295, 0x900f, 0x9b2a, 0x615d, 0x7279, 0x95d6, 0x5761, 0x5a46,
-0x5df4, 0x628a, 0x64ad, 0x64fa, 0x6777, 0x6ce2, 0x6d3e, 0x722c,
-0x7436, 0x7834, 0x7f77, 0x82ad, 0x8ddb, 0x9817, 0x5224, 0x5742,
-0x677f, 0x7248, 0x74e3, 0x8ca9, 0x8fa6, 0x9211,
-94, 0x7821,
-0x962a, 0x516b, 0x53ed, 0x634c, 0x4f69, 0x5504, 0x6096, 0x6557,
-0x6c9b, 0x6d7f, 0x724c, 0x72fd, 0x7a17, 0x8987, 0x8c9d, 0x5f6d,
-0x6f8e, 0x70f9, 0x81a8, 0x610e, 0x4fbf, 0x504f, 0x6241, 0x7247,
-0x7bc7, 0x7de8, 0x7fe9, 0x904d, 0x97ad, 0x9a19, 0x8cb6, 0x576a,
-0x5e73, 0x67b0, 0x840d, 0x8a55, 0x5420, 0x5b16, 0x5e63, 0x5ee2,
-0x5f0a, 0x6583, 0x80ba, 0x853d, 0x9589, 0x965b, 0x4f48, 0x5305,
-0x530d, 0x530f, 0x5486, 0x54fa, 0x5703, 0x5e03, 0x6016, 0x629b,
-0x62b1, 0x6355, 0xfa06, 0x6ce1, 0x6d66, 0x75b1, 0x7832, 0x80de,
-0x812f, 0x82de, 0x8461, 0x84b2, 0x888d, 0x8912, 0x900b, 0x92ea,
-0x98fd, 0x9b91, 0x5e45, 0x66b4, 0x66dd, 0x7011, 0x7206, 0xfa07,
-0x4ff5, 0x527d, 0x5f6a, 0x6153, 0x6753, 0x6a19, 0x6f02, 0x74e2,
-0x7968, 0x8868, 0x8c79, 0x98c7, 0x98c4, 0x9a43,
-94, 0x7921,
-0x54c1, 0x7a1f, 0x6953, 0x8af7, 0x8c4a, 0x98a8, 0x99ae, 0x5f7c,
-0x62ab, 0x75b2, 0x76ae, 0x88ab, 0x907f, 0x9642, 0x5339, 0x5f3c,
-0x5fc5, 0x6ccc, 0x73cc, 0x7562, 0x758b, 0x7b46, 0x82fe, 0x999d,
-0x4e4f, 0x903c, 0x4e0b, 0x4f55, 0x53a6, 0x590f, 0x5ec8, 0x6630,
-0x6cb3, 0x7455, 0x8377, 0x8766, 0x8cc0, 0x9050, 0x971e, 0x9c15,
-0x58d1, 0x5b78, 0x8650, 0x8b14, 0x9db4, 0x5bd2, 0x6068, 0x608d,
-0x65f1, 0x6c57, 0x6f22, 0x6fa3, 0x701a, 0x7f55, 0x7ff0, 0x9591,
-0x9592, 0x9650, 0x97d3, 0x5272, 0x8f44, 0x51fd, 0x542b, 0x54b8,
-0x5563, 0x558a, 0x6abb, 0x6db5, 0x7dd8, 0x8266, 0x929c, 0x9677,
-0x9e79, 0x5408, 0x54c8, 0x76d2, 0x86e4, 0x95a4, 0x95d4, 0x965c,
-0x4ea2, 0x4f09, 0x59ee, 0x5ae6, 0x5df7, 0x6052, 0x6297, 0x676d,
-0x6841, 0x6c86, 0x6e2f, 0x7f38, 0x809b, 0x822a,
-94, 0x7a21,
-0xfa08, 0xfa09, 0x9805, 0x4ea5, 0x5055, 0x54b3, 0x5793, 0x595a,
-0x5b69, 0x5bb3, 0x61c8, 0x6977, 0x6d77, 0x7023, 0x87f9, 0x89e3,
-0x8a72, 0x8ae7, 0x9082, 0x99ed, 0x9ab8, 0x52be, 0x6838, 0x5016,
-0x5e78, 0x674f, 0x8347, 0x884c, 0x4eab, 0x5411, 0x56ae, 0x73e6,
-0x9115, 0x97ff, 0x9909, 0x9957, 0x9999, 0x5653, 0x589f, 0x865b,
-0x8a31, 0x61b2, 0x6af6, 0x737b, 0x8ed2, 0x6b47, 0x96aa, 0x9a57,
-0x5955, 0x7200, 0x8d6b, 0x9769, 0x4fd4, 0x5cf4, 0x5f26, 0x61f8,
-0x665b, 0x6ceb, 0x70ab, 0x7384, 0x73b9, 0x73fe, 0x7729, 0x774d,
-0x7d43, 0x7d62, 0x7e23, 0x8237, 0x8852, 0xfa0a, 0x8ce2, 0x9249,
-0x986f, 0x5b51, 0x7a74, 0x8840, 0x9801, 0x5acc, 0x4fe0, 0x5354,
-0x593e, 0x5cfd, 0x633e, 0x6d79, 0x72f9, 0x8105, 0x8107, 0x83a2,
-0x92cf, 0x9830, 0x4ea8, 0x5144, 0x5211, 0x578b,
-94, 0x7b21,
-0x5f62, 0x6cc2, 0x6ece, 0x7005, 0x7050, 0x70af, 0x7192, 0x73e9,
-0x7469, 0x834a, 0x87a2, 0x8861, 0x9008, 0x90a2, 0x93a3, 0x99a8,
-0x516e, 0x5f57, 0x60e0, 0x6167, 0x66b3, 0x8559, 0x8e4a, 0x91af,
-0x978b, 0x4e4e, 0x4e92, 0x547c, 0x58d5, 0x58fa, 0x597d, 0x5cb5,
-0x5f27, 0x6236, 0x6248, 0x660a, 0x6667, 0x6beb, 0x6d69, 0x6dcf,
-0x6e56, 0x6ef8, 0x6f94, 0x6fe0, 0x6fe9, 0x705d, 0x72d0, 0x7425,
-0x745a, 0x74e0, 0x7693, 0x795c, 0x7cca, 0x7e1e, 0x80e1, 0x82a6,
-0x846b, 0x84bf, 0x864e, 0x865f, 0x8774, 0x8b77, 0x8c6a, 0x93ac,
-0x9800, 0x9865, 0x60d1, 0x6216, 0x9177, 0x5a5a, 0x660f, 0x6df7,
-0x6e3e, 0x743f, 0x9b42, 0x5ffd, 0x60da, 0x7b0f, 0x54c4, 0x5f18,
-0x6c5e, 0x6cd3, 0x6d2a, 0x70d8, 0x7d05, 0x8679, 0x8a0c, 0x9d3b,
-0x5316, 0x548c, 0x5b05, 0x6a3a, 0x706b, 0x7575,
-94, 0x7c21,
-0x798d, 0x79be, 0x82b1, 0x83ef, 0x8a71, 0x8b41, 0x8ca8, 0x9774,
-0xfa0b, 0x64f4, 0x652b, 0x78ba, 0x78bb, 0x7a6b, 0x4e38, 0x559a,
-0x5950, 0x5ba6, 0x5e7b, 0x60a3, 0x63db, 0x6b61, 0x6665, 0x6853,
-0x6e19, 0x7165, 0x74b0, 0x7d08, 0x9084, 0x9a69, 0x9c25, 0x6d3b,
-0x6ed1, 0x733e, 0x8c41, 0x95ca, 0x51f0, 0x5e4c, 0x5fa8, 0x604d,
-0x60f6, 0x6130, 0x614c, 0x6643, 0x6644, 0x69a5, 0x6cc1, 0x6e5f,
-0x6ec9, 0x6f62, 0x714c, 0x749c, 0x7687, 0x7bc1, 0x7c27, 0x8352,
-0x8757, 0x9051, 0x968d, 0x9ec3, 0x532f, 0x56de, 0x5efb, 0x5f8a,
-0x6062, 0x6094, 0x61f7, 0x6666, 0x6703, 0x6a9c, 0x6dee, 0x6fae,
-0x7070, 0x736a, 0x7e6a, 0x81be, 0x8334, 0x86d4, 0x8aa8, 0x8cc4,
-0x5283, 0x7372, 0x5b96, 0x6a6b, 0x9404, 0x54ee, 0x5686, 0x5b5d,
-0x6548, 0x6585, 0x66c9, 0x689f, 0x6d8d, 0x6dc6,
-94, 0x7d21,
-0x723b, 0x80b4, 0x9175, 0x9a4d, 0x4faf, 0x5019, 0x539a, 0x540e,
-0x543c, 0x5589, 0x55c5, 0x5e3f, 0x5f8c, 0x673d, 0x7166, 0x73dd,
-0x9005, 0x52db, 0x52f3, 0x5864, 0x58ce, 0x7104, 0x718f, 0x71fb,
-0x85b0, 0x8a13, 0x6688, 0x85a8, 0x55a7, 0x6684, 0x714a, 0x8431,
-0x5349, 0x5599, 0x6bc1, 0x5f59, 0x5fbd, 0x63ee, 0x6689, 0x7147,
-0x8af1, 0x8f1d, 0x9ebe, 0x4f11, 0x643a, 0x70cb, 0x7566, 0x8667,
-0x6064, 0x8b4e, 0x9df8, 0x5147, 0x51f6, 0x5308, 0x6d36, 0x80f8,
-0x9ed1, 0x6615, 0x6b23, 0x7098, 0x75d5, 0x5403, 0x5c79, 0x7d07,
-0x8a16, 0x6b20, 0x6b3d, 0x6b46, 0x5438, 0x6070, 0x6d3d, 0x7fd5,
-0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec, 0x5b09,
-0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199, 0x71b9,
-0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70,
-0
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/memmove.c b/usr/src/cmd/man/src/util/nsgmls.src/lib/memmove.c
deleted file mode 100644
index 3fcb8a6280..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/memmove.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stddef.h>
-
-void *memmove(void *p1, const void *p2, size_t n)
-{
- bcopy(p2, p1, n);
- return p1;
-}
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseAttribute.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseAttribute.cxx
deleted file mode 100644
index 398c19393d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseAttribute.cxx
+++ /dev/null
@@ -1,472 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Parser.h"
-#include "MessageArg.h"
-#include "token.h"
-#include "macros.h"
-#include "ParserMessages.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Boolean Parser::parseAttributeSpec(Boolean inDecl,
- AttributeList &atts,
- Boolean &netEnabling,
- Ptr<AttributeDefinitionList> &newAttDef)
-
-{
- unsigned specLength = 0;
- AttributeParameter::Type curParm;
-
- if (!parseAttributeParameter(inDecl, 0, curParm, netEnabling))
- return 0;
- while (curParm != AttributeParameter::end) {
- switch (curParm) {
- case AttributeParameter::name:
- {
- Text text;
- text.addChars(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation());
- size_t nameMarkupIndex;
- if (currentMarkup())
- nameMarkupIndex = currentMarkup()->size() - 1;
- text.subst(*syntax().generalSubstTable(), syntax().space());
- if (!parseAttributeParameter(inDecl, 1, curParm, netEnabling))
- return 0;
- if (curParm == AttributeParameter::vi) {
- specLength += text.size() + syntax().normsep();
- if (!parseAttributeValueSpec(inDecl, text.string(), atts,
- specLength, newAttDef))
- return 0;
- // setup for next attribute
- if (!parseAttributeParameter(inDecl, 0, curParm, netEnabling))
- return 0;
- }
- else {
- if (currentMarkup())
- currentMarkup()->changeToAttributeValue(nameMarkupIndex);
- if (!handleAttributeNameToken(text, atts, specLength))
- return 0;
- }
- }
- break;
- case AttributeParameter::nameToken:
- {
- Text text;
- text.addChars(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation());
- text.subst(*syntax().generalSubstTable(), syntax().space());
- if (!handleAttributeNameToken(text, atts, specLength))
- return 0;
- if (!parseAttributeParameter(inDecl, 0, curParm, netEnabling))
- return 0;
- }
- break;
- case AttributeParameter::recoverUnquoted:
- {
- if (!atts.recoverUnquoted(currentToken(), currentLocation(), *this)) {
- // Don't treat it as an unquoted attribute value.
- currentInput()->endToken(1);
- if (!atts.handleAsUnterminated(*this))
- message(ParserMessages::attributeSpecCharacter,
- StringMessageArg(currentToken()));
- return 0;
- }
- if (!parseAttributeParameter(inDecl, 0, curParm, netEnabling))
- return 0;
- }
- break;
- default:
- CANNOT_HAPPEN();
- }
- }
- atts.finish(*this);
- if (specLength > syntax().attsplen())
- message(ParserMessages::attsplen,
- NumberMessageArg(syntax().attsplen()),
- NumberMessageArg(specLength));
- return 1;
-}
-
-Boolean Parser::handleAttributeNameToken(Text &text,
- AttributeList &atts,
- unsigned &specLength)
-{
- unsigned index;
- if (!atts.tokenIndex(text.string(), index)) {
- if (atts.handleAsUnterminated(*this))
- return 0;
- atts.noteInvalidSpec();
- message(ParserMessages::noSuchAttributeToken,
- StringMessageArg(text.string()));
- }
- else if (sd().www() && !atts.tokenIndexUnique(text.string(), index)) {
- atts.noteInvalidSpec();
- message(ParserMessages::attributeTokenNotUnique,
- StringMessageArg(text.string()));
- }
- else {
- if (!sd().attributeOmitName())
- message(ParserMessages::attributeNameShorttag);
- else if (options().warnMissingAttributeName)
- message(ParserMessages::missingAttributeName);
- atts.setSpec(index, *this);
- atts.setValueToken(index, text, *this, specLength);
- }
- return 1;
-}
-
-Boolean Parser::parseAttributeValueSpec(Boolean inDecl,
- const StringC &name,
- AttributeList &atts,
- unsigned &specLength,
- Ptr<AttributeDefinitionList> &newAttDef)
-{
- Mode mode = inDecl ? asMode : tagMode;
- Markup *markup = currentMarkup();
- Token token = getToken(mode);
- if (token == tokenS) {
- if (markup) {
- do {
- markup->addS(currentChar());
- token = getToken(mode);
- } while (token == tokenS);
- }
- else {
- do {
- token = getToken(mode);
- } while (token == tokenS);
- }
- }
- unsigned index;
- if (!atts.attributeIndex(name, index)) {
- if (!implydefAttlist())
- message(ParserMessages::noSuchAttribute, StringMessageArg(name));
- if (newAttDef.isNull())
- newAttDef = new AttributeDefinitionList(atts.def());
- newAttDef
- ->append(new ImpliedAttributeDefinition(name,
- new CdataDeclaredValue));
- atts.changeDef(newAttDef);
- index = atts.size() - 1;
- }
- atts.setSpec(index, *this);
- Text text;
- switch (token) {
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- return 0;
- // fall through
- case tokenEtago:
- case tokenStago:
- case tokenNestc:
- message(ParserMessages::unquotedAttributeValue);
- extendUnquotedAttributeValue();
- if (markup)
- markup->addAttributeValue(currentInput());
- text.addChars(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation());
- break;
- case tokenEe:
- message(ParserMessages::attributeSpecEntityEnd);
- return 0;
- case tokenTagc:
- case tokenDsc:
- case tokenVi:
- message(ParserMessages::attributeValueExpected);
- return 0;
- case tokenNameStart:
- case tokenDigit:
- case tokenLcUcNmchar:
- if (!sd().attributeValueNotLiteral())
- message(ParserMessages::attributeValueShorttag);
- else if (options().warnAttributeValueNotLiteral)
- message(ParserMessages::attributeValueNotLiteral);
- extendNameToken(syntax().litlen() >= syntax().normsep()
- ? syntax().litlen() - syntax().normsep()
- : 0,
- ParserMessages::attributeValueLength);
- if (markup)
- markup->addAttributeValue(currentInput());
- text.addChars(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation());
- break;
- case tokenLit:
- case tokenLita:
- Boolean lita;
- lita = (token == tokenLita);
- if (!(atts.tokenized(index)
- ? parseTokenizedAttributeValueLiteral(lita, text)
- : parseAttributeValueLiteral(lita, text)))
- return 0;
- if (markup)
- markup->addLiteral(text);
- break;
- default:
- CANNOT_HAPPEN();
- }
- return atts.setValue(index, text, *this, specLength);
-}
-
-
-Boolean Parser::parseAttributeParameter(Boolean inDecl,
- Boolean allowVi,
- AttributeParameter::Type &result,
- Boolean &netEnabling)
-{
- Mode mode = inDecl ? asMode : tagMode;
- Token token = getToken(mode);
- Markup *markup = currentMarkup();
- if (markup) {
- while (token == tokenS) {
- markup->addS(currentChar());
- token = getToken(mode);
- }
- }
- else {
- while (token == tokenS)
- token = getToken(mode);
- }
- switch (token) {
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- return 0;
- extendUnquotedAttributeValue();
- result = AttributeParameter::recoverUnquoted;
- break;
- case tokenEe:
- message(ParserMessages::attributeSpecEntityEnd);
- return 0;
- case tokenEtago:
- case tokenStago:
- if (!sd().startTagUnclosed())
- message(ParserMessages::unclosedStartTagShorttag);
- result = AttributeParameter::end;
- currentInput()->ungetToken();
- netEnabling = 0;
- break;
- case tokenNestc:
- if (markup)
- markup->addDelim(Syntax::dNESTC);
- switch (sd().startTagNetEnable()) {
- case Sd::netEnableNo:
- message(ParserMessages::netEnablingStartTagShorttag);
- break;
- case Sd::netEnableImmednet:
- if (getToken(econnetMode) != tokenNet)
- message(ParserMessages::nestcWithoutNet);
- currentInput()->ungetToken();
- break;
- case Sd::netEnableAll:
- break;
- }
- netEnabling = 1;
- result = AttributeParameter::end;
- break;
- case tokenTagc:
- if (markup)
- markup->addDelim(Syntax::dTAGC);
- netEnabling = 0;
- result = AttributeParameter::end;
- break;
- case tokenDsc:
- if (markup)
- markup->addDelim(Syntax::dDSC);
- result = AttributeParameter::end;
- break;
- case tokenNameStart:
- extendNameToken(syntax().namelen(), ParserMessages::nameTokenLength);
- if (markup)
- markup->addName(currentInput());
- result = AttributeParameter::name;
- break;
- case tokenDigit:
- case tokenLcUcNmchar:
- extendNameToken(syntax().namelen(), ParserMessages::nameTokenLength);
- if (markup)
- markup->addName(currentInput());
- result = AttributeParameter::nameToken;
- break;
- case tokenLit:
- case tokenLita:
- message(allowVi
- ? ParserMessages::attributeSpecLiteral
- : ParserMessages::attributeSpecNameTokenExpected);
- return 0;
- case tokenVi:
- if (!allowVi) {
- message(ParserMessages::attributeSpecNameTokenExpected);
- return 0;
- }
- if (markup)
- markup->addDelim(Syntax::dVI);
- result = AttributeParameter::vi;
- break;
- default:
- CANNOT_HAPPEN();
- }
- return 1;
-}
-
-void Parser::extendUnquotedAttributeValue()
-{
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- const Syntax &syn = syntax();
- for (;;) {
- Xchar c = in->tokenChar(messenger());
- if (syn.isS(c)
- || !syn.isSgmlChar(c)
- || c == InputSource::eE
- || c == syn.delimGeneral(Syntax::dTAGC)[0])
- break;
- length++;
- }
- in->endToken(length);
-}
-
-Boolean Parser::parseAttributeValueLiteral(Boolean lita, Text &text)
-{
- size_t maxLength = (syntax().litlen() > syntax().normsep()
- ? syntax().litlen() - syntax().normsep()
- : 0);
- if (parseLiteral(lita ? alitaMode : alitMode, aliteMode,
- maxLength,
- ParserMessages::attributeValueLength,
- literalNonSgml
- | (wantMarkup() ? unsigned(literalDelimInfo) : 0),
- text)) {
- if (text.size() == 0
- && syntax().normsep() > syntax().litlen())
- message(ParserMessages::attributeValueLengthNeg,
- NumberMessageArg(syntax().normsep() - syntax().litlen()));
- return 1;
- }
- else
- return 0;
-}
-
-Boolean Parser::parseTokenizedAttributeValueLiteral(Boolean lita, Text &text)
-{
- size_t maxLength = (syntax().litlen() > syntax().normsep()
- ? syntax().litlen() - syntax().normsep()
- : 0);
- if (parseLiteral(lita ? talitaMode : talitMode, taliteMode,
- maxLength,
- ParserMessages::tokenizedAttributeValueLength,
- literalSingleSpace
- | (wantMarkup() ? unsigned(literalDelimInfo) : 0),
- text)) {
- if (text.size() == 0
- && syntax().normsep() > syntax().litlen())
- message(ParserMessages::tokenizedAttributeValueLengthNeg,
- NumberMessageArg(syntax().normsep() - syntax().litlen()));
- return 1;
- }
- else
- return 0;
-}
-
-
-Boolean Parser::skipAttributeSpec()
-{
- AttributeParameter::Type parm;
- Boolean netEnabling;
- if (!parseAttributeParameter(0, 0, parm, netEnabling))
- return 0;
- while (parm != AttributeParameter::end) {
- if (parm == AttributeParameter::name) {
- size_t nameMarkupIndex = 0;
- if (currentMarkup())
- nameMarkupIndex = currentMarkup()->size() - 1;
- if (!parseAttributeParameter(0, 1, parm, netEnabling))
- return 0;
- if (parm == AttributeParameter::vi) {
- Token token = getToken(tagMode);
- while (token == tokenS) {
- if (currentMarkup())
- currentMarkup()->addS(currentChar());
- token = getToken(tagMode);
- }
- switch (token) {
- case tokenUnrecognized:
- if (!reportNonSgmlCharacter())
- message(ParserMessages::attributeSpecCharacter,
- StringMessageArg(currentToken()));
- return 0;
- case tokenEe:
- message(ParserMessages::attributeSpecEntityEnd);
- return 0;
- case tokenEtago:
- case tokenStago:
- case tokenNestc:
- case tokenTagc:
- case tokenDsc:
- case tokenVi:
- message(ParserMessages::attributeValueExpected);
- return 0;
- case tokenNameStart:
- case tokenDigit:
- case tokenLcUcNmchar:
- if (!sd().attributeValueNotLiteral())
- message(ParserMessages::attributeValueShorttag);
- extendNameToken(syntax().litlen() >= syntax().normsep()
- ? syntax().litlen() - syntax().normsep()
- : 0,
- ParserMessages::attributeValueLength);
- if (currentMarkup())
- currentMarkup()->addAttributeValue(currentInput());
- break;
- case tokenLit:
- case tokenLita:
- {
- Text text;
- if (!parseLiteral(token == tokenLita ? talitaMode : talitMode,
- taliteMode,
- syntax().litlen(),
- ParserMessages::tokenizedAttributeValueLength,
- (currentMarkup() ? literalDelimInfo : 0)
- | literalNoProcess,
- text))
- return 0;
- if (currentMarkup())
- currentMarkup()->addLiteral(text);
- }
- break;
- default:
- CANNOT_HAPPEN();
- }
- if (!parseAttributeParameter(0, 0, parm, netEnabling))
- return 0;
- }
- else {
- if (currentMarkup())
- currentMarkup()->changeToAttributeValue(nameMarkupIndex);
- if (!sd().attributeOmitName())
- message(ParserMessages::attributeNameShorttag);
- }
- }
- else {
- // It's a name token.
- if (!parseAttributeParameter(0, 0, parm, netEnabling))
- return 0;
- if (!sd().attributeOmitName())
- message(ParserMessages::attributeNameShorttag);
- }
- }
- if (netEnabling)
- message(ParserMessages::startTagGroupNet);
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseCommon.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseCommon.cxx
deleted file mode 100644
index 26975ebcf2..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseCommon.cxx
+++ /dev/null
@@ -1,618 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Parser.h"
-#include "token.h"
-#include "MessageArg.h"
-#include "ParserMessages.h"
-#include "constant.h"
-#include "NumericCharRefOrigin.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Boolean Parser::parseProcessingInstruction()
-{
- currentInput()->startToken();
- Location location(currentLocation());
- StringC buf;
- for (;;) {
- Token token = getToken(piMode);
- if (token == tokenPic)
- break;
- switch (token) {
- case tokenEe:
- message(ParserMessages::processingInstructionEntityEnd);
- return 0;
- case tokenUnrecognized:
- reportNonSgmlCharacter();
- // fall through
- case tokenChar:
- buf += *currentInput()->currentTokenStart();
- if (buf.size()/2 > syntax().pilen()) {
- message(ParserMessages::processingInstructionLength,
- NumberMessageArg(syntax().pilen()));
- message(ParserMessages::processingInstructionClose);
- return 0;
- }
- break;
- }
- }
- if (buf.size() > syntax().pilen())
- message(ParserMessages::processingInstructionLength,
- NumberMessageArg(syntax().pilen()));
- if (options().warnPiMissingName) {
- size_t i = 0;
- if (buf.size() && syntax().isNameStartCharacter(buf[0])) {
- for (i = 1; i < buf.size(); i++)
- if (!syntax().isNameCharacter(buf[i]))
- break;
- }
- if (i == 0 || (i < buf.size() && !syntax().isS(buf[i])))
- message(ParserMessages::piMissingName);
- }
- noteMarkup();
- eventHandler().pi(new (eventAllocator()) ImmediatePiEvent(buf, location));
- return 1;
-}
-
-Boolean Parser::parseLiteral(Mode litMode,
- Mode liteMode,
- size_t maxLength,
- const MessageType1 &tooLongMessage,
- unsigned flags,
- Text &text)
-{
- unsigned startLevel = inputLevel();
- Mode currentMode = litMode;
- // If the literal gets to be longer than this, then we assume
- // that the closing delimiter has been omitted if we're at the end
- // of a line and at the starting input level.
- size_t reallyMaxLength = (maxLength > size_t(-1)/2
- ? size_t(-1)
- : maxLength * 2);
- text.clear();
- Location startLoc(currentLocation());
- if (flags & literalDelimInfo)
- text.addStartDelim(currentLocation());
- for (;;) {
- Token token = getToken(currentMode);
- switch (token) {
- case tokenEe:
- if (inputLevel() == startLevel) {
- message(ParserMessages::literalLevel);
- return 0;
- }
- text.addEntityEnd(currentLocation());
- popInputStack();
- if (inputLevel() == startLevel)
- currentMode = litMode;
- break;
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- message(ParserMessages::literalMinimumData,
- StringMessageArg(currentToken()));
- break;
- case tokenRs:
- text.ignoreChar(currentChar(), currentLocation());
- break;
- case tokenRe:
- if (text.size() > reallyMaxLength && inputLevel() == startLevel) {
-#if 0
- message(tooLongMessage, NumberMessageArg(maxLength));
-#endif
- // guess that the closing delimiter has been omitted
- Messenger::setNextLocation(startLoc);
- message(ParserMessages::literalClosingDelimiter);
- return 0;
- }
- // fall through
- case tokenSepchar:
- if ((flags & literalSingleSpace)
- && (text.size() == 0 || text.lastChar() == syntax().space()))
- text.ignoreChar(currentChar(), currentLocation());
- else
- text.addChar(syntax().space(),
- Location(new ReplacementOrigin(currentLocation(),
- currentChar()),
- 0));
- break;
- case tokenSpace:
- if ((flags & literalSingleSpace)
- && (text.size() == 0 || text.lastChar() == syntax().space()))
- text.ignoreChar(currentChar(), currentLocation());
- else
- text.addChar(currentChar(), currentLocation());
- break;
- case tokenCroDigit:
- case tokenHcroHexDigit:
- {
- Char c;
- Location loc;
- if (!parseNumericCharRef(token== tokenHcroHexDigit, c, loc))
- return 0;
- Boolean isSgmlChar;
- if (!translateNumericCharRef(c, isSgmlChar))
- break;
- if (!isSgmlChar) {
- if (flags & literalNonSgml)
- text.addNonSgmlChar(c, loc);
- else
- message(ParserMessages::numericCharRefLiteralNonSgml,
- NumberMessageArg(c));
- break;
- }
- if (flags & literalDataTag) {
- if (!syntax().isSgmlChar(c))
- message(ParserMessages::dataTagPatternNonSgml);
- else if (syntax().charSet(Syntax::functionChar)->contains(c))
- message(ParserMessages::dataTagPatternFunction);
- }
- if ((flags & literalSingleSpace)
- && c == syntax().space()
- && (text.size() == 0 || text.lastChar() == syntax().space()))
- text.ignoreChar(c, loc);
- else
- text.addChar(c, loc);
- }
- break;
- case tokenCroNameStart:
- if (!parseNamedCharRef())
- return 0;
- break;
- case tokenEroGrpo:
- message(inInstance() ? ParserMessages::eroGrpoStartTag : ParserMessages::eroGrpoProlog);
- break;
- case tokenLit:
- case tokenLita:
- if (flags & literalDelimInfo)
- text.addEndDelim(currentLocation(), token == tokenLita);
- goto done;
- case tokenPeroNameStart:
- if (options().warnInternalSubsetLiteralParamEntityRef
- && inputLevel() == 1)
- message(ParserMessages::internalSubsetLiteralParamEntityRef);
- // fall through
- case tokenEroNameStart:
- {
- ConstPtr<Entity> entity;
- Ptr<EntityOrigin> origin;
- if (!parseEntityReference(token == tokenPeroNameStart,
- (flags & literalNoProcess) ? 2 : 0,
- entity, origin))
- return 0;
- if (!entity.isNull())
- entity->litReference(text, *this, origin,
- (flags & literalSingleSpace) != 0);
- if (inputLevel() > startLevel)
- currentMode = liteMode;
- }
- break;
- case tokenPeroGrpo:
- message(ParserMessages::peroGrpoProlog);
- break;
- case tokenCharDelim:
- message(ParserMessages::dataCharDelim,
- StringMessageArg(StringC(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength())));
- // fall through
- case tokenChar:
- if (text.size() > reallyMaxLength && inputLevel() == startLevel
- && currentChar() == syntax().standardFunction(Syntax::fRE)) {
-#if 0
- message(tooLongMessage, NumberMessageArg(maxLength));
-#endif
- // guess that the closing delimiter has been omitted
- Messenger::setNextLocation(startLoc);
- message(ParserMessages::literalClosingDelimiter);
- return 0;
- }
- text.addChar(currentChar(), currentLocation());
- break;
- }
- }
- done:
- if ((flags & literalSingleSpace)
- && text.size() > 0
- && text.lastChar() == syntax().space())
- text.ignoreLastChar();
- if (text.size() > maxLength) {
- switch (litMode) {
- case alitMode:
- case alitaMode:
- case talitMode:
- case talitaMode:
- if (AttributeValue::handleAsUnterminated(text, *this))
- return 0;
- default:
- break;
- }
- message(tooLongMessage, NumberMessageArg(maxLength));
- }
- return 1;
-}
-
-Boolean Parser::parseNamedCharRef()
-{
- if (options().warnNamedCharRef)
- message(ParserMessages::namedCharRef);
- InputSource *in = currentInput();
- Index startIndex = currentLocation().index();
- in->discardInitial();
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- Char c;
- Boolean valid;
- StringC name;
- getCurrentToken(syntax().generalSubstTable(), name);
- if (!syntax().lookupFunctionChar(name, &c)) {
- message(ParserMessages::functionName, StringMessageArg(name));
- valid = 0;
- }
- else {
- valid = 1;
- if (wantMarkup())
- getCurrentToken(name); // the original name
- }
- NamedCharRef::RefEndType refEndType;
- switch (getToken(refMode)) {
- case tokenRefc:
- refEndType = NamedCharRef::endRefc;
- break;
- case tokenRe:
- refEndType = NamedCharRef::endRE;
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- default:
- refEndType = NamedCharRef::endOmitted;
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- }
- in->startToken();
- if (valid)
- in->pushCharRef(c, NamedCharRef(startIndex, refEndType, name));
- return 1;
-}
-
-Boolean Parser::parseNumericCharRef(Boolean isHex, Char &ch, Location &loc)
-{
- InputSource *in = currentInput();
- Location startLocation = currentLocation();
- in->discardInitial();
- Boolean valid = 1;
- Char c = 0;
- if (isHex) {
- extendHexNumber();
- const Char *lim = in->currentTokenEnd();
- for (const Char *p = in->currentTokenStart(); p < lim; p++) {
- int val = sd().hexDigitWeight(*p);
- if (c <= charMax/16 && (c *= 16) <= charMax - val)
- c += val;
- else {
- message(ParserMessages::characterNumber, StringMessageArg(currentToken()));
- valid = 0;
- break;
- }
- }
- }
- else {
- extendNumber(syntax().namelen(), ParserMessages::numberLength);
- const Char *lim = in->currentTokenEnd();
- for (const Char *p = in->currentTokenStart(); p < lim; p++) {
- int val = sd().digitWeight(*p);
- if (c <= charMax/10 && (c *= 10) <= charMax - val)
- c += val;
- else {
- message(ParserMessages::characterNumber, StringMessageArg(currentToken()));
- valid = 0;
- break;
- }
- }
- }
- if (valid && !sd().docCharsetDecl().charDeclared(c)) {
- valid = 0;
- message(ParserMessages::characterNumber, StringMessageArg(currentToken()));
- }
- Owner<Markup> markupPtr;
- if (wantMarkup()) {
- markupPtr = new Markup;
- markupPtr->addDelim(isHex ? Syntax::dHCRO : Syntax::dCRO);
- markupPtr->addNumber(in);
- switch (getToken(refMode)) {
- case tokenRefc:
- markupPtr->addDelim(Syntax::dREFC);
- break;
- case tokenRe:
- markupPtr->addRefEndRe();
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- default:
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- }
- }
- else if (options().warnRefc) {
- if (getToken(refMode) != tokenRefc)
- message(ParserMessages::refc);
- }
- else
- (void)getToken(refMode);
- if (valid) {
- ch = c;
- loc = Location(new NumericCharRefOrigin(startLocation,
- currentLocation().index()
- + currentInput()->currentTokenLength()
- - startLocation.index(),
- markupPtr),
- 0);
- }
- return valid;
-}
-
-// Translate a character number in the document character set
-// into the internal character set.
-// If it's a non-SGML char (ie described as UNUSED in SGML declaration),
-// return 1 and set sgmlChar to 0.
-
-Boolean Parser::translateNumericCharRef(Char &ch, Boolean &isSgmlChar)
-{
- if (sd().internalCharsetIsDocCharset()) {
- if (options().warnNonSgmlCharRef && !syntax().isSgmlChar(ch))
- message(ParserMessages::nonSgmlCharRef);
- isSgmlChar = 1;
- return 1;
- }
- UnivChar univChar;
- if (!sd().docCharset().descToUniv(ch, univChar)) {
- const PublicId *pubid;
- CharsetDeclRange::Type type;
- Number n;
- StringC desc;
- if (sd().docCharsetDecl().getCharInfo(ch, pubid, type, n, desc)) {
- if (type == CharsetDeclRange::unused) {
- if (options().warnNonSgmlCharRef)
- message(ParserMessages::nonSgmlCharRef);
- isSgmlChar = 0;
- return 1;
- }
- }
- else
- CANNOT_HAPPEN();
- if (type == CharsetDeclRange::string)
- message(ParserMessages::numericCharRefUnknownDesc,
- NumberMessageArg(ch),
- StringMessageArg(desc));
- else
- message(ParserMessages::numericCharRefUnknownBase,
- NumberMessageArg(ch),
- NumberMessageArg(n),
- StringMessageArg(pubid->string()));
- }
- else {
- WideChar resultChar;
- ISet<WideChar> resultChars;
- switch (sd().internalCharset().univToDesc(univChar,
- resultChar,
- resultChars)) {
- case 1:
- if (resultChar <= charMax) {
- isSgmlChar = 1;
- ch = Char(resultChar);
- return 1;
- }
- // fall through
- case 2:
- message(ParserMessages::numericCharRefBadInternal,
- NumberMessageArg(ch));
- break;
- default:
- message(ParserMessages::numericCharRefNoInternal,
- NumberMessageArg(ch));
- break;
- }
- }
- return 0;
-}
-
-// ignoreLevel: 0 means don't ignore;
-// 1 means parse name group and ignore if inactive
-// 2 means ignore
-
-Boolean Parser::parseEntityReference(Boolean isParameter,
- int ignoreLevel,
- ConstPtr<Entity> &entity,
- Ptr<EntityOrigin> &origin)
-{
- InputSource *in = currentInput();
- Location startLocation(in->currentLocation());
- Owner<Markup> markupPtr;
- if (wantMarkup()) {
- markupPtr = new Markup;
- markupPtr->addDelim(isParameter ? Syntax::dPERO : Syntax::dERO);
- }
- if (ignoreLevel == 1) {
- Markup savedMarkup;
- Markup *savedCurrentMarkup = currentMarkup();
- if (savedCurrentMarkup)
- savedCurrentMarkup->swap(savedMarkup);
- Location savedMarkupLocation(markupLocation());
- startMarkup(markupPtr != 0, startLocation);
- if (markupPtr) {
- markupPtr->addDelim(Syntax::dGRPO);
- markupPtr->swap(*currentMarkup());
- }
- Boolean ignore;
- if (!parseEntityReferenceNameGroup(ignore))
- return 0;
- if (markupPtr)
- currentMarkup()->swap(*markupPtr);
- startMarkup(savedCurrentMarkup != 0, savedMarkupLocation);
- if (savedCurrentMarkup)
- savedMarkup.swap(*currentMarkup());
- if (!ignore)
- ignoreLevel = 0;
- in->startToken();
- Xchar c = in->tokenChar(messenger());
- if (!syntax().isNameStartCharacter(c)) {
- message(ParserMessages::entityReferenceMissingName);
- return 0;
- }
- }
- in->discardInitial();
- if (isParameter)
- extendNameToken(syntax().penamelen(), ParserMessages::parameterEntityNameLength);
- else
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- StringC &name = nameBuffer();
- getCurrentToken(syntax().entitySubstTable(), name);
- if (ignoreLevel)
- entity = new IgnoredEntity(name,
- isParameter
- ? Entity::parameterEntity
- : Entity::generalEntity);
- else {
- entity = lookupEntity(isParameter, name, startLocation, 1);
- if (entity.isNull()) {
- if (haveApplicableDtd()) {
- if (!isParameter) {
- entity = createUndefinedEntity(name, startLocation);
- message(ParserMessages::entityUndefined,
- StringMessageArg(name));
- }
- else
- message(ParserMessages::parameterEntityUndefined,
- StringMessageArg(name));
- }
- else
- message(ParserMessages::entityApplicableDtd);
- }
- else if (entity->defaulted() && options().warnDefaultEntityReference)
- message(ParserMessages::defaultEntityReference, StringMessageArg(name));
- }
- if (markupPtr) {
- markupPtr->addName(in);
- switch (getToken(refMode)) {
- case tokenRefc:
- markupPtr->addDelim(Syntax::dREFC);
- break;
- case tokenRe:
- markupPtr->addRefEndRe();
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- default:
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- }
- }
- else if (options().warnRefc) {
- if (getToken(refMode) != tokenRefc)
- message(ParserMessages::refc);
- }
- else
- (void)getToken(refMode);
- if (!entity.isNull())
- origin = EntityOrigin::make(internalAllocator(),
- entity,
- startLocation,
- currentLocation().index()
- + currentInput()->currentTokenLength()
- - startLocation.index(),
- markupPtr);
- else
- origin = (EntityOrigin *)0;
- return 1;
-}
-
-Boolean Parser::parseComment(Mode mode)
-{
- Location startLoc(currentLocation());
- Markup *markup = currentMarkup();
- if (markup)
- markup->addCommentStart();
- Token token;
- while ((token = getToken(mode)) != tokenCom)
- switch (token) {
- case tokenUnrecognized:
- if (!reportNonSgmlCharacter())
- message(ParserMessages::sdCommentSignificant,
- StringMessageArg(currentToken()));
- break;
- case tokenEe:
- message(ParserMessages::commentEntityEnd, startLoc);
- return 0;
- default:
- if (markup)
- markup->addCommentChar(currentChar());
- break;
- }
- return 1;
-}
-
-void Parser::extendNameToken(size_t maxLength,
- const MessageType1 &tooLongMessage)
-{
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- const Syntax &syn = syntax();
- while (syn.isNameCharacter(in->tokenChar(messenger())))
- length++;
- if (length > maxLength)
- message(tooLongMessage, NumberMessageArg(maxLength));
- in->endToken(length);
-}
-
-void Parser::extendNumber(size_t maxLength, const MessageType1 &tooLongMessage)
-{
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- while (syntax().isDigit(in->tokenChar(messenger())))
- length++;
- if (length > maxLength)
- message(tooLongMessage, NumberMessageArg(maxLength));
- in->endToken(length);
-}
-
-void Parser::extendHexNumber()
-{
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- while (syntax().isHexDigit(in->tokenChar(messenger())))
- length++;
- if (length > syntax().namelen())
- message(ParserMessages::hexNumberLength, NumberMessageArg(syntax().namelen()));
- in->endToken(length);
-}
-
-Boolean Parser::reportNonSgmlCharacter()
-{
- // In scanSuppress mode the non-SGML character will have been read.
- Char c = currentInput()->currentTokenLength() ? currentChar() : getChar();
- if (!syntax().isSgmlChar(c)) {
- message(ParserMessages::nonSgmlCharacter, NumberMessageArg(c));
- return 1;
- }
- return 0;
-}
-
-void Parser::extendS()
-{
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- while (syntax().isS(in->tokenChar(messenger())))
- length++;
- in->endToken(length);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseDecl.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseDecl.cxx
deleted file mode 100644
index f41eb54a11..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseDecl.cxx
+++ /dev/null
@@ -1,3336 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-// Prolog, dtd and declaration parsing.
-
-#include "splib.h"
-#include "Parser.h"
-#include "Param.h"
-#include "Markup.h"
-#include "ParserMessages.h"
-#include "MessageArg.h"
-#include "TokenMessageArg.h"
-#include "token.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-static const AllowedParams allowMdc(Param::mdc);
-static const AllowedParams allowName(Param::name);
-static const AllowedParams allowParamLiteral(Param::paramLiteral);
-static const AllowedParams allowNameNameGroup(Param::name, Param::nameGroup);
-static const AllowedParams allowDsoMdc(Param::dso, Param::mdc);
-static AllowedParams allowNameMdc(Param::name, Param::mdc);
-static AllowedParams
- allowExplicitLinkRuleMdc(Param::mdc,
- Param::name,
- Param::nameGroup,
- Param::indicatedReservedName + Syntax::rIMPLIED);
-static AllowedParams
- allowNameNameGroupMdc(Param::name, Param::nameGroup, Param::mdc);
-
-static const AllowedParams
- allowLinkSetSpec(Param::name,
- Param::indicatedReservedName + Syntax::rINITIAL,
- Param::indicatedReservedName + Syntax::rEMPTY,
- Param::indicatedReservedName + Syntax::rRESTORE);
-
-void Parser::doProlog()
-{
- const unsigned maxTries = 10;
- unsigned tries = 0;
- do {
- if (cancelled()) {
- allDone();
- return;
- }
- Token token = getToken(proMode);
- switch (token) {
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- if (hadDtd()) {
- currentInput()->ungetToken();
- endProlog();
- return;
- }
- {
- StringC gi;
- if (lookingAtStartTag(gi)) {
- currentInput()->ungetToken();
- implyDtd(gi);
- return;
- }
- }
-
- if (++tries >= maxTries) {
- message(ParserMessages::notSgml);
- giveUp();
- return;
- }
- message(ParserMessages::prologCharacter, StringMessageArg(currentToken()));
- prologRecover();
- break;
- case tokenEe:
- if (hadDtd()) {
- endProlog();
- return;
- }
- message(ParserMessages::documentEndProlog);
- allDone();
- return;
- case tokenMdoMdc:
- // empty comment
- emptyCommentDecl();
- break;
- case tokenMdoCom:
- if (!parseCommentDecl())
- prologRecover();
- break;
- case tokenMdoNameStart:
- setPass2Start();
- if (startMarkup(eventsWanted().wantPrologMarkup(), currentLocation()))
- currentMarkup()->addDelim(Syntax::dMDO);
- Syntax::ReservedName name;
- if (parseDeclarationName(&name)) {
- switch (name) {
- case Syntax::rDOCTYPE:
- if (!parseDoctypeDeclStart())
- giveUp();
- return;
- case Syntax::rLINKTYPE:
- if (!parseLinktypeDeclStart())
- giveUp();
- return;
- case Syntax::rELEMENT:
- case Syntax::rATTLIST:
- case Syntax::rENTITY:
- case Syntax::rNOTATION:
- case Syntax::rSHORTREF:
- case Syntax::rUSEMAP:
- case Syntax::rUSELINK:
- case Syntax::rLINK:
- case Syntax::rIDLINK:
- message(ParserMessages::prologDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- if (!hadDtd())
- tries++;
- prologRecover();
- break;
- default:
- message(ParserMessages::noSuchDeclarationType,
- StringMessageArg(syntax().reservedName(name)));
- prologRecover();
- break;
- }
- }
- else
- prologRecover();
- break;
- case tokenPio:
- if (!parseProcessingInstruction())
- prologRecover();
- break;
- case tokenS:
- if (eventsWanted().wantPrologMarkup()) {
- extendS();
- eventHandler().sSep(new (eventAllocator())
- SSepEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 1));
- }
- break;
- default:
- CANNOT_HAPPEN();
- }
- } while (eventQueueEmpty());
-}
-
-void Parser::endProlog()
-{
- if (baseDtd().isNull()
-#if 0
- || baseDtd()->documentElementType()->definition()->undefined()
-#endif
- ) {
- // We could continue, but there's not a lot of point.
- giveUp();
- return;
- }
- if (maybeStartPass2())
- setPhase(prologPhase);
- else {
- if (inputLevel() == 0) {
- allDone();
- return;
- }
- if (pass2())
- checkEntityStability();
- setPhase(instanceStartPhase);
- startInstance();
- ConstPtr<ComplexLpd> lpd;
- Vector<AttributeList> simpleLinkAtts;
- Vector<StringC> simpleLinkNames;
- for (size_t i = 0; i < nActiveLink(); i++)
- if (activeLpd(i).type() == Lpd::simpleLink) {
- const SimpleLpd &lpd = (SimpleLpd &)activeLpd(i);
- simpleLinkNames.push_back(lpd.name());
- simpleLinkAtts.resize(simpleLinkAtts.size() + 1);
- simpleLinkAtts.back().init(lpd.attributeDef());
- simpleLinkAtts.back().finish(*this);
- }
- else
- lpd = (ComplexLpd *)&activeLpd(i);
- eventHandler().endProlog(new (eventAllocator())
- EndPrologEvent(baseDtd(),
- lpd,
- simpleLinkNames,
- simpleLinkAtts,
- currentLocation()));
- }
-}
-
-void Parser::prologRecover()
-{
- unsigned skipCount = 0;
- const unsigned skipMax = 250;
- for (;;) {
- Token token = getToken(proMode);
- skipCount++;
- if (token == tokenUnrecognized) {
- token = getToken(mdMode);
- if (token == tokenMdc) {
- token = getToken(proMode);
- if (token == tokenS)
- return;
- }
- }
- switch (token) {
- case tokenUnrecognized:
- (void)getChar();
- break;
- case tokenEe:
- return;
- case tokenMdoMdc:
- case tokenMdoCom:
- case tokenMdoNameStart:
- case tokenPio:
- currentInput()->ungetToken();
- return;
- case tokenS:
- if (currentChar() == syntax().standardFunction(Syntax::fRE)
- && skipCount >= skipMax)
- return;
- default:
- break;
- }
- }
-}
-
-void Parser::doDeclSubset()
-{
- do {
- if (cancelled()) {
- allDone();
- return;
- }
- Token token = getToken(currentMode());
- unsigned startLevel = inputLevel();
- Boolean inDtd = !haveDefLpd();
- switch (token) {
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- message(ParserMessages::declSubsetCharacter, StringMessageArg(currentToken()));
- declSubsetRecover(startLevel);
- break;
- case tokenEe:
- if (inputLevel() == specialParseInputLevel()) {
- // FIXME have separate messages for each type of special parse
- message(ParserMessages::specialParseEntityEnd);
- }
- if (eventsWanted().wantPrologMarkup())
- eventHandler().entityEnd(new (eventAllocator())
- EntityEndEvent(currentLocation()));
- if (inputLevel() == 2) {
- const Entity *e
- = currentLocation().origin()->entity();
- if (e
- && (e->declType() == Entity::doctype
- || e->declType() == Entity::linktype)) {
- // popInputStack may destroy e
- Boolean fake = e->defLocation().origin().isNull();
- popInputStack();
- if (!(inDtd
- ? parseDoctypeDeclEnd(fake)
- : parseLinktypeDeclEnd()))
- ; // FIXME recover
- setPhase(prologPhase);
- return;
- }
- }
- if (inputLevel() == 1) {
- if (finalPhase() == declSubsetPhase) {
- checkDtd(defDtd());
- endDtd();
- }
- else
- // Give message before popping stack.
- message(inDtd
- ? ParserMessages::documentEndDtdSubset
- : ParserMessages::documentEndLpdSubset);
- popInputStack();
- allDone();
- }
- else
- popInputStack();
- return;
- case tokenDsc: // end of declaration subset
- // FIXME what's the right location?
- if (!referenceDsEntity(currentLocation())) {
- if (!(inDtd ? parseDoctypeDeclEnd() : parseLinktypeDeclEnd()))
- ; // FIXME recover
- setPhase(prologPhase);
- }
- return;
- case tokenMdoNameStart: // named markup declaration
- if (startMarkup(eventsWanted().wantPrologMarkup(), currentLocation()))
- currentMarkup()->addDelim(Syntax::dMDO);
- Syntax::ReservedName name;
- Boolean result;
- if (parseDeclarationName(&name,
- inDtd && !options().errorAfdr)) {
- switch (name) {
- case Syntax::rANY: // used for <!AFDR
- result = parseAfdrDecl();
- break;
- case Syntax::rELEMENT:
- if (inDtd)
- result = parseElementDecl();
- else {
- message(ParserMessages::lpdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- }
- break;
- case Syntax::rATTLIST:
- result = parseAttlistDecl();
- break;
- case Syntax::rENTITY:
- result = parseEntityDecl();
- break;
- case Syntax::rNOTATION:
- result = parseNotationDecl();
- if (!inDtd && !sd().www())
- message(ParserMessages::lpdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- break;
- case Syntax::rSHORTREF:
- if (inDtd)
- result = parseShortrefDecl();
- else {
- message(ParserMessages::lpdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- }
- break;
- case Syntax::rUSEMAP:
- if (inDtd)
- result = parseUsemapDecl();
- else {
- message(ParserMessages::lpdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- }
- break;
- case Syntax::rLINK:
- if (inDtd) {
- message(ParserMessages::dtdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- }
- else
- result = parseLinkDecl();
- break;
- case Syntax::rIDLINK:
- if (inDtd) {
- message(ParserMessages::dtdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- }
- else
- result = parseIdlinkDecl();
- break;
- case Syntax::rDOCTYPE:
- case Syntax::rLINKTYPE:
- case Syntax::rUSELINK:
- result = 0;
- message(inDtd
- ? ParserMessages::dtdSubsetDeclaration
- : ParserMessages::lpdSubsetDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- break;
- default:
- result = 0;
- message(ParserMessages::noSuchDeclarationType,
- StringMessageArg(syntax().reservedName(name)));
- break;
- }
- }
- else
- result = 0;
- if (!result)
- declSubsetRecover(startLevel);
- break;
- case tokenMdoMdc: // empty comment declaration
- // empty comment
- emptyCommentDecl();
- break;
- case tokenMdoCom: // comment declaration
- if (!parseCommentDecl())
- declSubsetRecover(startLevel);
- break;
- case tokenMdoDso: // marked section declaration
- if (!parseMarkedSectionDeclStart())
- declSubsetRecover(startLevel);
- break;
- case tokenMscMdc:
- handleMarkedSectionEnd();
- break;
- case tokenPeroGrpo: // parameter entity reference with name group
- message(ParserMessages::peroGrpoProlog);
- // fall through
- case tokenPeroNameStart: // parameter entity reference
- {
- ConstPtr<Entity> entity;
- Ptr<EntityOrigin> origin;
- if (parseEntityReference(1, token == tokenPeroGrpo, entity, origin)) {
- if (!entity.isNull())
- entity->dsReference(*this, origin);
- }
- else
- declSubsetRecover(startLevel);
- }
- break;
- case tokenPio: // processing instruction
- if (!parseProcessingInstruction())
- declSubsetRecover(startLevel);
- break;
- case tokenS: // white space
- if (eventsWanted().wantPrologMarkup()) {
- extendS();
- eventHandler().sSep(new (eventAllocator())
- SSepEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 1));
- }
- break;
- case tokenIgnoredChar:
- // from an ignored marked section
- if (eventsWanted().wantPrologMarkup())
- eventHandler().ignoredChars(new (eventAllocator())
- IgnoredCharsEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 1));
- break;
- case tokenRe:
- case tokenRs:
- case tokenCroNameStart:
- case tokenCroDigit:
- case tokenHcroHexDigit:
- case tokenEroNameStart:
- case tokenEroGrpo:
- case tokenChar:
- // these can occur in a cdata or rcdata marked section
- message(ParserMessages::dataMarkedSectionDeclSubset);
- declSubsetRecover(startLevel);
- break;
- default:
- CANNOT_HAPPEN();
- }
- } while (eventQueueEmpty());
-}
-
-void Parser::declSubsetRecover(unsigned startLevel)
-{
- for (;;) {
- Token token = getToken(currentMode());
- switch (token) {
- case tokenUnrecognized:
- (void)getChar();
- break;
- case tokenEe:
- if (inputLevel() <= startLevel)
- return;
- popInputStack();
- break;
- case tokenMdoCom:
- case tokenDsc:
- case tokenMdoNameStart:
- case tokenMdoMdc:
- case tokenMdoDso:
- case tokenMscMdc:
- case tokenPio:
- if (inputLevel() == startLevel) {
- currentInput()->ungetToken();
- return;
- }
- break;
- default:
- break;
- }
- }
-}
-
-Boolean Parser::lookingAtStartTag(StringC &gi)
-{
- // This is harder than might be expected since we may not have compiled
- // the recognizers for the instance yet.
- const StringC &stago = instanceSyntax().delimGeneral(Syntax::dSTAGO);
- for (size_t i = currentInput()->currentTokenLength();
- i < stago.size();
- i++)
- if (currentInput()->tokenChar(messenger()) == InputSource::eE)
- return 0;
- StringC delim;
- getCurrentToken(instanceSyntax().generalSubstTable(), delim);
- if (delim != stago)
- return 0;
- Xchar c = currentInput()->tokenChar(messenger());
- if (!instanceSyntax().isNameStartCharacter(c))
- return 0;
- do {
- gi += (*instanceSyntax().generalSubstTable())[(Char)c];
- c = currentInput()->tokenChar(messenger());
- } while (instanceSyntax().isNameCharacter(c));
- return 1;
-}
-
-Boolean Parser::parseDeclarationName(Syntax::ReservedName *result,
- Boolean allowAfdr)
-{
- currentInput()->discardInitial();
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- StringC &name = nameBuffer();
- getCurrentToken(syntax().generalSubstTable(), name);
- if (!syntax().lookupReservedName(name, result)) {
- if (allowAfdr && name == sd().execToInternal("AFDR")) {
- *result = Syntax::rANY;
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- }
- else {
- message(ParserMessages::noSuchDeclarationType, StringMessageArg(name));
- return 0;
- }
- }
- else if (currentMarkup())
- currentMarkup()->addReservedName(*result, currentInput());
- return 1;
-}
-
-Boolean Parser::parseElementDecl()
-{
- unsigned declInputLevel = inputLevel();
- Param parm;
- if (!parseParam(allowNameNameGroup, declInputLevel, parm))
- return 0;
- Vector<NameToken> nameVector;
- if (parm.type == Param::nameGroup) {
- parm.nameTokenVector.swap(nameVector);
- if (options().warnElementGroupDecl)
- message(ParserMessages::elementGroupDecl);
- }
- else {
- nameVector.resize(1);
- parm.token.swap(nameVector[0].name);
- }
- static AllowedParams
- allowRankOmissionContent(Param::number,
- Param::reservedName + Syntax::rO,
- Param::minus,
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rRCDATA,
- Param::reservedName + Syntax::rEMPTY,
- Param::reservedName + Syntax::rANY,
- Param::modelGroup);
- if (!parseParam(allowRankOmissionContent, declInputLevel, parm))
- return 0;
- StringC rankSuffix;
- Vector<ElementType *> elements(nameVector.size());
- Vector<RankStem *> rankStems;
- Vector<const RankStem *> constRankStems;
- size_t i;
- if (parm.type == Param::number) {
- if (options().warnRank)
- message(ParserMessages::rank);
- parm.token.swap(rankSuffix);
- rankStems.resize(nameVector.size());
- constRankStems.resize(nameVector.size());
- for (i = 0; i < elements.size(); i++) {
- StringC name(nameVector[i].name);
- name += rankSuffix;
- if (name.size() > syntax().namelen()
- && nameVector[i].name.size() <= syntax().namelen())
- message(ParserMessages::genericIdentifierLength,
- NumberMessageArg(syntax().namelen()));
- elements[i] = lookupCreateElement(name);
- rankStems[i] = lookupCreateRankStem(nameVector[i].name);
- constRankStems[i] = rankStems[i];
- }
- static AllowedParams
- allowOmissionContent(Param::reservedName + Syntax::rO,
- Param::minus,
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rRCDATA,
- Param::reservedName + Syntax::rEMPTY,
- Param::reservedName + Syntax::rANY,
- Param::modelGroup);
- Token token = getToken(mdMinusMode);
- if (token == tokenNameStart)
- message(ParserMessages::psRequired);
- currentInput()->ungetToken();
- if (!parseParam(allowOmissionContent, declInputLevel, parm))
- return 0;
- }
- else {
- for (i = 0; i < elements.size(); i++)
- elements[i] = lookupCreateElement(nameVector[i].name);
- }
- for (i = 0; i < elements.size(); i++)
- if (defDtd().lookupRankStem(elements[i]->name()) && validate())
- message(ParserMessages::rankStemGenericIdentifier,
- StringMessageArg(elements[i]->name()));
- unsigned char omitFlags = 0;
- if (parm.type == Param::minus
- || parm.type == Param::reservedName + Syntax::rO) {
- if (options().warnMinimizationParam)
- message(ParserMessages::minimizationParam);
- omitFlags |= ElementDefinition::omitSpec;
- if (parm.type != Param::minus)
- omitFlags |= ElementDefinition::omitStart;
- static AllowedParams allowOmission(Param::reservedName + Syntax::rO,
- Param::minus);
- if (!parseParam(allowOmission, declInputLevel, parm))
- return 0;
- if (parm.type != Param::minus)
- omitFlags |= ElementDefinition::omitEnd;
- static AllowedParams allowContent(Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rRCDATA,
- Param::reservedName + Syntax::rEMPTY,
- Param::reservedName + Syntax::rANY,
- Param::modelGroup);
- if (!parseParam(allowContent, declInputLevel, parm))
- return 0;
- }
- else {
- if (sd().omittag())
- message(ParserMessages::missingTagMinimization);
- }
- Ptr<ElementDefinition> def;
- switch (parm.type) {
- case Param::reservedName + Syntax::rCDATA:
- def = new ElementDefinition(markupLocation(),
- defDtd().allocElementDefinitionIndex(),
- omitFlags,
- ElementDefinition::cdata);
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- if (options().warnCdataContent)
- message(ParserMessages::cdataContent);
- break;
- case Param::reservedName + Syntax::rRCDATA:
- def = new ElementDefinition(markupLocation(),
- defDtd().allocElementDefinitionIndex(),
- omitFlags,
- ElementDefinition::rcdata);
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- if (options().warnRcdataContent)
- message(ParserMessages::rcdataContent);
- break;
- case Param::reservedName + Syntax::rEMPTY:
- def = new ElementDefinition(markupLocation(),
- defDtd().allocElementDefinitionIndex(),
- omitFlags,
- ElementDefinition::empty);
- if ((omitFlags & ElementDefinition::omitSpec)
- && !(omitFlags & ElementDefinition::omitEnd)
- && options().warnShould)
- message(ParserMessages::emptyOmitEndTag);
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- break;
- case Param::reservedName + Syntax::rANY:
- def = new ElementDefinition(markupLocation(),
- defDtd().allocElementDefinitionIndex(),
- omitFlags,
- ElementDefinition::any);
- if (!parseExceptions(declInputLevel, def))
- return 0;
- break;
- case Param::modelGroup:
- {
- unsigned long cnt = parm.modelGroupPtr->grpgtcnt();
- // The outermost model group isn't formally a content token.
- if (cnt - 1 > syntax().grpgtcnt())
- message(ParserMessages::grpgtcnt, NumberMessageArg(syntax().grpgtcnt()));
- Owner<CompiledModelGroup>
- modelGroup(new CompiledModelGroup(parm.modelGroupPtr));
- Vector<ContentModelAmbiguity> ambiguities;
- Boolean pcdataUnreachable;
- modelGroup->compile(currentDtd().nElementTypeIndex(), ambiguities,
- pcdataUnreachable);
- if (pcdataUnreachable && options().warnMixedContent)
- message(ParserMessages::pcdataUnreachable);
- if (validate()) {
- for (i = 0; i < ambiguities.size(); i++) {
- const ContentModelAmbiguity &a = ambiguities[i];
- reportAmbiguity(a.from, a.to1, a.to2, a.andDepth);
- }
- }
- def = new ElementDefinition(markupLocation(),
- defDtd().allocElementDefinitionIndex(),
- omitFlags,
- ElementDefinition::modelGroup,
- modelGroup);
- if (!parseExceptions(declInputLevel, def))
- return 0;
- }
- break;
- }
- if (rankSuffix.size() > 0)
- def->setRank(rankSuffix, constRankStems);
- ConstPtr<ElementDefinition> constDef(def);
- for (i = 0; i < elements.size(); i++) {
- if (elements[i]->definition() != 0) {
- if (validate())
- message(ParserMessages::duplicateElementDefinition,
- StringMessageArg(elements[i]->name()));
- }
- else {
- elements[i]->setElementDefinition(constDef, i);
- if (!elements[i]->attributeDef().isNull())
- checkElementAttribute(elements[i]);
- }
- if (rankStems.size() > 0)
- rankStems[i]->addDefinition(constDef);
- }
- if (currentMarkup()) {
- Vector<const ElementType *> v(elements.size());
- for (i = 0; i < elements.size(); i++)
- v[i] = elements[i];
- eventHandler().elementDecl(new (eventAllocator())
- ElementDeclEvent(v, currentDtdPointer(),
- markupLocation(),
- currentMarkup()));
- }
- return 1;
-}
-
-void Parser::reportAmbiguity(const LeafContentToken *from,
- const LeafContentToken *to1,
- const LeafContentToken *to2,
- unsigned ambigAndDepth)
-{
- StringC toName;
- const ElementType *toType = to1->elementType();
- if (toType)
- toName = toType->name();
- else {
- toName = syntax().delimGeneral(Syntax::dRNI);
- toName += syntax().reservedName(Syntax::rPCDATA);
- }
- unsigned to1Index = to1->typeIndex() + 1;
- unsigned to2Index = to2->typeIndex() + 1;
- if (from->isInitial())
- message(ParserMessages::ambiguousModelInitial,
- StringMessageArg(toName),
- OrdinalMessageArg(to1Index),
- OrdinalMessageArg(to2Index));
- else {
- StringC fromName;
- const ElementType *fromType = from->elementType();
- if (fromType)
- fromName = fromType->name();
- else {
- fromName = syntax().delimGeneral(Syntax::dRNI);
- fromName += syntax().reservedName(Syntax::rPCDATA);
- }
- unsigned fromIndex = from->typeIndex() + 1;
- unsigned andMatches = from->andDepth() - ambigAndDepth;
- if (andMatches == 0)
- message(ParserMessages::ambiguousModel,
- StringMessageArg(fromName),
- OrdinalMessageArg(fromIndex),
- StringMessageArg(toName),
- OrdinalMessageArg(to1Index),
- OrdinalMessageArg(to2Index));
- else if (andMatches == 1)
- message(ParserMessages::ambiguousModelSingleAnd,
- StringMessageArg(fromName),
- OrdinalMessageArg(fromIndex),
- StringMessageArg(toName),
- OrdinalMessageArg(to1Index),
- OrdinalMessageArg(to2Index));
- else
- message(ParserMessages::ambiguousModelMultipleAnd,
- StringMessageArg(fromName),
- OrdinalMessageArg(fromIndex),
- NumberMessageArg(andMatches),
- StringMessageArg(toName),
- OrdinalMessageArg(to1Index),
- OrdinalMessageArg(to2Index));
- }
-}
-
-
-// Check the compatibility of the attribute definition with
-// the element definition.
-
-void Parser::checkElementAttribute(const ElementType *e, size_t checkFrom)
-{
- if (!validate())
- return;
- const AttributeDefinitionList *attDef = e->attributeDef().pointer();
- Boolean conref = 0;
- ASSERT(e != 0);
- const ElementDefinition *edef = e->definition();
- ASSERT(edef != 0);
- ASSERT(attDef != 0);
- size_t attDefLength = attDef->size();
- for (size_t i = checkFrom; i < attDefLength; i++) {
- const AttributeDefinition *p = attDef->def(i);
- if (p->isConref())
- conref = 1;
- if (p->isNotation()
- && edef->declaredContent() == ElementDefinition::empty)
- message(ParserMessages::notationEmpty, StringMessageArg(e->name()));
- }
- if (conref) {
-#if 0
- if (edef->omittedTagSpec() && !edef->canOmitEndTag()
- && options().warnShould)
- message(ParserMessages::conrefOmitEndTag, StringMessageArg(e->name()));
-#endif
- if (edef->declaredContent() == ElementDefinition::empty)
- message(ParserMessages::conrefEmpty, StringMessageArg(e->name()));
- }
-}
-
-ElementType *Parser::lookupCreateElement(const StringC &name)
-{
- ElementType *e = defDtd().lookupElementType(name);
- if (!e) {
- if (haveDefLpd())
- message(ParserMessages::noSuchSourceElement, StringMessageArg(name));
- else {
- e = new ElementType(name, defDtd().allocElementTypeIndex());
- defDtd().insertElementType(e);
- }
- }
- return e;
-}
-
-RankStem *Parser::lookupCreateRankStem(const StringC &name)
-{
- RankStem *r = defDtd().lookupRankStem(name);
- if (!r) {
- r = new RankStem(name, defDtd().nRankStem());
- defDtd().insertRankStem(r);
- const ElementType *e = defDtd().lookupElementType(name);
- if (e && e->definition() != 0)
- message(ParserMessages::rankStemGenericIdentifier, StringMessageArg(name));
- }
- return r;
-}
-
-Boolean Parser::parseExceptions(unsigned declInputLevel,
- Ptr<ElementDefinition> &def)
-{
- Param parm;
- static AllowedParams
- allowExceptionsMdc(Param::mdc, Param::exclusions, Param::inclusions);
- if (!parseParam(allowExceptionsMdc, declInputLevel, parm))
- return 0;
- if (parm.type == Param::exclusions) {
- if (options().warnExclusion)
- message(ParserMessages::exclusion);
- def->setExclusions(parm.elementVector);
- static AllowedParams allowInclusionsMdc(Param::mdc, Param::inclusions);
- if (!parseParam(allowInclusionsMdc, declInputLevel, parm))
- return 0;
- }
- if (parm.type == Param::inclusions) {
- if (options().warnInclusion)
- message(ParserMessages::inclusion);
- def->setInclusions(parm.elementVector);
- size_t nI = def->nInclusions();
- size_t nE = def->nExclusions();
- if (nE) {
- for (size_t i = 0; i < nI; i++) {
- const ElementType *e = def->inclusion(i);
- for (size_t j = 0; j < nE; j++)
- if (def->exclusion(j) == e)
- message(ParserMessages::excludeIncludeSame,
- StringMessageArg(e->name()));
- }
- }
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- }
- return 1;
-}
-
-Boolean Parser::parseAttlistDecl()
-{
- unsigned declInputLevel = inputLevel();
- Param parm;
- size_t attcnt = 0;
- size_t idIndex = size_t(-1);
- size_t notationIndex = size_t(-1);
- Boolean anyCurrent = 0;
-
- Boolean isNotation;
- Vector<Attributed *> attributed;
- if (!parseAttributed(declInputLevel, parm, attributed, isNotation))
- return 0;
- Vector<CopyOwner<AttributeDefinition> > defs;
- if (!parseParam(sd().www() ? allowNameMdc : allowName, declInputLevel, parm))
- return 0;
- while (parm.type != Param::mdc) {
- StringC attributeName;
- parm.token.swap(attributeName);
- attcnt++;
- Boolean duplicate = 0;
- size_t i;
- for (i = 0; i < defs.size(); i++)
- if (defs[i]->name() == attributeName) {
- message(ParserMessages::duplicateAttributeDef,
- StringMessageArg(attributeName));
- duplicate = 1;
- break;
- }
- Owner<DeclaredValue> declaredValue;
- if (!parseDeclaredValue(declInputLevel, isNotation, parm, declaredValue))
- return 0;
- if (!duplicate) {
- if (declaredValue->isId()) {
- if (idIndex != size_t(-1))
- message(ParserMessages::multipleIdAttributes,
- StringMessageArg(defs[idIndex]->name()));
- idIndex = defs.size();
- }
- else if (declaredValue->isNotation()) {
- if (notationIndex != size_t(-1))
- message(ParserMessages::multipleNotationAttributes,
- StringMessageArg(defs[notationIndex]->name()));
- notationIndex = defs.size();
- }
- }
- const Vector<StringC> *tokensPtr = declaredValue->getTokens();
- if (tokensPtr) {
- size_t nTokens = tokensPtr->size();
- if (!sd().www()) {
- Vector<StringC>::const_iterator tokens = tokensPtr->begin();
- for (i = 0; i < nTokens; i++) {
- for (size_t j = 0; j < defs.size(); j++)
- if (defs[j]->containsToken(tokens[i])) {
- message(ParserMessages::duplicateAttributeToken,
- StringMessageArg(tokens[i]));
- break;
- }
- }
- }
- attcnt += nTokens;
- }
- Owner<AttributeDefinition> def;
- if (!parseDefaultValue(declInputLevel, isNotation, parm, attributeName,
- declaredValue, def, anyCurrent))
- return 0;
- if (haveDefLpd() && defLpd().type() == Lpd::simpleLink && !def->isFixed())
- message(ParserMessages::simpleLinkFixedAttribute);
- if (!duplicate) {
- defs.resize(defs.size() + 1);
- defs.back() = def.extract();
- }
- static AllowedParams allowNameMdc(Param::name, Param::mdc);
- if (!parseParam(allowNameMdc, declInputLevel, parm))
- return 0;
- }
- if (attcnt > syntax().attcnt())
- message(ParserMessages::attcnt,
- NumberMessageArg(attcnt),
- NumberMessageArg(syntax().attcnt()));
- if (haveDefLpd() && !isNotation) {
- if (defLpd().type() == Lpd::simpleLink) {
- for (size_t i = 0; i < attributed.size(); i++) {
- const ElementType *e = (const ElementType *)attributed[i];
- if (e) {
- if (e->name() == defLpd().sourceDtd()->name()) {
- SimpleLpd &lpd = (SimpleLpd &)defLpd();
- if (lpd.attributeDef().isNull())
- lpd.setAttributeDef(new AttributeDefinitionList(defs, 0));
- else
- message(ParserMessages::duplicateAttlistElement,
- StringMessageArg(e->name()));
- }
- else
- message(ParserMessages::simpleLinkAttlistElement,
- StringMessageArg(e->name()));
- }
- }
- }
- else {
- Ptr<AttributeDefinitionList>
- adl(new AttributeDefinitionList(defs,
- defComplexLpd()
- .allocAttributeDefinitionListIndex()));
- for (size_t i = 0; i < attributed.size(); i++) {
- const ElementType *e = (const ElementType *)attributed[i];
- if (e) {
- if (defComplexLpd().attributeDef(e).isNull())
- defComplexLpd().setAttributeDef(e, adl);
- else
- message(ParserMessages::duplicateAttlistElement,
- StringMessageArg(e->name()));
- }
- }
- }
- }
- else {
- Ptr<AttributeDefinitionList>
- adl(new AttributeDefinitionList(defs,
- defDtd()
- .allocAttributeDefinitionListIndex(),
- anyCurrent,
- idIndex,
- notationIndex));
- for (size_t i = 0; i < attributed.size(); i++) {
- if (attributed[i]->attributeDef().isNull()) {
- attributed[i]->setAttributeDef(adl);
- if (!isNotation) {
- ElementType *e = (ElementType *)attributed[i];
- if (e->definition() != 0)
- checkElementAttribute(e);
- }
- }
- else if (options().errorAfdr && !sd().www()) {
- if (isNotation)
- message(ParserMessages::duplicateAttlistNotation,
- StringMessageArg(((Notation *)attributed[i])->name()));
- else
- message(ParserMessages::duplicateAttlistElement,
- StringMessageArg(((ElementType *)attributed[i])->name()));
- }
- else {
- if (!hadAfdrDecl() && !sd().www()) {
- message(ParserMessages::missingAfdrDecl);
- setHadAfdrDecl();
- }
- AttributeDefinitionList *curAdl;
- {
- // Use block to make sure temporary gets destroyed.
- curAdl = attributed[i]->attributeDef().pointer();
- }
- size_t oldSize = curAdl->size();
- if (curAdl->count() != 1) {
- Vector<CopyOwner<AttributeDefinition> > copy(oldSize);
- for (size_t j = 0; j < oldSize; j++)
- copy[j] = curAdl->def(j)->copy();
- Ptr<AttributeDefinitionList> adlCopy
- = new AttributeDefinitionList(copy,
- defDtd().allocAttributeDefinitionListIndex(),
- curAdl->anyCurrent(),
- curAdl->idIndex(),
- curAdl->notationIndex());
- attributed[i]->setAttributeDef(adlCopy);
- curAdl = adlCopy.pointer();
- }
- // FIXME check for multiple ID and NOTATION attributes
- for (size_t j = 0; j < adl->size(); j++) {
- unsigned tem;
- if (!curAdl->attributeIndex(adl->def(j)->name(), tem))
- curAdl->append(adl->def(j)->copy());
- }
- if (!isNotation) {
- ElementType *e = (ElementType *)attributed[i];
- if (e->definition() != 0)
- checkElementAttribute(e, oldSize);
- }
- }
- }
- }
- if (currentMarkup()) {
- if (isNotation) {
- Vector<ConstPtr<Notation> > v(attributed.size());
- for (size_t i = 0; i < attributed.size(); i++)
- v[i] = (Notation *)attributed[i];
- eventHandler()
- .attlistNotationDecl(new (eventAllocator())
- AttlistNotationDeclEvent(v,
- markupLocation(),
- currentMarkup()));
- }
- else {
- Vector<const ElementType *> v(attributed.size());
- for (size_t i = 0; i < attributed.size(); i++)
- v[i] = (ElementType *)attributed[i];
- if (haveDefLpd())
- eventHandler()
- .linkAttlistDecl(new (eventAllocator())
- LinkAttlistDeclEvent(v,
- defLpdPointer(),
- markupLocation(),
- currentMarkup()));
- else
- eventHandler().attlistDecl(new (eventAllocator())
- AttlistDeclEvent(v,
- currentDtdPointer(),
- markupLocation(),
- currentMarkup()));
- }
- }
- if (isNotation) {
- Dtd::EntityIter entityIter(defDtd().generalEntityIter());
- for (;;) {
- Ptr<Entity> entity(entityIter.next());
- if (entity.isNull())
- break;
- const ExternalDataEntity *external = entity->asExternalDataEntity();
- if (external) {
- const Notation *entityNotation = external->notation();
- for (size_t i = 0; i < attributed.size(); i++)
- if ((Notation *)attributed[i] == entityNotation) {
- AttributeList attributes(entityNotation->attributeDef());
- attributes.finish(*this);
- ((ExternalDataEntity *)entity.pointer())
- ->setNotation((Notation *)attributed[i], attributes);
- }
- }
- }
- }
- return 1;
-}
-
-
-Boolean Parser::parseAttributed(unsigned declInputLevel,
- Param &parm,
- Vector<Attributed *> &attributed,
- Boolean &isNotation)
-{
- static AllowedParams
- allowNameGroupNotation(Param::name,
- Param::nameGroup,
- Param::indicatedReservedName + Syntax::rNOTATION);
- static AllowedParams
- allowNameGroupNotationAll(Param::name,
- Param::nameGroup,
- Param::indicatedReservedName
- + Syntax::rNOTATION,
- Param::indicatedReservedName
- + Syntax::rALL,
- Param::indicatedReservedName
- + Syntax::rIMPLICIT);
- if (!parseParam(haveDefLpd()
- ? allowNameGroupNotation
- : allowNameGroupNotationAll,
- declInputLevel, parm))
- return 0;
- if (parm.type == Param::indicatedReservedName + Syntax::rNOTATION) {
- if (options().warnDataAttributes)
- message(ParserMessages::dataAttributes);
- isNotation = 1;
- static AllowedParams
- allowNameGroupAll(Param::name,
- Param::nameGroup,
- Param::indicatedReservedName + Syntax::rALL,
- Param::indicatedReservedName + Syntax::rIMPLICIT);
- if (!parseParam(haveDefLpd()
- ? allowNameNameGroup
- : allowNameGroupAll,
- declInputLevel, parm))
- return 0;
- if (parm.type == Param::nameGroup) {
- attributed.resize(parm.nameTokenVector.size());
- for (size_t i = 0; i < attributed.size(); i++)
- attributed[i] = lookupCreateNotation(parm.nameTokenVector[i].name);
- }
- else {
- if (parm.type != Param::name && !hadAfdrDecl() && !sd().www()) {
- message(ParserMessages::missingAfdrDecl);
- setHadAfdrDecl();
- }
- attributed.resize(1);
- attributed[0]
- = lookupCreateNotation(parm.type == Param::name
- ? parm.token
- : syntax().rniReservedName(Syntax::ReservedName(parm.type - Param::indicatedReservedName)));
- }
- }
- else {
- isNotation = 0;
- if (parm.type == Param::nameGroup) {
- if (options().warnAttlistGroupDecl)
- message(ParserMessages::attlistGroupDecl);
- attributed.resize(parm.nameTokenVector.size());
- for (size_t i = 0; i < attributed.size(); i++)
- attributed[i] = lookupCreateElement(parm.nameTokenVector[i].name);
- }
- else {
- if (parm.type != Param::name && !hadAfdrDecl() && !sd().www()) {
- message(ParserMessages::missingAfdrDecl);
- setHadAfdrDecl();
- }
- attributed.resize(1);
- attributed[0]
- = lookupCreateElement(parm.type == Param::name
- ? parm.token
- : syntax().rniReservedName(Syntax::ReservedName(parm.type - Param::indicatedReservedName)));
- }
- }
- return 1;
-}
-
-Boolean Parser::parseDeclaredValue(unsigned declInputLevel,
- Boolean isNotation,
- Param &parm,
- Owner<DeclaredValue> &declaredValue)
-{
- static Param::Type declaredValues[] = {
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rENTITY,
- Param::reservedName + Syntax::rENTITIES,
- Param::reservedName + Syntax::rID,
- Param::reservedName + Syntax::rIDREF,
- Param::reservedName + Syntax::rIDREFS,
- Param::reservedName + Syntax::rNAME,
- Param::reservedName + Syntax::rNAMES,
- Param::reservedName + Syntax::rNMTOKEN,
- Param::reservedName + Syntax::rNMTOKENS,
- Param::reservedName + Syntax::rNUMBER,
- Param::reservedName + Syntax::rNUMBERS,
- Param::reservedName + Syntax::rNUTOKEN,
- Param::reservedName + Syntax::rNUTOKENS,
- Param::reservedName + Syntax::rNOTATION,
- Param::nameTokenGroup
- };
- static AllowedParams allowDeclaredValue(declaredValues,
- SIZEOF(declaredValues));
- if (!parseParam(allowDeclaredValue, declInputLevel, parm))
- return 0;
- enum { asDataAttribute = 01, asLinkAttribute = 02 };
- unsigned allowedFlags = asDataAttribute|asLinkAttribute;
- switch (parm.type) {
- case Param::reservedName + Syntax::rCDATA:
- declaredValue = new CdataDeclaredValue;
- break;
- case Param::reservedName + Syntax::rENTITY:
- declaredValue = new EntityDeclaredValue(0);
- allowedFlags = asLinkAttribute;
- break;
- case Param::reservedName + Syntax::rENTITIES:
- declaredValue = new EntityDeclaredValue(1);
- allowedFlags = asLinkAttribute;
- break;
- case Param::reservedName + Syntax::rID:
- declaredValue = new IdDeclaredValue;
- allowedFlags = 0;
- break;
- case Param::reservedName + Syntax::rIDREF:
- declaredValue = new IdrefDeclaredValue(0);
- allowedFlags = 0;
- break;
- case Param::reservedName + Syntax::rIDREFS:
- declaredValue = new IdrefDeclaredValue(1);
- allowedFlags = 0;
- break;
- case Param::reservedName + Syntax::rNAME:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::name, 0);
- if (options().warnNameDeclaredValue)
- message(ParserMessages::nameDeclaredValue);
- break;
- case Param::reservedName + Syntax::rNAMES:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::name, 1);
- if (options().warnNameDeclaredValue)
- message(ParserMessages::nameDeclaredValue);
- break;
- case Param::reservedName + Syntax::rNMTOKEN:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::nameToken, 0);
- break;
- case Param::reservedName + Syntax::rNMTOKENS:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::nameToken, 1);
- break;
- case Param::reservedName + Syntax::rNUMBER:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::number, 0);
- if (options().warnNumberDeclaredValue)
- message(ParserMessages::numberDeclaredValue);
- break;
- case Param::reservedName + Syntax::rNUMBERS:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::number, 1);
- if (options().warnNumberDeclaredValue)
- message(ParserMessages::numberDeclaredValue);
- break;
- case Param::reservedName + Syntax::rNUTOKEN:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::numberToken, 0);
- if (options().warnNutokenDeclaredValue)
- message(ParserMessages::nutokenDeclaredValue);
- break;
- case Param::reservedName + Syntax::rNUTOKENS:
- declaredValue
- = new TokenizedDeclaredValue(TokenizedDeclaredValue::numberToken, 1);
- if (options().warnNutokenDeclaredValue)
- message(ParserMessages::nutokenDeclaredValue);
- break;
- case Param::reservedName + Syntax::rNOTATION:
- {
- static AllowedParams allowNameGroup(Param::nameGroup);
- if (!parseParam(allowNameGroup, declInputLevel, parm))
- return 0;
- Vector<StringC> group(parm.nameTokenVector.size());
- for (size_t i = 0; i < group.size(); i++)
- parm.nameTokenVector[i].name.swap(group[i]);
- declaredValue = new NotationDeclaredValue(group);
- allowedFlags = 0;
- }
- break;
- case Param::nameTokenGroup:
- {
- Vector<StringC> group(parm.nameTokenVector.size());
- for (size_t i = 0; i < group.size(); i++)
- parm.nameTokenVector[i].name.swap(group[i]);
- declaredValue = new NameTokenGroupDeclaredValue(group);
- }
- break;
- default:
- CANNOT_HAPPEN();
- }
- if (isNotation) {
- if (!(allowedFlags & asDataAttribute))
- message(ParserMessages::dataAttributeDeclaredValue);
- }
- else if (haveDefLpd() && !isNotation && !(allowedFlags & asLinkAttribute))
- message(ParserMessages::linkAttributeDeclaredValue);
- return 1;
-}
-
-Boolean Parser::parseDefaultValue(unsigned declInputLevel,
- Boolean isNotation,
- Param &parm,
- const StringC &attributeName,
- Owner<DeclaredValue> &declaredValue,
- Owner<AttributeDefinition> &def,
- Boolean &anyCurrent)
-{
- // default value
- static AllowedParams
- allowDefaultValue(Param::indicatedReservedName + Syntax::rFIXED,
- Param::indicatedReservedName + Syntax::rREQUIRED,
- Param::indicatedReservedName + Syntax::rCURRENT,
- Param::indicatedReservedName + Syntax::rCONREF,
- Param::indicatedReservedName + Syntax::rIMPLIED,
- Param::attributeValue,
- Param::attributeValueLiteral);
- static AllowedParams
- allowTokenDefaultValue(Param::indicatedReservedName + Syntax::rFIXED,
- Param::indicatedReservedName + Syntax::rREQUIRED,
- Param::indicatedReservedName + Syntax::rCURRENT,
- Param::indicatedReservedName + Syntax::rCONREF,
- Param::indicatedReservedName + Syntax::rIMPLIED,
- Param::attributeValue,
- Param::tokenizedAttributeValueLiteral);
- if (!parseParam(declaredValue->tokenized()
- ? allowTokenDefaultValue
- : allowDefaultValue, declInputLevel, parm))
- return 0;
- switch (parm.type) {
- case Param::indicatedReservedName + Syntax::rFIXED:
- {
- static AllowedParams allowValue(Param::attributeValue,
- Param::attributeValueLiteral);
- static AllowedParams
- allowTokenValue(Param::attributeValue,
- Param::tokenizedAttributeValueLiteral);
- if (!parseParam(declaredValue->tokenized()
- ? allowTokenValue
- : allowValue, declInputLevel, parm))
- return 0;
- unsigned specLength = 0;
- AttributeValue *value = declaredValue->makeValue(parm.literalText,
- *this,
- attributeName,
- specLength);
- if (declaredValue->isId())
- message(ParserMessages::idDeclaredValue);
- def = new FixedAttributeDefinition(attributeName,
- declaredValue.extract(),
- value);
- }
- break;
- case Param::attributeValue:
- if (options().warnAttributeValueNotLiteral)
- message(ParserMessages::attributeValueNotLiteral);
- // falll through
- case Param::attributeValueLiteral:
- case Param::tokenizedAttributeValueLiteral:
- {
- unsigned specLength = 0;
- AttributeValue *value = declaredValue->makeValue(parm.literalText,
- *this,
- attributeName,
- specLength);
- if (declaredValue->isId())
- message(ParserMessages::idDeclaredValue);
- def = new DefaultAttributeDefinition(attributeName,
- declaredValue.extract(),
- value);
- }
- break;
- case Param::indicatedReservedName + Syntax::rREQUIRED:
- def = new RequiredAttributeDefinition(attributeName,
- declaredValue.extract());
- break;
- case Param::indicatedReservedName + Syntax::rCURRENT:
- anyCurrent = 1;
- if (declaredValue->isId())
- message(ParserMessages::idDeclaredValue);
- def = new CurrentAttributeDefinition(attributeName,
- declaredValue.extract(),
- defDtd().allocCurrentAttributeIndex());
- if (isNotation)
- message(ParserMessages::dataAttributeDefaultValue);
- else if (haveDefLpd())
- message(ParserMessages::linkAttributeDefaultValue);
- else if (options().warnCurrent)
- message(ParserMessages::currentAttribute);
- break;
- case Param::indicatedReservedName + Syntax::rCONREF:
- if (declaredValue->isId())
- message(ParserMessages::idDeclaredValue);
- def = new ConrefAttributeDefinition(attributeName,
- declaredValue.extract());
- if (isNotation)
- message(ParserMessages::dataAttributeDefaultValue);
- else if (haveDefLpd())
- message(ParserMessages::linkAttributeDefaultValue);
- else if (options().warnConref)
- message(ParserMessages::conrefAttribute);
- break;
- case Param::indicatedReservedName + Syntax::rIMPLIED:
- def = new ImpliedAttributeDefinition(attributeName,
- declaredValue.extract());
- break;
- default:
- CANNOT_HAPPEN();
- }
- return 1;
-}
-
-// parm contains either system or public
-
-Boolean Parser::parseExternalId(const AllowedParams &sysidAllow,
- const AllowedParams &endAllow,
- Boolean maybeWarnMissingSystemId,
- unsigned declInputLevel,
- Param &parm,
- ExternalId &id)
-{
- id.setLocation(currentLocation());
- if (parm.type == Param::reservedName + Syntax::rPUBLIC) {
- static AllowedParams allowMinimumLiteral(Param::minimumLiteral);
- if (!parseParam(allowMinimumLiteral, declInputLevel, parm))
- return 0;
- const MessageType1 *err;
- if (id.setPublic(parm.literalText, sd().internalCharset(), syntax().space(),
- err)) {
- PublicId::TextClass textClass;
- if (sd().formal() && id.publicId()->getTextClass(textClass) && textClass == PublicId::SD)
- message(ParserMessages::wwwRequired);
- }
- else if (sd().formal())
- message(*err,
- StringMessageArg(*id.publicIdString()));
- }
- if (!parseParam(sysidAllow, declInputLevel, parm))
- return 0;
- if (parm.type == Param::systemIdentifier) {
- id.setSystem(parm.literalText);
- if (!parseParam(endAllow, declInputLevel, parm))
- return 0;
- }
- else if (options().warnMissingSystemId && maybeWarnMissingSystemId)
- message(ParserMessages::missingSystemId);
- return 1;
-}
-
-Boolean Parser::parseNotationDecl()
-{
- unsigned declInputLevel = inputLevel();
- Param parm;
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- Notation *nt = lookupCreateNotation(parm.token);
- if (validate() && nt->defined())
- message(ParserMessages::duplicateNotationDeclaration,
- StringMessageArg(parm.token));
- static AllowedParams
- allowPublicSystem(Param::reservedName + Syntax::rPUBLIC,
- Param::reservedName + Syntax::rSYSTEM);
- if (!parseParam(allowPublicSystem, declInputLevel, parm))
- return 0;
-
-
- static AllowedParams allowSystemIdentifierMdc(Param::systemIdentifier,
- Param::mdc);
-
- ExternalId id;
- if (!parseExternalId(allowSystemIdentifierMdc, allowMdc,
- parm.type == Param::reservedName + Syntax::rSYSTEM,
- declInputLevel, parm, id))
- return 0;
- if (validate() && sd().formal()) {
- PublicId::TextClass textClass;
- const PublicId *publicId = id.publicId();
- if (publicId
- && publicId->getTextClass(textClass)
- && textClass != PublicId::NOTATION)
- message(ParserMessages::notationIdentifierTextClass);
- }
- if (!nt->defined()) {
- nt->setExternalId(id, markupLocation());
- nt->generateSystemId(*this);
- if (currentMarkup())
- eventHandler().notationDecl(new (eventAllocator())
- NotationDeclEvent(nt, markupLocation(),
- currentMarkup()));
- }
- return 1;
-}
-
-Boolean Parser::parseEntityDecl()
-{
- unsigned declInputLevel = inputLevel();
- Param parm;
-
- static AllowedParams
- allowEntityNamePero(Param::entityName,
- Param::indicatedReservedName + Syntax::rDEFAULT,
- Param::pero);
-
- if (!parseParam(allowEntityNamePero, declInputLevel, parm))
- return 0;
-
- Entity::DeclType declType;
- StringC name; // empty for default entity
- if (parm.type == Param::pero) {
- declType = Entity::parameterEntity;
- static AllowedParams allowParamEntityName(Param::paramEntityName);
- if (!parseParam(allowParamEntityName, declInputLevel, parm))
- return 0;
- parm.token.swap(name);
- }
- else {
- declType = Entity::generalEntity;
- if (parm.type == Param::entityName)
- parm.token.swap(name);
- else if (options().warnDefaultEntityDecl)
- message(ParserMessages::defaultEntityDecl);
- }
- static AllowedParams
- allowEntityTextType(Param::paramLiteral,
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rSDATA,
- Param::reservedName + Syntax::rPI,
- Param::reservedName + Syntax::rSTARTTAG,
- Param::reservedName + Syntax::rENDTAG,
- Param::reservedName + Syntax::rMS,
- Param::reservedName + Syntax::rMD,
- Param::reservedName + Syntax::rSYSTEM,
- Param::reservedName + Syntax::rPUBLIC);
-
- if (!parseParam(allowEntityTextType, declInputLevel, parm))
- return 0;
- Location typeLocation(currentLocation());
- Entity::DataType dataType = Entity::sgmlText;
- InternalTextEntity::Bracketed bracketed = InternalTextEntity::none;
- switch (parm.type) {
- case Param::reservedName + Syntax::rSYSTEM:
- case Param::reservedName + Syntax::rPUBLIC:
- return parseExternalEntity(name, declType, declInputLevel, parm);
- case Param::reservedName + Syntax::rCDATA:
- dataType = Entity::cdata;
- if (options().warnInternalCdataEntity)
- message(ParserMessages::internalCdataEntity);
- break;
- case Param::reservedName + Syntax::rSDATA:
- dataType = Entity::sdata;
- if (options().warnInternalSdataEntity)
- message(ParserMessages::internalSdataEntity);
- break;
- case Param::reservedName + Syntax::rPI:
- dataType = Entity::pi;
- if (options().warnPiEntity)
- message(ParserMessages::piEntity);
- break;
- case Param::reservedName + Syntax::rSTARTTAG:
- bracketed = InternalTextEntity::starttag;
- if (options().warnBracketEntity)
- message(ParserMessages::bracketEntity);
- break;
- case Param::reservedName + Syntax::rENDTAG:
- bracketed = InternalTextEntity::endtag;
- if (options().warnBracketEntity)
- message(ParserMessages::bracketEntity);
- break;
- case Param::reservedName + Syntax::rMS:
- bracketed = InternalTextEntity::ms;
- if (options().warnBracketEntity)
- message(ParserMessages::bracketEntity);
- break;
- case Param::reservedName + Syntax::rMD:
- bracketed = InternalTextEntity::md;
- if (options().warnBracketEntity)
- message(ParserMessages::bracketEntity);
- break;
- }
- if (parm.type != Param::paramLiteral) {
- if (!parseParam(allowParamLiteral, declInputLevel, parm))
- return 0;
- }
- Text text;
- parm.literalText.swap(text);
- if (bracketed != InternalTextEntity::none) {
- StringC open;
- StringC close;
- switch (bracketed) {
- case InternalTextEntity::starttag:
- open = syntax().delimGeneral(Syntax::dSTAGO);
- close = syntax().delimGeneral(Syntax::dTAGC);
- break;
- case InternalTextEntity::endtag:
- open = syntax().delimGeneral(Syntax::dETAGO);
- close = syntax().delimGeneral(Syntax::dTAGC);
- break;
- case InternalTextEntity::ms:
- open = syntax().delimGeneral(Syntax::dMDO);
- open += syntax().delimGeneral(Syntax::dDSO);
- close = syntax().delimGeneral(Syntax::dMSC);
- close += syntax().delimGeneral(Syntax::dMDC);
- break;
- case InternalTextEntity::md:
- open = syntax().delimGeneral(Syntax::dMDO);
- close = syntax().delimGeneral(Syntax::dMDC);
- break;
- default:
- CANNOT_HAPPEN();
- }
- text.insertChars(open, Location(new BracketOrigin(typeLocation,
- BracketOrigin::open),
- 0));
- text.addChars(close, Location(new BracketOrigin(typeLocation,
- BracketOrigin::close),
- 0));
- if (text.size() > syntax().litlen()
- && text.size() - open.size() - close.size() <= syntax().litlen())
- message(ParserMessages::bracketedLitlen,
- NumberMessageArg(syntax().litlen()));
- }
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- if (declType == Entity::parameterEntity
- && (dataType == Entity::cdata || dataType == Entity::sdata)) {
- message(ParserMessages::internalParameterDataEntity,
- StringMessageArg(name));
- return 1;
- }
- Ptr<Entity> entity;
- switch (dataType) {
- case Entity::cdata:
- entity = new InternalCdataEntity(name, markupLocation(), text);
- break;
- case Entity::sdata:
- entity = new InternalSdataEntity(name, markupLocation(), text);
- break;
- case Entity::pi:
- entity = new PiEntity(name, declType, markupLocation(), text);
- break;
- case Entity::sgmlText:
- entity = new InternalTextEntity(name, declType, markupLocation(), text, bracketed);
- break;
- default:
- CANNOT_HAPPEN();
- break;
- }
- maybeDefineEntity(entity);
- return 1;
-}
-
-Boolean Parser::parseExternalEntity(StringC &name,
- Entity::DeclType declType,
- unsigned declInputLevel,
- Param &parm)
-{
- static AllowedParams
- allowSystemIdentifierEntityTypeMdc(Param::systemIdentifier,
- Param::reservedName + Syntax::rSUBDOC,
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rSDATA,
- Param::reservedName + Syntax::rNDATA,
- Param::mdc);
- static AllowedParams
- allowEntityTypeMdc(Param::reservedName + Syntax::rSUBDOC,
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rSDATA,
- Param::reservedName + Syntax::rNDATA,
- Param::mdc);
-
- ExternalId id;
- if (!parseExternalId(allowSystemIdentifierEntityTypeMdc, allowEntityTypeMdc,
- 1, declInputLevel, parm, id))
- return 0;
- if (parm.type == Param::mdc) {
- maybeDefineEntity(new ExternalTextEntity(name, declType, markupLocation(),
- id));
- return 1;
- }
- Ptr<Entity> entity;
- if (parm.type == Param::reservedName + Syntax::rSUBDOC) {
- if (sd().subdoc() == 0)
- message(ParserMessages::subdocEntity, StringMessageArg(name));
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- entity = new SubdocEntity(name, markupLocation(), id);
- }
- else {
- Entity::DataType dataType;
- switch (parm.type) {
- case Param::reservedName + Syntax::rCDATA:
- dataType = Entity::cdata;
- if (options().warnExternalCdataEntity)
- message(ParserMessages::externalCdataEntity);
- break;
- case Param::reservedName + Syntax::rSDATA:
- dataType = Entity::sdata;
- if (options().warnExternalSdataEntity)
- message(ParserMessages::externalSdataEntity);
- break;
- case Param::reservedName + Syntax::rNDATA:
- dataType = Entity::ndata;
- break;
- default:
- CANNOT_HAPPEN();
- }
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- Ptr<Notation> notation(lookupCreateNotation(parm.token));
- if (!parseParam(allowDsoMdc, declInputLevel, parm))
- return 0;
- AttributeList attributes(notation->attributeDef());
- if (parm.type == Param::dso) {
- if (attributes.size() == 0)
- message(ParserMessages::notationNoAttributes,
- StringMessageArg(notation->name()));
- Boolean netEnabling;
- Ptr<AttributeDefinitionList> newAttDef;
- if (!parseAttributeSpec(1, attributes, netEnabling, newAttDef))
- return 0;
- if (!newAttDef.isNull()) {
- newAttDef->setIndex(defDtd().allocAttributeDefinitionListIndex());
- notation->setAttributeDef(newAttDef);
- }
- if (attributes.nSpec() == 0)
- message(ParserMessages::emptyDataAttributeSpec);
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- }
- else
- attributes.finish(*this);
- entity = new ExternalDataEntity(name, dataType, markupLocation(), id, notation,
- attributes);
- }
- if (declType == Entity::parameterEntity) {
- message(ParserMessages::externalParameterDataSubdocEntity,
- StringMessageArg(name));
- return 1;
- }
- maybeDefineEntity(entity);
- return 1;
-}
-
-Notation *Parser::lookupCreateNotation(const StringC &name)
-{
- Ptr<Notation> nt = defDtd().lookupNotation(name);
- if (nt.isNull()) {
- nt = new Notation(name, defDtd().namePointer(), defDtd().isBase());
- defDtd().insertNotation(nt);
- }
- return nt.pointer();
-}
-
-void Parser::maybeDefineEntity(const Ptr<Entity> &entity)
-{
- Dtd &dtd = defDtd();
- if (haveDefLpd())
- entity->setDeclIn(dtd.namePointer(),
- dtd.isBase(),
- defLpd().namePointer(),
- defLpd().active());
- else
- entity->setDeclIn(dtd.namePointer(), dtd.isBase());
- Boolean ignored = 0;
- if (entity->name().size() == 0) {
- const Entity *oldEntity = dtd.defaultEntity().pointer();
- if (oldEntity == 0
- || (!oldEntity->declInActiveLpd() && entity->declInActiveLpd()))
- dtd.setDefaultEntity(entity, *this);
- else {
- ignored = 1;
- if (options().warnDuplicateEntity)
- message(ParserMessages::duplicateEntityDeclaration,
- StringMessageArg(syntax().rniReservedName(Syntax::rDEFAULT)));
- }
- }
- else {
- Ptr<Entity> oldEntity = dtd.insertEntity(entity);
- if (oldEntity.isNull())
- entity->generateSystemId(*this);
- else if (oldEntity->defaulted()) {
- dtd.insertEntity(entity, 1);
- message(ParserMessages::defaultedEntityDefined,
- StringMessageArg(entity->name()));
- entity->generateSystemId(*this);
- }
- else {
- if (entity->declInActiveLpd() && !oldEntity->declInActiveLpd()) {
- dtd.insertEntity(entity, 1);
- entity->generateSystemId(*this);
- }
- else {
- ignored = 1;
- if (options().warnDuplicateEntity)
- message(entity->declType() == Entity::parameterEntity
- ? ParserMessages::duplicateParameterEntityDeclaration
- : ParserMessages::duplicateEntityDeclaration,
- StringMessageArg(entity->name()));
- }
- }
- }
- if (currentMarkup())
- eventHandler().entityDecl(new (eventAllocator())
- EntityDeclEvent(entity, ignored,
- markupLocation(),
- currentMarkup()));
-}
-
-Boolean Parser::parseShortrefDecl()
-{
- if (!defDtd().isBase())
- message(ParserMessages::shortrefOnlyInBaseDtd);
-
- unsigned declInputLevel = inputLevel();
- Param parm;
-
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- ShortReferenceMap *map = lookupCreateMap(parm.token);
- int valid = 1;
- if (map->defined()) {
- message(ParserMessages::duplicateShortrefDeclaration,
- StringMessageArg(parm.token),
- map->defLocation());
- valid = 0;
- }
- else
- map->setDefLocation(markupLocation());
- if (!parseParam(allowParamLiteral, declInputLevel, parm))
- return 0;
- Vector<StringC> vec;
- do {
- StringC delim(parm.literalText.string());
- const SubstTable<Char> *table = instanceSyntax().generalSubstTable();
- for (size_t i = 0; i < delim.size(); i++)
- table->subst(delim[i]);
- size_t srIndex;
- if (!defDtd().shortrefIndex(delim, instanceSyntax(), srIndex)) {
- message(ParserMessages::unknownShortrefDelim,
- StringMessageArg(prettifyDelim(delim)));
- valid = 0;
- }
- static AllowedParams allowEntityName(Param::entityName);
- if (!parseParam(allowEntityName, declInputLevel, parm))
- return 0;
- if (valid) {
- if (srIndex >= vec.size())
- vec.resize(srIndex + 1);
- if (vec[srIndex].size() > 0) {
- message(ParserMessages::delimDuplicateMap,
- StringMessageArg(prettifyDelim(delim)));
- valid = 0;
- }
- else
- parm.token.swap(vec[srIndex]);
- }
- static AllowedParams allowParamLiteralMdc(Param::paramLiteral, Param::mdc);
- if (!parseParam(allowParamLiteralMdc, declInputLevel, parm))
- return 0;
- } while (parm.type != Param::mdc);
- if (valid) {
- map->setNameMap(vec);
- if (currentMarkup())
- eventHandler().shortrefDecl(new (eventAllocator())
- ShortrefDeclEvent(map,
- currentDtdPointer(),
- markupLocation(),
- currentMarkup()));
- }
- return 1;
-}
-
-StringC Parser::prettifyDelim(const StringC &delim)
-{
- StringC prettyDelim;
- for (size_t i = 0; i < delim.size(); i++) {
- const StringC *nameP;
- if (syntax().charFunctionName(delim[i], nameP)) {
- prettyDelim += syntax().delimGeneral(Syntax::dCRO);
- prettyDelim += *nameP;
- prettyDelim += syntax().delimGeneral(Syntax::dREFC);
- }
- else
- prettyDelim += delim[i];
- }
- return prettyDelim;
-}
-
-ShortReferenceMap *Parser::lookupCreateMap(const StringC &name)
-{
- ShortReferenceMap *map = defDtd().lookupShortReferenceMap(name);
- if (!map) {
- map = new ShortReferenceMap(name);
- defDtd().insertShortReferenceMap(map);
- }
- return map;
-}
-
-Boolean Parser::parseUsemapDecl()
-{
- if (!inInstance() && !defDtd().isBase())
- message(ParserMessages::usemapOnlyInBaseDtd);
-
- unsigned declInputLevel = inputLevel();
- Param parm;
- static AllowedParams
- allowNameEmpty(Param::name,
- Param::indicatedReservedName + Syntax::rEMPTY);
- if (!parseParam(allowNameEmpty, declInputLevel, parm))
- return 0;
- const ShortReferenceMap *map;
- if (parm.type == Param::name) {
- if (inInstance()) {
- map = currentDtd().lookupShortReferenceMap(parm.token);
- if (!map)
- message(ParserMessages::undefinedShortrefMapInstance,
- StringMessageArg(parm.token));
- }
- else {
- ShortReferenceMap *tem = lookupCreateMap(parm.token);
- tem->setUsed();
- map = tem;
- }
- }
- else
- map = &theEmptyMap;
- static AllowedParams
- allowNameNameGroupMdc(Param::name, Param::nameGroup, Param::mdc);
- if (!parseParam(allowNameNameGroupMdc, declInputLevel, parm))
- return 0;
- if (parm.type != Param::mdc) {
- if (inInstance()) {
- message(ParserMessages::usemapAssociatedElementTypeInstance);
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- }
- else {
- Vector<const ElementType *> v;
- if (parm.type == Param::name) {
- ElementType *e = lookupCreateElement(parm.token);
- v.push_back(e);
- if (!e->map())
- e->setMap(map);
- }
- else {
- v.resize(parm.nameTokenVector.size());
- for (size_t i = 0; i < parm.nameTokenVector.size(); i++) {
- ElementType *e
- = lookupCreateElement(parm.nameTokenVector[i].name);
- v[i] = e;
- if (!e->map())
- e->setMap(map);
- }
- }
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- if (currentMarkup())
- eventHandler().usemap(new (eventAllocator())
- UsemapEvent(map, v,
- currentDtdPointer(),
- markupLocation(),
- currentMarkup()));
- }
- }
- else {
- if (!inInstance())
- message(ParserMessages::usemapAssociatedElementTypeDtd);
- else if (map) {
- if (map != &theEmptyMap && !map->defined())
- message(ParserMessages::undefinedShortrefMapInstance,
- StringMessageArg(map->name()));
- else {
- if (currentMarkup()) {
- Vector<const ElementType *> v;
- eventHandler().usemap(new (eventAllocator())
- UsemapEvent(map, v,
- currentDtdPointer(),
- markupLocation(),
- currentMarkup()));
- }
- currentElement().setMap(map);
- }
- }
- }
- return 1;
-}
-
-Boolean Parser::parseDoctypeDeclStart()
-{
- if (hadDtd() && !sd().concur() && !sd().explicitLink())
- message(ParserMessages::multipleDtds);
- if (hadLpd())
- message(ParserMessages::dtdAfterLpd);
- unsigned declInputLevel = inputLevel();
- Param parm;
-
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- StringC name;
- parm.token.swap(name);
- if (!lookupDtd(name).isNull())
- message(ParserMessages::duplicateDtd, StringMessageArg(name));
- static AllowedParams
- allowPublicSystemDsoMdc(Param::reservedName + Syntax::rPUBLIC,
- Param::reservedName + Syntax::rSYSTEM,
- Param::dso,
- Param::mdc);
- if (!parseParam(allowPublicSystemDsoMdc, declInputLevel, parm))
- return 0;
- ConstPtr<Entity> entity;
- if (parm.type == Param::reservedName + Syntax::rPUBLIC
- || parm.type == Param::reservedName + Syntax::rSYSTEM) {
- static AllowedParams allowSystemIdentifierDsoMdc(Param::systemIdentifier,
- Param::dso, Param::mdc);
- ExternalId id;
- if (!parseExternalId(allowSystemIdentifierDsoMdc, allowDsoMdc,
- 1, declInputLevel, parm, id))
- return 0;
- Ptr<Entity> tem
- = new ExternalTextEntity(name, Entity::doctype, markupLocation(), id);
- tem->generateSystemId(*this);
- entity = tem;
-#if 0
- eventHandler()
- .externalEntityDecl(new (eventAllocator())
- ExternalEntityDeclEvent(entity, 0));
-#endif
- }
- else if (parm.type == Param::mdc) {
- if (!sd().implydefElement()) {
- message(ParserMessages::noDtdSubset);
- enableImplydef();
- }
- }
- // Discard mdc or dso
- if (currentMarkup())
- currentMarkup()->resize(currentMarkup()->size() - 1);
- eventHandler().startDtd(new (eventAllocator())
- StartDtdEvent(name, entity, parm.type == Param::dso,
- markupLocation(),
- currentMarkup()));
- startDtd(name);
- if (parm.type == Param::mdc) {
- // unget the mdc
- currentInput()->ungetToken();
- if (entity.isNull()) {
- (void)parseDoctypeDeclEnd();
- return 1;
- }
- // reference the entity
- Ptr<EntityOrigin> origin
- = EntityOrigin::make(internalAllocator(), entity, currentLocation());
- entity->dsReference(*this, origin);
- if (inputLevel() == 1) { // reference failed
- (void)parseDoctypeDeclEnd();
- return 1;
- }
- }
- else if (!entity.isNull())
- setDsEntity(entity);
- setPhase(declSubsetPhase);
- return 1;
-}
-
-void Parser::implyDtd(const StringC &gi)
-{
- startMarkup(eventsWanted().wantPrologMarkup(), Location());
-#if 0
- if (currentMarkup()) {
- currentMarkup()->addDelim(Syntax::dMDO);
- currentMarkup()->addReservedName(Syntax::rDOCTYPE,
- syntax().reservedName(Syntax::rDOCTYPE));
- currentMarkup()->addS(syntax().space());
- currentMarkup()->addName(gi.data(), gi.size());
- }
-#endif
- if (sd().implydefElement() && !sd().implydefDoctype()) {
- eventHandler().startDtd(new (eventAllocator())
- StartDtdEvent(gi, ConstPtr<Entity>(), 0,
- markupLocation(),
- currentMarkup()));
- startDtd(gi);
- parseDoctypeDeclEnd(1);
- return;
- }
- ExternalId id;
- // The null location indicates that this is a fake entity.
- Entity *tem = new ExternalTextEntity(gi, Entity::doctype, Location(), id);
- ConstPtr<Entity> entity(tem);
- if (sd().implydefDoctype())
- tem->generateSystemId(*this);
- else {
- // Don't use Entity::generateSystemId because we don't want an error
- // if it fails.
- StringC str;
- if (!entityCatalog().lookup(*entity, syntax(), sd().internalCharset(),
- messenger(), str)) {
- message(ParserMessages::noDtd);
- enableImplydef();
- eventHandler().startDtd(new (eventAllocator())
- StartDtdEvent(gi, ConstPtr<Entity>(), 0,
- markupLocation(),
- currentMarkup()));
- startDtd(gi);
- parseDoctypeDeclEnd(1);
- return;
- }
- id.setEffectiveSystem(str);
-#if 0
- if (currentMarkup()) {
- currentMarkup()->addS(syntax().space());
- currentMarkup()->addReservedName(Syntax::rSYSTEM,
- syntax().reservedName(Syntax::rSYSTEM));
- }
-#endif
- entity = new ExternalTextEntity(gi,
- Entity::doctype,
- Location(),
- id);
- StringC declStr;
- declStr += syntax().delimGeneral(Syntax::dMDO);
- declStr += syntax().reservedName(Syntax::rDOCTYPE);
- declStr += syntax().space();
- declStr += gi;
- declStr += syntax().space();
- declStr += syntax().reservedName(Syntax::rSYSTEM);
- declStr += syntax().delimGeneral(Syntax::dMDC);
- message(ParserMessages::implyingDtd, StringMessageArg(declStr));
- }
- Ptr<EntityOrigin> origin
- = EntityOrigin::make(internalAllocator(), entity, currentLocation());
- eventHandler().startDtd(new (eventAllocator())
- StartDtdEvent(gi, entity, 0,
- markupLocation(),
- currentMarkup()));
- startDtd(gi);
- entity->dsReference(*this, origin);
- if (inputLevel() == 1)
- parseDoctypeDeclEnd(1);
- else
- setPhase(declSubsetPhase);
-}
-
-Boolean Parser::parseDoctypeDeclEnd(Boolean fake)
-{
- checkDtd(defDtd());
- Ptr<Dtd> tem(defDtdPointer());
- endDtd();
- if (fake) {
- startMarkup(eventsWanted().wantPrologMarkup(), Location());
-#if 0
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dMDC);
-#endif
- }
- else {
- startMarkup(eventsWanted().wantPrologMarkup(), currentLocation());
- Param parm;
- // End DTD before parsing final param so parameter entity reference
- // not allowed between ] and >.
- if (!parseParam(allowMdc, inputLevel(), parm))
- return 0;
- }
- eventHandler().endDtd(new (eventAllocator()) EndDtdEvent(tem,
- markupLocation(),
- currentMarkup()));
-#if 0
- if (fake) {
- Char c = syntax().standardFunction(Syntax::fRE);
- eventHandler().sSep(new (eventAllocator())
- SSepEvent(&c, 1, Location(), 1));
- }
-#endif
- return 1;
-}
-
-void Parser::checkDtd(Dtd &dtd)
-{
- if (dtd.isBase())
- addNeededShortrefs(dtd, instanceSyntax());
- if (sd().www() || !options().errorAfdr)
- addCommonAttributes(dtd);
- Dtd::ElementTypeIter elementIter(dtd.elementTypeIter());
- ElementType *p;
- ConstPtr<ElementDefinition> def;
- int i = 0;
- while ((p = elementIter.next()) != 0) {
- if (p->definition() == 0) {
- if (p->name() == dtd.name()) {
- if (validate() && !implydefElement())
- message(ParserMessages::documentElementUndefined);
- }
- else if (options().warnUndefinedElement)
- message(ParserMessages::dtdUndefinedElement, StringMessageArg(p->name()));
- if (def.isNull())
- def = new ElementDefinition(currentLocation(),
- size_t(ElementDefinition::undefinedIndex),
- 0,
- ElementDefinition::any);
- p->setElementDefinition(def, i++);
- }
- const ShortReferenceMap *map = p->map();
- if (map != 0 && map != &theEmptyMap && !map->defined()) {
- if (validate())
- message(ParserMessages::undefinedShortrefMapDtd,
- StringMessageArg(map->name()),
- StringMessageArg(p->name()));
- p->setMap(0);
- }
- }
- Dtd::ShortReferenceMapIter mapIter(dtd.shortReferenceMapIter());
- int nShortref = dtd.nShortref();
- for (;;) {
- ShortReferenceMap *map = mapIter.next();
- if (!map)
- break;
- Vector<ConstPtr<Entity> > entityMap(nShortref);
- for (i = 0; i < nShortref; i++) {
- const StringC *entityName = map->entityName(i);
- if (entityName) {
- ConstPtr<Entity> entity
- = lookupEntity(0, *entityName, map->defLocation(), 0);
- if (entity.isNull()) {
- setNextLocation(map->defLocation());
- message(ParserMessages::mapEntityUndefined,
- StringMessageArg(*entityName),
- StringMessageArg(map->name()));
- }
- else {
- if (entity->defaulted() && options().warnDefaultEntityReference) {
- setNextLocation(map->defLocation());
- message(ParserMessages::mapDefaultEntity,
- StringMessageArg(*entityName),
- StringMessageArg(map->name()));
- }
- entityMap[i] = entity;
- }
- }
- }
- map->setEntityMap(entityMap);
- if (options().warnUnusedMap && !map->used()) {
- setNextLocation(map->defLocation());
- message(ParserMessages::unusedMap, StringMessageArg(map->name()));
- }
- }
- if (options().warnUnusedParam) {
- Dtd::ConstEntityIter entityIter(((const Dtd &)dtd).parameterEntityIter());
- for (;;) {
- ConstPtr<Entity> entity(entityIter.next());
- if (entity.isNull())
- break;
- if (!entity->used() && !maybeStatusKeyword(*entity)) {
- setNextLocation(entity->defLocation());
- message(ParserMessages::unusedParamEntity,
- StringMessageArg(entity->name()));
- }
- }
- }
- if (!validate())
- return;
- Dtd::ConstEntityIter entityIter(((const Dtd &)dtd).generalEntityIter());
- for (;;) {
- ConstPtr<Entity> entity(entityIter.next());
- if (entity.isNull())
- break;
- const ExternalDataEntity *external = entity->asExternalDataEntity();
- if (external) {
- const Notation *notation = external->notation();
- if (!notation->defined()) {
- setNextLocation(external->defLocation());
- message(ParserMessages::entityNotationUndefined,
- StringMessageArg(notation->name()),
- StringMessageArg(external->name()));
- }
- }
- }
- Dtd::NotationIter notationIter(dtd.notationIter());
- for (;;) {
- ConstPtr<Notation> notation(notationIter.next());
- if (notation.isNull())
- break;
- if (!notation->defined() && !notation->attributeDef().isNull())
- message(ParserMessages::attlistNotationUndefined,
- StringMessageArg(notation->name()));
- }
-}
-
-void Parser::addCommonAttributes(Dtd &dtd)
-{
- Ptr<AttributeDefinitionList> commonAdl[2];
- {
- ElementType *e = dtd.removeElementType(syntax()
- .rniReservedName(Syntax::rALL));
- if (e) {
- commonAdl[0] = e->attributeDef();
- delete e;
- lookupCreateElement(syntax().rniReservedName(Syntax::rIMPLICIT));
- }
- }
- {
- Ptr<Notation> allNotation
- = dtd.removeNotation(syntax().rniReservedName(Syntax::rALL));
- if (!allNotation.isNull()) {
- commonAdl[1] = allNotation->attributeDef();
- lookupCreateNotation(syntax().rniReservedName(Syntax::rIMPLICIT));
- }
- }
- Dtd::ElementTypeIter elementIter(dtd.elementTypeIter());
- Dtd::NotationIter notationIter(dtd.notationIter());
- Vector<PackedBoolean> doneAdl(dtd.nAttributeDefinitionList(),
- PackedBoolean(0));
- for (int isNotation = 0; isNotation < 2; isNotation++) {
- if (!commonAdl[isNotation].isNull()) {
- doneAdl[commonAdl[isNotation]->index()] = 1;
- for (;;) {
- Attributed *a;
- if (!isNotation)
- a = elementIter.next();
- else
- a = notationIter.next().pointer();
- if (!a)
- break;
- Ptr<AttributeDefinitionList> adl = a->attributeDef();
- if (adl.isNull())
- a->setAttributeDef(commonAdl[isNotation]);
- else if (!doneAdl[adl->index()]) {
- doneAdl[adl->index()] = 1;
- for (size_t j = 0; j < commonAdl[isNotation]->size(); j++) {
- unsigned tem;
- if (!adl->attributeIndex(commonAdl[isNotation]->def(j)->name(),
- tem))
- adl->append(commonAdl[isNotation]->def(j)->copy());
- }
- }
- }
- }
- }
- {
- ElementType *e = dtd.removeElementType(syntax()
- .rniReservedName(Syntax::rIMPLICIT));
- if (e)
- dtd.setImplicitElementAttributeDef(e->attributeDef());
- delete e;
- }
- {
- Ptr<Notation> n
- = dtd.removeNotation(syntax().rniReservedName(Syntax::rIMPLICIT));
- if (!n.isNull())
- dtd.setImplicitNotationAttributeDef(n->attributeDef());
- }
-}
-
-Boolean Parser::maybeStatusKeyword(const Entity &entity)
-{
- const InternalEntity *internal = entity.asInternalEntity();
- if (!internal)
- return 0;
- const StringC &text = internal->string();
- static const Syntax::ReservedName statusKeywords[] = {
- Syntax::rINCLUDE, Syntax::rIGNORE
- };
- for (size_t i = 0; i < SIZEOF(statusKeywords); i++) {
- const StringC &keyword = instanceSyntax().reservedName(statusKeywords[i]);
- size_t j = 0;
- while (j < text.size() && instanceSyntax().isS(text[j]))
- j++;
- size_t k = 0;
- while (j < text.size()
- && k < keyword.size()
- && ((*instanceSyntax().generalSubstTable())[text[j]]
- == keyword[k]))
- j++, k++;
- if (k == keyword.size()) {
- while (j < text.size() && instanceSyntax().isS(text[j]))
- j++;
- if (j == text.size())
- return 1;
- }
- }
- return 0;
-}
-
-Boolean Parser::parseLinktypeDeclStart()
-{
- if (baseDtd().isNull())
- message(ParserMessages::lpdBeforeBaseDtd);
- unsigned declInputLevel = inputLevel();
- Param parm;
-
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- StringC name;
- parm.token.swap(name);
- if (!lookupDtd(name).isNull())
- message(ParserMessages::duplicateDtdLpd, StringMessageArg(name));
- else if (!lookupLpd(name).isNull())
- message(ParserMessages::duplicateLpd, StringMessageArg(name));
- static AllowedParams
- allowSimpleName(Param::indicatedReservedName + Syntax::rSIMPLE,
- Param::name);
- if (!parseParam(allowSimpleName, declInputLevel, parm))
- return 0;
- Boolean simple;
- Ptr<Dtd> sourceDtd;
- if (parm.type == Param::indicatedReservedName + Syntax::rSIMPLE) {
- simple = 1;
- sourceDtd = baseDtd();
- if (sourceDtd.isNull())
- sourceDtd = new Dtd(StringC(), 1);
- }
- else {
- simple = 0;
- sourceDtd = lookupDtd(parm.token);
- if (sourceDtd.isNull()) {
- message(ParserMessages::noSuchDtd, StringMessageArg(parm.token));
- sourceDtd = new Dtd(parm.token, 0);
- }
- }
- static AllowedParams
- allowImpliedName(Param::indicatedReservedName + Syntax::rIMPLIED,
- Param::name);
- if (!parseParam(allowImpliedName, declInputLevel, parm))
- return 0;
- Ptr<Dtd> resultDtd;
- Boolean implied = 0;
- if (parm.type == Param::indicatedReservedName + Syntax::rIMPLIED) {
- if (simple) {
- if (!sd().simpleLink())
- message(ParserMessages::simpleLinkFeature);
- }
- else {
- implied = 1;
- if (!sd().implicitLink())
- message(ParserMessages::implicitLinkFeature);
- }
- }
- else {
- if (simple)
- message(ParserMessages::simpleLinkResultNotImplied);
- else {
- if (!sd().explicitLink())
- message(ParserMessages::explicitLinkFeature);
- resultDtd = lookupDtd(parm.token);
- if (resultDtd.isNull())
- message(ParserMessages::noSuchDtd, StringMessageArg(parm.token));
- }
- }
- static AllowedParams
- allowPublicSystemDsoMdc(Param::reservedName + Syntax::rPUBLIC,
- Param::reservedName + Syntax::rSYSTEM,
- Param::dso,
- Param::mdc);
- if (!parseParam(allowPublicSystemDsoMdc, declInputLevel, parm))
- return 0;
- ConstPtr<Entity> entity;
- if (parm.type == Param::reservedName + Syntax::rPUBLIC
- || parm.type == Param::reservedName + Syntax::rSYSTEM) {
- static AllowedParams allowSystemIdentifierDsoMdc(Param::systemIdentifier,
- Param::dso, Param::mdc);
- ExternalId id;
- if (!parseExternalId(allowSystemIdentifierDsoMdc, allowDsoMdc,
- 1, declInputLevel, parm, id))
- return 0;
- Ptr<Entity> tem
- = new ExternalTextEntity(name, Entity::linktype, markupLocation(), id);
- tem->generateSystemId(*this);
- entity = tem;
-#if 0
- eventHandler()
- .externalEntityDecl(new (eventAllocator())
- ExternalEntityDeclEvent(entity, 0));
-#endif
- }
- Ptr<Lpd> lpd;
- if (simple)
- lpd = new SimpleLpd(name, markupLocation(), sourceDtd);
- else
- lpd = new ComplexLpd(name,
- implied ? Lpd::implicitLink : Lpd::explicitLink,
- markupLocation(),
- syntax(),
- sourceDtd,
- resultDtd);
- if (!baseDtd().isNull() && shouldActivateLink(name)) {
- size_t nActive = nActiveLink();
- if (simple) {
- size_t nSimple = 0;
- for (size_t i = 0; i < nActive; i++)
- if (activeLpd(i).type() == Lpd::simpleLink)
- nSimple++;
- if (nSimple == sd().simpleLink())
- message(ParserMessages::simpleLinkCount,
- NumberMessageArg(sd().simpleLink()));
- lpd->activate();
- }
- else {
- Boolean haveImplicit = 0;
- Boolean haveExplicit = 0;
- size_t i;
- for (i = 0; i < nActive; i++) {
- if (activeLpd(i).type() == Lpd::implicitLink)
- haveImplicit = 1;
- else if (activeLpd(i).type() == Lpd::explicitLink)
- haveExplicit = 1;
- }
- const Dtd *sourceDtd = lpd->sourceDtd().pointer();
- if (implied && haveImplicit)
- message(ParserMessages::oneImplicitLink);
- else if (sd().explicitLink() <= 1 && sourceDtd != baseDtd().pointer())
- message(sd().explicitLink() == 0
- ? ParserMessages::explicitNoRequiresSourceTypeBase
- : ParserMessages::explicit1RequiresSourceTypeBase,
- StringMessageArg(lpd->name()));
- else if (sd().explicitLink() == 1 && haveExplicit && !implied)
- message(ParserMessages::duplicateExplicitChain);
- else if (haveExplicit || haveImplicit
- || sourceDtd != baseDtd().pointer())
- message(ParserMessages::sorryLink, StringMessageArg(lpd->name()));
- else
- lpd->activate();
- }
- }
- // Discard mdc or dso
- if (currentMarkup())
- currentMarkup()->resize(currentMarkup()->size() - 1);
- eventHandler().startLpd(new (eventAllocator())
- StartLpdEvent(lpd->active(),
- name,
- entity,
- parm.type == Param::dso,
- markupLocation(),
- currentMarkup()));
- startLpd(lpd);
- if (parm.type == Param::mdc) {
- // unget the mdc
- currentInput()->ungetToken();
- if (entity.isNull()) {
- message(ParserMessages::noLpdSubset, StringMessageArg(name));
- (void)parseLinktypeDeclEnd();
- return 1;
- }
- // reference the entity
- Ptr<EntityOrigin> origin
- = EntityOrigin::make(internalAllocator(), entity, currentLocation());
- entity->dsReference(*this, origin);
- if (inputLevel() == 1) { // reference failed
- (void)parseLinktypeDeclEnd();
- return 1;
- }
- }
- else if (!entity.isNull())
- setDsEntity(entity);
- setPhase(declSubsetPhase);
- return 1;
-}
-
-Boolean Parser::parseLinktypeDeclEnd()
-{
-
- if (defLpd().type() != Lpd::simpleLink) {
- if (!defComplexLpd().initialLinkSet()->defined())
- message(ParserMessages::noInitialLinkSet,
- StringMessageArg(defLpd().name()));
- ComplexLpd::ConstLinkSetIter iter = defComplexLpd().linkSetIter();
- const LinkSet *linkSet;
- while ((linkSet = iter.next()) != 0)
- if (!linkSet->defined())
- message(ParserMessages::undefinedLinkSet, StringMessageArg(linkSet->name()));
- }
- ConstPtr<Lpd> tem(defLpdPointer());
- endLpd();
- startMarkup(eventsWanted().wantPrologMarkup(), currentLocation());
- Param parm;
- Boolean result = parseParam(allowMdc, inputLevel(), parm);
- eventHandler().endLpd(new (eventAllocator()) EndLpdEvent(tem,
- markupLocation(),
- currentMarkup()));
- return result;
-}
-
-Boolean Parser::parseLinkDecl()
-{
- return parseLinkSet(0);
-}
-
-Boolean Parser::parseIdlinkDecl()
-{
- return parseLinkSet(1);
-}
-
-// This will only get called if we're defining a complex lpd.
-
-Boolean Parser::parseLinkSet(Boolean idlink)
-{
- if (defLpd().type() == Lpd::simpleLink) {
- message(idlink ? ParserMessages::idlinkDeclSimple : ParserMessages::linkDeclSimple);
- return 0;
- }
- if (idlink) {
- if (defComplexLpd().hadIdLinkSet())
- message(ParserMessages::duplicateIdLinkSet);
- else
- defComplexLpd().setHadIdLinkSet();
- }
- unsigned declInputLevel = inputLevel();
- Param parm;
-
- Boolean isExplicit = (defLpd().type() == Lpd::explicitLink);
- LinkSet *linkSet;
- if (idlink) {
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- linkSet = 0;
- }
- else {
- static AllowedParams
- allowNameInitial(Param::name,
- Param::indicatedReservedName + Syntax::rINITIAL);
- if (!parseParam(allowNameInitial, declInputLevel, parm))
- return 0;
- if (parm.type == Param::name)
- linkSet = lookupCreateLinkSet(parm.token);
- else
- linkSet = defComplexLpd().initialLinkSet();
- if (linkSet->defined())
- message(ParserMessages::duplicateLinkSet, StringMessageArg(linkSet->name()));
- static AllowedParams
- allowExplicitLinkRule(Param::name,
- Param::nameGroup,
- Param::indicatedReservedName + Syntax::rIMPLIED);
- if (!parseParam(isExplicit ? allowExplicitLinkRule : allowNameNameGroup,
- declInputLevel, parm))
- return 0;
- }
-
- do {
- StringC id;
- if (idlink) {
- parm.token.swap(id);
- if (!parseParam(isExplicit ? allowExplicitLinkRuleMdc : allowNameNameGroupMdc,
- declInputLevel, parm))
- return 0;
- }
- if (parm.type == Param::indicatedReservedName + Syntax::rIMPLIED) {
- if (!parseParam(allowName, declInputLevel, parm))
- return 0;
- Boolean resultImplied;
- const ElementType *resultType;
- AttributeList resultAttributes;
- if (!parseResultElementSpec(declInputLevel,
- parm,
- idlink,
- resultImplied,
- resultType,
- resultAttributes))
- return 0;
- if (resultType) {
- const AttributeList *dummy;
- if (linkSet->impliedResultAttributes(resultType, dummy))
- message(ParserMessages::duplicateImpliedResult,
- StringMessageArg(resultType->name()));
- else
- linkSet->addImplied(resultType, resultAttributes);
- }
- }
- else {
- SourceLinkRule *linkRule = 0;
- IdLinkRule idLinkRule;
- Ptr<SourceLinkRuleResource> linkRuleResource;
- if (idlink)
- linkRule = &idLinkRule;
- else {
- linkRuleResource = new SourceLinkRuleResource;
- linkRule = linkRuleResource.pointer();
- }
- Vector<const ElementType *> assocElementTypes;
- if (parm.type == Param::name) {
- assocElementTypes.resize(1);
- assocElementTypes[0] = lookupCreateElement(parm.token);
- }
- else {
- assocElementTypes.resize(parm.nameTokenVector.size());
- for (size_t i = 0; i < assocElementTypes.size(); i++)
- assocElementTypes[i]
- = lookupCreateElement(parm.nameTokenVector[i].name);
- }
- static AllowedParams
- allow2i(Param::indicatedReservedName + Syntax::rUSELINK,
- Param::indicatedReservedName + Syntax::rPOSTLINK,
- Param::dso,
- Param::mdc,
- Param::name,
- Param::nameGroup);
- static AllowedParams
- allow2id(Param::indicatedReservedName + Syntax::rUSELINK,
- Param::indicatedReservedName + Syntax::rPOSTLINK,
- Param::dso,
- Param::mdc,
- Param::name);
- static AllowedParams
- allow2e(Param::indicatedReservedName + Syntax::rUSELINK,
- Param::indicatedReservedName + Syntax::rPOSTLINK,
- Param::dso,
- Param::name,
- Param::indicatedReservedName + Syntax::rIMPLIED);
-
- if (!parseParam(isExplicit
- ? allow2e
- : (idlink ? allow2id : allow2i), declInputLevel, parm))
- return 0;
- if (parm.type == Param::indicatedReservedName + Syntax::rUSELINK) {
- static AllowedParams
- allowLinkSetEmpty(Param::name,
- Param::indicatedReservedName + Syntax::rINITIAL,
- Param::indicatedReservedName + Syntax::rEMPTY);
- if (!parseParam(allowLinkSetEmpty, declInputLevel, parm))
- return 0;
- const LinkSet *uselink;
- if (parm.type == Param::name)
- uselink = lookupCreateLinkSet(parm.token);
- else if (parm.type == Param::indicatedReservedName + Syntax::rINITIAL)
- uselink = defComplexLpd().initialLinkSet();
- else
- uselink = defComplexLpd().emptyLinkSet();
- linkRule->setUselink(uselink);
- static AllowedParams
- allow3i(Param::indicatedReservedName + Syntax::rPOSTLINK,
- Param::dso,
- Param::mdc,
- Param::name,
- Param::nameGroup);
- static AllowedParams
- allow3id(Param::indicatedReservedName + Syntax::rPOSTLINK,
- Param::dso,
- Param::mdc,
- Param::name);
- static AllowedParams
- allow3e(Param::indicatedReservedName + Syntax::rPOSTLINK,
- Param::dso,
- Param::name,
- Param::indicatedReservedName + Syntax::rIMPLIED);
-
- if (!parseParam(isExplicit
- ? allow3e
- : (idlink ? allow3id : allow3i),
- declInputLevel, parm))
- return 0;
- }
- if (parm.type == Param::indicatedReservedName + Syntax::rPOSTLINK) {
- if (!parseParam(allowLinkSetSpec, declInputLevel, parm))
- return 0;
- const LinkSet *postlink;
- if (parm.type == Param::indicatedReservedName + Syntax::rRESTORE)
- linkRule->setPostlinkRestore();
- else {
- if (parm.type == Param::name)
- postlink = lookupCreateLinkSet(parm.token);
- else if (parm.type
- == Param::indicatedReservedName + Syntax::rINITIAL)
- postlink = defComplexLpd().initialLinkSet();
- else
- postlink = defComplexLpd().emptyLinkSet();
- linkRule->setPostlink(postlink);
- }
- static AllowedParams
- allow4i(Param::dso,
- Param::mdc,
- Param::name,
- Param::nameGroup);
- static AllowedParams
- allow4id(Param::dso,
- Param::mdc,
- Param::name);
- static AllowedParams
- allow4e(Param::dso,
- Param::name,
- Param::indicatedReservedName + Syntax::rIMPLIED);
- if (!parseParam(isExplicit
- ? allow4e
- : (idlink ? allow4id : allow4i),
- declInputLevel, parm))
- return 0;
- }
- AttributeList attributes;
- ConstPtr<AttributeDefinitionList> attDef;
- for (size_t i = 0; i < assocElementTypes.size(); i++) {
- const ElementType *e = assocElementTypes[i];
- if (e) {
- if (i == 0)
- attDef = defComplexLpd().attributeDef(e);
- else if (attDef != defComplexLpd().attributeDef(e))
- message(ParserMessages::assocElementDifferentAtts);
- // FIXME recover from this
- }
- }
- attributes.init(attDef);
-
- if (parm.type == Param::dso) {
- Boolean netEnabling;
- Ptr<AttributeDefinitionList> newAttDef;
- if (!parseAttributeSpec(1, attributes, netEnabling, newAttDef))
- return 0;
- if (!newAttDef.isNull()) {
- newAttDef->setIndex(defComplexLpd().allocAttributeDefinitionListIndex());
- for (size_t i = 0; i < assocElementTypes.size(); i++) {
- const ElementType *e = assocElementTypes[i];
- if (e && defComplexLpd().attributeDef(e) == attDef)
- defComplexLpd().setAttributeDef(e, newAttDef);
- }
- }
- static AllowedParams
- allow5e(Param::name,
- Param::indicatedReservedName + Syntax::rIMPLIED);
- if (!parseParam(isExplicit
- ? allow5e
- : (idlink ? allowNameMdc : allowNameNameGroupMdc),
- declInputLevel, parm))
- return 0;
- }
- else
- attributes.finish(*this);
- linkRule->setLinkAttributes(attributes);
- if (isExplicit) {
- Boolean resultImplied;
- const ElementType *resultType;
- AttributeList resultAttributes;
- if (!parseResultElementSpec(declInputLevel,
- parm,
- idlink,
- resultImplied,
- resultType,
- resultAttributes))
- return 0;
- if (!resultImplied)
- linkRule->setResult(resultType, resultAttributes);
- }
- // Install the link rule.
- if (idlink) {
- idLinkRule.setAssocElementTypes(assocElementTypes);
- addIdLinkRule(id, idLinkRule);
- }
- else {
- if (!linkSet->defined()) {
- for (size_t i = 0; i < assocElementTypes.size(); i++)
- if (assocElementTypes[i])
- addLinkRule(linkSet, assocElementTypes[i], linkRuleResource);
- }
- }
- }
- } while (parm.type != Param::mdc);
- if (linkSet)
- linkSet->setDefined();
- if (currentMarkup()) {
- if (idlink)
- eventHandler().idLinkDecl(new (eventAllocator())
- IdLinkDeclEvent(defComplexLpdPointer(),
- markupLocation(),
- currentMarkup()));
- else
- eventHandler().linkDecl(new (eventAllocator())
- LinkDeclEvent(linkSet,
- defComplexLpdPointer(),
- markupLocation(),
- currentMarkup()));
- }
- return 1;
-}
-
-void Parser::addIdLinkRule(const StringC &id,
- IdLinkRule &rule)
-{
- IdLinkRuleGroup *group = defComplexLpd().lookupCreateIdLink(id);
- size_t nRules = group->nLinkRules();
- if ((nRules == 1 && group->linkRule(0).attributes().nSpec() == 0)
- || nRules >= 1 && rule.attributes().nSpec() == 0)
- message(ParserMessages::multipleIdLinkRuleAttribute,
- StringMessageArg(id));
- group->addLinkRule(rule);
-}
-
-void Parser::addLinkRule(LinkSet *linkSet,
- const ElementType *sourceElement,
- const ConstPtr<SourceLinkRuleResource> &linkRule)
-{
- size_t nRules = linkSet->nLinkRules(sourceElement);
- if ((nRules == 1
- && linkSet->linkRule(sourceElement, 0).attributes().nSpec() == 0)
- || nRules >= 1 && linkRule->attributes().nSpec() == 0)
- message(ParserMessages::multipleLinkRuleAttribute,
- StringMessageArg(sourceElement->name()));
- linkSet->addLinkRule(sourceElement, linkRule);
-}
-
-class ResultAttributeSpecModeSetter {
-public:
- ResultAttributeSpecModeSetter(ParserState *state) : state_(state) {
- state_->setResultAttributeSpecMode();
- }
- ~ResultAttributeSpecModeSetter() { clear(); }
- void clear() {
- if (state_) {
- state_->clearResultAttributeSpecMode();
- state_ = 0;
- }
- }
-private:
- ParserState *state_;
-};
-
-Boolean Parser::parseResultElementSpec(unsigned declInputLevel,
- Param &parm,
- Boolean idlink,
- Boolean &implied,
- const ElementType *&resultType,
- AttributeList &attributes)
-{
- if (parm.type == Param::indicatedReservedName + Syntax::rIMPLIED) {
- if (!parseParam(idlink ? allowNameMdc : allowExplicitLinkRuleMdc,
- declInputLevel, parm))
- return 0;
- implied = 1;
- }
- else {
- implied = 0;
- ElementType *e = lookupResultElementType(parm.token);
- resultType = e;
- static AllowedParams
- allow(Param::dso,
- Param::mdc,
- Param::name,
- Param::nameGroup,
- Param::indicatedReservedName + Syntax::rIMPLIED);
- static AllowedParams
- allowNameDsoMdc(Param::dso,
- Param::mdc,
- Param::name);
- if (!parseParam(idlink ? allowNameDsoMdc : allow,
- declInputLevel, parm))
- return 0;
- ConstPtr<AttributeDefinitionList> attDef;
- if (e)
- attDef = e->attributeDef();
- attributes.init(attDef);
- if (parm.type == Param::dso) {
- ResultAttributeSpecModeSetter modeSetter(this);
- Boolean netEnabling;
- Ptr<AttributeDefinitionList> newAttDef;
- if (!parseAttributeSpec(1, attributes, netEnabling, newAttDef))
- return 0;
- if (!newAttDef.isNull()) {
- Ptr<Dtd> r(defComplexLpd().resultDtd());
- if (!r.isNull()) {
- newAttDef->setIndex(r->allocAttributeDefinitionListIndex());
- if (e)
- e->setAttributeDef(newAttDef);
- }
- }
- modeSetter.clear();
- if (attributes.nSpec() == 0)
- message(ParserMessages::emptyResultAttributeSpec);
- if (!parseParam(idlink ? allowNameMdc : allowExplicitLinkRuleMdc,
- declInputLevel, parm))
- return 0;
- }
- else {
- // For entity and notation attributes.
- ResultAttributeSpecModeSetter modeSetter(this);
- attributes.finish(*this);
- modeSetter.clear();
- }
- }
- return 1;
-}
-
-ElementType *Parser::lookupResultElementType(const StringC &name)
-{
- Dtd *dtd = defComplexLpd().resultDtd().pointer();
- if (!dtd)
- return 0;
- ElementType *e = dtd->lookupElementType(name);
- if (!e)
- message(ParserMessages::noSuchResultElement, StringMessageArg(name));
- return e;
-}
-
-Boolean Parser::parseUselinkDecl()
-{
- unsigned declInputLevel = inputLevel();
- Param parm;
- if (!parseParam(allowLinkSetSpec, declInputLevel, parm))
- return 0;
- Param parm2;
- if (!parseParam(allowName, declInputLevel, parm2))
- return 0;
- StringC linkType;
- parm2.token.swap(linkType);
- if (!parseParam(allowMdc, declInputLevel, parm2))
- return 0;
- ConstPtr<Lpd> lpd = lookupLpd(linkType);
- if (lpd.isNull())
- message(ParserMessages::uselinkBadLinkType, StringMessageArg(linkType));
- else if (lpd->type() == Lpd::simpleLink)
- message(ParserMessages::uselinkSimpleLpd, StringMessageArg(linkType));
- else {
- const ComplexLpd *complexLpd = (const ComplexLpd *)lpd.pointer();
- const LinkSet *linkSet;
- Boolean restore = 0;
- if (parm.type == Param::name) {
- linkSet = complexLpd->lookupLinkSet(parm.token);
- if (!linkSet) {
- message(ParserMessages::uselinkBadLinkSet,
- StringMessageArg(complexLpd->name()),
- StringMessageArg(parm.token));
- return 1;
- }
- }
- else if (parm.type == Param::indicatedReservedName + Syntax::rINITIAL)
- linkSet = complexLpd->initialLinkSet();
- else if (parm.type == Param::indicatedReservedName + Syntax::rEMPTY)
- linkSet = complexLpd->emptyLinkSet();
- else {
- linkSet = 0;
- restore = 1;
- }
- if (lpd->active())
- eventHandler().uselink(new (eventAllocator())
- UselinkEvent(lpd, linkSet,
- restore, markupLocation(),
- currentMarkup()));
- else
- eventHandler().ignoredMarkup(new (eventAllocator())
- IgnoredMarkupEvent(markupLocation(),
- currentMarkup()));
- }
- return 1;
-}
-
-LinkSet *Parser::lookupCreateLinkSet(const StringC &name)
-{
- LinkSet *linkSet = defComplexLpd().lookupLinkSet(name);
- if (!linkSet) {
- linkSet = new LinkSet(name, defComplexLpd().sourceDtd().pointer());
- defComplexLpd().insertLinkSet(linkSet);
- }
- return linkSet;
-}
-
-Boolean Parser::parseMarkedSectionDeclStart()
-{
- if (markedSectionLevel() == syntax().taglvl())
- message(ParserMessages::markedSectionLevel,
- NumberMessageArg(syntax().taglvl()));
- if (!inInstance()
- && options().warnInternalSubsetMarkedSection
- && inputLevel() == 1)
- message(ParserMessages::internalSubsetMarkedSection);
- if (markedSectionSpecialLevel() > 0) {
- startMarkedSection(markupLocation());
- if (inInstance()
- ? eventsWanted().wantMarkedSections()
- : eventsWanted().wantPrologMarkup())
- eventHandler().ignoredChars(new (eventAllocator())
- IgnoredCharsEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 0));
-
- return 1;
- }
- Boolean discardMarkup;
- if (startMarkup(inInstance()
- ? eventsWanted().wantMarkedSections()
- : eventsWanted().wantPrologMarkup(),
- currentLocation())) {
- currentMarkup()->addDelim(Syntax::dMDO);
- currentMarkup()->addDelim(Syntax::dDSO);
- discardMarkup = 0;
- }
- else if (options().warnInstanceStatusKeywordSpecS && inInstance()) {
- startMarkup(1, currentLocation());
- discardMarkup = 1;
- }
- unsigned declInputLevel = inputLevel();
- static AllowedParams allowStatusDso(Param::dso,
- Param::reservedName + Syntax::rCDATA,
- Param::reservedName + Syntax::rRCDATA,
- Param::reservedName + Syntax::rIGNORE,
- Param::reservedName + Syntax::rINCLUDE,
- Param::reservedName + Syntax::rTEMP);
- Param parm;
- MarkedSectionEvent::Status status = MarkedSectionEvent::include;
- if (!parseParam(allowStatusDso, declInputLevel, parm))
- return 0;
- if (options().warnMissingStatusKeyword && parm.type == Param::dso)
- message(ParserMessages::missingStatusKeyword);
- while (parm.type != Param::dso) {
- switch (parm.type) {
- case Param::reservedName + Syntax::rCDATA:
- if (status < MarkedSectionEvent::cdata)
- status = MarkedSectionEvent::cdata;
- break;
- case Param::reservedName + Syntax::rRCDATA:
- if (status < MarkedSectionEvent::rcdata)
- status = MarkedSectionEvent::rcdata;
- if (options().warnRcdataMarkedSection)
- message(ParserMessages::rcdataMarkedSection);
- break;
- case Param::reservedName + Syntax::rIGNORE:
- if (status < MarkedSectionEvent::ignore)
- status = MarkedSectionEvent::ignore;
- if (inInstance() && options().warnInstanceIgnoreMarkedSection)
- message(ParserMessages::instanceIgnoreMarkedSection);
- break;
- case Param::reservedName + Syntax::rINCLUDE:
- if (inInstance() && options().warnInstanceIncludeMarkedSection)
- message(ParserMessages::instanceIncludeMarkedSection);
- break;
- case Param::reservedName + Syntax::rTEMP:
- if (options().warnTempMarkedSection)
- message(ParserMessages::tempMarkedSection);
- break;
- }
- if (!parseParam(allowStatusDso, declInputLevel, parm))
- return 0;
- if (options().warnMultipleStatusKeyword
- && parm.type != Param::dso)
- message(ParserMessages::multipleStatusKeyword);
- }
- // FIXME this disallows
- // <!entity % e "include [ stuff ">
- // ...
- // <![ %e; ]]>
- // which I think is legal.
-
- if (inputLevel() > declInputLevel)
- message(ParserMessages::parameterEntityNotEnded);
- switch (status) {
- case MarkedSectionEvent::include:
- startMarkedSection(markupLocation());
- break;
- case MarkedSectionEvent::cdata:
- startSpecialMarkedSection(cmsMode, markupLocation());
- break;
- case MarkedSectionEvent::rcdata:
- startSpecialMarkedSection(rcmsMode, markupLocation());
- break;
- case MarkedSectionEvent::ignore:
- startSpecialMarkedSection(imsMode, markupLocation());
- break;
- }
- if (currentMarkup()) {
- if (options().warnInstanceStatusKeywordSpecS && inInstance()) {
- Location loc(markupLocation());
- for (MarkupIter iter(*currentMarkup()); iter.valid(); iter.advance(loc, syntaxPointer())) {
- if (iter.type() == Markup::s) {
- setNextLocation(loc);
- message(ParserMessages::instanceStatusKeywordSpecS);
- }
- }
- if (discardMarkup)
- startMarkup(0, markupLocation());
- }
- eventHandler().markedSectionStart(new (eventAllocator())
- MarkedSectionStartEvent(status,
- markupLocation(),
- currentMarkup()));
- }
- return 1;
-}
-
-void Parser::handleMarkedSectionEnd()
-{
- if (markedSectionLevel() == 0)
- message(ParserMessages::markedSectionEnd);
- else {
- if (inInstance()
- ? eventsWanted().wantMarkedSections()
- : eventsWanted().wantPrologMarkup()) {
- if (markedSectionSpecialLevel() > 1)
- eventHandler().ignoredChars(new (eventAllocator())
- IgnoredCharsEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 0));
- else {
- MarkedSectionEvent::Status status;
- switch (currentMode()) {
- case cmsMode:
- status = MarkedSectionEvent::cdata;
- break;
- case rcmsMode:
- status = MarkedSectionEvent::rcdata;
- break;
- case imsMode:
- status = MarkedSectionEvent::ignore;
- break;
- default:
- status = MarkedSectionEvent::include;
- break;
- }
- startMarkup(1, currentLocation());
- currentMarkup()->addDelim(Syntax::dMSC);
- currentMarkup()->addDelim(Syntax::dMDC);
- eventHandler().markedSectionEnd(new (eventAllocator())
- MarkedSectionEndEvent(status,
- markupLocation(),
- currentMarkup()));
- }
- }
- endMarkedSection();
- }
-}
-
-void Parser::emptyCommentDecl()
-{
- if (startMarkup(eventsWanted().wantCommentDecls(), currentLocation())) {
- currentMarkup()->addDelim(Syntax::dMDO);
- currentMarkup()->addDelim(Syntax::dMDC);
- eventHandler().commentDecl(new (eventAllocator())
- CommentDeclEvent(markupLocation(),
- currentMarkup()));
- }
- if (options().warnEmptyCommentDecl)
- message(ParserMessages::emptyCommentDecl);
-}
-
-Boolean Parser::parseCommentDecl()
-{
- if (startMarkup(inInstance()
- ? eventsWanted().wantCommentDecls()
- : eventsWanted().wantPrologMarkup(),
- currentLocation()))
- currentMarkup()->addDelim(Syntax::dMDO);
- if (!parseComment(comMode))
- return 0;
- for (;;) {
- Token token = getToken(mdMode);
- switch (token) {
- case tokenS:
- if (currentMarkup())
- currentMarkup()->addS(currentChar());
- if (options().warnCommentDeclS)
- message(ParserMessages::commentDeclS);
- break;
- case tokenCom:
- if (!parseComment(comMode))
- return 0;
- if (options().warnCommentDeclMultiple)
- message(ParserMessages::commentDeclMultiple);
- break;
- case tokenMdc:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dMDC);
- goto done;
- case tokenEe:
- message(ParserMessages::declarationLevel);
- return 0;
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- // braces to work round Sun C++ 4.0 bug
- {
- message(ParserMessages::commentDeclarationCharacter,
- StringMessageArg(currentToken()),
- markupLocation());
- }
- return 0;
- default:
- // braces to work round Sun C++ 4.0 bug
- {
- message(ParserMessages::commentDeclInvalidToken,
- TokenMessageArg(token, mdMode, syntaxPointer(), sdPointer()),
- markupLocation());
- }
- return 0;
- }
- }
- done:
- if (currentMarkup())
- eventHandler().commentDecl(new (eventAllocator())
- CommentDeclEvent(markupLocation(),
- currentMarkup()));
- return 1;
-}
-
-Boolean Parser::parseAfdrDecl()
-{
- unsigned declInputLevel = inputLevel();
- static AllowedParams allowMinimumLiteral(Param::minimumLiteral);
- Param parm;
- setHadAfdrDecl();
- if (!parseParam(allowMinimumLiteral, declInputLevel, parm))
- return 0;
- if (parm.literalText.string() != sd().execToInternal("ISO/IEC 10744:1997"))
- message(ParserMessages::afdrVersion,
- StringMessageArg(parm.literalText.string()));
- if (!parseParam(allowMdc, declInputLevel, parm))
- return 0;
- eventHandler().ignoredMarkup(new (eventAllocator())
- IgnoredMarkupEvent(markupLocation(),
- currentMarkup()));
- return 1;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseInstance.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseInstance.cxx
deleted file mode 100644
index 221afd9b91..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseInstance.cxx
+++ /dev/null
@@ -1,1414 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Parser.h"
-#include "ParserMessages.h"
-#include "MessageArg.h"
-#include "TokenMessageArg.h"
-#include "StringVectorMessageArg.h"
-#include "token.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-void Parser::doInstanceStart()
-{
- if (cancelled()) {
- allDone();
- return;
- }
- // FIXME check here that we have a valid dtd
- compileInstanceModes();
- setPhase(contentPhase);
- Token token = getToken(currentMode());
- switch (token) {
- case tokenEe:
- case tokenStagoNameStart:
- case tokenStagoTagc:
- case tokenStagoGrpo:
- case tokenEtagoNameStart:
- case tokenEtagoTagc:
- case tokenEtagoGrpo:
- break;
- default:
- if (sd().omittag()) {
- unsigned startImpliedCount = 0;
- unsigned attributeListIndex = 0;
- IList<Undo> undoList;
- IList<Event> eventList;
- if (!tryImplyTag(currentLocation(),
- startImpliedCount,
- attributeListIndex,
- undoList,
- eventList))
- CANNOT_HAPPEN();
- queueElementEvents(eventList);
- }
- else
- message(ParserMessages::instanceStartOmittag);
- }
- currentInput()->ungetToken();
-}
-
-void Parser::endInstance()
-{
- // Do checking before popping entity stack so that there's a
- // current location for error messages.
- endAllElements();
- while (markedSectionLevel() > 0) {
- message(ParserMessages::unclosedMarkedSection,
- currentMarkedSectionStartLocation());
- endMarkedSection();
- }
- checkIdrefs();
- popInputStack();
- allDone();
-}
-
-void Parser::checkIdrefs()
-{
- IdTableIter iter(idTableIter());
- Id *id;
- while ((id = iter.next()) != 0) {
- for (size_t i = 0; i < id->pendingRefs().size(); i++) {
- Messenger::setNextLocation(id->pendingRefs()[i]);
- message(ParserMessages::missingId, StringMessageArg(id->name()));
- }
- }
-}
-
-void Parser::doContent()
-{
- do {
- if (cancelled()) {
- allDone();
- return;
- }
- Token token = getToken(currentMode());
- switch (token) {
- case tokenEe:
- if (inputLevel() == 1) {
- endInstance();
- return;
- }
- if (inputLevel() == specialParseInputLevel()) {
- // FIXME have separate messages for each type of special parse
- // perhaps force end of marked section or element
- message(ParserMessages::specialParseEntityEnd);
- }
- if (eventsWanted().wantInstanceMarkup())
- eventHandler().entityEnd(new (eventAllocator())
- EntityEndEvent(currentLocation()));
- if (afterDocumentElement())
- message(ParserMessages::afterDocumentElementEntityEnd);
- if (sd().integrallyStored()
- && tagLevel()
- && currentElement().index() != currentInputElementIndex())
- message(ParserMessages::contentAsyncEntityRef);
- popInputStack();
- break;
- case tokenCroDigit:
- case tokenHcroHexDigit:
- {
- if (afterDocumentElement())
- message(ParserMessages::characterReferenceAfterDocumentElement);
- Char ch;
- Location loc;
- if (parseNumericCharRef(token == tokenHcroHexDigit, ch, loc)) {
- acceptPcdata(loc);
- noteData();
- Boolean isSgmlChar;
- if (!translateNumericCharRef(ch, isSgmlChar))
- break;
- if (!isSgmlChar) {
- eventHandler().nonSgmlChar(new (eventAllocator())
- NonSgmlCharEvent(ch, loc));
- break;
- }
- eventHandler().data(new (eventAllocator())
- ImmediateDataEvent(Event::characterData,
- &ch, 1, loc, 1));
- break;
- }
- }
- break;
- case tokenCroNameStart:
- if (afterDocumentElement())
- message(ParserMessages::characterReferenceAfterDocumentElement);
- parseNamedCharRef();
- break;
- case tokenEroGrpo:
- case tokenEroNameStart:
- {
- if (afterDocumentElement())
- message(ParserMessages::entityReferenceAfterDocumentElement);
- ConstPtr<Entity> entity;
- Ptr<EntityOrigin> origin;
- if (parseEntityReference(0, token == tokenEroGrpo, entity, origin)) {
- if (!entity.isNull()) {
- if (entity->isCharacterData())
- acceptPcdata(Location(origin.pointer(), 0));
- if (inputLevel() == specialParseInputLevel())
- entity->rcdataReference(*this, origin);
- else
- entity->contentReference(*this, origin);
- }
- }
- }
- break;
- case tokenEtagoNameStart:
- acceptEndTag(parseEndTag());
- break;
- case tokenEtagoTagc:
- parseEmptyEndTag();
- break;
- case tokenEtagoGrpo:
- parseGroupEndTag();
- break;
- case tokenMdoNameStart:
- if (startMarkup(eventsWanted().wantInstanceMarkup(), currentLocation()))
- currentMarkup()->addDelim(Syntax::dMDO);
- Syntax::ReservedName name;
- Boolean result;
- unsigned startLevel;
- startLevel = inputLevel();
- if (parseDeclarationName(&name)) {
- switch (name) {
- case Syntax::rUSEMAP:
- if (afterDocumentElement())
- message(ParserMessages::declarationAfterDocumentElement,
- StringMessageArg(syntax().reservedName(name)));
- result = parseUsemapDecl();
- break;
- case Syntax::rUSELINK:
- if (afterDocumentElement())
- message(ParserMessages::declarationAfterDocumentElement,
- StringMessageArg(syntax().reservedName(name)));
- result = parseUselinkDecl();
- break;
- case Syntax::rDOCTYPE:
- case Syntax::rLINKTYPE:
- case Syntax::rELEMENT:
- case Syntax::rATTLIST:
- case Syntax::rENTITY:
- case Syntax::rNOTATION:
- case Syntax::rSHORTREF:
- case Syntax::rLINK:
- case Syntax::rIDLINK:
- message(ParserMessages::instanceDeclaration,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- break;
- default:
- message(ParserMessages::noSuchDeclarationType,
- StringMessageArg(syntax().reservedName(name)));
- result = 0;
- break;
- }
- }
- else
- result = 0;
- if (!result)
- skipDeclaration(startLevel);
- noteMarkup();
- break;
- case tokenMdoMdc:
- // empty comment
- emptyCommentDecl();
- noteMarkup();
- break;
- case tokenMdoCom:
- parseCommentDecl();
- noteMarkup();
- break;
- case tokenMdoDso:
- if (afterDocumentElement())
- message(ParserMessages::markedSectionAfterDocumentElement);
- parseMarkedSectionDeclStart();
- noteMarkup();
- break;
- case tokenMscMdc:
- handleMarkedSectionEnd();
- noteMarkup();
- break;
- case tokenNet:
- parseNullEndTag();
- break;
- case tokenPio:
- parseProcessingInstruction();
- break;
- case tokenStagoNameStart:
- parseStartTag();
- break;
- case tokenStagoTagc:
- parseEmptyStartTag();
- break;
- case tokenStagoGrpo:
- parseGroupStartTag();
- break;
- case tokenRe:
- acceptPcdata(currentLocation());
- queueRe(currentLocation());
- break;
- case tokenRs:
- acceptPcdata(currentLocation());
- noteRs();
- if (eventsWanted().wantInstanceMarkup())
- eventHandler().ignoredRs(new (eventAllocator())
- IgnoredRsEvent(currentChar(),
- currentLocation()));
- break;
- case tokenS:
- extendContentS();
- if (eventsWanted().wantInstanceMarkup())
- eventHandler().sSep(new (eventAllocator())
- SSepEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 0));
- break;
- case tokenIgnoredChar:
- extendData();
- if (eventsWanted().wantMarkedSections())
- eventHandler().ignoredChars(new (eventAllocator())
- IgnoredCharsEvent(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 0));
- break;
- case tokenUnrecognized:
- reportNonSgmlCharacter();
- parsePcdata();
- break;
- case tokenCharDelim:
- message(ParserMessages::dataCharDelim,
- StringMessageArg(StringC(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength())));
- // fall through
- case tokenChar:
- parsePcdata();
- break;
- default:
- ASSERT(token >= tokenFirstShortref);
- handleShortref(token - tokenFirstShortref);
- break;
- }
- } while (eventQueueEmpty());
-}
-
-void Parser::skipDeclaration(unsigned startLevel)
-{
- const unsigned skipMax = 250;
- unsigned skipCount = 0;
- for (;;) {
- Token token = getToken(mdMode);
- if (inputLevel() == startLevel)
- skipCount++;
- switch (token) {
- case tokenUnrecognized:
- (void)getChar();
- break;
- case tokenEe:
- if (inputLevel() <= startLevel)
- return;
- popInputStack();
- return;
- case tokenMdc:
- if (inputLevel() == startLevel)
- return;
- break;
- case tokenS:
- if (inputLevel() == startLevel && skipCount >= skipMax
- && currentChar() == syntax().standardFunction(Syntax::fRE))
- return;
- break;
- default:
- break;
- }
- }
-}
-
-void Parser::handleShortref(int index)
-{
- const ConstPtr<Entity> &entity
- = currentElement().map()->entity(index);
- if (!entity.isNull()) {
- Owner<Markup> markupPtr;
- if (eventsWanted().wantInstanceMarkup()) {
- markupPtr = new Markup;
- markupPtr->addShortref(currentInput());
- }
- Ptr<EntityOrigin> origin
- = EntityOrigin::make(internalAllocator(),
- entity,
- currentLocation(),
- currentInput()->currentTokenLength(),
- markupPtr);
- entity->contentReference(*this, origin);
- return;
- }
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- const Char *s = in->currentTokenStart();
- size_t i = 0;
- if (currentMode() == econMode || currentMode() == econnetMode) {
- // FIXME do this in advance (what about B sequence?)
- for (i = 0; i < length && syntax().isS(s[i]); i++)
- ;
- if (i > 0 && eventsWanted().wantInstanceMarkup())
- eventHandler().sSep(new (eventAllocator())
- SSepEvent(s, i, currentLocation(), 0));
- }
- if (i < length) {
- Location location(currentLocation());
- location += i;
- s += i;
- length -= i;
- acceptPcdata(location);
- if (sd().keeprsre()) {
- noteData();
- eventHandler().data(new (eventAllocator())
- ImmediateDataEvent(Event::characterData, s, length,
- location, 0));
- return;
- }
- // FIXME speed this up
- for (; length > 0; location += 1, length--, s++) {
- if (*s == syntax().standardFunction(Syntax::fRS)) {
- noteRs();
- if (eventsWanted().wantInstanceMarkup())
- eventHandler().ignoredRs(new (eventAllocator())
- IgnoredRsEvent(*s, location));
- }
- else if (*s == syntax().standardFunction(Syntax::fRE))
- queueRe(location);
- else {
- noteData();
- eventHandler().data(new (eventAllocator())
- ImmediateDataEvent(Event::characterData, s, 1,
- location, 0));
- }
- }
- }
-}
-
-void Parser::parsePcdata()
-{
- extendData();
- acceptPcdata(currentLocation());
- noteData();
- eventHandler().data(new (eventAllocator())
- ImmediateDataEvent(Event::characterData,
- currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation(),
- 0));
-}
-
-void Parser::parseStartTag()
-{
- InputSource *in = currentInput();
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- in->currentLocation());
- in->discardInitial();
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- if (markup) {
- markup->addDelim(Syntax::dSTAGO);
- markup->addName(in);
- }
- StringC &name = nameBuffer();
- getCurrentToken(syntax().generalSubstTable(), name);
- ElementType *e = currentDtdNonConst().lookupElementType(name);
- if (sd().rank()) {
- if (!e)
- e = completeRankStem(name);
- else if (e->isRankedElement())
- handleRankedElement(e);
- }
- if (!e)
- e = lookupCreateUndefinedElement(name, currentLocation(), currentDtdNonConst());
- Boolean netEnabling;
- AttributeList *attributes = allocAttributeList(e->attributeDef(), 0);
- Token closeToken = getToken(tagMode);
- if (closeToken == tokenTagc) {
- if (name.size() > syntax().taglen())
- checkTaglen(markupLocation().index());
- attributes->finish(*this);
- netEnabling = 0;
- if (markup)
- markup->addDelim(Syntax::dTAGC);
- }
- else {
- in->ungetToken();
- Ptr<AttributeDefinitionList> newAttDef;
- if (parseAttributeSpec(0, *attributes, netEnabling, newAttDef)) {
- // The difference between the indices will be the difference
- // in offsets plus 1 for each named character reference.
- if (in->currentLocation().index() - markupLocation().index()
- > syntax().taglen())
- checkTaglen(markupLocation().index());
- }
- else
- netEnabling = 0;
- if (!newAttDef.isNull()) {
- newAttDef->setIndex(currentDtdNonConst().allocAttributeDefinitionListIndex());
- e->setAttributeDef(newAttDef);
- }
- }
- acceptStartTag(e,
- new (eventAllocator())
- StartElementEvent(e,
- currentDtdPointer(),
- attributes,
- markupLocation(),
- markup),
- netEnabling);
-}
-
-ElementType *Parser::completeRankStem(const StringC &name)
-{
- const RankStem *rankStem = currentDtd().lookupRankStem(name);
- if (rankStem) {
- StringC name(rankStem->name());
- if (!appendCurrentRank(name, rankStem))
- message(ParserMessages::noCurrentRank, StringMessageArg(name));
- else
- return currentDtdNonConst().lookupElementType(name);
- }
- return 0;
-}
-
-void Parser::handleRankedElement(const ElementType *e)
-{
- StringC rankSuffix(e->definition()->rankSuffix());
- const RankStem *rankStem = e->rankedElementRankStem();
- for (size_t i = 0; i < rankStem->nDefinitions(); i++) {
- const ElementDefinition *def = rankStem->definition(i);
- for (size_t j = 0; j < def->nRankStems(); j++)
- setCurrentRank(def->rankStem(j), rankSuffix);
- }
-}
-
-void Parser::checkTaglen(Index tagStartIndex)
-{
- const InputSourceOrigin *origin
- = currentLocation().origin()->asInputSourceOrigin();
- ASSERT(origin != 0);
- if (origin->startOffset(currentLocation().index())
- - origin->startOffset(tagStartIndex
- + syntax().delimGeneral(Syntax::dSTAGO).size())
- > syntax().taglen())
- message(ParserMessages::taglen, NumberMessageArg(syntax().taglen()));
-}
-
-void Parser::parseEmptyStartTag()
-{
- if (options().warnEmptyTag)
- message(ParserMessages::emptyStartTag);
- // FIXME error if not in base.
- const ElementType *e = 0;
- if (!sd().omittag())
- e = lastEndedElementType();
- else if (tagLevel() > 0)
- e = currentElement().type();
- if (!e)
- e = currentDtd().documentElementType();
- AttributeList *attributes = allocAttributeList(e->attributeDef(), 0);
- attributes->finish(*this);
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- currentLocation());
- if (markup) {
- markup->addDelim(Syntax::dSTAGO);
- markup->addDelim(Syntax::dTAGC);
- }
- acceptStartTag(e,
- new (eventAllocator())
- StartElementEvent(e,
- currentDtdPointer(),
- attributes,
- markupLocation(),
- markup),
- 0);
-}
-
-void Parser::parseGroupStartTag()
-{
- if (startMarkup(eventsWanted().wantInstanceMarkup(), currentLocation())) {
- currentMarkup()->addDelim(Syntax::dSTAGO);
- currentMarkup()->addDelim(Syntax::dGRPO);
- }
- Boolean active;
- if (!parseTagNameGroup(active))
- return;
- InputSource *in = currentInput();
- // Location startLocation = in->currentLocation();
- in->startToken();
- Xchar c = in->tokenChar(messenger());
- if (!syntax().isNameStartCharacter(c)) {
- message(ParserMessages::startTagMissingName);
- return;
- }
- in->discardInitial();
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- skipAttributeSpec();
- if (currentMarkup())
- eventHandler().ignoredMarkup(new (eventAllocator())
- IgnoredMarkupEvent(markupLocation(),
- currentMarkup()));
- noteMarkup();
-}
-
-void Parser::parseGroupEndTag()
-{
- if (startMarkup(eventsWanted().wantInstanceMarkup(), currentLocation())) {
- currentMarkup()->addDelim(Syntax::dSTAGO);
- currentMarkup()->addDelim(Syntax::dGRPO);
- }
- Boolean active;
- if (!parseTagNameGroup(active))
- return;
- InputSource *in = currentInput();
- // Location startLocation = in->currentLocation();
- in->startToken();
- Xchar c = in->tokenChar(messenger());
- if (!syntax().isNameStartCharacter(c)) {
- message(ParserMessages::endTagMissingName);
- return;
- }
- in->discardInitial();
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- parseEndTagClose();
- if (currentMarkup())
- eventHandler().ignoredMarkup(new (eventAllocator())
- IgnoredMarkupEvent(markupLocation(),
- currentMarkup()));
- noteMarkup();
-}
-
-void Parser::acceptPcdata(const Location &startLocation)
-{
- if (currentElement().tryTransitionPcdata())
- return;
- // Need to test here since implying tags may turn off pcdataRecovering.
- if (pcdataRecovering())
- return;
- IList<Undo> undoList;
- IList<Event> eventList;
- unsigned startImpliedCount = 0;
- unsigned attributeListIndex = 0;
- keepMessages();
- while (tryImplyTag(startLocation, startImpliedCount, attributeListIndex,
- undoList, eventList))
- if (currentElement().tryTransitionPcdata()) {
- queueElementEvents(eventList);
- return;
- }
- discardKeptMessages();
- undo(undoList);
- if (validate() || afterDocumentElement())
- message(ParserMessages::pcdataNotAllowed);
- pcdataRecover();
-}
-
-void Parser::acceptStartTag(const ElementType *e,
- StartElementEvent *event,
- Boolean netEnabling)
-{
- if (e->definition()->undefined() && !implydefElement())
- message(ParserMessages::undefinedElement, StringMessageArg(e->name()));
- if (elementIsExcluded(e)) {
- keepMessages();
- if (validate())
- checkExclusion(e);
- }
- else {
- if (currentElement().tryTransition(e)) {
- pushElementCheck(e, event, netEnabling);
- return;
- }
- if (elementIsIncluded(e)) {
- event->setIncluded();
- pushElementCheck(e, event, netEnabling);
- return;
- }
- keepMessages();
- }
- IList<Undo> undoList;
- IList<Event> eventList;
- unsigned startImpliedCount = 0;
- unsigned attributeListIndex = 1;
- while (tryImplyTag(event->location(), startImpliedCount,
- attributeListIndex, undoList, eventList))
- if (tryStartTag(e, event, netEnabling, eventList))
- return;
- discardKeptMessages();
- undo(undoList);
- if (validate() && !e->definition()->undefined())
- handleBadStartTag(e, event, netEnabling);
- else {
- if (validate() ? implydefElement() : afterDocumentElement())
- message(ParserMessages::elementNotAllowed, StringMessageArg(e->name()));
- // If element couldn't occur because it was excluded, then
- // do the transition here.
- (void)currentElement().tryTransition(e);
- pushElementCheck(e, event, netEnabling);
- }
-}
-
-void Parser::undo(IList<Undo> &undoList)
-{
- while (!undoList.empty()) {
- Undo *p = undoList.get();
- p->undo(this);
- delete p;
- }
-}
-
-void Parser::queueElementEvents(IList<Event> &events)
-{
- releaseKeptMessages();
- // FIXME provide IList<T>::reverse function
- // reverse it
- IList<Event> tem;
- while (!events.empty())
- tem.insert(events.get());
- while (!tem.empty()) {
- Event *e = tem.get();
- if (e->type() == Event::startElement) {
- noteStartElement(((StartElementEvent *)e)->included());
- eventHandler().startElement((StartElementEvent *)e);
- }
- else {
- noteEndElement(((EndElementEvent *)e)->included());
- eventHandler().endElement((EndElementEvent *)e);
- }
- }
-
-}
-
-void Parser::checkExclusion(const ElementType *e)
-{
- const LeafContentToken *token = currentElement().invalidExclusion(e);
- if (token)
- message(ParserMessages::invalidExclusion,
- OrdinalMessageArg(token->typeIndex() + 1),
- StringMessageArg(token->elementType()->name()),
- StringMessageArg(currentElement().type()->name()));
-}
-
-Boolean Parser::tryStartTag(const ElementType *e,
- StartElementEvent *event,
- Boolean netEnabling,
- IList<Event> &impliedEvents)
-{
- if (elementIsExcluded(e)) {
- checkExclusion(e);
- return 0;
- }
- if (currentElement().tryTransition(e)) {
- queueElementEvents(impliedEvents);
- pushElementCheck(e, event, netEnabling);
- return 1;
- }
- if (elementIsIncluded(e)) {
- queueElementEvents(impliedEvents);
- event->setIncluded();
- pushElementCheck(e, event, netEnabling);
- return 1;
- }
- return 0;
-}
-
-Boolean Parser::tryImplyTag(const Location &loc,
- unsigned &startImpliedCount,
- unsigned &attributeListIndex,
- IList<Undo> &undo,
- IList<Event> &eventList)
-{
- if (!sd().omittag())
- return 0;
- if (currentElement().isFinished()) {
- if (tagLevel() == 0)
- return 0;
-#if 1
- const ElementDefinition *def = currentElement().type()->definition();
- if (def && !def->canOmitEndTag())
- return 0;
-#endif
- // imply an end tag
- if (startImpliedCount > 0) {
- message(ParserMessages::startTagEmptyElement,
- StringMessageArg(currentElement().type()->name()));
- startImpliedCount--;
- }
-#if 0
- const ElementDefinition *def = currentElement().type()->definition();
- if (def && !def->canOmitEndTag())
- message(ParserMessages::omitEndTagDeclare,
- StringMessageArg(currentElement().type()->name()),
- currentElement().startLocation());
-#endif
- EndElementEvent *event
- = new (eventAllocator()) EndElementEvent(currentElement().type(),
- currentDtdPointer(),
- loc,
- 0);
- eventList.insert(event);
- undo.insert(new (internalAllocator()) UndoEndTag(popSaveElement()));
- return 1;
- }
- const LeafContentToken *token = currentElement().impliedStartTag();
- if (!token)
- return 0;
- const ElementType *e = token->elementType();
- if (elementIsExcluded(e))
- message(ParserMessages::requiredElementExcluded,
- OrdinalMessageArg(token->typeIndex() + 1),
- StringMessageArg(e->name()),
- StringMessageArg(currentElement().type()->name()));
- if (tagLevel() != 0)
- undo.insert(new (internalAllocator())
- UndoTransition(currentElement().matchState()));
- currentElement().doRequiredTransition();
- const ElementDefinition *def = e->definition();
- if (def->declaredContent() != ElementDefinition::modelGroup
- && def->declaredContent() != ElementDefinition::any)
- message(ParserMessages::omitStartTagDeclaredContent,
- StringMessageArg(e->name()));
- if (def->undefined())
- message(ParserMessages::undefinedElement, StringMessageArg(e->name()));
- else if (!def->canOmitStartTag())
- message(ParserMessages::omitStartTagDeclare, StringMessageArg(e->name()));
- AttributeList *attributes
- = allocAttributeList(e->attributeDef(),
- attributeListIndex++);
- // this will give an error if the element has a required attribute
- attributes->finish(*this);
- startImpliedCount++;
- StartElementEvent *event
- = new (eventAllocator()) StartElementEvent(e,
- currentDtdPointer(),
- attributes,
- loc,
- 0);
- pushElementCheck(e, event, undo, eventList);
- const int implyCheckLimit = 30; // this is fairly arbitrary
- if (startImpliedCount > implyCheckLimit
- && !checkImplyLoop(startImpliedCount))
- return 0;
- return 1;
-}
-
-void Parser::pushElementCheck(const ElementType *e, StartElementEvent *event,
- Boolean netEnabling)
-{
- if (tagLevel() == syntax().taglvl())
- message(ParserMessages::taglvlOpenElements, NumberMessageArg(syntax().taglvl()));
- noteStartElement(event->included());
- if (event->mustOmitEnd()) {
- if (sd().emptyElementNormal()) {
- Boolean included = event->included();
- Location loc(event->location());
- eventHandler().startElement(event);
- endTagEmptyElement(e, netEnabling, included, loc);
- }
- else {
- EndElementEvent *end
- = new (eventAllocator()) EndElementEvent(e,
- currentDtdPointer(),
- event->location(),
- 0);
- if (event->included()) {
- end->setIncluded();
- noteEndElement(1);
- }
- else
- noteEndElement(0);
- eventHandler().startElement(event);
- eventHandler().endElement(end);
- }
- }
- else {
- const ShortReferenceMap *map = e->map();
- if (!map)
- map = currentElement().map();
- pushElement(new (internalAllocator()) OpenElement(e,
- netEnabling,
- event->included(),
- map,
- event->location()));
- // Can't access event after it's passed to the event handler.
- eventHandler().startElement(event);
- }
-}
-
-void Parser::endTagEmptyElement(const ElementType *e,
- Boolean netEnabling,
- Boolean included,
- const Location &startLoc)
-{
- Token token = getToken(netEnabling ? econnetMode : econMode);
- switch (token) {
- case tokenNet:
- if (netEnabling) {
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- currentLocation());
- if (markup)
- markup->addDelim(Syntax::dNET);
- EndElementEvent *end
- = new (eventAllocator()) EndElementEvent(e,
- currentDtdPointer(),
- currentLocation(),
- markup);
- if (included)
- end->setIncluded();
- eventHandler().endElement(end);
- noteEndElement(included);
- return;
- }
- break;
- case tokenEtagoTagc:
- {
- if (options().warnEmptyTag)
- message(ParserMessages::emptyEndTag);
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- currentLocation());
- if (markup) {
- markup->addDelim(Syntax::dETAGO);
- markup->addDelim(Syntax::dTAGC);
- }
- EndElementEvent *end
- = new (eventAllocator()) EndElementEvent(e,
- currentDtdPointer(),
- currentLocation(),
- markup);
- if (included)
- end->setIncluded();
- eventHandler().endElement(end);
- noteEndElement(included);
- return;
- }
- case tokenEtagoNameStart:
- {
- EndElementEvent *end = parseEndTag();
- if (end->elementType() == e) {
- if (included)
- end->setIncluded();
- eventHandler().endElement(end);
- noteEndElement(included);
- return;
- }
- if (!elementIsOpen(end->elementType())) {
- message(ParserMessages::elementNotOpen,
- StringMessageArg(end->elementType()->name()));
- delete end;
- break;
- }
- implyEmptyElementEnd(e, included, startLoc);
- acceptEndTag(end);
- return;
- }
- default:
- break;
- }
- implyEmptyElementEnd(e, included, startLoc);
- currentInput()->ungetToken();
-}
-
-void Parser::implyEmptyElementEnd(const ElementType *e,
- Boolean included,
- const Location &startLoc)
-{
- if (!sd().omittag())
- message(ParserMessages::omitEndTagOmittag,
- StringMessageArg(e->name()),
- startLoc);
- else {
- const ElementDefinition *def = e->definition();
- if (def && !def->canOmitEndTag())
- message(ParserMessages::omitEndTagDeclare,
- StringMessageArg(e->name()),
- startLoc);
- }
- EndElementEvent *end
- = new (eventAllocator()) EndElementEvent(e,
- currentDtdPointer(),
- currentLocation(),
- 0);
- if (included)
- end->setIncluded();
- noteEndElement(included);
- eventHandler().endElement(end);
-}
-
-void Parser::pushElementCheck(const ElementType *e, StartElementEvent *event,
- IList<Undo> &undoList,
- IList<Event> &eventList)
-{
- if (tagLevel() == syntax().taglvl())
- message(ParserMessages::taglvlOpenElements, NumberMessageArg(syntax().taglvl()));
- eventList.insert(event);
- if (event->mustOmitEnd()) {
- EndElementEvent *end
- = new (eventAllocator()) EndElementEvent(e,
- currentDtdPointer(),
- event->location(),
- 0);
- if (event->included())
- end->setIncluded();
- eventList.insert(end);
- }
- else {
- undoList.insert(new (internalAllocator()) UndoStartTag);
- const ShortReferenceMap *map = e->map();
- if (!map)
- map = currentElement().map();
- pushElement(new (internalAllocator()) OpenElement(e,
- 0,
- event->included(),
- map,
- event->location()));
- }
-}
-
-EndElementEvent *Parser::parseEndTag()
-{
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- currentLocation());
- currentInput()->discardInitial();
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- if (markup) {
- markup->addDelim(Syntax::dETAGO);
- markup->addName(currentInput());
- }
- StringC &name = nameBuffer();
- getCurrentToken(syntax().generalSubstTable(), name);
- const ElementType *e = currentDtd().lookupElementType(name);
- if (sd().rank()) {
- if (!e)
- e = completeRankStem(name);
- }
- if (!e)
- e = lookupCreateUndefinedElement(name, currentLocation(), currentDtdNonConst());
- parseEndTagClose();
- return new (eventAllocator())
- EndElementEvent(e,
- currentDtdPointer(),
- markupLocation(),
- markup);
-}
-
-void Parser::parseEndTagClose()
-{
- for (;;) {
- Token token = getToken(tagMode);
- switch (token) {
- case tokenUnrecognized:
- if (!reportNonSgmlCharacter())
- message(ParserMessages::endTagCharacter, StringMessageArg(currentToken()));
- return;
- case tokenEe:
- message(ParserMessages::endTagEntityEnd);
- return;
- case tokenEtago:
- case tokenStago:
- if (!sd().endTagUnclosed())
- message(ParserMessages::unclosedEndTagShorttag);
- currentInput()->ungetToken();
- return;
- case tokenTagc:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dTAGC);
- return;
- case tokenS:
- if (currentMarkup())
- currentMarkup()->addS(currentChar());
- break;
- default:
- message(ParserMessages::endTagInvalidToken,
- TokenMessageArg(token, tagMode, syntaxPointer(), sdPointer()));
- return;
- }
- }
-}
-
-void Parser::parseEmptyEndTag()
-{
- if (options().warnEmptyTag)
- message(ParserMessages::emptyEndTag);
- // FIXME what to do if not in base
- if (tagLevel() == 0)
- message(ParserMessages::emptyEndTagNoOpenElements);
- else {
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- currentLocation());
- if (markup) {
- markup->addDelim(Syntax::dETAGO);
- markup->addDelim(Syntax::dTAGC);
- }
- acceptEndTag(new (eventAllocator()) EndElementEvent(currentElement().type(),
- currentDtdPointer(),
- currentLocation(),
- markup));
- }
-}
-
-void Parser::parseNullEndTag()
-{
- // If a null end tag was recognized, then there must be a net enabling
- // element on the stack.
- for (;;) {
- ASSERT(tagLevel() > 0);
- if (currentElement().netEnabling())
- break;
- if (!currentElement().isFinished() && validate())
- message(ParserMessages::elementNotFinished,
- StringMessageArg(currentElement().type()->name()));
- implyCurrentElementEnd(currentLocation());
- }
- if (!currentElement().isFinished() && validate())
- message(ParserMessages::elementEndTagNotFinished,
- StringMessageArg(currentElement().type()->name()));
- Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
- currentLocation());
- if (markup)
- markup->addDelim(Syntax::dNET);
- acceptEndTag(new (eventAllocator()) EndElementEvent(currentElement().type(),
- currentDtdPointer(),
- currentLocation(),
- markup));
-}
-
-void Parser::endAllElements()
-{
- while (tagLevel() > 0) {
- if (!currentElement().isFinished())
- message(ParserMessages::elementNotFinishedDocumentEnd,
- StringMessageArg(currentElement().type()->name()));
- implyCurrentElementEnd(currentLocation());
- }
- if (!currentElement().isFinished() && validate())
- message(ParserMessages::noDocumentElement);
-}
-
-void Parser::acceptEndTag(EndElementEvent *event)
-{
- const ElementType *e = event->elementType();
- if (!elementIsOpen(e)) {
- message(ParserMessages::elementNotOpen, StringMessageArg(e->name()));
- delete event;
- return;
- }
- for (;;){
- if (currentElement().type() == e)
- break;
- if (!currentElement().isFinished() && validate())
- message(ParserMessages::elementNotFinished,
- StringMessageArg(currentElement().type()->name()));
- implyCurrentElementEnd(event->location());
- }
- if (!currentElement().isFinished() && validate())
- message(ParserMessages::elementEndTagNotFinished,
- StringMessageArg(currentElement().type()->name()));
- if (currentElement().included())
- event->setIncluded();
- noteEndElement(event->included());
- eventHandler().endElement(event);
- popElement();
-}
-
-void Parser::implyCurrentElementEnd(const Location &loc)
-{
- if (!sd().omittag())
- message(ParserMessages::omitEndTagOmittag,
- StringMessageArg(currentElement().type()->name()),
- currentElement().startLocation());
- else {
- const ElementDefinition *def = currentElement().type()->definition();
- if (def && !def->canOmitEndTag())
- message(ParserMessages::omitEndTagDeclare,
- StringMessageArg(currentElement().type()->name()),
- currentElement().startLocation());
- }
- EndElementEvent *event
- = new (eventAllocator()) EndElementEvent(currentElement().type(),
- currentDtdPointer(),
- loc,
- 0);
- if (currentElement().included())
- event->setIncluded();
- noteEndElement(event->included());
- eventHandler().endElement(event);
- popElement();
-}
-
-void Parser::extendData()
-{
- XcharMap<PackedBoolean> isNormal(normalMap());
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- // This is one of the parser's inner loops, so it needs to be fast.
- while (isNormal[in->tokenChar(messenger())])
- length++;
- in->endToken(length);
-}
-
-void Parser::extendContentS()
-{
- InputSource *in = currentInput();
- size_t length = in->currentTokenLength();
- XcharMap<PackedBoolean> isNormal(normalMap());
- for (;;) {
- Xchar ch = in->tokenChar(messenger());
- if (!syntax().isS(ch) || !isNormal[ch])
- break;
- length++;
- }
- in->endToken(length);
-}
-
-void Parser::handleBadStartTag(const ElementType *e,
- StartElementEvent *event,
- Boolean netEnabling)
-{
- IList<Undo> undoList;
- IList<Event> eventList;
- keepMessages();
- for (;;) {
- Vector<const ElementType *> missing;
- findMissingTag(e, missing);
- if (missing.size() == 1) {
- queueElementEvents(eventList);
- const ElementType *m = missing[0];
- message(ParserMessages::missingElementInferred,
- StringMessageArg(e->name()),
- StringMessageArg(m->name()));
- AttributeList *attributes
- = allocAttributeList(m->attributeDef(), 1);
- // this will give an error if the element has a required attribute
- attributes->finish(*this);
- StartElementEvent *inferEvent
- = new (eventAllocator()) StartElementEvent(m,
- currentDtdPointer(),
- attributes,
- event->location(),
- 0);
- if (!currentElement().tryTransition(m))
- inferEvent->setIncluded();
- pushElementCheck(m, inferEvent, 0);
- if (!currentElement().tryTransition(e))
- event->setIncluded();
- pushElementCheck(e, event, netEnabling);
- return;
- }
- if (missing.size() > 0) {
- queueElementEvents(eventList);
- Vector<StringC> missingNames;
- for (size_t i = 0; i < missing.size(); i++)
- missingNames.push_back(missing[i]->name());
- message(ParserMessages::missingElementMultiple,
- StringMessageArg(e->name()),
- StringVectorMessageArg(missingNames));
- pushElementCheck(e, event, netEnabling);
- return;
- }
- if (!sd().omittag()
- || !currentElement().isFinished()
- || tagLevel() == 0
- || !currentElement().type()->definition()->canOmitEndTag())
- break;
- EndElementEvent *endEvent
- = new (eventAllocator()) EndElementEvent(currentElement().type(),
- currentDtdPointer(),
- event->location(),
- 0);
- eventList.insert(endEvent);
- undoList.insert(new (internalAllocator()) UndoEndTag(popSaveElement()));
- }
- discardKeptMessages();
- undo(undoList);
- message(ParserMessages::elementNotAllowed, StringMessageArg(e->name()));
- // If element couldn't occur because it was excluded, then
- // do the transition here.
- (void)currentElement().tryTransition(e);
- pushElementCheck(e, event, netEnabling);
-}
-
-void Parser::findMissingTag(const ElementType *e,
- Vector<const ElementType *> &v)
-{
- if (!currentElement().currentPosition()) {
- if (!e)
- v.push_back((const ElementType *)0);
- return;
- }
- if (elementIsExcluded(e))
- return;
- size_t newSize = 0;
- currentElement().matchState().possibleTransitions(v);
- // FIXME also get currentInclusions
- for (size_t i = 0; i < v.size(); i++) {
- if (v[i] && !elementIsExcluded(v[i])) {
- Boolean success = 0;
- switch (v[i]->definition()->declaredContent()) {
- case ElementDefinition::modelGroup:
- {
- const CompiledModelGroup *grp
- = v[i]->definition()->compiledModelGroup();
- MatchState state(grp);
- if (!e) {
- if (state.tryTransitionPcdata())
- success = 1;
- }
- else {
- if (state.tryTransition(e))
- success = 1;
- if (!success) {
- for (size_t j = 0; j < v[i]->definition()->nInclusions(); j++)
- if (v[i]->definition()->inclusion(j) == e) {
- success = 1;
- break;
- }
- }
- if (success) {
- for (size_t j = 0; j < v[i]->definition()->nExclusions(); j++)
- if (v[i]->definition()->exclusion(j) == e) {
- success = 0;
- break;
- }
- }
- }
- }
- break;
-#if 0
- case ElementDefinition::any:
- success = 1;
- break;
-#endif
- case ElementDefinition::cdata:
- case ElementDefinition::rcdata:
- if (e == 0)
- success = 1;
- break;
- default:
- break;
- }
- if (success)
- v[newSize++] = v[i];
- }
- }
- v.resize(newSize);
- // Sort them according to the order of their occurrence in the DTD.
- // Do an insertion sort.
- for (size_t i = 1; i < v.size(); i++) {
- const ElementType *tem = v[i];
- size_t j;
- for (j = i; j > 0 && v[j - 1]->index() > tem->index(); j--)
- v[j] = v[j - 1];
- v[j] = tem;
- }
-}
-
-#if 0
-// This produces messages that are too verbose
-// This doesn't try to be very efficient.
-// 0 for #pcdata
-
-void Parser::getAllowedElementTypes(Vector<const ElementType *> &v)
-{
- v.clear();
- // FIXME get a list of all inclusions first
- // getCurrentInclusions(v);
- // x says whether each element of v was excluded
- Vector<PackedBoolean> x(v.size(), 0);
- unsigned startImpliedCount = 0;
- IList<Undo> undoList;
- for (;;) {
- if (currentElement().currentPosition()) {
- // have a model group
- size_t i = v.size();
- currentElement().matchState().possibleTransitions(v);
- x.resize(v.size());
- for (size_t j = i; j < v.size(); j++)
- x[j] = (v[j] && elementIsExcluded(v[j]));
- if (!sd().omittag())
- break;
- // Try to imply a tag
- if (currentElement().isFinished()) {
- if (tagLevel() == 0)
- break;
- if (startImpliedCount)
- break;
- const ElementDefinition *def = currentElement().type()->definition();
- if (def && def->canOmitEndTag())
- undoList.insert(new (internalAllocator())
- UndoEndTag(popSaveElement()));
- else
- break;
- }
- else {
- const LeafContentToken *token = currentElement().impliedStartTag();
- if (!token)
- break;
- const ElementType *e = token->elementType();
- if (elementIsExcluded(e))
- break;
- const ElementDefinition *def = e->definition();
- if (!def
- || def->undefined()
- || (def->declaredContent() != ElementDefinition::modelGroup
- && def->declaredContent() != ElementDefinition::any)
- || !def->canOmitStartTag())
- break;
- undoList.insert(new (internalAllocator()) UndoStartTag);
- startImpliedCount++;
- pushElement(new (internalAllocator()) OpenElement(e,
- 0,
- 0,
- 0,
- Location()));
- if (checkImplyLoop(startImpliedCount))
- break;
- for (size_t i = 0; i < def->nInclusions(); i++)
- if (!elementIsExcluded(def->inclusion(i))) {
- v.push_back(def->inclusion(i));
- x.push_back(0);
- }
- }
- }
- else {
- // must be allowed #pcdata
- v.push_back((const ElementType *)0);
- x.push_back((PackedBoolean)0);
- break;
- }
- }
- undo(undoList);
- // Remove exclusions and duplicates and undefined
- size_t newSize = 0;
- for (size_t i = 0; i < v.size(); i++)
- if (!x[i] && (!v[i] || !v[i]->definition()->undefined())) {
- Boolean dup = 0;
- for (size_t j = 0; j < newSize; j++)
- if (v[i] == v[j]) {
- dup = 1;
- break;
- }
- if (!dup)
- v[newSize++] = v[i];
- }
- v.resize(newSize);
-}
-#endif
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseMode.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseMode.cxx
deleted file mode 100644
index 9920b0220d..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseMode.cxx
+++ /dev/null
@@ -1,581 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Parser.h"
-#include "ParserMessages.h"
-#include "MessageArg.h"
-#include "TokenMessageArg.h"
-#include "ModeInfo.h"
-#include "Partition.h"
-#include "SrInfo.h"
-#include "Vector.h"
-#include "ISetIter.h"
-#include "token.h"
-#include "TrieBuilder.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-enum {
- modeUsedInSd = 01,
- modeUsedInProlog = 02,
- modeUsedInInstance = 04,
- modeUsesSr = 010
-};
-
-static struct {
- Mode mode;
- unsigned flags;
-} modeTable[] = {
- { grpMode, modeUsedInProlog|modeUsedInInstance },
- { alitMode, modeUsedInProlog|modeUsedInInstance },
- { alitaMode, modeUsedInProlog|modeUsedInInstance },
- { aliteMode, modeUsedInProlog|modeUsedInInstance },
- { talitMode, modeUsedInProlog|modeUsedInInstance },
- { talitaMode, modeUsedInProlog|modeUsedInInstance },
- { taliteMode, modeUsedInProlog|modeUsedInInstance },
- { mdMode, modeUsedInProlog|modeUsedInInstance },
- { mdMinusMode, modeUsedInProlog },
- { mdPeroMode, modeUsedInProlog },
- { sdMode, modeUsedInSd },
- { comMode, modeUsedInProlog|modeUsedInInstance },
- { sdcomMode, modeUsedInSd },
- { piMode, modeUsedInProlog|modeUsedInInstance },
- { refMode, modeUsedInProlog|modeUsedInInstance|modeUsedInSd },
- { imsMode, modeUsedInProlog|modeUsedInInstance },
- { cmsMode, modeUsedInProlog|modeUsedInInstance },
- { rcmsMode, modeUsedInProlog|modeUsedInInstance },
- { proMode, modeUsedInProlog },
- { dsMode, modeUsedInProlog },
- { dsiMode, modeUsedInProlog },
- { plitMode, modeUsedInProlog },
- { plitaMode, modeUsedInProlog },
- { pliteMode, modeUsedInProlog },
- { sdplitMode, modeUsedInSd },
- { sdplitaMode, modeUsedInSd },
- { grpsufMode, modeUsedInProlog },
- { mlitMode, modeUsedInProlog|modeUsedInSd },
- { mlitaMode, modeUsedInProlog|modeUsedInSd },
- { asMode, modeUsedInProlog },
- { slitMode, modeUsedInProlog },
- { slitaMode, modeUsedInProlog },
- { sdslitMode, modeUsedInSd },
- { sdslitaMode, modeUsedInSd },
- { cconMode, modeUsedInInstance },
- { rcconMode, modeUsedInInstance },
- { cconnetMode, modeUsedInInstance },
- { rcconnetMode, modeUsedInInstance },
- { rcconeMode, modeUsedInInstance },
- { tagMode, modeUsedInInstance },
- { econMode, modeUsedInInstance|modeUsesSr },
- { mconMode, modeUsedInInstance|modeUsesSr },
- { econnetMode, modeUsedInInstance|modeUsesSr },
- { mconnetMode, modeUsedInInstance|modeUsesSr },
-};
-
-void Parser::compileSdModes()
-{
- Mode modes[nModes];
- int n = 0;
- for (size_t i = 0; i < SIZEOF(modeTable); i++)
- if (modeTable[i].flags & modeUsedInSd)
- modes[n++] = modeTable[i].mode;
- compileModes(modes, n, 0);
-}
-
-void Parser::compilePrologModes()
-{
- Boolean scopeInstance = sd().scopeInstance();
- Boolean haveSr = syntax().hasShortrefs();
- Mode modes[nModes];
- int n = 0;
- for (size_t i = 0; i < SIZEOF(modeTable); i++) {
- if (scopeInstance) {
- if (modeTable[i].flags & modeUsedInProlog)
- modes[n++] = modeTable[i].mode;
- }
- else if (haveSr) {
- if ((modeTable[i].flags & (modeUsedInInstance|modeUsedInProlog))
- && !(modeTable[i].flags & modeUsesSr))
- modes[n++] = modeTable[i].mode;
- }
- else {
- if (modeTable[i].flags & (modeUsedInInstance|modeUsedInProlog))
- modes[n++] = modeTable[i].mode;
- }
- }
- compileModes(modes, n, 0);
-}
-
-void Parser::compileInstanceModes()
-{
- Boolean scopeInstance = sd().scopeInstance();
- compileNormalMap();
- if (!scopeInstance && !syntax().hasShortrefs())
- return;
- Mode modes[nModes];
- int n = 0;
- for (size_t i = 0; i < SIZEOF(modeTable); i++) {
- if (scopeInstance) {
- if (modeTable[i].flags & modeUsedInInstance)
- modes[n++] = modeTable[i].mode;
- }
- else {
- if (modeTable[i].flags & modeUsesSr)
- modes[n++] = modeTable[i].mode;
- }
- }
- compileModes(modes, n, &currentDtd());
-}
-
-void Parser::compileModes(const Mode *modes,
- int n,
- const Dtd *dtd)
-{
- PackedBoolean sets[Syntax::nSet];
- PackedBoolean delims[Syntax::nDelimGeneral];
- PackedBoolean functions[3];
- int i;
- Boolean includesShortref = 0;
- for (i = 0; i < Syntax::nSet; i++)
- sets[i] = 0;
- for (i = 0; i < Syntax::nDelimGeneral; i++)
- delims[i] = 0;
- for (i = 0; i < 3; i++)
- functions[i] = 0;
-
- for (i = 0; i < n; i++) {
- ModeInfo iter(modes[i], sd());
- TokenInfo ti;
- while (iter.nextToken(&ti)) {
- switch (ti.type) {
- case TokenInfo::delimType:
- delims[ti.delim1] = 1;
- break;
- case TokenInfo::delimDelimType:
- delims[ti.delim1] = 1;
- delims[ti.delim2] = 1;
- break;
- case TokenInfo::delimSetType:
- delims[ti.delim1] = 1;
- // fall through
- case TokenInfo::setType:
- sets[ti.set] = 1;
- break;
- case TokenInfo::functionType:
- functions[ti.function] = 1;
- break;
- }
- }
- if (!includesShortref && iter.includesShortref())
- includesShortref = 1;
- }
-
- ISet<Char> chars;
-
- for (i = 0; i < 3; i++)
- if (functions[i])
- chars.add(syntax().standardFunction(i));
- for (i = 0; i < Syntax::nDelimGeneral; i++)
- if (delims[i]) {
- const StringC &str = syntax().delimGeneral(i);
- for (size_t j = 0; j < str.size(); j++)
- chars.add(str[j]);
- }
- if (includesShortref && dtd) {
- size_t n = dtd->nShortref();
- for (size_t i = 0; i < n; i++) {
- const StringC &delim = dtd->shortref(i);
- size_t len = delim.size();
- for (size_t j = 0; j < len; j++)
- if (delim[j] == sd().execToInternal('B'))
- sets[Syntax::blank] = 1;
- else
- chars.add(delim[j]);
- }
- }
-
- const ISet<Char> *csets[Syntax::nSet];
- int usedSets = 0;
- for (i = 0; i < Syntax::nSet; i++)
- if (sets[i])
- csets[usedSets++] = syntax().charSet(i);
-
- Partition partition(chars, csets, usedSets, *syntax().generalSubstTable());
-
- String<EquivCode> setCodes[Syntax::nSet];
-
- int nCodes = 0;
- for (i = 0; i < Syntax::nSet; i++)
- if (sets[i])
- setCodes[i] = partition.setCodes(nCodes++);
-
- String<EquivCode> delimCodes[Syntax::nDelimGeneral];
- for (i = 0; i < Syntax::nDelimGeneral; i++)
- if (delims[i]) {
- StringC str = syntax().delimGeneral(i);
- for (size_t j = 0; j < str.size(); j++)
- delimCodes[i] += partition.charCode(str[j]);
- }
-
- String<EquivCode> functionCode[3];
- for (i = 0; i < 3; i++)
- if (functions[i])
- functionCode[i] += partition.charCode(syntax().standardFunction(i));
-
- Vector<SrInfo> srInfo;
-
- int nShortref;
- if (!includesShortref || !dtd)
- nShortref = 0;
- else {
- nShortref = dtd->nShortref();
- srInfo.resize(nShortref);
-
- for (i = 0; i < nShortref; i++) {
- const StringC delim = dtd->shortref(i);
- SrInfo *p = &srInfo[i];
- size_t j;
- for (j = 0; j < delim.size(); j++) {
- if (delim[j] == sd().execToInternal('B'))
- break;
- p->chars += partition.charCode(delim[j]);
- }
- if (j < delim.size()) {
- p->bSequenceLength = 1;
- for (++j; j < delim.size(); j++) {
- if (delim[j] != sd().execToInternal('B'))
- break;
- p->bSequenceLength += 1;
- }
- for (; j < delim.size(); j++)
- p->chars2 += partition.charCode(delim[j]);
- }
- else
- p->bSequenceLength = 0;
- }
- }
-
- String<EquivCode> dataDelimCodes;
- if (options().warnDataDelim) {
- ModeInfo iter(mconMode, sd());
- TokenInfo ti;
- while (iter.nextToken(&ti)) {
- switch (ti.type) {
- case TokenInfo::delimType:
- case TokenInfo::delimDelimType:
- case TokenInfo::delimSetType:
- {
- if (ti.token == tokenMscMdc)
- break;
- const StringC &delim = syntax().delimGeneral(ti.delim1);
- if (!delim.size())
- break;
- EquivCode c = partition.charCode(delim[0]);
- for (size_t i = 0; ; i++) {
- if (i >= dataDelimCodes.size()) {
- dataDelimCodes += c;
- break;
- }
- if (dataDelimCodes[i] == c)
- break;
- }
- }
- break;
- default:
- break;
- }
- }
- }
-
- const String<EquivCode> emptyString;
- Boolean multicode = syntax().multicode();
- for (i = 0; i < n; i++) {
- TrieBuilder tb(partition.maxCode() + 1);
- TrieBuilder::TokenVector ambiguities;
- Vector<Token> suppressTokens;
- if (multicode) {
- suppressTokens.assign(partition.maxCode() + 1, 0);
- suppressTokens[partition.eECode()] = tokenEe;
- }
- tb.recognizeEE(partition.eECode(), tokenEe);
- ModeInfo iter(modes[i], sd());
- TokenInfo ti;
- // We try to handle the possibility that some delimiters may be empty;
- // this might happen when compiling recognizers for the SGML declaration.
- while (iter.nextToken(&ti)) {
- switch (ti.type) {
- case TokenInfo::delimType:
- if (delimCodes[ti.delim1].size() > 0)
- tb.recognize(delimCodes[ti.delim1], ti.token,
- ti.priority, ambiguities);
- break;
- case TokenInfo::delimDelimType:
- {
- String<EquivCode> str(delimCodes[ti.delim1]);
- if (str.size() > 0 && delimCodes[ti.delim2].size() > 0) {
- str += delimCodes[ti.delim2];
- tb.recognize(str, ti.token, ti.priority, ambiguities);
- }
- }
- break;
- case TokenInfo::delimSetType:
- if (delimCodes[ti.delim1].size() > 0)
- tb.recognize(delimCodes[ti.delim1], setCodes[ti.set],
- ti.token, ti.priority, ambiguities);
- break;
- case TokenInfo::setType:
- tb.recognize(emptyString, setCodes[ti.set], ti.token,
- ti.priority, ambiguities);
- if (multicode) {
- const String<EquivCode> &equivCodes = setCodes[ti.set];
- for (size_t j = 0; j < equivCodes.size(); j++)
- suppressTokens[equivCodes[j]] = ti.token;
- }
- break;
- case TokenInfo::functionType:
- tb.recognize(functionCode[ti.function], ti.token,
- ti.priority, ambiguities);
- if (multicode)
- suppressTokens[functionCode[ti.function][0]] = ti.token;
- break;
- }
- }
- if (iter.includesShortref()) {
- for (int j = 0; j < nShortref; j++) {
- const SrInfo *p = &srInfo[j];
- if (p->bSequenceLength > 0)
- tb.recognizeB(p->chars, p->bSequenceLength,
- syntax().quantity(Syntax::qBSEQLEN),
- setCodes[Syntax::blank],
- p->chars2, tokenFirstShortref + j,
- ambiguities);
- else
- tb.recognize(p->chars, tokenFirstShortref + j,
- Priority::delim, ambiguities);
- }
- }
- if (options().warnDataDelim) {
- switch (modes[i]) {
- default:
- if (!iter.includesShortref())
- break;
- // fall through
- case alitMode:
- case alitaMode:
- case aliteMode:
- case talitMode:
- case talitaMode:
- case taliteMode:
- for (size_t j = 0; j < dataDelimCodes.size(); j++) {
- String<EquivCode> code;
- code += dataDelimCodes[j];
- tb.recognize(code, tokenCharDelim, Priority::dataDelim, ambiguities);
- }
- break;
- case plitMode:
- case plitaMode:
- case pliteMode:
- {
- String<EquivCode> code;
- code += partition.charCode(syntax().delimGeneral(Syntax::dPERO)[0]);
- tb.recognize(code, tokenCharDelim, Priority::dataDelim, ambiguities);
- }
- break;
- }
- }
- setRecognizer(modes[i],
- (multicode
- ? new Recognizer(tb.extractTrie(), partition.map(),
- suppressTokens)
- : new Recognizer(tb.extractTrie(), partition.map())));
- // FIXME give more information
- for (size_t j = 0; j < ambiguities.size(); j += 2)
- message(ParserMessages::lexicalAmbiguity,
- TokenMessageArg(ambiguities[j], modes[i], syntaxPointer(),
- sdPointer()),
- TokenMessageArg(ambiguities[j + 1], modes[i], syntaxPointer(),
- sdPointer()));
- }
-}
-
-void Parser::compileNormalMap()
-{
- XcharMap<PackedBoolean> map(0);
- ISetIter<Char> sgmlCharIter(*syntax().charSet(Syntax::sgmlChar));
- Char min, max;
- while (sgmlCharIter.next(min, max))
- map.setRange(min, max, 1);
- ModeInfo iter(mconnetMode, sd());
- TokenInfo ti;
- while (iter.nextToken(&ti)) {
- switch (ti.type) {
- case TokenInfo::delimType:
- case TokenInfo::delimDelimType:
- case TokenInfo::delimSetType:
- {
- const StringC &delim = syntax().delimGeneral(ti.delim1);
- if (!delim.size())
- break;
- Char c = delim[0];
- map.setChar(c, 0);
- StringC str(syntax().generalSubstTable()->inverse(c));
- for (size_t i = 0; i < str.size(); i++)
- map.setChar(str[i], 0);
- }
- break;
- case TokenInfo::setType:
- if (ti.token != tokenChar) {
- ISetIter<Char> setIter(*syntax().charSet(ti.set));
- Char min, max;
- while (setIter.next(min, max))
- map.setRange(min, max, 0);
- }
- break;
- case TokenInfo::functionType:
- if (ti.token != tokenChar)
- map.setChar(syntax().standardFunction(ti.function), 0);
- break;
- }
- }
- int nShortref = currentDtd().nShortref();
- for (int i = 0; i < nShortref; i++) {
- Char c = currentDtd().shortref(i)[0];
- if (c == sd().execToInternal('B')) {
- ISetIter<Char> setIter(*syntax().charSet(Syntax::blank));
- Char min, max;
- while (setIter.next(min, max))
- map.setRange(min, max, 0);
- }
- else {
- map.setChar(c, 0);
- StringC str(syntax().generalSubstTable()->inverse(c));
- for (size_t j = 0; j < str.size(); j++)
- map.setChar(str[j], 0);
- }
- }
- setNormalMap(map);
-}
-
-void Parser::addNeededShortrefs(Dtd &dtd, const Syntax &syntax)
-{
- if (!syntax.hasShortrefs())
- return;
- PackedBoolean delimRelevant[Syntax::nDelimGeneral];
- size_t i;
- for (i = 0; i < Syntax::nDelimGeneral; i++)
- delimRelevant[i] = 0;
- ModeInfo iter(mconnetMode, sd());
- TokenInfo ti;
- while (iter.nextToken(&ti)) {
- switch (ti.type) {
- case TokenInfo::delimType:
- case TokenInfo::delimDelimType:
- case TokenInfo::delimSetType:
- delimRelevant[ti.delim1] = 1;
- break;
- default:
- break;
- }
- }
-
- // PIO and NET are the only delimiters that are recognized in con
- // mode without context. If a short reference delimiter is
- // identical to one of these delimiters, then we'll have an
- // ambiguity. We make such a short reference delimiter needed
- // to ensure that this ambiguity is reported.
- if (syntax.isValidShortref(syntax.delimGeneral(Syntax::dPIO)))
- dtd.addNeededShortref(syntax.delimGeneral(Syntax::dPIO));
- if (syntax.isValidShortref(syntax.delimGeneral(Syntax::dNET)))
- dtd.addNeededShortref(syntax.delimGeneral(Syntax::dNET));
-
- size_t nShortrefComplex = syntax.nDelimShortrefComplex();
-
- // A short reference delimiter is needed if it is used or if it can
- // contains some other shorter delimiter that is either a relevant general
- // delimiter or a shortref delimiter that is used.
-
- for (i = 0; i < nShortrefComplex; i++) {
- size_t j;
- for (j = 0; j < Syntax::nDelimGeneral; j++)
- if (delimRelevant[j]
- && shortrefCanPreemptDelim(syntax.delimShortrefComplex(i),
- syntax.delimGeneral(j),
- 0,
- syntax)) {
- dtd.addNeededShortref(syntax.delimShortrefComplex(i));
- break;
- }
- for (j = 0; j < dtd.nShortref(); j++)
- if (shortrefCanPreemptDelim(syntax.delimShortrefComplex(i),
- dtd.shortref(j),
- 1,
- syntax)) {
- dtd.addNeededShortref(syntax.delimShortrefComplex(i));
- break;
- }
- }
-
-}
-
-Boolean Parser::shortrefCanPreemptDelim(const StringC &sr,
- const StringC &d,
- Boolean dIsSr,
- const Syntax &syntax)
-{
- Char letterB = sd().execToInternal('B');
- for (size_t i = 0; i < sr.size(); i++) {
- size_t j = 0;
- size_t k = i;
- for (;;) {
- if (j == d.size())
- return 1;
- if (k >= sr.size())
- break;
- if (sr[k] == letterB) {
- if (dIsSr && d[j] == letterB) {
- j++;
- k++;
- }
- else if (syntax.isB(d[j])) {
- j++;
- k++;
- if (k == sr.size() || sr[k] != letterB) {
- // it was the last B in the sequence
- while (j < d.size() && syntax.isB(d[j]))
- j++;
- }
- }
- else
- break;
- }
- else if (dIsSr && d[j] == letterB) {
- if (syntax.isB(sr[k])) {
- ++j;
- ++k;
- if (j < d.size() && d[j] != letterB) {
- while (k < sr.size() && syntax.isB(sr[k]))
- k++;
- }
- }
- else
- break;
- }
- else if (d[j] == sr[k]) {
- j++;
- k++;
- }
- else
- break;
- }
- }
- return 0;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseParam.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseParam.cxx
deleted file mode 100644
index ee55d4e08f..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseParam.cxx
+++ /dev/null
@@ -1,1024 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Parser.h"
-#include "Param.h"
-#include "Group.h"
-#include "Markup.h"
-#include "ParserMessages.h"
-#include "MessageArg.h"
-#include "TokenMessageArg.h"
-#include "token.h"
-#include "macros.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-Boolean Parser::parseParam(const AllowedParams &allow,
- unsigned declInputLevel,
- Param &parm)
-{
- for (;;) {
- Token token = getToken(allow.mainMode());
- switch (token) {
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- {
- message(ParserMessages::markupDeclarationCharacter,
- StringMessageArg(currentToken()),
- AllowedParamsMessageArg(allow, syntaxPointer()));
- }
- return 0;
- case tokenEe:
- if (inputLevel() <= declInputLevel) {
- message(ParserMessages::declarationLevel);
- return 0;
- }
- if (currentMarkup())
- currentMarkup()->addEntityEnd();
- popInputStack();
- break;
- case tokenCom:
- if (!parseComment(comMode))
- return 0;
- if (options().warnPsComment)
- message(ParserMessages::psComment);
- break;
- case tokenDso:
- if (!allow.dso()) {
- paramInvalidToken(tokenDso, allow);
- return 0;
- }
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dDSO);
- parm.type = Param::dso;
- return 1;
- case tokenGrpo:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dGRPO);
- switch (allow.group()) {
- case Param::invalid:
- paramInvalidToken(tokenGrpo, allow);
- return 0;
- case Param::modelGroup:
- {
- ModelGroup *group;
- if (!parseModelGroup(1, declInputLevel, group, grpsufMode))
- return 0;
- parm.type = Param::modelGroup;
- parm.modelGroupPtr = group;
- }
- break;
- case Param::nameGroup:
- if (!parseNameGroup(declInputLevel, parm))
- return 0;
- break;
- case Param::nameTokenGroup:
- if (!parseNameTokenGroup(declInputLevel, parm))
- return 0;
- break;
- default:
- CANNOT_HAPPEN();
- }
- parm.type = allow.group();
- return 1;
- case tokenLita:
- case tokenLit:
- parm.type = allow.literal();
- parm.lita = token == tokenLita;
- switch (allow.literal()) {
- case Param::invalid:
- paramInvalidToken(token, allow);
- return 0;
- case Param::minimumLiteral:
- if (!parseMinimumLiteral(parm.lita, parm.literalText))
- return 0;
- break;
- case Param::attributeValueLiteral:
- if (!parseAttributeValueLiteral(parm.lita, parm.literalText))
- return 0;
- break;
- case Param::tokenizedAttributeValueLiteral:
- if (!parseTokenizedAttributeValueLiteral(parm.lita, parm.literalText))
- return 0;
- break;
- case Param::systemIdentifier:
- if (!parseSystemIdentifier(parm.lita, parm.literalText))
- return 0;
- break;
- case Param::paramLiteral:
- if (!parseParameterLiteral(parm.lita, parm.literalText))
- return 0;
- break;
- }
- if (currentMarkup())
- currentMarkup()->addLiteral(parm.literalText);
- return 1;
- case tokenMdc:
- if (!allow.mdc()) {
- paramInvalidToken(tokenMdc, allow);
- return 0;
- }
- if (inputLevel() > declInputLevel)
- message(ParserMessages::parameterEntityNotEnded);
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dMDC);
- parm.type = Param::mdc;
- return 1;
- case tokenMinus:
- parm.type = Param::minus;
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dMINUS);
- return 1;
- case tokenMinusGrpo:
- if (!allow.exclusions()) {
- paramInvalidToken(tokenMinusGrpo, allow);
- return 0;
- }
- if (currentMarkup()) {
- currentMarkup()->addDelim(Syntax::dMINUS);
- currentMarkup()->addDelim(Syntax::dGRPO);
- }
- parm.type = Param::exclusions;
- return parseElementNameGroup(declInputLevel, parm);
- case tokenPero:
- parm.type = Param::pero;
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dPERO);
- return 1;
- case tokenPeroGrpo:
- if (!inInstance())
- message(ParserMessages::peroGrpoProlog);
- // fall through
- case tokenPeroNameStart:
- {
- if (inInstance()) {
- if (options().warnInstanceParamEntityRef)
- message(ParserMessages::instanceParamEntityRef);
- }
- else {
- if (options().warnInternalSubsetPsParamEntityRef && inputLevel() == 1)
- message(ParserMessages::internalSubsetPsParamEntityRef);
- }
- ConstPtr<Entity> entity;
- Ptr<EntityOrigin> origin;
- if (!parseEntityReference(1, token == tokenPeroGrpo, entity, origin))
- return 0;
- if (!entity.isNull())
- entity->declReference(*this, origin);
- }
- break;
- case tokenPlusGrpo:
- if (!allow.inclusions()) {
- paramInvalidToken(tokenPlusGrpo, allow);
- return 0;
- }
- if (currentMarkup()) {
- currentMarkup()->addDelim(Syntax::dPLUS);
- currentMarkup()->addDelim(Syntax::dGRPO);
- }
- parm.type = Param::inclusions;
- return parseElementNameGroup(declInputLevel, parm);
- case tokenRni:
- if (!allow.rni()) {
- paramInvalidToken(tokenRni, allow);
- return 0;
- }
- return parseIndicatedReservedName(allow, parm);
- case tokenS:
- if (currentMarkup())
- currentMarkup()->addS(currentChar());
- break;
- case tokenNameStart:
- switch (allow.nameStart()) {
- case Param::invalid:
- paramInvalidToken(tokenNameStart, allow);
- return 0;
- case Param::reservedName:
- return parseReservedName(allow, parm);
- case Param::name:
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- parm.type = Param::name;
- getCurrentToken(syntax().generalSubstTable(), parm.token);
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- case Param::entityName:
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- parm.type = Param::entityName;
- getCurrentToken(syntax().entitySubstTable(), parm.token);
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- case Param::paramEntityName:
- extendNameToken(syntax().penamelen(),
- ParserMessages::parameterEntityNameLength);
- parm.type = Param::paramEntityName;
- getCurrentToken(syntax().entitySubstTable(), parm.token);
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- case Param::attributeValue:
- return parseAttributeValueParam(parm);
- }
- break;
- case tokenDigit:
- switch (allow.digit()) {
- case Param::invalid:
- paramInvalidToken(tokenDigit, allow);
- return 0;
- case Param::number:
- extendNumber(syntax().namelen(), ParserMessages::numberLength);
- parm.type = Param::number;
- getCurrentToken(parm.token);
- if (currentMarkup())
- currentMarkup()->addNumber(currentInput());
- return 1;
- case Param::attributeValue:
- return parseAttributeValueParam(parm);
- }
- break;
- case tokenLcUcNmchar:
- switch (allow.nmchar()) {
- case Param::invalid:
- paramInvalidToken(tokenLcUcNmchar, allow);
- return 0;
- case Param::attributeValue:
- return parseAttributeValueParam(parm);
- }
- break;
- default:
- CANNOT_HAPPEN();
- }
- }
-}
-
-void Parser::paramInvalidToken(Token token, const AllowedParams &allow)
-{
- message(ParserMessages::paramInvalidToken,
- TokenMessageArg(token, allow.mainMode(),
- syntaxPointer(), sdPointer()),
- AllowedParamsMessageArg(allow, syntaxPointer()));
-}
-
-Boolean Parser::parseGroupToken(const AllowedGroupTokens &allow,
- unsigned nestingLevel,
- unsigned declInputLevel,
- unsigned groupInputLevel,
- GroupToken &gt)
-{
- for (;;) {
- Token token = getToken(grpMode);
- switch (token) {
- case tokenEe:
- if (inputLevel() <= groupInputLevel) {
- message(ParserMessages::groupLevel);
- if (inputLevel() <= declInputLevel)
- return 0;
- }
- else if (!sd().www())
- message(ParserMessages::groupEntityEnd);
- if (currentMarkup())
- currentMarkup()->addEntityEnd();
- popInputStack();
- break;
- case tokenPeroGrpo:
- if (!inInstance())
- message(ParserMessages::peroGrpoProlog);
- // fall through
- case tokenPeroNameStart:
- {
- if (options().warnInternalSubsetTsParamEntityRef && inputLevel() == 1)
- message(ParserMessages::internalSubsetTsParamEntityRef);
- ConstPtr<Entity> entity;
- Ptr<EntityOrigin> origin;
- if (!parseEntityReference(1, token == tokenPeroGrpo, entity, origin))
- return 0;
- if (!entity.isNull())
- entity->declReference(*this, origin);
- }
- break;
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- {
- message(ParserMessages::groupCharacter,
- StringMessageArg(currentToken()),
- AllowedGroupTokensMessageArg(allow, syntaxPointer()));
- }
- return 0;
- case tokenDtgo:
- if (!allow.groupToken(GroupToken::dataTagGroup)) {
- groupTokenInvalidToken(tokenDtgo, allow);
- return 0;
- }
- if (sd().datatag())
- message(ParserMessages::datatagNotImplemented);
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dDTGO);
- return parseDataTagGroup(nestingLevel + 1, declInputLevel, gt);
- case tokenGrpo:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dGRPO);
- switch (allow.group()) {
- case GroupToken::modelGroup:
- {
- ModelGroup *modelGroup;
- if (!parseModelGroup(nestingLevel + 1, declInputLevel, modelGroup,
- grpMode))
- return 0;
- gt.model = modelGroup;
- gt.type = GroupToken::modelGroup;
- return 1;
- }
- case GroupToken::dataTagTemplateGroup:
- return parseDataTagTemplateGroup(nestingLevel + 1, declInputLevel, gt);
- default:
- groupTokenInvalidToken(tokenGrpo, allow);
- return 0;
- }
- break;
- case tokenRni:
- if (!allow.groupToken(GroupToken::pcdata)) {
- groupTokenInvalidToken(tokenRni, allow);
- return 0;
- }
- Syntax::ReservedName rn;
- if (!getIndicatedReservedName(&rn))
- return 0;
- if (rn != Syntax::rPCDATA) {
- StringC token(syntax().delimGeneral(Syntax::dRNI));
- token += syntax().reservedName(Syntax::rPCDATA);
- message(ParserMessages::invalidToken, StringMessageArg(token));
- return 0;
- }
- gt.type = GroupToken::pcdata;
- gt.contentToken = new PcdataToken;
- return 1;
- case tokenS:
- if (currentMarkup()) {
- extendS();
- currentMarkup()->addS(currentInput());
- }
- break;
- case tokenNameStart:
- switch (allow.nameStart()) {
- case GroupToken::elementToken:
- {
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- gt.type = GroupToken::elementToken;
- StringC &buffer = nameBuffer();
- getCurrentToken(syntax().generalSubstTable(), buffer);
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- const ElementType *e = lookupCreateElement(buffer);
- ContentToken::OccurrenceIndicator oi
- = getOccurrenceIndicator(grpMode);
- gt.contentToken = new ElementToken(e, oi);
- return 1;
- }
- case GroupToken::name:
- case GroupToken::nameToken:
- extendNameToken(syntax().namelen(),
- token == GroupToken::name
- ? ParserMessages::nameLength
- : ParserMessages::nameTokenLength);
- getCurrentToken(syntax().generalSubstTable(), gt.token);
- gt.type = allow.nameStart();
- if (currentMarkup()) {
- if (gt.type == GroupToken::nameToken)
- currentMarkup()->addNameToken(currentInput());
- else
- currentMarkup()->addName(currentInput());
- }
- return 1;
- default:
- groupTokenInvalidToken(tokenNameStart, allow);
- return 0;
- }
- case tokenDigit:
- case tokenLcUcNmchar:
- if (!allow.groupToken(GroupToken::nameToken)) {
- groupTokenInvalidToken(token, allow);
- return 0;
- }
- extendNameToken(syntax().namelen(), ParserMessages::nameTokenLength);
- getCurrentToken(syntax().generalSubstTable(), gt.token);
- gt.type = GroupToken::nameToken;
- if (currentMarkup())
- currentMarkup()->addNameToken(currentInput());
- return 1;
- case tokenLit:
- case tokenLita:
- // parameter literal in data tag pattern
- if (!allow.groupToken(GroupToken::dataTagLiteral)) {
- groupTokenInvalidToken(token, allow);
- return 0;
- }
- if (!parseDataTagParameterLiteral(token == tokenLita, gt.text))
- return 0;
- gt.type = GroupToken::dataTagLiteral;
- if (currentMarkup())
- currentMarkup()->addLiteral(gt.text);
- return 1;
- case tokenAnd:
- case tokenSeq:
- case tokenOr:
- case tokenDtgc:
- case tokenGrpc:
- case tokenOpt:
- case tokenPlus:
- case tokenRep:
- groupTokenInvalidToken(token, allow);
- return 0;
- }
- }
-}
-
-
-void Parser::groupTokenInvalidToken(Token token, const AllowedGroupTokens &allow)
-{
- message(ParserMessages::groupTokenInvalidToken,
- TokenMessageArg(token, grpMode, syntaxPointer(), sdPointer()),
- AllowedGroupTokensMessageArg(allow, syntaxPointer()));
-}
-
-
-Boolean Parser::parseGroupConnector(const AllowedGroupConnectors &allow,
- unsigned declInputLevel,
- unsigned groupInputLevel,
- GroupConnector &gc)
-{
- for (;;) {
- Token token = getToken(grpMode);
- switch (token) {
- case tokenEe:
- if (inputLevel() <= groupInputLevel) {
- message(ParserMessages::groupLevel);
- if (inputLevel() <= declInputLevel)
- return 0;
- }
- if (currentMarkup())
- currentMarkup()->addEntityEnd();
- popInputStack();
- break;
- case tokenS:
- if (currentMarkup()) {
- extendS();
- currentMarkup()->addS(currentInput());
- }
- break;
- case tokenPeroGrpo:
- if (inInstance()) {
- message(ParserMessages::peroGrpoProlog);
- break;
- }
- // fall through
- case tokenPeroNameStart:
- if (!sd().www())
- message(ParserMessages::groupEntityReference);
- else {
- ConstPtr<Entity> entity;
- Ptr<EntityOrigin> origin;
- if (!parseEntityReference(1, token == tokenPeroGrpo, entity, origin))
- return 0;
- if (!entity.isNull())
- entity->declReference(*this, origin);
- }
- break;
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- {
- message(ParserMessages::groupCharacter,
- StringMessageArg(currentToken()),
- AllowedGroupConnectorsMessageArg(allow, syntaxPointer()));
- }
- return 0;
- case tokenAnd:
- if (!allow.groupConnector(GroupConnector::andGC)) {
- groupConnectorInvalidToken(tokenAnd, allow);
- return 0;
- }
- gc.type = GroupConnector::andGC;
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dAND);
- return 1;
- case tokenSeq:
- if (!allow.groupConnector(GroupConnector::seqGC)) {
- groupConnectorInvalidToken(tokenSeq, allow);
- return 0;
- }
- gc.type = GroupConnector::seqGC;
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dSEQ);
- return 1;
- case tokenOr:
- if (!allow.groupConnector(GroupConnector::orGC)) {
- groupConnectorInvalidToken(tokenOr, allow);
- return 0;
- }
- gc.type = GroupConnector::orGC;
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dOR);
- return 1;
- case tokenDtgc:
- if (!allow.groupConnector(GroupConnector::dtgcGC)) {
- groupConnectorInvalidToken(tokenDtgc, allow);
- return 0;
- }
- gc.type = GroupConnector::dtgcGC;
- if (inputLevel() > groupInputLevel)
- message(ParserMessages::groupParameterEntityNotEnded);
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dDTGC);
- return 1;
- case tokenGrpc:
- if (!allow.groupConnector(GroupConnector::grpcGC)) {
- groupConnectorInvalidToken(tokenGrpc, allow);
- return 0;
- }
- gc.type = GroupConnector::grpcGC;
- if (inputLevel() > groupInputLevel)
- message(ParserMessages::groupParameterEntityNotEnded);
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dGRPC);
- return 1;
- default:
- groupConnectorInvalidToken(token, allow);
- return 0;
- }
- }
-}
-
-void Parser::groupConnectorInvalidToken(Token token,
- const AllowedGroupConnectors &allow)
-{
- message(ParserMessages::connectorInvalidToken,
- TokenMessageArg(token, grpMode, syntaxPointer(), sdPointer()),
- AllowedGroupConnectorsMessageArg(allow, syntaxPointer()));
-}
-
-Boolean Parser::parseElementNameGroup(unsigned declInputLevel, Param &parm)
-{
- if (!parseNameGroup(declInputLevel, parm))
- return 0;
- parm.elementVector.resize(parm.nameTokenVector.size());
- for (size_t i = 0; i < parm.nameTokenVector.size(); i++)
- parm.elementVector[i] = lookupCreateElement(parm.nameTokenVector[i].name);
- return 1;
-}
-
-Boolean Parser::parseEntityReferenceNameGroup(Boolean &ignore)
-{
- Param parm;
- if (!parseNameGroup(inputLevel(), parm))
- return 0;
- if (inInstance()) {
- for (size_t i = 0; i < parm.nameTokenVector.size(); i++) {
- const Lpd *lpd = lookupLpd(parm.nameTokenVector[i].name).pointer();
- if (lpd && lpd->active()) {
- ignore = 0;
- return 1;
- }
- }
- }
- ignore = 1;
- return 1;
-}
-
-Boolean Parser::parseTagNameGroup(Boolean &active)
-{
- Param parm;
- if (!parseNameGroup(inputLevel(), parm))
- return 0;
- active = 0;
- return 1;
-}
-
-Boolean Parser::parseNameGroup(unsigned declInputLevel, Param &parm)
-{
- static AllowedGroupTokens allowName(GroupToken::name);
- return parseGroup(allowName, declInputLevel, parm);
-}
-
-Boolean Parser::parseNameTokenGroup(unsigned declInputLevel, Param &parm)
-{
- static AllowedGroupTokens allowNameToken(GroupToken::nameToken);
- return parseGroup(allowNameToken, declInputLevel, parm);
-}
-
-static
-Boolean groupContains(const Vector<NameToken> &vec, const StringC &str)
-{
- for (size_t i = 0; i < vec.size(); i++)
- if (vec[i].name == str)
- return 1;
- return 0;
-}
-
-Boolean Parser::parseGroup(const AllowedGroupTokens &allowToken,
- unsigned declInputLevel,
- Param &parm)
-{
- unsigned groupInputLevel = inputLevel();
- int nDuplicates = 0;
- Vector<NameToken> &vec = parm.nameTokenVector;
- vec.clear();
- GroupConnector::Type connector = GroupConnector::grpcGC;
- GroupToken gt;
- for (;;) {
- if (!parseGroupToken(allowToken, 0, declInputLevel, groupInputLevel, gt))
- return 0;
- if (groupContains(vec, gt.token)) {
- nDuplicates++;
- message(ParserMessages::duplicateGroupToken,
- StringMessageArg(gt.token));
- }
- else {
- vec.resize(vec.size() + 1);
- gt.token.swap(vec.back().name);
- getCurrentToken(vec.back().origName);
- vec.back().loc = currentLocation();
- }
- GroupConnector gc;
- static AllowedGroupConnectors allowAnyConnectorGrpc(GroupConnector::orGC,
- GroupConnector::andGC,
- GroupConnector::seqGC,
- GroupConnector::grpcGC);
-
- if (!parseGroupConnector(allowAnyConnectorGrpc, declInputLevel,
- groupInputLevel, gc))
- return 0;
- if (gc.type == GroupConnector::grpcGC)
- break;
- if (options().warnNameGroupNotOr) {
- if (gc.type != GroupConnector::orGC)
- message(ParserMessages::nameGroupNotOr);
- }
- else if (options().warnShould) {
- if (connector == GroupConnector::grpcGC)
- connector = gc.type;
- else if (gc.type != connector) {
- message(ParserMessages::mixedConnectors);
- connector = gc.type;
- }
- }
- }
- if (nDuplicates + vec.size() > syntax().grpcnt())
- message(ParserMessages::groupCount, NumberMessageArg(syntax().grpcnt()));
- return 1;
-}
-
-Boolean Parser::parseDataTagGroup(unsigned nestingLevel,
- unsigned declInputLevel, GroupToken &result)
-{
- if (nestingLevel - 1 == syntax().grplvl())
- message(ParserMessages::grplvl, NumberMessageArg(syntax().grplvl()));
- unsigned groupInputLevel = inputLevel();
- GroupToken gt;
- static AllowedGroupTokens allowName(GroupToken::name);
- if (!parseGroupToken(allowName, nestingLevel, declInputLevel,
- groupInputLevel, gt))
- return 0;
- const ElementType *element = lookupCreateElement(gt.token);
- GroupConnector gc;
- static AllowedGroupConnectors allowSeq(GroupConnector::seqGC);
- if (!parseGroupConnector(allowSeq, declInputLevel, groupInputLevel, gc))
- return 0;
- static AllowedGroupTokens
- allowDataTagLiteralDataTagTemplateGroup(GroupToken::dataTagLiteral,
- GroupToken::dataTagTemplateGroup);
- if (!parseGroupToken(allowDataTagLiteralDataTagTemplateGroup,
- nestingLevel,
- declInputLevel,
- groupInputLevel,
- gt))
- return 0;
- Vector<Text> templates;
- if (gt.type == GroupToken::dataTagTemplateGroup)
- gt.textVector.swap(templates);
- else {
- templates.resize(1);
- gt.text.swap(templates[0]);
- }
- static AllowedGroupConnectors allowSeqDtgc(GroupConnector::seqGC,
- GroupConnector::dtgcGC);
- if (!parseGroupConnector(allowSeqDtgc, declInputLevel, groupInputLevel, gc))
- return 0;
- NCVector<Owner<ContentToken> > vec(2);
- vec[1] = new PcdataToken;
- if (gc.type != GroupConnector::dtgcGC) {
- static AllowedGroupTokens allowDataTagLiteral(GroupToken::dataTagLiteral);
- if (!parseGroupToken(allowDataTagLiteral,
- nestingLevel,
- declInputLevel,
- groupInputLevel,
- gt))
- return 0;
- vec[0] = new DataTagElementToken(element, templates, gt.text);
- static AllowedGroupConnectors allowDtgc(GroupConnector::dtgcGC);
- if (!parseGroupConnector(allowDtgc, declInputLevel, groupInputLevel, gc))
- return 0;
- }
- else
- vec[0] = new DataTagElementToken(element, templates);
- ContentToken::OccurrenceIndicator oi = getOccurrenceIndicator(grpMode);
- result.contentToken = new DataTagGroup(vec, oi);
- result.type = GroupToken::dataTagGroup;
- return 1;
-}
-
-Boolean Parser::parseDataTagTemplateGroup(unsigned nestingLevel,
- unsigned declInputLevel,
- GroupToken &result)
-{
- if (nestingLevel - 1 == syntax().grplvl())
- message(ParserMessages::grplvl, NumberMessageArg(syntax().grplvl()));
- unsigned groupInputLevel = inputLevel();
- Vector<Text> &vec = result.textVector;
- for (;;) {
- GroupToken gt;
- static AllowedGroupTokens allowDataTagLiteral(GroupToken::dataTagLiteral);
- if (!parseGroupToken(allowDataTagLiteral,
- nestingLevel,
- declInputLevel,
- groupInputLevel,
- gt))
- return 0;
- if (vec.size() == syntax().grpcnt())
- message(ParserMessages::groupCount, NumberMessageArg(syntax().grpcnt()));
- vec.resize(vec.size() + 1);
- gt.text.swap(vec.back());
- static AllowedGroupConnectors allowOrGrpc(GroupConnector::orGC,
- GroupConnector::grpcGC);
- GroupConnector gc;
- if (!parseGroupConnector(allowOrGrpc, declInputLevel, groupInputLevel, gc))
- return 0;
- if (gc.type == GroupConnector::grpcGC)
- break;
- }
- return 1;
-}
-
-Boolean Parser::parseModelGroup(unsigned nestingLevel, unsigned declInputLevel,
- ModelGroup *&group, Mode oiMode)
-{
- if (nestingLevel - 1 == syntax().grplvl())
- message(ParserMessages::grplvl, NumberMessageArg(syntax().grplvl()));
- unsigned groupInputLevel = inputLevel();
- GroupToken gt;
- NCVector<Owner<ContentToken> > tokenVector;
- GroupConnector::Type connector = GroupConnector::grpcGC;
-
- static AllowedGroupTokens allowContentToken(GroupToken::pcdata,
- GroupToken::dataTagGroup,
- GroupToken::elementToken,
- GroupToken::modelGroup);
- static AllowedGroupConnectors allowAnyConnectorGrpc(GroupConnector::orGC,
- GroupConnector::andGC,
- GroupConnector::seqGC,
- GroupConnector::grpcGC);
-
- static AllowedGroupConnectors allowOrGrpc(GroupConnector::orGC,
- GroupConnector::grpcGC);
- static AllowedGroupConnectors allowAndGrpc(GroupConnector::andGC,
- GroupConnector::grpcGC);
- static AllowedGroupConnectors allowSeqGrpc(GroupConnector::seqGC,
- GroupConnector::grpcGC);
- const AllowedGroupConnectors *connectorp = &allowAnyConnectorGrpc;
-
- GroupConnector gc;
- Boolean pcdataCheck = 0;
- do {
- if (!parseGroupToken(allowContentToken, nestingLevel, declInputLevel,
- groupInputLevel, gt))
- return 0;
- ContentToken *contentToken;
- if (gt.type == GroupToken::modelGroup)
- contentToken = gt.model.extract();
- else
- contentToken = gt.contentToken.extract();
- if (tokenVector.size() == syntax().grpcnt())
- message(ParserMessages::groupCount, NumberMessageArg(syntax().grpcnt()));
- tokenVector.resize(tokenVector.size() + 1);
- tokenVector.back() = contentToken;
- if (!parseGroupConnector(*connectorp, declInputLevel, groupInputLevel, gc))
- return 0;
- if (options().warnMixedContentRepOrGroup && gt.type == GroupToken::pcdata) {
- if (tokenVector.size() != 1)
- message(ParserMessages::pcdataNotFirstInGroup);
- else if (gc.type == GroupConnector::seqGC)
- message(ParserMessages::pcdataInSeqGroup);
- else
- pcdataCheck = 1;
- if (nestingLevel != 1)
- message(ParserMessages::pcdataInNestedModelGroup);
- }
- else if (pcdataCheck) {
- if (gt.type == GroupToken::modelGroup)
- message(ParserMessages::pcdataGroupMemberModelGroup);
- if (contentToken->occurrenceIndicator() != ContentToken::none)
- message(ParserMessages::pcdataGroupMemberOccurrenceIndicator);
- }
- if (tokenVector.size() == 1) {
- connector = gc.type;
- switch (gc.type) {
- case GroupConnector::orGC:
- connectorp = &allowOrGrpc;
- break;
- case GroupConnector::seqGC:
- connectorp = &allowSeqGrpc;
- break;
- case GroupConnector::andGC:
- connectorp = &allowAndGrpc;
- if (options().warnAndGroup)
- message(ParserMessages::andGroup);
- break;
- default:
- break;
- }
- }
- } while (gc.type != GroupConnector::grpcGC);
- ContentToken::OccurrenceIndicator oi
- = getOccurrenceIndicator(oiMode);
- switch (connector) {
- case GroupConnector::orGC:
- group = new OrModelGroup(tokenVector, oi);
- if (pcdataCheck && oi != ContentToken::rep)
- message(ParserMessages::pcdataGroupNotRep);
- break;
- case GroupConnector::grpcGC:
- if (pcdataCheck && oi != ContentToken::rep && oi != ContentToken::none)
- message(ParserMessages::pcdataGroupNotRep);
- // fall through
- case GroupConnector::seqGC:
- group = new SeqModelGroup(tokenVector, oi);
- break;
- case GroupConnector::andGC:
- group = new AndModelGroup(tokenVector, oi);
- break;
- default:
- break;
- }
- return 1;
-}
-
-ContentToken::OccurrenceIndicator
-Parser::getOccurrenceIndicator(Mode oiMode)
-{
- Token token = getToken(oiMode);
- switch (token) {
- case tokenPlus:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dPLUS);
- return ContentToken::plus;
- case tokenOpt:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dOPT);
- return ContentToken::opt;
- case tokenRep:
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dREP);
- return ContentToken::rep;
- default:
- currentInput()->ungetToken();
- return ContentToken::none;
- }
-}
-
-Boolean Parser::parseMinimumLiteral(Boolean lita, Text &text)
-{
- return parseLiteral(lita ? mlitaMode : mlitMode, mlitMode,
- Syntax::referenceQuantity(Syntax::qLITLEN),
- ParserMessages::minimumLiteralLength,
- literalSingleSpace|literalMinimumData
- |(eventsWanted().wantPrologMarkup()
- ? literalDelimInfo
- : 0),
- text);
-}
-
-Boolean Parser::parseSystemIdentifier(Boolean lita, Text &text)
-{
- return parseLiteral(lita ? slitaMode : slitMode, slitMode, syntax().litlen(),
- ParserMessages::systemIdentifierLength,
- (eventsWanted().wantPrologMarkup()
- ? literalDelimInfo
- : 0), text);
-}
-
-Boolean Parser::parseParameterLiteral(Boolean lita, Text &text)
-{
- return parseLiteral(lita ? plitaMode : plitMode, pliteMode, syntax().litlen(),
- ParserMessages::parameterLiteralLength,
- (eventsWanted().wantPrologMarkup()
- ? literalDelimInfo
- : 0),
- text);
-}
-
-Boolean Parser::parseDataTagParameterLiteral(Boolean lita, Text &text)
-{
- return parseLiteral(lita ? plitaMode : plitMode, pliteMode,
- syntax().dtemplen(),
- ParserMessages::dataTagPatternLiteralLength,
- literalDataTag
- | (eventsWanted().wantPrologMarkup()
- ? literalDelimInfo
- : 0),
- text);
-}
-
-Boolean Parser::parseIndicatedReservedName(const AllowedParams &allow,
- Param &parm)
-{
- Syntax::ReservedName rn;
- if (!getIndicatedReservedName(&rn))
- return 0;
- if (!allow.reservedName(rn)) {
- message(ParserMessages::invalidReservedName,
- StringMessageArg(currentToken()));
- return 0;
- }
- parm.type = Param::indicatedReservedName + rn;
- return 1;
-}
-
-Boolean Parser::parseReservedName(const AllowedParams &allow,
- Param &parm)
-{
- Syntax::ReservedName rn;
- if (!getReservedName(&rn))
- return 0;
- if (!allow.reservedName(rn)) {
- message(ParserMessages::invalidReservedName,
- StringMessageArg(syntax().reservedName(rn)));
- return 0;
- }
- parm.type = Param::reservedName + rn;
- return 1;
-}
-
-
-Boolean Parser::parseAttributeValueParam(Param &parm)
-{
- extendNameToken(syntax().litlen() > syntax().normsep()
- ? syntax().litlen() - syntax().normsep()
- : 0,
- ParserMessages::attributeValueLength);
- parm.type = Param::attributeValue;
- Text text;
- text.addChars(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- currentLocation());
- text.swap(parm.literalText);
- if (currentMarkup())
- currentMarkup()->addAttributeValue(currentInput());
- return 1;
-}
-
-Boolean Parser::getIndicatedReservedName(Syntax::ReservedName *result)
-{
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dRNI);
- InputSource *in = currentInput();
- in->startToken();
- if (!syntax().isNameStartCharacter(in->tokenChar(messenger()))) {
- message(ParserMessages::rniNameStart);
- return 0;
- }
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- StringC &buffer = nameBuffer();
- getCurrentToken(syntax().generalSubstTable(), buffer);
- if (!syntax().lookupReservedName(buffer, result)) {
- message(ParserMessages::noSuchReservedName, StringMessageArg(buffer));
- return 0;
- }
- if (currentMarkup())
- currentMarkup()->addReservedName(*result, currentInput());
- return 1;
-}
-
-Boolean Parser::getReservedName(Syntax::ReservedName *result)
-{
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- StringC &buffer = nameBuffer();
- getCurrentToken(syntax().generalSubstTable(), buffer);
- if (!syntax().lookupReservedName(buffer, result)) {
- message(ParserMessages::noSuchReservedName, StringMessageArg(buffer));
- return 0;
- }
- if (currentMarkup())
- currentMarkup()->addReservedName(*result, currentInput());
- return 1;
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseSd.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/parseSd.cxx
deleted file mode 100644
index 4f8a5e10fb..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parseSd.cxx
+++ /dev/null
@@ -1,3435 +0,0 @@
-// Copyright (c) 1994, 1995, 1997 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-#include "Parser.h"
-#include "macros.h"
-#include "SdFormalError.h"
-#include "MessageBuilder.h"
-#include "ParserMessages.h"
-#include "MessageArg.h"
-#include "CharsetRegistry.h"
-#include "ISetIter.h"
-#include "token.h"
-#include "TokenMessageArg.h"
-#include "constant.h"
-#include "SdText.h"
-#include "NumericCharRefOrigin.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class CharSwitcher {
-public:
- CharSwitcher();
- void addSwitch(WideChar from, WideChar to);
- SyntaxChar subst(WideChar c);
- size_t nSwitches() const;
- Boolean switchUsed(size_t i) const;
- WideChar switchFrom(size_t i) const;
- WideChar switchTo(size_t i) const;
-private:
- Vector<PackedBoolean> switchUsed_;
- Vector<WideChar> switches_;
-};
-
-// Information about the SGML declaration being built.
-
-struct SdBuilder {
- SdBuilder();
- void addFormalError(const Location &, const MessageType1 &, const StringC &);
- Ptr<Sd> sd;
- Ptr<Syntax> syntax;
- CharsetDecl syntaxCharsetDecl;
- CharsetInfo syntaxCharset;
- CharSwitcher switcher;
- Boolean externalSyntax;
- Boolean enr;
- Boolean www;
- Boolean valid;
- Boolean external;
- IList<SdFormalError> formalErrorList;
-};
-
-class CharsetMessageArg : public MessageArg {
-public:
- CharsetMessageArg(const ISet<WideChar> &set);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- ISet<WideChar> set_;
-};
-
-struct SdParam {
- typedef unsigned char Type;
- enum {
- invalid,
- eE,
- minimumLiteral,
- mdc,
- minus,
- number,
- capacityName,
- name,
- paramLiteral,
- systemIdentifier,
- generalDelimiterName,
- referenceReservedName,
- quantityName,
- reservedName // Sd::ReservedName is added to this
- };
- Type type;
- StringC token;
- Text literalText;
- String<SyntaxChar> paramLiteralText;
- union {
- Number n;
- Sd::Capacity capacityIndex;
- Syntax::Quantity quantityIndex;
- Syntax::ReservedName reservedNameIndex;
- Syntax::DelimGeneral delimGeneralIndex;
- };
-};
-
-class AllowedSdParams {
-public:
- AllowedSdParams(SdParam::Type,
- SdParam::Type = SdParam::invalid,
- SdParam::Type = SdParam::invalid,
- SdParam::Type = SdParam::invalid,
- SdParam::Type = SdParam::invalid,
- SdParam::Type = SdParam::invalid);
- Boolean param(SdParam::Type) const;
- SdParam::Type get(int i) const;
-private:
- enum { maxAllow = 6 };
- SdParam::Type allow_[maxAllow];
-};
-
-class AllowedSdParamsMessageArg : public MessageArg {
-public:
- AllowedSdParamsMessageArg(const AllowedSdParams &allow,
- const ConstPtr<Sd> &sd);
- MessageArg *copy() const;
- void append(MessageBuilder &) const;
-private:
- AllowedSdParams allow_;
- ConstPtr<Sd> sd_;
-};
-
-struct StandardSyntaxSpec {
- struct AddedFunction {
- const char *name;
- Syntax::FunctionClass functionClass;
- SyntaxChar syntaxChar;
- };
- const AddedFunction *addedFunction;
- size_t nAddedFunction;
- Boolean shortref;
-};
-
-static StandardSyntaxSpec::AddedFunction coreFunctions[] = {
- { "TAB", Syntax::cSEPCHAR, 9 },
-};
-
-static StandardSyntaxSpec coreSyntax = {
- coreFunctions, SIZEOF(coreFunctions), 0
-};
-
-static StandardSyntaxSpec refSyntax = {
- coreFunctions, SIZEOF(coreFunctions), 1
-};
-
-void Parser::doInit()
-{
- if (cancelled()) {
- allDone();
- return;
- }
- // When document entity doesn't exist, don't give any errors
- // other than the cannot open error.
- if (currentInput()->get(messenger()) == InputSource::eE) {
- if (currentInput()->accessError()) {
- allDone();
- return;
- }
- }
- else
- currentInput()->ungetToken();
- const CharsetInfo &initCharset = sd().internalCharset();
- ISet<WideChar> missing;
- findMissingMinimum(initCharset, missing);
- if (!missing.isEmpty()) {
- message(ParserMessages::sdMissingCharacters, CharsetMessageArg(missing));
- giveUp();
- return;
- }
- Boolean found = 0;
- StringC systemId;
- if (scanForSgmlDecl(initCharset)) {
- if (options().warnExplicitSgmlDecl)
- message(ParserMessages::explicitSgmlDecl);
- found = 1;
- }
- else {
- currentInput()->ungetToken();
- if (entityCatalog().sgmlDecl(initCharset, messenger(), systemId)) {
- InputSource *in = entityManager().open(systemId,
- sd().docCharset(),
- InputSourceOrigin::make(),
- 0,
- messenger());
- if (in) {
- pushInput(in);
- if (scanForSgmlDecl(initCharset))
- found = 1;
- else {
- message(ParserMessages::badDefaultSgmlDecl);
- popInputStack();
- }
- }
- }
- }
- if (found) {
- if (startMarkup(eventsWanted().wantPrologMarkup(), currentLocation())) {
- size_t nS = currentInput()->currentTokenLength() - 6;
- for (size_t i = 0; i < nS; i++)
- currentMarkup()->addS(currentInput()->currentTokenStart()[i]);
- currentMarkup()->addDelim(Syntax::dMDO);
- currentMarkup()->addSdReservedName(Sd::rSGML,
- currentInput()->currentTokenStart()
- + (currentInput()->currentTokenLength() - 4),
- 4);
- }
- Syntax *syntaxp = new Syntax(sd());
- CharSwitcher switcher;
- if (!setStandardSyntax(*syntaxp, refSyntax, sd().internalCharset(), switcher, 0)) {
- giveUp();
- return;
- }
- syntaxp->implySgmlChar(sd());
- setSyntax(syntaxp);
- compileSdModes();
- ConstPtr<Sd> refSd(sdPointer());
- ConstPtr<Syntax> refSyntax(syntaxPointer());
- if (!parseSgmlDecl()) {
- giveUp();
- return;
- }
- // queue an SGML declaration event
- eventHandler().sgmlDecl(new (eventAllocator())
- SgmlDeclEvent(sdPointer(),
- syntaxPointer(),
- instanceSyntaxPointer(),
- refSd,
- refSyntax,
- currentInput()->nextIndex(),
- systemId,
- markupLocation(),
- currentMarkup()));
- if (inputLevel() == 2) {
- // FIXME perhaps check for junk after SGML declaration
- popInputStack();
- }
- }
- else {
- if (!implySgmlDecl()) {
- giveUp();
- return;
- }
- currentInput()->willNotSetDocCharset();
- // queue an SGML declaration event
- eventHandler().sgmlDecl(new (eventAllocator())
- SgmlDeclEvent(sdPointer(),
- syntaxPointer()));
- }
-
- // Now we have sd and syntax set up, prepare to parse the prolog.
- compilePrologModes();
- setPhase(prologPhase);
-}
-
-Boolean Parser::implySgmlDecl()
-{
- Syntax *syntaxp = new Syntax(sd());
- const StandardSyntaxSpec *spec;
- if (options().shortref)
- spec = &refSyntax;
- else
- spec = &coreSyntax;
- CharSwitcher switcher;
- if (!setStandardSyntax(*syntaxp, *spec, sd().internalCharset(), switcher, 0))
- return 0;
- syntaxp->implySgmlChar(sd());
- for (int i = 0; i < Syntax::nQuantity; i++)
- syntaxp->setQuantity(i, options().quantity[i]);
- setSyntax(syntaxp);
- return 1;
-}
-
-Boolean Parser::setStandardSyntax(Syntax &syn,
- const StandardSyntaxSpec &spec,
- const CharsetInfo &internalCharset,
- CharSwitcher &switcher,
- Boolean www)
-{
- static UnivCharsetDesc::Range syntaxCharsetRanges[] = {
- { 0, 128, 0 },
- };
- static UnivCharsetDesc syntaxCharsetDesc(syntaxCharsetRanges,
- SIZEOF(syntaxCharsetRanges));
- static CharsetInfo syntaxCharset(syntaxCharsetDesc);
-
- Boolean valid = 1;
- if (!checkSwitches(switcher, syntaxCharset))
- valid = 0;
- size_t i;
- for (i = 0; i < switcher.nSwitches(); i++)
- if (switcher.switchTo(i) >= 128)
- message(ParserMessages::switchNotInCharset,
- NumberMessageArg(switcher.switchTo(i)));
- static const Char shunchar[] = {
- 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
- };
-
- for (i = 0; i < SIZEOF(shunchar); i++)
- syn.addShunchar(shunchar[i]);
- syn.setShuncharControls();
- static Syntax::StandardFunction standardFunctions[3] = {
- Syntax::fRE, Syntax::fRS, Syntax::fSPACE
- };
- static SyntaxChar functionChars[3] = { 13, 10, 32 };
- for (i = 0; i < 3; i++) {
- Char docChar;
- if (translateSyntax(switcher,
- syntaxCharset,
- internalCharset,
- functionChars[i],
- docChar)
- && checkNotFunction(syn, docChar))
- syn.setStandardFunction(standardFunctions[i], docChar);
- else
- valid = 0;
- }
- for (i = 0; i < spec.nAddedFunction; i++) {
- Char docChar;
- if (translateSyntax(switcher,
- syntaxCharset,
- internalCharset,
- spec.addedFunction[i].syntaxChar,
- docChar)
- && checkNotFunction(syn, docChar))
- syn.addFunctionChar(internalCharset.execToDesc(spec.addedFunction[i].name),
- spec.addedFunction[i].functionClass,
- docChar);
- else
- valid = 0;
- }
-
- static SyntaxChar nameChars[2] = { 45, 46 }; // '-' '.'
- ISet<Char> nameCharSet;
- for (i = 0; i < 2; i++) {
- Char docChar;
- if (translateSyntax(switcher,
- syntaxCharset,
- internalCharset,
- nameChars[i],
- docChar))
- nameCharSet.add(docChar);
- else
- valid = 0;
- }
- if (!checkNmchars(nameCharSet, syn))
- valid = 0;
- else
- syn.addNameCharacters(nameCharSet);
- syn.setNamecaseGeneral(1);
- syn.setNamecaseEntity(0);
- if (!setRefDelimGeneral(syn, syntaxCharset, internalCharset, switcher))
- valid = 0;
- setRefNames(syn, internalCharset, www);
- syn.enterStandardFunctionNames();
- if (spec.shortref
- && !addRefDelimShortref(syn, syntaxCharset, internalCharset, switcher))
- valid = 0;
- return valid;
-}
-
-Boolean Parser::setRefDelimGeneral(Syntax &syntax,
- const CharsetInfo &syntaxCharset,
- const CharsetInfo &internalCharset,
- CharSwitcher &switcher)
-{
- // Column 3 from Figure 3
- static const char delims[][2] = {
- { 38 },
- { 45, 45 },
- { 38, 35 },
- { 93 },
- { 91 },
- { 93 },
- { 91 },
- { 38 },
- { 60, 47 },
- { 41 },
- { 40 },
- { 0 }, // HCRO
- { 34 },
- { 39 },
- { 62 },
- { 60, 33 },
- { 45 },
- { 93, 93 },
- { 47 },
- { 47 }, // NESTC
- { 63 },
- { 124 },
- { 37 },
- { 62 },
- { 60, 63 },
- { 43 },
- { 59 },
- { 42 },
- { 35 },
- { 44 },
- { 60 },
- { 62 },
- { 61 },
- };
- Boolean valid = 1;
- ISet<WideChar> missing;
- for (int i = 0; i < Syntax::nDelimGeneral; i++)
- if (syntax.delimGeneral(i).size() == 0) {
- StringC delim;
- size_t j;
- for (j = 0; j < 2 && delims[i][j] != '\0'; j++) {
- UnivChar univChar = translateUniv(delims[i][j], switcher,
- syntaxCharset);
- Char c;
- if (univToDescCheck(internalCharset, univChar, c))
- delim += c;
- else {
- missing += univChar;
- valid = 0;
- }
- }
- if (delim.size() == j) {
- if (checkGeneralDelim(syntax, delim))
- syntax.setDelimGeneral(i, delim);
- else
- valid = 0;
- }
- }
- if (!missing.isEmpty())
- message(ParserMessages::missingSignificant646, CharsetMessageArg(missing));
- return valid;
-}
-
-void Parser::setRefNames(Syntax &syntax, const CharsetInfo &internalCharset,
- Boolean www)
-{
- static const char *const referenceNames[] = {
- "ALL",
- "ANY",
- "ATTLIST",
- "CDATA",
- "CONREF",
- "CURRENT",
- "DATA",
- "DEFAULT",
- "DOCTYPE",
- "ELEMENT",
- "EMPTY",
- "ENDTAG",
- "ENTITIES",
- "ENTITY",
- "FIXED",
- "ID",
- "IDLINK",
- "IDREF",
- "IDREFS",
- "IGNORE",
- "IMPLICIT",
- "IMPLIED",
- "INCLUDE",
- "INITIAL",
- "LINK",
- "LINKTYPE",
- "MD",
- "MS",
- "NAME",
- "NAMES",
- "NDATA",
- "NMTOKEN",
- "NMTOKENS",
- "NOTATION",
- "NUMBER",
- "NUMBERS",
- "NUTOKEN",
- "NUTOKENS",
- "O",
- "PCDATA",
- "PI",
- "POSTLINK",
- "PUBLIC",
- "RCDATA",
- "RE",
- "REQUIRED",
- "RESTORE",
- "RS",
- "SDATA",
- "SHORTREF",
- "SIMPLE",
- "SPACE",
- "STARTTAG",
- "SUBDOC",
- "SYSTEM",
- "TEMP",
- "USELINK",
- "USEMAP"
- };
- for (int i = 0; i < Syntax::nNames; i++) {
- switch (i) {
- case Syntax::rDATA:
- case Syntax::rIMPLICIT:
- if (!www)
- break;
- // fall through
- case Syntax::rALL:
- if (!www && options().errorAfdr)
- break;
- // fall through
- default:
- {
- StringC docName(internalCharset.execToDesc(referenceNames[i]));
- Syntax::ReservedName tem;
- if (syntax.lookupReservedName(docName, &tem))
- message(ParserMessages::nameReferenceReservedName,
- StringMessageArg(docName));
- if (syntax.reservedName(Syntax::ReservedName(i)).size() == 0)
- syntax.setName(i, docName);
- break;
- }
- }
- }
-}
-
-Boolean Parser::addRefDelimShortref(Syntax &syntax,
- const CharsetInfo &syntaxCharset,
- const CharsetInfo &internalCharset,
- CharSwitcher &switcher)
-{
- // Column 2 from Figure 4
- static const char delimShortref[][3] = {
- { 9 },
- { 13 },
- { 10 },
- { 10, 66 },
- { 10, 13 },
- { 10, 66, 13 },
- { 66, 13 },
- { 32 },
- { 66, 66 },
- { 34 },
- { 35 },
- { 37 },
- { 39 },
- { 40 },
- { 41 },
- { 42 },
- { 43 },
- { 44 },
- { 45 },
- { 45, 45 },
- { 58 },
- { 59 },
- { 61 },
- { 64 },
- { 91 },
- { 93 },
- { 94 },
- { 95 },
- { 123 },
- { 124 },
- { 125 },
- { 126 },
- };
- ISet<WideChar> missing;
-
- for (size_t i = 0; i < SIZEOF(delimShortref); i++) {
- StringC delim;
-
- size_t j;
- for (j = 0; j < 3 && delimShortref[i][j] != '\0'; j++) {
- Char c;
- UnivChar univChar = translateUniv(delimShortref[i][j], switcher,
- syntaxCharset);
- if (univToDescCheck(internalCharset, univChar, c))
- delim += c;
- else
- missing += univChar;
- }
- if (delim.size() == j) {
- if (switcher.nSwitches() > 0 && syntax.isValidShortref(delim))
- message(ParserMessages::duplicateDelimShortref,
- StringMessageArg(delim));
- else
- syntax.addDelimShortref(delim, internalCharset);
- }
- }
- if (!missing.isEmpty())
- message(ParserMessages::missingSignificant646, CharsetMessageArg(missing));
- return 1;
-}
-
-// Determine whether the document starts with an SGML declaration.
-// There is no current syntax at this point.
-
-Boolean Parser::scanForSgmlDecl(const CharsetInfo &initCharset)
-{
- Char rs;
- if (!univToDescCheck(initCharset, UnivCharsetDesc::rs, rs))
- return 0;
- Char re;
- if (!univToDescCheck(initCharset, UnivCharsetDesc::re, re))
- return 0;
- Char space;
- if (!univToDescCheck(initCharset, UnivCharsetDesc::space, space))
- return 0;
- Char tab;
- if (!univToDescCheck(initCharset, UnivCharsetDesc::tab, tab))
- return 0;
- InputSource *in = currentInput();
- Xchar c = in->get(messenger());
- while (c == rs || c == space || c == re || c == tab)
- c = in->tokenChar(messenger());
- if (c != initCharset.execToDesc('<'))
- return 0;
- if (in->tokenChar(messenger()) != initCharset.execToDesc('!'))
- return 0;
- c = in->tokenChar(messenger());
- if (c != initCharset.execToDesc('S')
- && c != initCharset.execToDesc('s'))
- return 0;
- c = in->tokenChar(messenger());
- if (c != initCharset.execToDesc('G')
- && c != initCharset.execToDesc('g'))
- return 0;
- c = in->tokenChar(messenger());
- if (c != initCharset.execToDesc('M')
- && c != initCharset.execToDesc('m'))
- return 0;
- c = in->tokenChar(messenger());
- if (c != initCharset.execToDesc('L')
- && c != initCharset.execToDesc('l'))
- return 0;
- c = in->tokenChar(messenger());
- // Don't recognize this if SGML is followed by a name character.
- if (c == InputSource::eE)
- return 1;
- in->endToken(in->currentTokenLength() - 1);
- if (c == initCharset.execToDesc('-'))
- return 0;
- if (c == initCharset.execToDesc('.'))
- return 0;
- UnivChar univ;
- if (!initCharset.descToUniv(c, univ))
- return 1;
- if (UnivCharsetDesc::a <= univ && univ < UnivCharsetDesc::a + 26)
- return 0;
- if (UnivCharsetDesc::A <= univ && univ < UnivCharsetDesc::A + 26)
- return 0;
- if (UnivCharsetDesc::zero <= univ && univ < UnivCharsetDesc::zero + 10)
- return 0;
- return 1;
-}
-
-void Parser::findMissingMinimum(const CharsetInfo &charset,
- ISet<WideChar> &missing)
-{
- Char to;
- size_t i;
- for (i = 0; i < 26; i++) {
- if (!univToDescCheck(charset, UnivCharsetDesc::A + i, to))
- missing += UnivCharsetDesc::A + i;
- if (!univToDescCheck(charset, UnivCharsetDesc::a + i, to))
- missing += UnivCharsetDesc::a + i;
- }
- for (i = 0; i < 10; i++) {
- Char to;
- if (!univToDescCheck(charset, UnivCharsetDesc::zero + i, to))
- missing += UnivCharsetDesc::zero + i;
- }
- static const UnivChar special[] = {
- 39, 40, 41, 43, 44, 45, 46, 47, 58, 61, 63
- };
-
- for (i = 0; i < SIZEOF(special); i++)
- if (!univToDescCheck(charset, special[i], to))
- missing += special[i];
-}
-
-
-Boolean Parser::parseSgmlDecl()
-{
- SdParam parm;
- SdBuilder sdBuilder;
-
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral, SdParam::name), parm))
- return 0;
- if (parm.type == SdParam::name) {
- sdBuilder.external = 1;
- Location loc(currentLocation());
- StringC name;
- parm.token.swap(name);
- ExternalId externalId;
- if (!sdParseSgmlDeclRef(sdBuilder, parm, externalId))
- return 0;
- ExternalEntity *entity
- = new ExternalTextEntity(name, EntityDecl::sgml, loc, externalId);
- ConstPtr<Entity> entityPtr(entity);
- entity->generateSystemId(*this);
- if (entity->externalId().effectiveSystemId().size() == 0) {
- message(ParserMessages::cannotGenerateSystemIdSgml);
- return 0;
- }
- Ptr<EntityOrigin> origin(EntityOrigin::make(internalAllocator(), entityPtr, loc));
- if (currentMarkup())
- currentMarkup()->addEntityStart(origin);
- pushInput(entityManager().open(entity->externalId().effectiveSystemId(),
- sd().docCharset(),
- origin.pointer(),
- 0,
- messenger()));
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral), parm))
- return 0;
- }
- StringC version(sd().execToInternal("ISO 8879:1986"));
- StringC enrVersion(sd().execToInternal("ISO 8879:1986 (ENR)"));
- StringC wwwVersion(sd().execToInternal("ISO 8879:1986 (WWW)"));
- if (parm.literalText.string() == enrVersion)
- sdBuilder.enr = 1;
- else if (parm.literalText.string() == wwwVersion) {
- sdBuilder.enr = 1;
- sdBuilder.www = 1;
- }
- else if (parm.literalText.string() != version)
- message(ParserMessages::standardVersion,
- StringMessageArg(parm.literalText.string()));
- if (sdBuilder.external && !sdBuilder.www)
- message(ParserMessages::sgmlDeclRefRequiresWww);
- sdBuilder.sd = new Sd(entityManagerPtr());
- if (sdBuilder.www)
- sdBuilder.sd->setWww(1);
- typedef Boolean (Parser::*SdParser)(SdBuilder &, SdParam &);
- static SdParser parsers[] = {
- &Parser::sdParseDocumentCharset,
- &Parser::sdParseCapacity,
- &Parser::sdParseScope,
- &Parser::sdParseSyntax,
- &Parser::sdParseFeatures,
- &Parser::sdParseAppinfo,
- &Parser::sdParseSeealso,
- };
- for (size_t i = 0; i < SIZEOF(parsers); i++) {
- if (!(this->*(parsers[i]))(sdBuilder, parm))
- return 0;
- if (!sdBuilder.valid)
- return 0;
- }
- setSdOverrides(*sdBuilder.sd);
- if (sdBuilder.sd->formal()) {
- while (!sdBuilder.formalErrorList.empty()) {
- SdFormalError *p = sdBuilder.formalErrorList.get();
- ParserState *state = this; // work around lcc 3.0 bug
- p->send(*state);
- delete p;
- }
- }
- setSd(sdBuilder.sd.pointer());
- currentInput()->setDocCharset(sd().docCharset(), entityManager().charset());
- if (sdBuilder.sd->scopeInstance()) {
- Syntax *proSyntax = new Syntax(sd());
- CharSwitcher switcher;
- setStandardSyntax(*proSyntax, refSyntax, sd().internalCharset(), switcher, sdBuilder.www);
- proSyntax->setSgmlChar(*sdBuilder.syntax->charSet(Syntax::sgmlChar));
- ISet<WideChar> invalidSgmlChar;
- proSyntax->checkSgmlChar(*sdBuilder.sd,
- sdBuilder.syntax.pointer(),
- 1, // get results in document character set
- invalidSgmlChar);
- sdBuilder.syntax->checkSgmlChar(*sdBuilder.sd,
- proSyntax,
- 1, // get results in document character set
- invalidSgmlChar);
- if (!invalidSgmlChar.isEmpty())
- message(ParserMessages::invalidSgmlChar, CharsetMessageArg(invalidSgmlChar));
- setSyntaxes(proSyntax, sdBuilder.syntax.pointer());
- }
- else
- setSyntax(sdBuilder.syntax.pointer());
- if (syntax().multicode())
- currentInput()->setMarkupScanTable(syntax().markupScanTable());
- return 1;
-}
-
-Boolean Parser::sdParseSgmlDeclRef(SdBuilder &sdBuilder, SdParam &parm,
- ExternalId &id)
-{
- id.setLocation(currentLocation());
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSYSTEM,
- SdParam::reservedName + Sd::rPUBLIC,
- SdParam::mdc),
- parm))
- return 0;
- if (parm.type == SdParam::mdc)
- return 1;
- if (parm.type == SdParam::reservedName + Sd::rPUBLIC) {
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral), parm))
- return 0;
- const MessageType1 *err;
- PublicId::TextClass textClass;
- if (!id.setPublic(parm.literalText, sd().internalCharset(), syntax().space(), err))
- sdBuilder.addFormalError(currentLocation(), *err, id.publicId()->string());
- else if (id.publicId()->getTextClass(textClass)
- && textClass != PublicId::SD)
- sdBuilder.addFormalError(currentLocation(),
- ParserMessages::sdTextClass,
- id.publicId()->string());
- }
- if (!parseSdParam(AllowedSdParams(SdParam::systemIdentifier, SdParam::mdc), parm))
- return 0;
- if (parm.type == SdParam::mdc)
- return 1;
- id.setSystem(parm.literalText);
- return parseSdParam(AllowedSdParams(SdParam::mdc), parm);
-}
-
-Boolean Parser::sdParseDocumentCharset(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rCHARSET),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rBASESET),
- parm))
- return 0;
- CharsetDecl decl;
- UnivCharsetDesc desc;
- if (!sdParseCharset(sdBuilder, parm, 1, decl, desc))
- return 0;
- ISet<WideChar> missing;
- findMissingMinimum(desc, missing);
- if (!missing.isEmpty()) {
- message(ParserMessages::missingMinimumChars,
- CharsetMessageArg(missing));
- return 0;
- }
- ISet<Char> sgmlChar;
- decl.usedSet(sgmlChar);
- sdBuilder.sd->setDocCharsetDesc(desc);
- sdBuilder.sd->setDocCharsetDecl(decl);
- sdBuilder.syntax = new Syntax(*sdBuilder.sd);
- if (sd().internalCharsetIsDocCharset())
- sdBuilder.syntax->setSgmlChar(sgmlChar);
- else {
- ISet<Char> internalSgmlChar;
- translateDocSet(sdBuilder.sd->docCharset(), sdBuilder.sd->internalCharset(),
- sgmlChar, internalSgmlChar);
- sdBuilder.syntax->setSgmlChar(internalSgmlChar);
- }
- return 1;
-}
-
-void Parser::translateDocSet(const CharsetInfo &fromCharset,
- const CharsetInfo &toCharset,
- const ISet<Char> &fromSet,
- ISet<Char> &toSet)
-{
- ISetIter<Char> iter(fromSet);
- Char min, max;
- while (iter.next(min, max)) {
- do {
- UnivChar univChar;
- Char internalChar;
- WideChar count2, alsoMax;
- if (!fromCharset.descToUniv(min, univChar, alsoMax)) {
- if (alsoMax >= max)
- break;
- min = alsoMax;
- }
- else {
- // FIXME better not to use univToDescCheck here
- // Maybe OK if multiple internal chars corresponding to doc char
- int nMap = univToDescCheck(toCharset, univChar, internalChar, count2);
- if (alsoMax > max)
- alsoMax = max;
- if (alsoMax - min > count2 - 1)
- alsoMax = min + (count2 - 1);
- if (nMap)
- toSet.addRange(internalChar, internalChar + (alsoMax - min));
- min = alsoMax;
- }
- } while (min++ != max);
- }
-}
-
-Boolean Parser::sdParseCharset(SdBuilder &sdBuilder,
- SdParam &parm,
- Boolean isDocument,
- CharsetDecl &decl,
- UnivCharsetDesc &desc)
-{
- decl.clear();
- ISet<WideChar> multiplyDeclared;
- // This is for checking whether the syntax reference character set
- // is ISO 646 when SCOPE is INSTANCE.
- Boolean maybeISO646 = 1;
- do {
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral), parm))
- return 0;
- UnivCharsetDesc baseDesc;
- PublicId id;
- Boolean found;
- PublicId::TextClass textClass;
- const MessageType1 *err;
- if (!id.init(parm.literalText, sd().internalCharset(), syntax().space(), err))
- sdBuilder.addFormalError(currentLocation(),
- *err,
- id.string());
- else if (id.getTextClass(textClass)
- && textClass != PublicId::CHARSET)
- sdBuilder.addFormalError(currentLocation(),
- ParserMessages::basesetTextClass,
- id.string());
- Boolean givenError;
- if (referencePublic(id, PublicId::CHARSET, givenError))
- found = sdParseExternalCharset(*sdBuilder.sd, baseDesc);
- else if (!givenError) {
- found = 0;
- PublicId::OwnerType ownerType;
- if (id.getOwnerType(ownerType) && ownerType == PublicId::ISO) {
- StringC sequence;
- if (id.getDesignatingSequence(sequence)) {
- CharsetRegistry::ISORegistrationNumber number
- = CharsetRegistry::getRegistrationNumber(sequence, sd().internalCharset());
- if (number != CharsetRegistry::UNREGISTERED) {
- Owner<CharsetRegistry::Iter> iter(CharsetRegistry::makeIter(number));
- if (iter) {
- found = 1;
- WideChar min;
- WideChar max;
- UnivChar univ;
- while (iter->next(min, max, univ))
- baseDesc.addRange(min, max, univ);
- }
- }
- }
- }
- if (!found)
- message(ParserMessages::unknownBaseset, StringMessageArg(id.string()));
- }
- else
- found = 0;
- if (!found)
- maybeISO646 = 0;
- decl.addSection(id);
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rDESCSET),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- do {
- WideChar min = parm.n;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- Number count = parm.n;
- Number adjCount;
- if (options().warnSgmlDecl && count == 0)
- message(ParserMessages::zeroNumberOfCharacters);
- decl.rangeDeclared(min, count, multiplyDeclared);
- if (isDocument
- && count > 0
- && (min > charMax || count - 1 > charMax - min)) {
- message(ParserMessages::documentCharMax, NumberMessageArg(charMax));
- adjCount = min > charMax ? 0 : 1 + (charMax - min);
- maybeISO646 = 0;
- }
- else
- adjCount = count;
- if (!parseSdParam(AllowedSdParams(SdParam::number,
- SdParam::minimumLiteral,
- SdParam::reservedName + Sd::rUNUSED),
- parm))
- return 0;
- switch (parm.type) {
- case SdParam::number:
- decl.addRange(min, count, parm.n);
- if (found && adjCount > 0) {
- ISet<WideChar> baseMissing;
- desc.addBaseRange(baseDesc, min, min + (adjCount - 1), parm.n,
- baseMissing);
- if (!baseMissing.isEmpty() && options().warnSgmlDecl)
- message(ParserMessages::basesetCharsMissing,
- CharsetMessageArg(baseMissing));
- }
- break;
- case SdParam::reservedName + Sd::rUNUSED:
- decl.addRange(min, count);
- break;
- case SdParam::minimumLiteral:
- {
- UnivChar c = charNameToUniv(*sdBuilder.sd, parm.literalText.string());
- if (adjCount > 256) {
- message(ParserMessages::tooManyCharsMinimumLiteral);
- adjCount = 256;
- }
- for (Number i = 0; i < adjCount; i++)
- desc.addRange(min + i, min + i, c);
- }
- maybeISO646 = 0;
- decl.addRange(min, count, parm.literalText.string());
- break;
- default:
- CANNOT_HAPPEN();
- }
- SdParam::Type follow = (isDocument
- ? SdParam::reservedName + Sd::rCAPACITY
- : SdParam::reservedName + Sd::rFUNCTION);
- if (!parseSdParam(AllowedSdParams(SdParam::number,
- SdParam::reservedName + Sd::rBASESET,
- follow),
- parm))
- return 0;
-
- } while (parm.type == SdParam::number);
- } while (parm.type == SdParam::reservedName + Sd::rBASESET);
- if (!multiplyDeclared.isEmpty())
- message(ParserMessages::duplicateCharNumbers,
- CharsetMessageArg(multiplyDeclared));
- ISet<WideChar> declaredSet;
- decl.declaredSet(declaredSet);
- ISetIter<WideChar> iter(declaredSet);
- WideChar min, max, lastMax;
- if (iter.next(min, max)) {
- ISet<WideChar> holes;
- lastMax = max;
- while (iter.next(min, max)) {
- if (min - lastMax > 1)
- holes.addRange(lastMax + 1, min - 1);
- lastMax = max;
- }
- if (!holes.isEmpty())
- message(ParserMessages::codeSetHoles, CharsetMessageArg(holes));
- }
- if (!isDocument && sdBuilder.sd->scopeInstance()) {
- // If scope is INSTANCE, syntax reference character set
- // must be same as reference.
- UnivCharsetDescIter iter(desc);
- WideChar descMin, descMax;
- UnivChar univMin;
- Char nextDescMin = 0;
- while (maybeISO646) {
- if (!iter.next(descMin, descMax, univMin)) {
- if (nextDescMin != 128)
- maybeISO646 = 0;
- break;
- }
- if (descMin != nextDescMin || univMin != descMin)
- maybeISO646 = 0;
- nextDescMin = descMax + 1;
- }
- if (!maybeISO646)
- message(ParserMessages::scopeInstanceSyntaxCharset);
- }
- return 1;
-}
-
-Boolean Parser::sdParseExternalCharset(Sd &sd, UnivCharsetDesc &desc)
-{
- SdParam parm;
- for (;;) {
- if (!parseSdParam(AllowedSdParams(SdParam::number, SdParam::eE),
- parm))
- break;
- if (parm.type == SdParam::eE)
- return 1;
- WideChar min = parm.n;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- break;
- Number count = parm.n;
- if (!parseSdParam(AllowedSdParams(SdParam::number,
- SdParam::minimumLiteral,
- SdParam::reservedName + Sd::rUNUSED),
- parm))
- break;
- if (parm.type == SdParam::number) {
- if (count > 0)
- desc.addRange(min, min + (count - 1), parm.n);
- }
- else if (parm.type == SdParam::minimumLiteral) {
- UnivChar c = charNameToUniv(sd, parm.literalText.string());
- if (count > 256) {
- message(ParserMessages::tooManyCharsMinimumLiteral);
- count = 256;
- }
- for (Number i = 0; i < count; i++)
- desc.addRange(min + i, min + i, c);
- }
- }
- popInputStack();
- return 0;
-}
-
-UnivChar Parser::charNameToUniv(Sd &sd, const StringC &name)
-{
- UnivChar univ;
- if (entityCatalog().lookupChar(name, sd.internalCharset(), messenger(), univ))
- return univ;
- else
- return sd.nameToUniv(name);
-}
-
-Boolean Parser::sdParseCapacity(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(sdBuilder.www
- ? AllowedSdParams(SdParam::reservedName + Sd::rNONE,
- SdParam::reservedName + Sd::rPUBLIC,
- SdParam::reservedName + Sd::rSGMLREF)
- : AllowedSdParams(SdParam::reservedName + Sd::rPUBLIC,
- SdParam::reservedName + Sd::rSGMLREF),
- parm))
- return 0;
-#if _MSC_VER == 1100
- // Workaround for Visual C++ 5.0 bug
- int
-#else
- Boolean
-#endif
- pushed = 0;
- if (parm.type == SdParam::reservedName + Sd::rNONE)
- return parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSCOPE),
- parm);
- if (parm.type == SdParam::reservedName + Sd::rPUBLIC) {
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral), parm))
- return 0;
- PublicId id;
- PublicId::TextClass textClass;
- const MessageType1 *err;
- if (!id.init(parm.literalText, sd().internalCharset(), syntax().space(), err))
- sdBuilder.addFormalError(currentLocation(),
- *err,
- id.string());
- else if (id.getTextClass(textClass)
- && textClass != PublicId::CAPACITY)
- sdBuilder.addFormalError(currentLocation(),
- ParserMessages::capacityTextClass,
- id.string());
- const StringC &str = id.string();
- if (str != sd().execToInternal("ISO 8879-1986//CAPACITY Reference//EN")
- && str != sd().execToInternal("ISO 8879:1986//CAPACITY Reference//EN")) {
- Boolean givenError;
- if (referencePublic(id, PublicId::CAPACITY, givenError))
- pushed = 1;
- else if (!givenError)
- message(ParserMessages::unknownCapacitySet, StringMessageArg(str));
- }
- if (!pushed)
- return parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSCOPE),
- parm);
- }
-
- PackedBoolean capacitySpecified[Sd::nCapacity];
- int i;
- for (i = 0; i < Sd::nCapacity; i++)
- capacitySpecified[i] = 0;
- if (!parseSdParam(AllowedSdParams(SdParam::capacityName), parm))
- return 0;
- do {
- Sd::Capacity capacityIndex = parm.capacityIndex;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
-
- if (!capacitySpecified[capacityIndex]) {
- sdBuilder.sd->setCapacity(capacityIndex, parm.n);
- capacitySpecified[capacityIndex] = 1;
- }
- else if (options().warnSgmlDecl)
- message(ParserMessages::duplicateCapacity,
- StringMessageArg(sd().capacityName(i)));
- int final = pushed ? int(SdParam::eE) : SdParam::reservedName + Sd::rSCOPE;
- if (!parseSdParam(AllowedSdParams(SdParam::capacityName, final),
- parm))
- return 0;
- } while (parm.type == SdParam::capacityName);
- Number totalcap = sdBuilder.sd->capacity(0);
- for (i = 1; i < Sd::nCapacity; i++)
- if (sdBuilder.sd->capacity(i) > totalcap)
- message(ParserMessages::capacityExceedsTotalcap,
- StringMessageArg(sd().capacityName(i)));
- if (pushed)
- return parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSCOPE),
- parm);
- return 1;
-}
-
-Boolean Parser::referencePublic(const PublicId &id,
- PublicId::TextClass entityType,
- Boolean &givenError)
-{
- givenError = 0;
- StringC sysid;
- if (entityCatalog().lookupPublic(id.string(),
- sd().internalCharset(),
- messenger(),
- sysid)) {
- Location loc = currentLocation();
- eventHandler().sgmlDeclEntity(new (eventAllocator())
- SgmlDeclEntityEvent(id,
- entityType,
- sysid,
- loc));
- Ptr<EntityOrigin> origin(EntityOrigin::make(internalAllocator(),
- ConstPtr<Entity>(0),
- loc));
- if (currentMarkup())
- currentMarkup()->addEntityStart(origin);
- InputSource *in = entityManager().open(sysid,
- sd().docCharset(),
- origin.pointer(),
- 0,
- messenger());
- if (!in) {
- givenError = 1;
- return 0;
- }
- pushInput(in);
- return 1;
- }
- return 0;
-}
-
-Boolean Parser::sdParseScope(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rINSTANCE,
- SdParam::reservedName + Sd::rDOCUMENT),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rINSTANCE)
- sdBuilder.sd->setScopeInstance();
- return 1;
-}
-
-Boolean Parser::sdParseSyntax(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSYNTAX),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSHUNCHAR,
- SdParam::reservedName + Sd::rPUBLIC),
- parm))
- return 0;
-
- if (parm.type == SdParam::reservedName + Sd::rPUBLIC) {
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral), parm))
- return 0;
- PublicId id;
- const MessageType1 *err;
- PublicId::TextClass textClass;
- if (!id.init(parm.literalText, sd().internalCharset(), syntax().space(), err))
- sdBuilder.addFormalError(currentLocation(),
- *err,
- id.string());
- else if (id.getTextClass(textClass)
- && textClass != PublicId::SYNTAX)
- sdBuilder.addFormalError(currentLocation(),
- ParserMessages::syntaxTextClass,
- id.string());
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rFEATURES,
- SdParam::reservedName + Sd::rSWITCHES),
- parm))
- return 0;
- Vector<UnivChar> charSwitches;
- if (parm.type == SdParam::reservedName + Sd::rSWITCHES) {
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- for (;;) {
- SyntaxChar c = parm.n;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- sdBuilder.switcher.addSwitch(c, parm.n);
- if (!parseSdParam(AllowedSdParams(SdParam::number,
- SdParam::reservedName
- + Sd::rFEATURES),
- parm))
- return 0;
- if (parm.type != SdParam::number)
- break;
- }
- }
- const StandardSyntaxSpec *spec = lookupSyntax(id);
- if (spec) {
- if (!setStandardSyntax(*sdBuilder.syntax,
- *spec,
- sdBuilder.sd->internalCharset(),
- sdBuilder.switcher,
- sdBuilder.www))
- sdBuilder.valid = 0;
- }
- else {
- Boolean givenError;
- if (referencePublic(id, PublicId::SYNTAX, givenError)) {
- sdBuilder.externalSyntax = 1;
- SdParam parm2;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + Sd::rSHUNCHAR),
- parm2))
- return 0;
- if (!sdParseExplicitSyntax(sdBuilder, parm2))
- return 0;
- }
- else {
- if (!givenError)
- message(ParserMessages::unknownPublicSyntax,
- StringMessageArg(id.string()));
- sdBuilder.valid = 0;
- }
- }
- }
- else {
- if (!sdParseExplicitSyntax(sdBuilder, parm))
- return 0;
- }
- if (!sdBuilder.sd->scopeInstance()) {
- // we know the significant chars now
- ISet<WideChar> invalidSgmlChar;
- sdBuilder.syntax->checkSgmlChar(*sdBuilder.sd,
- 0,
- 1,
- invalidSgmlChar);
- if (!invalidSgmlChar.isEmpty())
- message(ParserMessages::invalidSgmlChar, CharsetMessageArg(invalidSgmlChar));
- }
- checkSyntaxNamelen(*sdBuilder.syntax);
- checkSwitchesMarkup(sdBuilder.switcher);
- return 1;
-}
-
-Boolean Parser::sdParseExplicitSyntax(SdBuilder &sdBuilder,
- SdParam &parm)
-{
- typedef Boolean (Parser::*SdParser)(SdBuilder &, SdParam &);
- static SdParser parsers[] = {
- &Parser::sdParseShunchar,
- &Parser::sdParseSyntaxCharset,
- &Parser::sdParseFunction,
- &Parser::sdParseNaming,
- &Parser::sdParseDelim,
- &Parser::sdParseNames,
- &Parser::sdParseQuantity
- };
- for (size_t i = 0; i < SIZEOF(parsers); i++)
- if (!(this->*(parsers[i]))(sdBuilder, parm))
- return 0;
- return 1;
-}
-
-const StandardSyntaxSpec *Parser::lookupSyntax(const PublicId &id)
-{
- PublicId::OwnerType ownerType;
- if (!id.getOwnerType(ownerType) || ownerType != PublicId::ISO)
- return 0;
- StringC str;
- if (!id.getOwner(str))
- return 0;
- if (str != sd().execToInternal("ISO 8879:1986")
- && str != sd().execToInternal("ISO 8879-1986"))
- return 0;
- PublicId::TextClass textClass;
- if (!id.getTextClass(textClass) || textClass != PublicId::SYNTAX)
- return 0;
- if (!id.getDescription(str))
- return 0;
- if (str == sd().execToInternal("Reference"))
- return &refSyntax;
- if (str == sd().execToInternal("Core"))
- return &coreSyntax;
- return 0;
-}
-
-Boolean Parser::sdParseSyntaxCharset(SdBuilder &sdBuilder, SdParam &parm)
-{
- UnivCharsetDesc desc;
- if (!sdParseCharset(sdBuilder, parm, 0, sdBuilder.syntaxCharsetDecl, desc))
- return 0;
- sdBuilder.syntaxCharset.set(desc);
- checkSwitches(sdBuilder.switcher, sdBuilder.syntaxCharset);
- for (size_t i = 0; i < sdBuilder.switcher.nSwitches(); i++)
- if (!sdBuilder.syntaxCharsetDecl.charDeclared(sdBuilder.switcher.switchTo(i)))
- message(ParserMessages::switchNotInCharset,
- NumberMessageArg(sdBuilder.switcher.switchTo(i)));
- ISet<WideChar> missing;
- findMissingMinimum(sdBuilder.syntaxCharset, missing);
- if (!missing.isEmpty())
- message(ParserMessages::missingMinimumChars,
- CharsetMessageArg(missing));
- return 1;
-}
-
-Boolean Parser::sdParseShunchar(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNONE,
- SdParam::reservedName + Sd::rCONTROLS,
- SdParam::number), parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rNONE) {
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rBASESET),
- parm))
- return 0;
- return 1;
- }
- if (parm.type == SdParam::reservedName + Sd::rCONTROLS)
- sdBuilder.syntax->setShuncharControls();
- else {
- if (parm.n <= charMax)
- sdBuilder.syntax->addShunchar(Char(parm.n));
- }
- for (;;) {
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rBASESET,
- SdParam::number), parm))
- return 0;
- if (parm.type != SdParam::number)
- break;
- if (parm.n <= charMax)
- sdBuilder.syntax->addShunchar(Char(parm.n));
- }
- return 1;
-}
-
-Boolean Parser::sdParseFunction(SdBuilder &sdBuilder, SdParam &parm)
-{
- static Sd::ReservedName standardNames[3] = {
- Sd::rRE, Sd::rRS, Sd::rSPACE
- };
- for (int i = 0; i < 3; i++) {
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + standardNames[i]),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- Char c;
- if (translateSyntax(sdBuilder, parm.n, c)) {
- if (checkNotFunction(*sdBuilder.syntax, c))
- sdBuilder.syntax->setStandardFunction(Syntax::StandardFunction(i), c);
- else
- sdBuilder.valid = 0;
- }
- }
- Boolean haveMsichar = 0;
- Boolean haveMsochar = 0;
- for (;;) {
- if (!parseSdParam(sdBuilder.externalSyntax
- ? AllowedSdParams(SdParam::name, SdParam::paramLiteral)
- : AllowedSdParams(SdParam::name),
- parm))
- return 0;
- Boolean nameWasLiteral;
- size_t nameMarkupIndex;
- if (currentMarkup())
- nameMarkupIndex = currentMarkup()->size() - 1;
- Boolean invalidName = 0;
- StringC name;
- if (parm.type == SdParam::paramLiteral) {
- nameWasLiteral = 1;
- if (!translateSyntax(sdBuilder, parm.paramLiteralText, name))
- invalidName = 1;
- }
- else {
- parm.token.swap(name);
- nameWasLiteral = 0;
- }
- if (!parseSdParam(nameWasLiteral
- ? AllowedSdParams(SdParam::reservedName + Sd::rFUNCHAR,
- SdParam::reservedName + Sd::rMSICHAR,
- SdParam::reservedName + Sd::rMSOCHAR,
- SdParam::reservedName + Sd::rMSSCHAR,
- SdParam::reservedName + Sd::rSEPCHAR)
- : AllowedSdParams(SdParam::reservedName + Sd::rFUNCHAR,
- SdParam::reservedName + Sd::rMSICHAR,
- SdParam::reservedName + Sd::rMSOCHAR,
- SdParam::reservedName + Sd::rMSSCHAR,
- SdParam::reservedName + Sd::rSEPCHAR,
- SdParam::reservedName + Sd::rLCNMSTRT),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rLCNMSTRT) {
- if (name != sd().reservedName(Sd::rNAMING))
- message(ParserMessages::namingBeforeLcnmstrt,
- StringMessageArg(name));
- else if (currentMarkup())
- currentMarkup()->changeToSdReservedName(nameMarkupIndex, Sd::rNAMING);
- break;
- }
- if (!nameWasLiteral) {
- StringC tem;
- name.swap(tem);
- if (!translateName(sdBuilder, tem, name))
- invalidName = 1;
- }
- Syntax::FunctionClass functionClass;
- switch (parm.type) {
- case SdParam::reservedName + Sd::rFUNCHAR:
- functionClass = Syntax::cFUNCHAR;
- break;
- case SdParam::reservedName + Sd::rMSICHAR:
- haveMsichar = 1;
- functionClass = Syntax::cMSICHAR;
- break;
- case SdParam::reservedName + Sd::rMSOCHAR:
- haveMsochar = 1;
- functionClass = Syntax::cMSOCHAR;
- break;
- case SdParam::reservedName + Sd::rMSSCHAR:
- functionClass = Syntax::cMSSCHAR;
- break;
- case SdParam::reservedName + Sd::rSEPCHAR:
- functionClass = Syntax::cSEPCHAR;
- break;
- default:
- CANNOT_HAPPEN();
- }
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- Char c;
- if (translateSyntax(sdBuilder, parm.n, c)
- && checkNotFunction(*sdBuilder.syntax, c)
- && !invalidName) {
- Char tem;
- if (sdBuilder.syntax->lookupFunctionChar(name, &tem))
- message(ParserMessages::duplicateFunctionName, StringMessageArg(name));
- else
- sdBuilder.syntax->addFunctionChar(name, functionClass, c);
- }
- }
- if (haveMsochar && !haveMsichar)
- message(ParserMessages::msocharRequiresMsichar);
- return 1;
-}
-
-Boolean Parser::sdParseNaming(SdBuilder &sdBuilder, SdParam &parm)
-{
- static Sd::ReservedName keys[6] = {
- Sd::rUCNMSTRT, Sd::rNAMESTRT, Sd::rLCNMCHAR, Sd::rUCNMCHAR, Sd::rNAMECHAR,
- Sd::rNAMECASE
- };
- int isNamechar = 0;
- ISet<Char> nameStartChar;
- ISet<Char> nameChar;
- do {
- String<SyntaxChar> lc;
- Vector<size_t> rangeIndex;
- enum PrevParam {
- paramNone,
- paramNumber,
- paramOther
- } prevParam = paramNone;
-
- for (;;) {
- switch (prevParam) {
- case paramNone:
- if (!parseSdParam(AllowedSdParams(SdParam::paramLiteral, SdParam::number),
- parm))
- return 0;
- break;
- case paramNumber:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + keys[isNamechar * 3],
- SdParam::paramLiteral,
- SdParam::number,
- SdParam::minus),
- parm))
- return 0;
- break;
- case paramOther:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + keys[isNamechar * 3],
- SdParam::paramLiteral,
- SdParam::number),
- parm))
- return 0;
- break;
- }
- switch (parm.type) {
- case SdParam::paramLiteral:
- if (prevParam == paramNone)
- break;
- // fall through
- case SdParam::number:
- if (!sdBuilder.externalSyntax && !sdBuilder.enr) {
- message(ParserMessages::enrRequired);
- sdBuilder.enr = 1;
- }
- break;
- default:
- break;
- }
- prevParam = (parm.type == SdParam::number ? paramNumber : paramOther);
- if (parm.type == SdParam::minus) {
- if (!parseSdParam(AllowedSdParams(SdParam::number),
- parm))
- return 0;
- if (parm.n < lc[lc.size() - 1])
- message(ParserMessages::sdInvalidRange);
- else {
- if (parm.n > lc[lc.size() - 1] + 1)
- rangeIndex.push_back(lc.size() - 1);
- lc += SyntaxChar(parm.n);
- }
- }
- else {
- sdParamConvertToLiteral(parm);
- if (parm.type != SdParam::paramLiteral)
- break;
- lc += parm.paramLiteralText;
- }
- }
- size_t lcPos = 0;
- size_t rangeIndexPos = 0;
- unsigned long rangeLeft = 0;
- SyntaxChar nextRangeChar;
- ISet<Char> &set = isNamechar ? nameChar : nameStartChar;
- String<SyntaxChar> chars;
- Boolean runOut = 0;
- prevParam = paramNone;
- for (;;) {
- switch (prevParam) {
- case paramNone:
- if (!parseSdParam(AllowedSdParams(SdParam::paramLiteral, SdParam::number),
- parm))
- return 0;
- break;
- case paramNumber:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + keys[isNamechar * 3 + 1],
- SdParam::reservedName
- + keys[isNamechar * 3 + 2],
- SdParam::paramLiteral,
- SdParam::number,
- SdParam::minus),
- parm))
- return 0;
- break;
- case paramOther:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + keys[isNamechar * 3 + 1],
- SdParam::reservedName
- + keys[isNamechar * 3 + 2],
- SdParam::paramLiteral,
- SdParam::number),
- parm))
- return 0;
- break;
- }
- switch (parm.type) {
- case SdParam::paramLiteral:
- if (prevParam == paramNone)
- break;
- // fall through
- case SdParam::number:
- if (!sdBuilder.externalSyntax && !sdBuilder.enr) {
- message(ParserMessages::enrRequired);
- sdBuilder.enr = 1;
- }
- break;
- default:
- break;
- }
- prevParam = (parm.type == SdParam::number ? paramNumber : paramOther);
- if (parm.type == SdParam::minus) {
- if (!parseSdParam(AllowedSdParams(SdParam::number),
- parm))
- return 0;
- ASSERT(chars.size() == 1);
- SyntaxChar start = chars[0];
- SyntaxChar end = parm.n;
- if (start > end)
- message(ParserMessages::sdInvalidRange);
- else {
- size_t count = end + 1 - start;
- while (count > 0) {
- if (rangeLeft == 0
- && rangeIndexPos < rangeIndex.size()
- && rangeIndex[rangeIndexPos] == lcPos) {
- rangeLeft = 1 + lc[lcPos + 1] - lc[lcPos];
- nextRangeChar = lc[lcPos];
- lcPos += 2;
- rangeIndexPos += 1;
- }
- Char c;
- if (rangeLeft > 0) {
- rangeLeft--;
- c = nextRangeChar++;
- }
- else if (lcPos < lc.size())
- c = lc[lcPos++];
- else {
- c = start;
- runOut = 1;
- }
- if (c == start && count > 1 && (runOut || rangeLeft > 0)) {
- size_t n;
- if (runOut)
- n = count;
- else if (rangeLeft < count) {
- // rangeLeft + 1 <= count
- n = rangeLeft + 1;
- rangeLeft = 0;
- }
- else {
- // count < rangeLeft + 1
- n = count;
- rangeLeft -= n - 1;
- nextRangeChar += n - 1;
- }
- translateRange(sdBuilder, start, start + (n - 1), set);
- count -= n;
- start += n;
- }
- else {
- Char transLc, transUc;
- if (translateSyntax(sdBuilder, c, transLc)
- && translateSyntax(sdBuilder, start, transUc)) {
- set.add(transLc);
- if (transLc != transUc) {
- set.add(transUc);
- sdBuilder.syntax->addSubst(transLc, transUc);
- }
- }
- count--;
- start++;
- }
- }
- }
- chars.resize(0);
- }
- else {
- for (size_t i = 0; i < chars.size(); i++) {
- if (rangeLeft == 0
- && rangeIndexPos < rangeIndex.size()
- && rangeIndex[rangeIndexPos] == lcPos) {
- rangeLeft = 1 + lc[lcPos + 1] - lc[lcPos];
- nextRangeChar = lc[lcPos];
- lcPos += 2;
- rangeIndexPos += 1;
- }
- Char c;
- if (rangeLeft > 0) {
- rangeLeft--;
- c = nextRangeChar++;
- }
- else if (lcPos < lc.size())
- c = lc[lcPos++];
- else {
- runOut = 1;
- c = chars[i];
- }
- // map from c to chars[i]
- Char transLc, transUc;
- if (translateSyntax(sdBuilder, c, transLc)
- && translateSyntax(sdBuilder, chars[i], transUc)) {
- set.add(transLc);
- if (transLc != transUc) {
- set.add(transUc);
- sdBuilder.syntax->addSubst(transLc, transUc);
- }
- }
- }
- sdParamConvertToLiteral(parm);
- if (parm.type != SdParam::paramLiteral)
- break;
- parm.paramLiteralText.swap(chars);
- }
- }
- if ((runOut && !sdBuilder.externalSyntax)
- || rangeLeft > 0 || lcPos < lc.size())
- message(isNamechar
- ? ParserMessages::nmcharLength
- : ParserMessages::nmstrtLength);
- if (parm.type == SdParam::reservedName + keys[isNamechar * 3 + 1]) {
- if (!sdBuilder.externalSyntax && !sdBuilder.enr) {
- message(ParserMessages::enrRequired);
- sdBuilder.enr = 1;
- }
- prevParam = paramNone;
- for (;;) {
- switch (prevParam) {
- case paramNone:
- if (!parseSdParam(AllowedSdParams(SdParam::paramLiteral, SdParam::number),
- parm))
- return 0;
- break;
- case paramNumber:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + keys[isNamechar * 3 + 2],
- SdParam::paramLiteral,
- SdParam::number,
- SdParam::minus),
- parm))
- return 0;
- break;
- case paramOther:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + keys[isNamechar * 3 + 2],
- SdParam::paramLiteral,
- SdParam::number),
- parm))
- return 0;
- break;
- }
- prevParam = (parm.type == SdParam::number ? paramNumber : paramOther);
- if (parm.type == SdParam::minus) {
- SyntaxChar prevNumber = parm.n;
- if (!parseSdParam(AllowedSdParams(SdParam::number),
- parm))
- return 0;
- if (parm.n < prevNumber)
- message(ParserMessages::sdInvalidRange);
- else if (parm.n > prevNumber)
- translateRange(sdBuilder, prevNumber + 1, parm.n, set);
- }
- else {
- sdParamConvertToLiteral(parm);
- if (parm.type != SdParam::paramLiteral)
- break;
- for (size_t i = 0; i < parm.paramLiteralText.size(); i++) {
- Char trans;
- if (translateSyntax(sdBuilder, parm.paramLiteralText[i], trans))
- set.add(trans);
- }
- }
- }
- }
- if (!checkNmchars(set, *sdBuilder.syntax))
- sdBuilder.valid = 0;
- } while (!isNamechar++);
- ISet<WideChar> bad;
- intersectCharSets(nameStartChar, nameChar, bad);
- if (!bad.isEmpty()) {
- sdBuilder.valid = 0;
- message(ParserMessages::nmcharNmstrt, CharsetMessageArg(bad));
- }
- sdBuilder.syntax->addNameStartCharacters(nameStartChar);
- sdBuilder.syntax->addNameCharacters(nameChar);
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rGENERAL),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rYES),
- parm))
- return 0;
- sdBuilder.syntax->setNamecaseGeneral(parm.type
- == SdParam::reservedName + Sd::rYES);
-
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rENTITY),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rYES),
- parm))
- return 0;
- sdBuilder.syntax->setNamecaseEntity(parm.type
- == SdParam::reservedName + Sd::rYES);
- return 1;
-}
-
-Boolean Parser::checkNmchars(const ISet<Char> &set, const Syntax &syntax)
-{
- Boolean valid = 1;
- ISet<WideChar> bad;
- intersectCharSets(set, *syntax.charSet(Syntax::nameStart), bad);
- if (!bad.isEmpty()) {
- message(ParserMessages::nmcharLetter, CharsetMessageArg(bad));
- valid = 0;
- bad.clear();
- }
- intersectCharSets(set, *syntax.charSet(Syntax::digit), bad);
- if (!bad.isEmpty()) {
- message(ParserMessages::nmcharDigit, CharsetMessageArg(bad));
- valid = 0;
- bad.clear();
- }
- Char funChar;
- if (syntax.getStandardFunction(Syntax::fRE, funChar)
- && set.contains(funChar)) {
- message(ParserMessages::nmcharRe, NumberMessageArg(funChar));
- valid = 0;
- }
- if (syntax.getStandardFunction(Syntax::fRS, funChar)
- && set.contains(funChar)) {
- message(ParserMessages::nmcharRs, NumberMessageArg(funChar));
- valid = 0;
- }
- if (syntax.getStandardFunction(Syntax::fSPACE, funChar)
- && set.contains(funChar)) {
- message(ParserMessages::nmcharSpace, NumberMessageArg(funChar));
- valid = 0;
- }
- intersectCharSets(set, *syntax.charSet(Syntax::sepchar), bad);
- if (!bad.isEmpty()) {
- message(ParserMessages::nmcharSepchar, CharsetMessageArg(bad));
- valid = 0;
- }
- return valid;
-}
-
-// Result is a ISet<WideChar>, so it can be used with CharsetMessageArg.
-
-void Parser::intersectCharSets(const ISet<Char> &s1, const ISet<Char> &s2,
- ISet<WideChar> &inter)
-{
- ISetIter<Char> i1(s1);
- ISetIter<Char> i2(s2);
- Char min1, max1, min2, max2;
- if (!i1.next(min1, max1))
- return;
- if (!i2.next(min2, max2))
- return;
- for (;;) {
- if (max1 < min2) {
- if (!i1.next(min1, max1))
- break;
- }
- else if (max2 < min1) {
- if (!i2.next(min2, max2))
- break;
- }
- else {
- // min2 <= max1
- // min1 <= max2
- Char min = min1 > min2 ? min1 : min2;
- Char max = max1 < max2 ? max1 : max2;
- inter.addRange(min, max);
- if (max2 > max) {
- if (!i1.next(min1, max1))
- break;
- }
- else {
- if (!i2.next(min2, max2))
- break;
- }
- }
- }
-}
-
-Boolean Parser::sdParseDelim(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rDELIM),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rGENERAL),
- parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSGMLREF),
- parm))
- return 0;
- PackedBoolean delimGeneralSpecified[Syntax::nDelimGeneral];
- for (int i = 0; i < Syntax::nDelimGeneral; i++)
- delimGeneralSpecified[i] = 0;
- for (;;) {
- if (!parseSdParam(AllowedSdParams(SdParam::generalDelimiterName,
- SdParam::reservedName + Sd::rSHORTREF),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rSHORTREF)
- break;
- Syntax::DelimGeneral delimGeneral = parm.delimGeneralIndex;
- if (delimGeneralSpecified[delimGeneral])
- message(ParserMessages::duplicateDelimGeneral,
- StringMessageArg(sd().generalDelimiterName(delimGeneral)));
- switch (delimGeneral) {
- case Syntax::dHCRO:
- case Syntax::dNESTC:
- requireWWW(sdBuilder);
- break;
- default:
- break;
- }
- if (!parseSdParam(sdBuilder.externalSyntax
- ? AllowedSdParams(SdParam::paramLiteral,
- SdParam::number)
- : AllowedSdParams(SdParam::paramLiteral),
- parm))
- return 0;
- sdParamConvertToLiteral(parm);
- StringC str;
- if (parm.paramLiteralText.size() == 0)
- message(ParserMessages::sdEmptyDelimiter);
- else if (translateSyntax(sdBuilder, parm.paramLiteralText, str)) {
- const SubstTable<Char> *table = sdBuilder.syntax->generalSubstTable();
- for (size_t i = 0; i < str.size(); i++)
- table->subst(str[i]);
- if (checkGeneralDelim(*sdBuilder.syntax, str)
- && !delimGeneralSpecified[delimGeneral])
- sdBuilder.syntax->setDelimGeneral(delimGeneral, str);
- else
- sdBuilder.valid = 0;
- }
- delimGeneralSpecified[delimGeneral] = 1;
- }
- if (sdBuilder.syntax->delimGeneral(Syntax::dNET).size()
- && !sdBuilder.syntax->delimGeneral(Syntax::dNESTC).size())
- sdBuilder.syntax->setDelimGeneral(Syntax::dNESTC,
- sdBuilder.syntax->delimGeneral(Syntax::dNET));
- if (!setRefDelimGeneral(*sdBuilder.syntax,
- sdBuilder.syntaxCharset,
- sdBuilder.sd->internalCharset(),
- sdBuilder.switcher))
- sdBuilder.valid = 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSGMLREF,
- SdParam::reservedName + Sd::rNONE),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rSGMLREF) {
- if (!addRefDelimShortref(*sdBuilder.syntax,
- sdBuilder.syntaxCharset,
- sdBuilder.sd->internalCharset(),
- sdBuilder.switcher))
- sdBuilder.valid = 0;
- }
- String<SyntaxChar> lastLiteral;
- for (;;) {
- if (!parseSdParam(sdBuilder.externalSyntax
- ? AllowedSdParams(SdParam::paramLiteral,
- SdParam::number,
- SdParam::minus,
- SdParam::reservedName + Sd::rNAMES)
- : AllowedSdParams(SdParam::paramLiteral,
- SdParam::reservedName + Sd::rNAMES),
- parm))
- return 0;
- sdParamConvertToLiteral(parm);
- if (parm.type == SdParam::minus) {
- if (!parseSdParam(AllowedSdParams(SdParam::paramLiteral,
- SdParam::number),
- parm))
- return 0;
- sdParamConvertToLiteral(parm);
- if (parm.paramLiteralText.size() == 0)
- message(ParserMessages::sdEmptyDelimiter);
- else if (lastLiteral.size() != 1
- || parm.paramLiteralText.size() != 1)
- message(ParserMessages::sdRangeNotSingleChar);
- else if (parm.paramLiteralText[0] < lastLiteral[0])
- message(ParserMessages::sdInvalidRange);
- else if (parm.paramLiteralText[0] != lastLiteral[0]) {
- ISet<Char> shortrefChars;
- translateRange(sdBuilder,
- lastLiteral[0] + 1,
- parm.paramLiteralText[0],
- shortrefChars);
- ISet<WideChar> duplicates;
- intersectCharSets(shortrefChars,
- sdBuilder.syntax->delimShortrefSimple(),
- duplicates);
- int nComplexShortrefs = sdBuilder.syntax->nDelimShortrefComplex();
- for (int i = 0; i < nComplexShortrefs; i++) {
- const StringC &delim = sdBuilder.syntax->delimShortrefComplex(i);
- if (delim.size() == 1 && shortrefChars.contains(delim[0]))
- duplicates.add(delim[0]);
- }
- if (!duplicates.isEmpty())
- message(ParserMessages::duplicateDelimShortrefSet,
- CharsetMessageArg(duplicates));
- sdBuilder.syntax->addDelimShortrefs(shortrefChars,
- sdBuilder.sd->internalCharset());
- }
- lastLiteral.resize(0);
- }
- else if (parm.type == SdParam::paramLiteral) {
- parm.paramLiteralText.swap(lastLiteral);
- StringC str;
- if (lastLiteral.size() == 0)
- message(ParserMessages::sdEmptyDelimiter);
- else if (translateSyntax(sdBuilder, lastLiteral, str)) {
- const SubstTable<Char> *table = sdBuilder.syntax->generalSubstTable();
- for (size_t i = 0; i < str.size(); i++)
- table->subst(str[i]);
- if (str.size() == 1
- || checkShortrefDelim(*sdBuilder.syntax,
- sdBuilder.sd->internalCharset(),
- str)) {
- if (sdBuilder.syntax->isValidShortref(str))
- message(ParserMessages::duplicateDelimShortref,
- StringMessageArg(str));
- else
- sdBuilder.syntax->addDelimShortref(str,
- sdBuilder.sd->internalCharset());
- }
- }
- }
- else
- break;
- }
- return 1;
-}
-
-Boolean Parser::sdParseNames(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSGMLREF),
- parm))
- return 0;
- for (;;) {
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rQUANTITY,
- SdParam::referenceReservedName),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rQUANTITY)
- break;
- Syntax::ReservedName reservedName = parm.reservedNameIndex;
- switch (reservedName) {
- case Syntax::rALL:
- case Syntax::rDATA:
- case Syntax::rIMPLICIT:
- requireWWW(sdBuilder);
- break;
- default:
- break;
- }
- if (!parseSdParam(sdBuilder.externalSyntax
- ? AllowedSdParams(SdParam::name, SdParam::paramLiteral)
- : AllowedSdParams(SdParam::name),
- parm))
- return 0;
- StringC transName;
- if (parm.type == SdParam::name
- ? translateName(sdBuilder, parm.token, transName)
- : translateSyntax(sdBuilder, parm.paramLiteralText, transName)) {
- Syntax::ReservedName tem;
- if (sdBuilder.syntax->lookupReservedName(transName, &tem))
- message(ParserMessages::ambiguousReservedName,
- StringMessageArg(transName));
- else {
- if (transName.size() == 0
- || !sdBuilder.syntax->isNameStartCharacter(transName[0])) {
- message(ParserMessages::reservedNameSyntax,
- StringMessageArg(transName));
- transName.resize(0);
- }
- size_t i;
- // Check that its a valid name in the declared syntax
- // (- and . might not be name characters).
- for (i = 1; i < transName.size(); i++)
- if (!sdBuilder.syntax->isNameCharacter(transName[i])) {
- message(ParserMessages::reservedNameSyntax,
- StringMessageArg(transName));
- transName.resize(0);
- break;
- }
- for (i = 0; i < transName.size(); i++)
- sdBuilder.syntax->generalSubstTable()->subst(transName[i]);
- if (sdBuilder.syntax->reservedName(reservedName).size() > 0)
- message(ParserMessages::duplicateReservedName,
- StringMessageArg(syntax().reservedName(reservedName)));
- else if (transName.size() > 0)
- sdBuilder.syntax->setName(reservedName, transName);
- else
- sdBuilder.valid = 0;
- }
- }
- }
- setRefNames(*sdBuilder.syntax, sdBuilder.sd->internalCharset(), sdBuilder.www);
- static Syntax::ReservedName functionNameIndex[3] = {
- Syntax::rRE, Syntax::rRS, Syntax::rSPACE
- };
- for (int i = 0; i < 3; i++) {
- const StringC &functionName
- = sdBuilder.syntax->reservedName(functionNameIndex[i]);
- Char tem;
- if (sdBuilder.syntax->lookupFunctionChar(functionName, &tem))
- message(ParserMessages::duplicateFunctionName, StringMessageArg(functionName));
- }
- sdBuilder.syntax->enterStandardFunctionNames();
- return 1;
-}
-
-Boolean Parser::sdParseQuantity(SdBuilder &sdBuilder, SdParam &parm)
-{
- if (!parseSdParam(sdBuilder.www
- ? AllowedSdParams(SdParam::reservedName + Sd::rNONE,
- SdParam::reservedName + Sd::rSGMLREF)
- : AllowedSdParams(SdParam::reservedName + Sd::rSGMLREF),
- parm))
- return 0;
- int final = (sdBuilder.externalSyntax
- ? int(SdParam::eE)
- : SdParam::reservedName + Sd::rFEATURES);
- if (parm.type == SdParam::reservedName + Sd::rNONE) {
- for (int i = 0; i < Syntax::nQuantity; i++) {
- if (i != Syntax::qNORMSEP)
- sdBuilder.syntax->setQuantity(Syntax::Quantity(i), Syntax::unlimited);
- }
- if (!parseSdParam(AllowedSdParams(final, SdParam::reservedName + Sd::rENTITIES), parm))
- return 0;
- }
- else {
- for (;;) {
- if (!parseSdParam(sdBuilder.www
- ? AllowedSdParams(SdParam::quantityName,
- final,
- SdParam::reservedName + Sd::rENTITIES)
- : AllowedSdParams(SdParam::quantityName, final),
- parm))
- return 0;
- if (parm.type != SdParam::quantityName)
- break;
- Syntax::Quantity quantity = parm.quantityIndex;
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- sdBuilder.syntax->setQuantity(quantity, parm.n);
- }
- if (sdBuilder.sd->scopeInstance()) {
- for (int i = 0; i < Syntax::nQuantity; i++)
- if (sdBuilder.syntax->quantity(Syntax::Quantity(i))
- < syntax().quantity(Syntax::Quantity(i)))
- message(ParserMessages::scopeInstanceQuantity,
- StringMessageArg(sd().quantityName(Syntax::Quantity(i))));
- }
- }
- if (parm.type == SdParam::reservedName + Sd::rENTITIES)
- return sdParseEntities(sdBuilder, parm);
- else
- return 1;
-}
-
-Boolean Parser::sdParseEntities(SdBuilder &sdBuilder, SdParam &parm)
-{
- int final = (sdBuilder.externalSyntax
- ? int(SdParam::eE)
- : SdParam::reservedName + Sd::rFEATURES);
- for (;;) {
- if (!parseSdParam(AllowedSdParams(final, SdParam::paramLiteral), parm))
- return 0;
- if (parm.type != SdParam::paramLiteral)
- break;
- StringC name;
- if (!translateSyntax(sdBuilder, parm.paramLiteralText, name))
- name.resize(0);
- else if (name.size() == 0
- || !sdBuilder.syntax->isNameStartCharacter(name[0])) {
- message(ParserMessages::entityNameSyntax, StringMessageArg(name));
- name.resize(0);
- }
- else {
- // Check that its a valid name in the declared syntax
- for (size_t i = 1; i < name.size(); i++)
- if (!sdBuilder.syntax->isNameCharacter(name[i])) {
- message(ParserMessages::entityNameSyntax, StringMessageArg(name));
- name.resize(0);
- break;
- }
- }
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- Char c;
- if (translateSyntax(sdBuilder, parm.n, c) && name.size())
- sdBuilder.syntax->addEntity(name, c);
- }
- return 1;
-}
-
-Boolean Parser::sdParseFeatures(SdBuilder &sdBuilder, SdParam &parm)
-{
- struct FeatureInfo {
- Sd::ReservedName name;
- enum {
- none,
- boolean,
- number,
- netenabl
- } arg;
- };
- static FeatureInfo features[] = {
- { Sd::rMINIMIZE, FeatureInfo::none },
- { Sd::rDATATAG, FeatureInfo::boolean },
- { Sd::rOMITTAG, FeatureInfo::boolean },
- { Sd::rRANK, FeatureInfo::boolean },
- { Sd::rSHORTTAG, FeatureInfo::none },
- { Sd::rSTARTTAG, FeatureInfo::none },
- { Sd::rEMPTY, FeatureInfo::boolean },
- { Sd::rUNCLOSED, FeatureInfo::boolean },
- { Sd::rNETENABL, FeatureInfo::netenabl },
- { Sd::rENDTAG, FeatureInfo::none },
- { Sd::rEMPTY, FeatureInfo::boolean },
- { Sd::rUNCLOSED, FeatureInfo::boolean },
- { Sd::rATTRIB, FeatureInfo::none },
- { Sd::rDEFAULT, FeatureInfo::boolean },
- { Sd::rOMITNAME, FeatureInfo::boolean },
- { Sd::rVALUE, FeatureInfo::boolean },
- { Sd::rEMPTYNRM, FeatureInfo::boolean },
- { Sd::rIMPLYDEF, FeatureInfo::none },
- { Sd::rATTLIST, FeatureInfo::boolean },
- { Sd::rDOCTYPE, FeatureInfo::boolean },
- { Sd::rELEMENT, FeatureInfo::boolean },
- { Sd::rENTITY, FeatureInfo::boolean },
- { Sd::rNOTATION, FeatureInfo::boolean },
- { Sd::rLINK, FeatureInfo::none },
- { Sd::rSIMPLE, FeatureInfo::number },
- { Sd::rIMPLICIT, FeatureInfo::boolean },
- { Sd::rEXPLICIT, FeatureInfo::number },
- { Sd::rOTHER, FeatureInfo::none },
- { Sd::rCONCUR, FeatureInfo::number },
- { Sd::rSUBDOC, FeatureInfo::number },
- { Sd::rFORMAL, FeatureInfo::boolean },
- { Sd::rURN, FeatureInfo::boolean },
- { Sd::rKEEPRSRE, FeatureInfo::boolean },
- { Sd::rVALIDITY, FeatureInfo::none },
- };
- int booleanFeature = 0;
- int numberFeature = 0;
- for (size_t i = 0; i < SIZEOF(features); i++) {
- switch (features[i].name) {
- case Sd::rSTARTTAG:
- // SHORTTAG
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSTARTTAG,
- SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rYES),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rSTARTTAG)
- break;
- sdBuilder.sd->setShorttag(parm.type == SdParam::reservedName + Sd::rYES);
- while (features[++i].name != Sd::rEMPTYNRM)
- if (features[i].arg == FeatureInfo::boolean)
- booleanFeature++;
- // fall through
- case Sd::rEMPTYNRM:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + features[i].name,
- SdParam::reservedName
- + features[i + 7].name), parm))
- return 0;
- if (parm.type == SdParam::reservedName + features[i].name)
- requireWWW(sdBuilder);
- else {
- booleanFeature += 6;
- i += 7;
- }
- break;
- case Sd::rURN:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + features[i].name,
- SdParam::reservedName + Sd::rAPPINFO), parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rAPPINFO)
- return 1;
- requireWWW(sdBuilder);
- break;
- default:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName
- + features[i].name), parm))
- return 0;
- break;
- }
- switch (features[i].arg) {
- case FeatureInfo::number:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rYES),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rYES) {
- if (!parseSdParam(AllowedSdParams(SdParam::number), parm))
- return 0;
- sdBuilder.sd->setNumberFeature(Sd::NumberFeature(numberFeature++),
- parm.n);
- }
- else
- sdBuilder.sd->setNumberFeature(Sd::NumberFeature(numberFeature++),
- 0);
- break;
- case FeatureInfo::netenabl:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rIMMEDNET,
- SdParam::reservedName + Sd::rALL),
- parm))
- return 0;
- switch (parm.type) {
- case SdParam::reservedName + Sd::rNO:
- sdBuilder.sd->setStartTagNetEnable(Sd::netEnableNo);
- break;
- case SdParam::reservedName + Sd::rIMMEDNET:
- sdBuilder.sd->setStartTagNetEnable(Sd::netEnableImmednet);
- break;
- case SdParam::reservedName + Sd::rALL:
- sdBuilder.sd->setStartTagNetEnable(Sd::netEnableAll);
- break;
- }
- break;
- case FeatureInfo::boolean:
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rYES),
- parm))
- return 0;
- switch (features[i].name) {
-#if 0
- case Sd::rDATATAG:
- if (parm.type == SdParam::reservedName + Sd::rYES)
- message(ParserMessages::datatagNotImplemented);
- break;
-#endif
- case Sd::rEMPTYNRM:
- if (parm.type == SdParam::reservedName + Sd::rNO
- && sdBuilder.sd->startTagNetEnable() == Sd::netEnableImmednet) {
- message(ParserMessages::immednetRequiresEmptynrm);
- sdBuilder.valid = 0;
- }
- break;
- }
- sdBuilder.sd->setBooleanFeature(Sd::BooleanFeature(booleanFeature++),
- parm.type == (SdParam::reservedName
- + Sd::rYES));
- break;
- }
- }
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNOASSERT,
- SdParam::reservedName + Sd::rTYPE),
- parm))
- return 0;
- switch (parm.type) {
- case SdParam::reservedName + Sd::rNOASSERT:
- sdBuilder.sd->setTypeValid(0);
- break;
- case SdParam::reservedName + Sd::rTYPE:
- sdBuilder.sd->setTypeValid(1);
- break;
- }
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rENTITIES), parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNOASSERT,
- SdParam::reservedName + Sd::rREF),
- parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rNOASSERT) {
- sdBuilder.sd->setIntegrallyStored(0);
- sdBuilder.sd->setEntityRef(Sd::entityRefAny);
- }
- else {
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNONE,
- SdParam::reservedName + Sd::rINTERNAL,
- SdParam::reservedName + Sd::rANY),
- parm))
- return 0;
- switch (parm.type) {
- case SdParam::reservedName + Sd::rNONE:
- sdBuilder.sd->setEntityRef(Sd::entityRefNone);
- break;
- case SdParam::reservedName + Sd::rINTERNAL:
- sdBuilder.sd->setEntityRef(Sd::entityRefInternal);
- break;
- case SdParam::reservedName + Sd::rANY:
- sdBuilder.sd->setEntityRef(Sd::entityRefAny);
- break;
- }
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rINTEGRAL), parm))
- return 0;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNO,
- SdParam::reservedName + Sd::rYES),
- parm))
- return 0;
- sdBuilder.sd->setIntegrallyStored(parm.type == (SdParam::reservedName + Sd::rYES));
- }
- return parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rAPPINFO),
- parm);
-}
-
-Boolean Parser::sdParseAppinfo(SdBuilder &, SdParam &parm)
-{
- Location location(currentLocation());
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rNONE,
- SdParam::minimumLiteral),
- parm))
- return 0;
- AppinfoEvent *event;
- if (parm.type == SdParam::minimumLiteral)
- event = new (eventAllocator()) AppinfoEvent(parm.literalText, location);
- else
- event = new (eventAllocator()) AppinfoEvent(location);
- eventHandler().appinfo(event);
- return 1;
-}
-
-Boolean Parser::sdParseSeealso(SdBuilder &sdBuilder, SdParam &parm)
-{
- SdParam::Type final = sdBuilder.external ? SdParam::eE : SdParam::mdc;
- if (!parseSdParam(AllowedSdParams(SdParam::reservedName + Sd::rSEEALSO, final), parm))
- return 0;
- if (parm.type == final)
- return 1;
- requireWWW(sdBuilder);
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral,
- SdParam::reservedName + Sd::rNONE), parm))
- return 0;
- if (parm.type == SdParam::reservedName + Sd::rNONE)
- return parseSdParam(AllowedSdParams(final), parm);
- do {
- if (!parseSdParam(AllowedSdParams(SdParam::minimumLiteral, final), parm))
- return 0;
- } while (parm.type != final);
- return 1;
-}
-
-Boolean Parser::translateSyntax(CharSwitcher &switcher,
- const CharsetInfo &syntaxCharset,
- const CharsetInfo &internalCharset,
- WideChar syntaxChar,
- Char &docChar)
-{
- syntaxChar = switcher.subst(syntaxChar);
- UnivChar univChar;
- if (syntaxCharset.descToUniv(syntaxChar, univChar)
- && univToDescCheck(internalCharset, univChar, docChar))
- return 1;
- message(sd().internalCharsetIsDocCharset()
- ? ParserMessages::translateSyntaxCharDoc
- : ParserMessages::translateSyntaxCharInternal,
- NumberMessageArg(syntaxChar));
- return 0;
-}
-
-void Parser::translateRange(SdBuilder &sdBuilder, SyntaxChar start,
- SyntaxChar end, ISet<Char> &chars)
-{
-#if 0
- do {
- Char docChar;
- if (!translateSyntax(sdBuilder, start, docChar))
- break;
- chars.add(docChar);
- } while (start++ != end);
-#endif
- for (;;) {
- SyntaxChar doneUpTo = end;
- Boolean gotSwitch = 0;
- WideChar firstSwitch;
- for (size_t i = 0; i < sdBuilder.switcher.nSwitches(); i++) {
- WideChar c = sdBuilder.switcher.switchFrom(i);
- if (start <= c && c <= end) {
- if (!gotSwitch) {
- gotSwitch = 1;
- firstSwitch = c;
- }
- else if (c < firstSwitch)
- firstSwitch = c;
- }
- }
- if (gotSwitch && firstSwitch == start) {
- doneUpTo = start;
- Char docChar;
- if (translateSyntax(sdBuilder, start, docChar))
- chars.add(docChar);
- }
- else {
- if (gotSwitch)
- doneUpTo = firstSwitch - 1;
- Char docChar;
- Number count;
- if (translateSyntaxNoSwitch(sdBuilder, start, docChar, count)) {
- if (count - 1 < doneUpTo - start)
- doneUpTo = start + (count - 1);
- chars.addRange(docChar, docChar + (doneUpTo - start));
- }
- }
- if (doneUpTo == end)
- break;
- start = doneUpTo + 1;
- }
-}
-
-Boolean Parser::translateSyntax(SdBuilder &sdBuilder,
- WideChar syntaxChar, Char &docChar)
-{
- Number count;
- return translateSyntaxNoSwitch(sdBuilder,
- sdBuilder.switcher.subst(syntaxChar),
- docChar,
- count);
-}
-
-Boolean Parser::translateSyntaxNoSwitch(SdBuilder &sdBuilder,
- WideChar syntaxChar, Char &docChar,
- Number &count)
-{
- Number n;
- StringC str;
- CharsetDeclRange::Type type;
- const PublicId *id;
- if (sdBuilder.sd->internalCharsetIsDocCharset()
- && sdBuilder.syntaxCharsetDecl.getCharInfo(syntaxChar,
- id,
- type,
- n,
- str,
- count)) {
- ISet<WideChar> docChars;
- switch (type) {
- case CharsetDeclRange::unused:
- break;
- case CharsetDeclRange::string:
- sdBuilder.sd->docCharsetDecl().stringToChar(str, docChars);
- break;
- case CharsetDeclRange::number:
- {
- Number count2;
- sdBuilder.sd->docCharsetDecl().numberToChar(id, n, docChars, count2);
- if (!docChars.isEmpty() && count2 < count)
- count = count2;
- }
- break;
- default:
- CANNOT_HAPPEN();
- }
- if (!docChars.isEmpty()) {
- if (!docChars.isSingleton() && options().warnSgmlDecl)
- message(ParserMessages::ambiguousDocCharacter,
- CharsetMessageArg(docChars));
- ISetIter<WideChar> iter(docChars);
- WideChar min, max;
- if (iter.next(min, max) && min <= charMax) {
- docChar = Char(min);
- return 1;
- }
- }
- }
- UnivChar univChar;
- WideChar alsoMax, count2;
- if (sdBuilder.syntaxCharset.descToUniv(syntaxChar, univChar, alsoMax)
- && univToDescCheck(sdBuilder.sd->internalCharset(), univChar, docChar,
- count2)) {
- count = (alsoMax - syntaxChar) + 1;
- if (count2 < count)
- count = count2;
- return 1;
- }
- sdBuilder.valid = 0;
- message(sd().internalCharsetIsDocCharset()
- ? ParserMessages::translateSyntaxCharDoc
- : ParserMessages::translateSyntaxCharInternal,
- NumberMessageArg(syntaxChar));
- return 0;
-}
-
-
-Boolean Parser::translateSyntax(SdBuilder &sdBuilder,
- const String<SyntaxChar> &syntaxString,
- StringC &docString)
-{
- docString.resize(0);
- int ret = 1;
- for (size_t i = 0; i < syntaxString.size(); i++) {
- Char c;
- if (translateSyntax(sdBuilder, syntaxString[i], c))
- docString += c;
- else
- ret = 0;
- }
- return ret;
-}
-
-Boolean Parser::translateName(SdBuilder &sdBuilder,
- const StringC &name,
- StringC &str)
-{
- str.resize(name.size());
- for (size_t i = 0; i < name.size(); i++) {
- UnivChar univChar;
- Boolean ret = sd().internalCharset().descToUniv(name[i], univChar);
- // Might switch hyphen or period.
- univChar = translateUniv(univChar, sdBuilder.switcher,
- sdBuilder.syntaxCharset);
- ASSERT(ret != 0);
- if (!univToDescCheck(sdBuilder.sd->internalCharset(), univChar, str[i])) {
- message(ParserMessages::translateDocChar, NumberMessageArg(univChar));
- sdBuilder.valid = 0;
- return 0;
- }
- }
- return 1;
-}
-
-UnivChar Parser::translateUniv(UnivChar univChar,
- CharSwitcher &switcher,
- const CharsetInfo &syntaxCharset)
-{
- WideChar syntaxChar;
- ISet<WideChar> syntaxChars;
- if (syntaxCharset.univToDesc(univChar, syntaxChar, syntaxChars) != 1) {
- message(ParserMessages::missingSyntaxChar,
- NumberMessageArg(univChar));
- return univChar;
- }
- SyntaxChar tem = switcher.subst(syntaxChar);
- if (tem != syntaxChar && !syntaxCharset.descToUniv(tem, univChar))
- message(sd().internalCharsetIsDocCharset()
- ? ParserMessages::translateSyntaxCharDoc
- : ParserMessages::translateSyntaxCharInternal,
- NumberMessageArg(tem));
- return univChar;
-}
-
-Boolean Parser::checkNotFunction(const Syntax &syn, Char c)
-{
- if (syn.charSet(Syntax::functionChar)->contains(c)) {
- message(ParserMessages::oneFunction, NumberMessageArg(c));
- return 0;
- }
- else
- return 1;
-}
-
-
-// Check that it has at most one B sequence and that it
-// is not adjacent to a blank sequence.
-
-Boolean Parser::checkShortrefDelim(const Syntax &syn,
- const CharsetInfo &charset,
- const StringC &delim)
-{
- Boolean hadB = 0;
- Char letterB = charset.execToDesc('B');
- const ISet<Char> *bSet = syn.charSet(Syntax::blank);
- for (size_t i = 0; i < delim.size(); i++)
- if (delim[i] == letterB) {
- if (hadB) {
- message(ParserMessages::multipleBSequence, StringMessageArg(delim));
- return 0;
- }
- hadB = 1;
- if (i > 0 && bSet->contains(delim[i - 1])) {
- message(ParserMessages::blankAdjacentBSequence,
- StringMessageArg(delim));
- return 0;
- }
- while (i + 1 < delim.size() && delim[i + 1] == letterB)
- i++;
- if (i < delim.size() - 1 && bSet->contains(delim[i + 1])) {
- message(ParserMessages::blankAdjacentBSequence,
- StringMessageArg(delim));
- return 0;
- }
- }
- return 1;
-}
-
-Boolean Parser::checkGeneralDelim(const Syntax &syn, const StringC &delim)
-{
- const ISet<Char> *functionSet = syn.charSet(Syntax::functionChar);
- if (delim.size() > 0) {
- Boolean allFunction = 1;
- for (size_t i = 0; i < delim.size(); i++)
- if (!functionSet->contains(delim[i]))
- allFunction = 0;
- if (allFunction) {
- message(ParserMessages::generalDelimAllFunction,
- StringMessageArg(delim));
- return 0;
- }
- }
- return 1;
-}
-
-Boolean Parser::checkSwitches(CharSwitcher &switcher,
- const CharsetInfo &syntaxCharset)
-{
- Boolean valid = 1;
- for (size_t i = 0; i < switcher.nSwitches(); i++) {
- WideChar c[2];
- c[0] = switcher.switchFrom(i);
- c[1] = switcher.switchTo(i);
- for (int j = 0; j < 2; j++) {
- UnivChar univChar;
- if (syntaxCharset.descToUniv(c[j], univChar)) {
- // Check that it is not Digit Lcletter or Ucletter
- if ((UnivCharsetDesc::a <= univChar
- && univChar < UnivCharsetDesc::a + 26)
- || (UnivCharsetDesc::A <= univChar
- && univChar < UnivCharsetDesc::A + 26)
- || (UnivCharsetDesc::zero <= univChar
- && univChar < UnivCharsetDesc::zero + 10)) {
- message(ParserMessages::switchLetterDigit,
- NumberMessageArg(univChar));
- valid = 0;
- }
- }
- }
- }
- return valid;
-}
-
-Boolean Parser::checkSwitchesMarkup(CharSwitcher &switcher)
-{
- Boolean valid = 1;
- size_t nSwitches = switcher.nSwitches();
- for (size_t i = 0; i < nSwitches; i++)
- if (!switcher.switchUsed(i)) {
- // If the switch wasn't used,
- // then the character wasn't a markup character.
- message(ParserMessages::switchNotMarkup,
- NumberMessageArg(switcher.switchFrom(i)));
- valid = 0;
- }
- return valid;
-}
-
-void Parser::checkSyntaxNamelen(const Syntax &syn)
-{
- size_t namelen = syn.namelen();
- int i;
- for (i = 0; i < Syntax::nDelimGeneral; i++)
- if (syn.delimGeneral(i).size() > namelen)
- message(ParserMessages::delimiterLength,
- StringMessageArg(syn.delimGeneral(i)),
- NumberMessageArg(namelen));
- for (i = 0; i < syn.nDelimShortrefComplex(); i++)
- if (syn.delimShortrefComplex(i).size() > namelen)
- message(ParserMessages::delimiterLength,
- StringMessageArg(syn.delimShortrefComplex(i)),
- NumberMessageArg(namelen));
- for (i = 0; i < Syntax::nNames; i++)
- if (syn.reservedName(Syntax::ReservedName(i)).size() > namelen
- && options().warnSgmlDecl)
- message(ParserMessages::reservedNameLength,
- StringMessageArg(syn.reservedName(Syntax::ReservedName(i))),
- NumberMessageArg(namelen));
-}
-
-Boolean Parser::univToDescCheck(const CharsetInfo &charset, UnivChar from,
- Char &to)
-{
- WideChar c;
- ISet<WideChar> descSet;
- unsigned ret = charset.univToDesc(from, c, descSet);
- if (ret > 1) {
- if (options().warnSgmlDecl)
- message(ParserMessages::ambiguousDocCharacter,
- CharsetMessageArg(descSet));
- ret = 1;
- }
- if (ret && c <= charMax) {
- to = Char(c);
- return 1;
- }
- return 0;
-}
-
-Boolean Parser::univToDescCheck(const CharsetInfo &charset, UnivChar from,
- Char &to, WideChar &count)
-{
- WideChar c;
- ISet<WideChar> descSet;
- unsigned ret = charset.univToDesc(from, c, descSet, count);
- if (ret > 1) {
- if (options().warnSgmlDecl)
- message(ParserMessages::ambiguousDocCharacter,
- CharsetMessageArg(descSet));
- ret = 1;
- }
- if (ret && c <= charMax) {
- to = Char(c);
- return 1;
- }
- return 0;
-}
-
-Boolean Parser::parseSdParam(const AllowedSdParams &allow,
- SdParam &parm)
-{
- for (;;) {
- Token token = getToken(sdMode);
- switch (token) {
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- {
- message(ParserMessages::markupDeclarationCharacter,
- StringMessageArg(currentToken()),
- AllowedSdParamsMessageArg(allow, sdPointer()));
- }
- return 0;
- case tokenEe:
- if (allow.param(SdParam::eE)) {
- parm.type = SdParam::eE;
- if (currentMarkup())
- currentMarkup()->addEntityEnd();
- popInputStack();
- return 1;
- }
- message(ParserMessages::sdEntityEnd,
- AllowedSdParamsMessageArg(allow, sdPointer()));
- return 0;
- case tokenS:
- if (currentMarkup())
- currentMarkup()->addS(currentChar());
- break;
- case tokenCom:
- if (!parseComment(sdcomMode))
- return 0;
- break;
- case tokenDso:
- case tokenGrpo:
- case tokenMinusGrpo:
- case tokenPlusGrpo:
- case tokenRni:
- case tokenPeroNameStart:
- case tokenPeroGrpo:
- sdParamInvalidToken(token, allow);
- return 0;
- case tokenMinus:
- if (allow.param(SdParam::minus)) {
- parm.type = SdParam::minus;
- return 1;
- }
- sdParamInvalidToken(tokenMinus, allow);
- return 0;
- case tokenLita:
- case tokenLit:
- {
- Boolean lita = (token == tokenLita);
- if (allow.param(SdParam::minimumLiteral)) {
- if (!parseMinimumLiteral(lita, parm.literalText))
- return 0;
- parm.type = SdParam::minimumLiteral;
- if (currentMarkup())
- currentMarkup()->addLiteral(parm.literalText);
- }
- else if (allow.param(SdParam::paramLiteral)) {
- if (!parseSdParamLiteral(lita, parm.paramLiteralText))
- return 0;
- parm.type = SdParam::paramLiteral;
- }
- else if (allow.param(SdParam::systemIdentifier)) {
- if (!parseSdSystemIdentifier(lita, parm.literalText))
- return 0;
- parm.type = SdParam::systemIdentifier;
- }
- else {
- sdParamInvalidToken(token, allow);
- return 0;
- }
- return 1;
- }
- case tokenMdc:
- if (allow.param(SdParam::mdc)) {
- parm.type = SdParam::mdc;
- if (currentMarkup())
- currentMarkup()->addDelim(Syntax::dMDC);
- return 1;
- }
- sdParamInvalidToken(tokenMdc, allow);
- return 0;
- case tokenNameStart:
- {
- extendNameToken(syntax().namelen(), ParserMessages::nameLength);
- getCurrentToken(syntax().generalSubstTable(), parm.token);
- if (allow.param(SdParam::capacityName)) {
- if (sd().lookupCapacityName(parm.token, parm.capacityIndex)) {
- parm.type = SdParam::capacityName;
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- }
- }
- if (allow.param(SdParam::referenceReservedName)) {
- if (syntax().lookupReservedName(parm.token,
- &parm.reservedNameIndex)) {
- parm.type = SdParam::referenceReservedName;
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- }
- }
- if (allow.param(SdParam::generalDelimiterName)) {
- if (sd().lookupGeneralDelimiterName(parm.token,
- parm.delimGeneralIndex)) {
- parm.type = SdParam::generalDelimiterName;
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- }
- }
- if (allow.param(SdParam::quantityName)) {
- if (sd().lookupQuantityName(parm.token, parm.quantityIndex)) {
- parm.type = SdParam::quantityName;
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- }
- }
- for (int i = 0;; i++) {
- SdParam::Type t = allow.get(i);
- if (t == SdParam::invalid)
- break;
- if (t >= SdParam::reservedName) {
- Sd::ReservedName sdReservedName
- = Sd::ReservedName(t - SdParam::reservedName);
- if (parm.token == sd().reservedName(sdReservedName)) {
- parm.type = t;
- if (currentMarkup())
- currentMarkup()->addSdReservedName(sdReservedName,
- currentInput());
- return 1;
- }
- }
- }
- if (allow.param(SdParam::name)) {
- parm.type = SdParam::name;
- if (currentMarkup())
- currentMarkup()->addName(currentInput());
- return 1;
- }
- {
- message(ParserMessages::sdInvalidNameToken,
- StringMessageArg(parm.token),
- AllowedSdParamsMessageArg(allow, sdPointer()));
- }
- return 0;
- }
- case tokenDigit:
- if (allow.param(SdParam::number)) {
- extendNumber(syntax().namelen(), ParserMessages::numberLength);
- parm.type = SdParam::number;
- unsigned long n;
- if (!stringToNumber(currentInput()->currentTokenStart(),
- currentInput()->currentTokenLength(),
- n)
- || n > Number(-1)) {
- message(ParserMessages::numberTooBig,
- StringMessageArg(currentToken()));
- parm.n = Number(-1);
- }
- else {
- if (currentMarkup())
- currentMarkup()->addNumber(currentInput());
- parm.n = Number(n);
- }
- Token token = getToken(sdMode);
- if (token == tokenNameStart)
- message(ParserMessages::psRequired);
- currentInput()->ungetToken();
- return 1;
- }
- sdParamInvalidToken(tokenDigit, allow);
- return 0;
- default:
- CANNOT_HAPPEN();
- }
- }
-}
-
-// This is a separate function, because we might want SyntaxChar
-// to be bigger than Char.
-
-Boolean Parser::parseSdParamLiteral(Boolean lita, String<SyntaxChar> &str)
-{
- Location loc(currentLocation());
- loc += 1;
- SdText text(loc, lita); // first character of content
- str.resize(0);
- const unsigned refLitlen = Syntax::referenceQuantity(Syntax::qLITLEN);
-
- Mode mode = lita ? sdplitaMode : sdplitMode;
- for (;;) {
- Token token = getToken(mode);
- switch (token) {
- case tokenEe:
- message(ParserMessages::literalLevel);
- return 0;
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- if (options().errorSignificant)
- message(ParserMessages::sdLiteralSignificant,
- StringMessageArg(currentToken()));
- text.addChar(currentChar(), currentLocation());
- break;
- case tokenCroDigit:
- {
- InputSource *in = currentInput();
- Location startLocation = currentLocation();
- in->discardInitial();
- extendNumber(syntax().namelen(), ParserMessages::numberLength);
- unsigned long n;
- Boolean valid;
- if (!stringToNumber(in->currentTokenStart(),
- in->currentTokenLength(),
- n)
- || n > syntaxCharMax) {
- message(ParserMessages::syntaxCharacterNumber,
- StringMessageArg(currentToken()));
- valid = 0;
- }
- else
- valid = 1;
- Owner<Markup> markupPtr;
- if (eventsWanted().wantPrologMarkup()) {
- markupPtr = new Markup;
- markupPtr->addDelim(Syntax::dCRO);
- markupPtr->addNumber(in);
- switch (getToken(refMode)) {
- case tokenRefc:
- markupPtr->addDelim(Syntax::dREFC);
- break;
- case tokenRe:
- markupPtr->addRefEndRe();
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- default:
- if (options().warnRefc)
- message(ParserMessages::refc);
- break;
- }
- }
- else if (options().warnRefc) {
- if (getToken(refMode) != tokenRefc)
- message(ParserMessages::refc);
- }
- else
- (void)getToken(refMode);
- if (valid)
- text.addChar(SyntaxChar(n),
- Location(new NumericCharRefOrigin(startLocation,
- currentLocation().index()
- + currentInput()->currentTokenLength()
- - startLocation.index(),
- markupPtr),
- 0));
- }
- break;
- case tokenCroNameStart:
- if (!parseNamedCharRef())
- return 0;
- break;
- case tokenLit:
- case tokenLita:
- goto done;
- case tokenPeroNameStart:
- case tokenPeroGrpo:
- message(ParserMessages::sdParameterEntity);
- {
- Location loc(currentLocation());
- const Char *p = currentInput()->currentTokenStart();
- for (size_t count = currentInput()->currentTokenLength();
- count > 0;
- count--) {
- text.addChar(*p++, loc);
- loc += 1;
- }
- }
- break;
- case tokenChar:
- if (text.string().size() > refLitlen
- && currentChar() == syntax().standardFunction(Syntax::fRE)) {
- message(ParserMessages::parameterLiteralLength, NumberMessageArg(refLitlen));
- // guess that the closing delimiter has been omitted
- message(ParserMessages::literalClosingDelimiter);
- return 0;
- }
- text.addChar(currentChar(), currentLocation());
- break;
- }
- }
- done:
- if (text.string().size() > refLitlen)
- message(ParserMessages::parameterLiteralLength,
- NumberMessageArg(refLitlen));
-
- str = text.string();
- if (currentMarkup())
- currentMarkup()->addSdLiteral(text);
- return 1;
-}
-
-Boolean Parser::parseSdSystemIdentifier(Boolean lita, Text &text)
-{
- text.addStartDelim(currentLocation());
-
- const unsigned refLitlen = Syntax::referenceQuantity(Syntax::qLITLEN);
-
- Mode mode = lita ? sdslitaMode : sdslitMode;
- for (;;) {
- Token token = getToken(mode);
- switch (token) {
- case tokenEe:
- message(ParserMessages::literalLevel);
- return 0;
- case tokenUnrecognized:
- if (reportNonSgmlCharacter())
- break;
- if (options().errorSignificant)
- message(ParserMessages::sdLiteralSignificant,
- StringMessageArg(currentToken()));
- text.addChar(currentChar(), currentLocation());
- break;
- case tokenLit:
- case tokenLita:
- text.addEndDelim(currentLocation(), token == tokenLita);
- goto done;
- case tokenChar:
- text.addChar(currentChar(), currentLocation());
- break;
- default:
- CANNOT_HAPPEN();
- }
- }
-done:
- if (text.string().size() > refLitlen)
- message(ParserMessages::systemIdentifierLength,
- NumberMessageArg(refLitlen));
- if (currentMarkup())
- currentMarkup()->addLiteral(text);
- return 1;
-}
-
-Boolean Parser::stringToNumber(const Char *s, size_t length,
- unsigned long &result)
-{
- unsigned long n = 0;
- for (; length > 0; length--, s++) {
- int val = sd().digitWeight(*s);
- if (n <= ULONG_MAX/10 && (n *= 10) <= ULONG_MAX - val)
- n += val;
- else
- return 0;
- }
- result = n;
- return 1;
-}
-
-void Parser::sdParamInvalidToken(Token token,
- const AllowedSdParams &allow)
-{
- message(ParserMessages::sdParamInvalidToken,
- TokenMessageArg(token, sdMode, syntaxPointer(), sdPointer()),
- AllowedSdParamsMessageArg(allow, sdPointer()));
-}
-
-void Parser::sdParamConvertToLiteral(SdParam &parm)
-{
- if (parm.type == SdParam::number) {
- parm.type = SdParam::paramLiteral;
- parm.paramLiteralText.resize(1);
- parm.paramLiteralText[0] = parm.n;
- }
-}
-
-void Parser::requireWWW(SdBuilder &sdBuilder)
-{
- if (!sdBuilder.www) {
- message(ParserMessages::wwwRequired);
- sdBuilder.www = 1;
- }
-}
-
-AllowedSdParams::AllowedSdParams(SdParam::Type arg1, SdParam::Type arg2,
- SdParam::Type arg3, SdParam::Type arg4,
- SdParam::Type arg5, SdParam::Type arg6)
-{
- allow_[0] = arg1;
- allow_[1] = arg2;
- allow_[2] = arg3;
- allow_[3] = arg4;
- allow_[4] = arg5;
- allow_[5] = arg6;
-}
-
-Boolean AllowedSdParams::param(SdParam::Type t) const
-{
- for (int i = 0; i < maxAllow && allow_[i] != SdParam::invalid; i++)
- if (t == allow_[i])
- return 1;
- return 0;
-}
-
-SdParam::Type AllowedSdParams::get(int i) const
-{
- return i < 0 || i >= maxAllow ? SdParam::Type(SdParam::invalid) : allow_[i];
-}
-
-AllowedSdParamsMessageArg::AllowedSdParamsMessageArg(
- const AllowedSdParams &allow,
- const ConstPtr<Sd> &sd)
-: allow_(allow), sd_(sd)
-{
-}
-
-MessageArg *AllowedSdParamsMessageArg::copy() const
-{
- return new AllowedSdParamsMessageArg(*this);
-}
-
-void AllowedSdParamsMessageArg::append(MessageBuilder &builder) const
-{
- for (int i = 0;; i++) {
- SdParam::Type type = allow_.get(i);
- if (type == SdParam::invalid)
- break;
- if (i != 0)
- builder.appendFragment(ParserMessages::listSep);
- switch (type) {
- case SdParam::eE:
- builder.appendFragment(ParserMessages::entityEnd);
- break;
- case SdParam::minimumLiteral:
- builder.appendFragment(ParserMessages::minimumLiteral);
- break;
- case SdParam::mdc:
- {
- builder.appendFragment(ParserMessages::delimStart);
- Char c = sd_->execToInternal('>');
- builder.appendChars(&c, 1);
- builder.appendFragment(ParserMessages::delimEnd);
- }
- break;
- case SdParam::number:
- builder.appendFragment(ParserMessages::number);
- break;
- case SdParam::name:
- builder.appendFragment(ParserMessages::name);
- break;
- case SdParam::paramLiteral:
- builder.appendFragment(ParserMessages::parameterLiteral);
- break;
- case SdParam::systemIdentifier:
- builder.appendFragment(ParserMessages::systemIdentifier);
- break;
- case SdParam::capacityName:
- builder.appendFragment(ParserMessages::capacityName);
- break;
- case SdParam::generalDelimiterName:
- builder.appendFragment(ParserMessages::generalDelimiteRoleName);
- break;
- case SdParam::referenceReservedName:
- builder.appendFragment(ParserMessages::referenceReservedName);
- break;
- case SdParam::quantityName:
- builder.appendFragment(ParserMessages::quantityName);
- break;
- case SdParam::minus:
- {
- StringC str(sd_->execToInternal("..."));
- builder.appendChars(str.data(), str.size());
- break;
- }
- default:
- {
- StringC str(sd_->reservedName(type - SdParam::reservedName));
- builder.appendChars(str.data(), str.size());
- break;
- }
- }
- }
-}
-
-SdBuilder::SdBuilder()
-: valid(1), externalSyntax(0), enr(0), www(0), external(0)
-{
-}
-
-void SdBuilder::addFormalError(const Location &location,
- const MessageType1 &message,
- const StringC &id)
-{
- formalErrorList.insert(new SdFormalError(location, message, id));
-}
-
-SdFormalError::SdFormalError(const Location &location,
- const MessageType1 &message,
- const StringC &id)
-: location_(location),
- message_(&message),
- id_(id)
-{
-}
-
-void SdFormalError::send(ParserState &parser)
-{
- parser.Messenger::setNextLocation(location_);
- parser.message(*message_, StringMessageArg(id_));
-}
-
-CharSwitcher::CharSwitcher()
-{
-}
-
-void CharSwitcher::addSwitch(WideChar from, WideChar to)
-{
- switches_.push_back(from);
- switches_.push_back(to);
- switchUsed_.push_back(0);
-}
-
-SyntaxChar CharSwitcher::subst(WideChar c)
-{
- for (size_t i = 0; i < switches_.size(); i += 2)
- if (switches_[i] == c) {
- switchUsed_[i/2] = 1;
- return switches_[i + 1];
- }
- return c;
-}
-
-size_t CharSwitcher::nSwitches() const
-{
- return switchUsed_.size();
-}
-
-Boolean CharSwitcher::switchUsed(size_t i) const
-{
- return switchUsed_[i];
-}
-
-WideChar CharSwitcher::switchFrom(size_t i) const
-{
- return switches_[i*2];
-}
-
-WideChar CharSwitcher::switchTo(size_t i) const
-{
- return switches_[i*2 + 1];
-}
-
-CharsetMessageArg::CharsetMessageArg(const ISet<WideChar> &set)
-: set_(set)
-{
-}
-
-MessageArg *CharsetMessageArg::copy() const
-{
- return new CharsetMessageArg(*this);
-}
-
-void CharsetMessageArg::append(MessageBuilder &builder) const
-{
- ISetIter<WideChar> iter(set_);
- WideChar min, max;
- Boolean first = 1;
- while (iter.next(min, max)) {
- if (first)
- first = 0;
- else
- builder.appendFragment(ParserMessages::listSep);
- builder.appendNumber(min);
- if (max != min) {
- builder.appendFragment(max == min + 1
- ? ParserMessages::listSep
- : ParserMessages::rangeSep);
- builder.appendNumber(max);
- }
- }
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/parser_inst.m4 b/usr/src/cmd/man/src/util/nsgmls.src/lib/parser_inst.m4
deleted file mode 100644
index 9868749e0a..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/parser_inst.m4
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "splib.h"
-
-#ifdef SP_MANUAL_INST
-
-#define SP_DEFINE_TEMPLATES
-#include "Owner.h"
-#include "CopyOwner.h"
-#include "Vector.h"
-#include "NCVector.h"
-#include "Ptr.h"
-#include "IList.h"
-#include "IQueue.h"
-#include "List.h"
-#include "OwnerTable.h"
-#include "PointerTable.h"
-#include "HashTable.h"
-#include "HashTableItemBase.h"
-#include "StringOf.h"
-#include "IListIter.h"
-#include "ListIter.h"
-#include "NamedResourceTable.h"
-#undef SP_DEFINE_TEMPLATES
-
-#include <stddef.h>
-#include "Attribute.h"
-#include "Attributed.h"
-#include "CharsetDecl.h"
-#include "ContentToken.h"
-#include "Dtd.h"
-#include "ElementType.h"
-#include "Entity.h"
-#include "EntityCatalog.h"
-#include "EntityManager.h"
-#include "EquivClass.h"
-#include "Event.h"
-#include "Hash.h"
-#include "HashTable.h"
-#include "HashTableItemBase.h"
-#include "InputSource.h"
-#include "LinkProcess.h"
-#include "Lpd.h"
-#include "LpdEntityRef.h"
-#include "Markup.h"
-#include "NamedResource.h"
-#include "NamedTable.h"
-#include "Named.h"
-#include "NameToken.h"
-#include "OpenElement.h"
-#include "OutputState.h"
-#include "Recognizer.h"
-#include "Sd.h"
-#include "SdText.h"
-#include "SdFormalError.h"
-#include "SrInfo.h"
-#include "StringResource.h"
-#include "Syntax.h"
-#include "Text.h"
-#include "Trie.h"
-#include "Undo.h"
-#include "Boolean.h"
-#include "types.h"
-#include "Id.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-__instantiate(Ptr < Entity >\
-)
-__instantiate(ConstPtr < Entity >\
-)
-__instantiate(Ptr < Notation >\
-)
-__instantiate(ConstPtr < Notation >\
-)
-__instantiate(Ptr < Recognizer >\
-)
-__instantiate(ConstPtr < Recognizer >\
-)
-__instantiate(Ptr < EntityOrigin >\
-)
-__instantiate(ConstPtr < EntityOrigin >\
-)
-__instantiate(Ptr < AttributeValue >\
-)
-__instantiate(ConstPtr < AttributeValue >\
-)
-__instantiate(Ptr < AttributeDefinitionList >\
-)
-__instantiate(ConstPtr < AttributeDefinitionList >\
-)
-__instantiate(Ptr < ElementDefinition >\
-)
-__instantiate(ConstPtr < ElementDefinition >\
-)
-__instantiate(Ptr < Dtd >\
-)
-__instantiate(ConstPtr < Dtd >\
-)
-__instantiate(Ptr < Sd >\
-)
-__instantiate(ConstPtr < Sd >\
-)
-__instantiate(Ptr < Syntax >\
-)
-__instantiate(ConstPtr < Syntax >\
-)
-__instantiate(Ptr < SourceLinkRuleResource >\
-)
-__instantiate(ConstPtr < SourceLinkRuleResource >\
-)
-__instantiate(Ptr < Lpd >\
-)
-__instantiate(ConstPtr < Lpd >\
-)
-__instantiate(Ptr < ComplexLpd >\
-)
-__instantiate(ConstPtr < ComplexLpd >\
-)
-__instantiate(CopyOwner < BlankTrie >\
-)
-__instantiate(CopyOwner < AttributeSemantics >\
-)
-__instantiate(CopyOwner < AttributeDefinition >\
-)
-__instantiate(CopyOwner < DeclaredValue >\
-)
-__instantiate(NCVector < Owner < ContentToken > >\
-)
-__instantiate(Vector < CopyOwner < AttributeDefinition > >\
-)
-__instantiate(NCVector < Owner < AttributeList > >\
-)
-__instantiate(Vector < AttributeList >\
-)
-__instantiate(`HashTableItem < StringC, int > ')
-__instantiate(`HashTable < StringC, int > ')
-__instantiate(`HashTableItem < StringC, Char > ')
-__instantiate(`HashTable < StringC, Char > ')
-__instantiate(IList < EquivClass >\
-)
-__instantiate(IList < InputSource >\
-)
-__instantiate(IList < OpenElement >\
-)
-__instantiate(IList < Event >\
-)
-__instantiate(IList < OutputStateLevel >\
-)
-__instantiate(IList < SdFormalError >\
-)
-__instantiate(IList < Undo >\
-)
-__instantiate(IQueue < MessageEvent >\
-)
-__instantiate(IQueue < Event >\
-)
-__instantiate(`OwnerTable < Named,
- StringC, Hash, NamedTableKeyFunction > ')
-__instantiate(`OwnerTableIter < Named,
- StringC, Hash, NamedTableKeyFunction > ')
-__instantiate(Owner < AndInfo >\
-)
-__instantiate(Owner < BlankTrie >\
-)
-__instantiate(Owner < EquivClass >\
-)
-__instantiate(Owner < ModelGroup >\
-)
-__instantiate(Owner < OpenElement >\
-)
-__instantiate(Owner < ContentToken >\
-)
-__instantiate(Owner < DeclaredValue >\
-)
-__instantiate(Owner < LeafContentToken >\
-)
-__instantiate(Owner < AttributeSemantics >\
-)
-__instantiate(Owner < CompiledModelGroup >\
-)
-__instantiate(Owner < AttributeDefinition >\
-)
-__instantiate(Owner < AttributeList >\
-)
-__instantiate(Owner < Trie >\
-)
-__instantiate(Owner < Markup >\
-)
-__instantiate(`PointerTableIter < Named*,
- StringC, Hash, NamedTableKeyFunction > ')
-__instantiate(`PointerTable < Named*,
- StringC, Hash, NamedTableKeyFunction > ')
-__instantiate(`PointerTable < Ptr < NamedResource >,
- StringC, Hash, NamedResourceKeyFunction > ')
-__instantiate(`PointerTableIter < Ptr < NamedResource >,
- StringC, Hash, NamedResourceKeyFunction > ')
-__instantiate(Vector < ConstPtr < Entity > >\
-)
-__instantiate(Vector < NameToken >\
-)
-__instantiate(Vector < CharsetDeclRange >\
-)
-__instantiate(Vector < CharsetDeclSection >\
-)
-__instantiate(Vector < Ptr < Dtd > >\
-)
-__instantiate(Vector < Attribute >\
-)
-__instantiate(Vector < TextItem >\
-)
-__instantiate(Vector < SdTextItem >\
-)
-__instantiate(Vector < MarkupItem >\
-)
-__instantiate(Vector < RankStem* >\
-)
-__instantiate(Vector < const RankStem* >\
-)
-__instantiate(Vector < Attributed* >\
-)
-__instantiate(Vector < ElementType* >\
-)
-__instantiate(Vector < const ElementType* >\
-)
-__instantiate(Vector < ConstPtr < Notation > >\
-)
-__instantiate(Vector < Ptr < NamedResource > >\
-)
-__instantiate(Vector < LastSet >\
-)
-__instantiate(Vector < ConstPtr < AttributeValue > >\
-)
-__instantiate(Vector < SrInfo >\
-)
-__instantiate(Vector < Named* >\
-)
-__instantiate(Vector < FirstSet >\
-)
-__instantiate(Vector < const AttributeList * >\
-)
-__instantiate(Vector < ConstPtr < ElementDefinition > >\
-)
-__instantiate(Vector < Text >\
-)
-__instantiate(Vector < Location >\
-)
-__instantiate(Vector < NamedResourceTable < Entity > >\
-)
-__instantiate(Vector < ContentModelAmbiguity >\
-)
-__instantiate(Vector < Transition >\
-)
-__instantiate(Vector < LeafContentToken* >\
-)
-#if ((!defined(SIZEOF_SIZE_T)) || \
- (!defined(SIZEOF_UNSIGNED_INT)) || \
- (SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT))
-__instantiate(Vector < unsigned int >\
-)
-#else
-__instantiate(Vector < size_t >\
-)
-#endif
-__instantiate(NamedTable < Id >\
-)
-__instantiate(NamedTableIter < Id >\
-)
-__instantiate(IListIter < EquivClass >\
-)
-__instantiate(IListIter < InputSource >\
-)
-
-__instantiate(NamedResourceTable < Notation >\
-)
-__instantiate(NamedResourceTable < Entity >\
-)
-__instantiate(NamedResourceTableIter < Entity >\
-)
-__instantiate(NamedResourceTableIter < Notation >\
-)
-__instantiate(ConstNamedResourceTableIter < Entity >\
-)
-__instantiate(ConstNamedResourceTableIter < Notation >\
-)
-
-__instantiate(Vector < IdLinkRule >\
-)
-__instantiate(Vector < ConstPtr < SourceLinkRuleResource > >\
-)
-__instantiate(Vector < Vector < ConstPtr < SourceLinkRuleResource > > >\
-)
-__instantiate(Vector < ResultElementSpec >\
-)
-__instantiate(Vector < ConstPtr < AttributeDefinitionList > >\
-)
-__instantiate(Vector < ConstPtr < Lpd > >\
-)
-__instantiate(Vector < LpdEntityRef * >\
-)
-__instantiate(`PointerTable < LpdEntityRef *,
- LpdEntityRef, LpdEntityRef, LpdEntityRef > ')
-__instantiate(`PointerTableIter < LpdEntityRef *,
- LpdEntityRef, LpdEntityRef, LpdEntityRef > ')
-__instantiate(`OwnerTable < LpdEntityRef,
- LpdEntityRef, LpdEntityRef, LpdEntityRef > ')
-__instantiate(`OwnerTableIter < LpdEntityRef,
- LpdEntityRef, LpdEntityRef, LpdEntityRef > ')
-__instantiate(IList < LinkProcessOpenElement >\
-)
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MANUAL_INST */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/splib.cxx b/usr/src/cmd/man/src/util/nsgmls.src/lib/splib.cxx
deleted file mode 100644
index 8fd70f32db..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/splib.cxx
+++ /dev/null
@@ -1,4 +0,0 @@
-// This file is used to build the pre-compiled header on those
-// systems that support it.
-
-#include "splib.h"
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/splib.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/splib.h
deleted file mode 100644
index 0fd1ae5fa3..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/splib.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-// This file must be included first by all files in lib.
-
-#define BUILD_LIBSP
-#include "config.h"
-#ifdef SP_PCH
-#include "splibpch.h"
-#endif /* SP_PCH */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/splibpch.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/splibpch.h
deleted file mode 100644
index 5b94d9263c..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/splibpch.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-// Include all header files for systems that support pre-compiled headers.
-
-#include "Allocator.h"
-#include "ArcEngine.h"
-#include "Attribute.h"
-#include "Attributed.h"
-#include "Boolean.h"
-#include "CharMap.h"
-#include "CharsetDecl.h"
-#include "CharsetInfo.h"
-#include "CmdLineApp.h"
-#include "CodingSystem.h"
-#include "CodingSystemKit.h"
-#include "ConsoleOutput.h"
-#include "ContentState.h"
-#include "ContentToken.h"
-#include "CopyOwner.h"
-#include "DescriptorManager.h"
-#include "Dtd.h"
-#include "ElementType.h"
-#include "Entity.h"
-#include "EntityApp.h"
-#include "EntityCatalog.h"
-#include "EntityDecl.h"
-#include "EntityManager.h"
-#include "ErrnoMessageArg.h"
-#include "ErrorCountEventHandler.h"
-#include "Event.h"
-#include "EventsWanted.h"
-#include "ExtendEntityManager.h"
-#include "ExternalId.h"
-#include "GenericEventHandler.h"
-#include "Hash.h"
-#include "HashTable.h"
-#include "HashTableItemBase.h"
-#include "IList.h"
-#include "IListBase.h"
-#include "IListIter.h"
-#include "IListIterBase.h"
-#include "IQueue.h"
-#include "ISet.h"
-#include "ISetIter.h"
-#include "IdentityCodingSystem.h"
-#include "InputSource.h"
-#include "Link.h"
-#include "LinkProcess.h"
-#include "List.h"
-#include "ListIter.h"
-#include "LiteralStorage.h"
-#include "Location.h"
-#include "Lpd.h"
-#include "Markup.h"
-#include "Message.h"
-#include "MessageArg.h"
-#include "MessageBuilder.h"
-#include "MessageEventHandler.h"
-#include "MessageFormatter.h"
-#include "MessageReporter.h"
-#include "Mode.h"
-#include "NCVector.h"
-#include "Named.h"
-#include "NamedResource.h"
-#include "NamedResourceTable.h"
-#include "NamedTable.h"
-#include "Notation.h"
-#include "NotationStorage.h"
-#include "OpenElement.h"
-#include "Options.h"
-#include "OutputByteStream.h"
-#include "OutputCharStream.h"
-#include "Owner.h"
-#include "OwnerTable.h"
-#include "ParserApp.h"
-#include "ParserOptions.h"
-#include "PointerTable.h"
-#include "PosixStorage.h"
-#include "Ptr.h"
-#include "RangeMap.h"
-#include "Resource.h"
-#include "RewindStorageObject.h"
-#include "SOEntityCatalog.h"
-#include "Sd.h"
-#include "SdText.h"
-#include "SearchResultMessageArg.h"
-#include "SgmlParser.h"
-#include "ShortReferenceMap.h"
-#include "StdioStorage.h"
-#include "StorageManager.h"
-#include "StringC.h"
-#include "StringOf.h"
-#include "StringResource.h"
-#include "SubstTable.h"
-#include "Syntax.h"
-#include "Text.h"
-#include "TypeId.h"
-#include "URLStorage.h"
-#include "UnivCharsetDesc.h"
-#include "Vector.h"
-#include "XcharMap.h"
-#include "config.h"
-#include "constant.h"
-#include "macros.h"
-#include "rtti.h"
-#include "sptchar.h"
-#include "types.h"
-#include "xnew.h"
-#ifdef SP_MULTI_BYTE
-#include "EUCJPCodingSystem.h"
-#include "Fixed2CodingSystem.h"
-#include "SJISCodingSystem.h"
-#include "UnicodeCodingSystem.h"
-#include "UTF8CodingSystem.h"
-#ifdef WIN32
-#include "Win32CodingSystem.h"
-#endif
-#endif /* SP_MULTI_BYTE */
-#include "EventGenerator.h"
-#include "ParserEventGeneratorKit.h"
-#include "SGMLApplication.h"
-#include "ArcProcessor.h"
-#include "CatalogEntry.h"
-#include "CharsetRegistry.h"
-#include "EquivClass.h"
-#include "EventQueue.h"
-#include "Group.h"
-#include "Id.h"
-#include "InternalInputSource.h"
-#include "LpdEntityRef.h"
-#include "MarkupScan.h"
-#include "ModeInfo.h"
-#include "NameToken.h"
-#include "NumericCharRefOrigin.h"
-#include "OutputState.h"
-#include "Param.h"
-#include "Parser.h"
-#include "ParserMessages.h"
-#include "ParserState.h"
-#include "Partition.h"
-#include "Priority.h"
-#include "Recognizer.h"
-#include "SdFormalError.h"
-#include "SrInfo.h"
-#include "StorageObjectPosition.h"
-#include "StringVectorMessageArg.h"
-#include "TokenMessageArg.h"
-#include "Trie.h"
-#include "TrieBuilder.h"
-#include "Undo.h"
-#include "token.h"
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/strerror.c b/usr/src/cmd/man/src/util/nsgmls.src/lib/strerror.c
deleted file mode 100644
index 1a017e03ac..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/strerror.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdio.h>
-
-#define INT_DIGITS 19 /* enough for 64 bit integer */
-
-extern int sys_nerr;
-extern char *sys_errlist[];
-
-char *strerror(n)
- int n;
-{
- static char buf[sizeof("Error ") + 1 + INT_DIGITS];
- if (n >= 0 && n < sys_nerr && sys_errlist[n] != 0)
- return sys_errlist[n];
- else {
- sprintf(buf, "Error %d", n);
- return buf;
- }
-}
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/token.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/token.h
deleted file mode 100644
index fe21103484..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/token.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef token_INCLUDED
-#define token_INCLUDED 1
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-enum EnumToken {
- // tokenUnrecognized must be 0
- tokenUnrecognized, // no token could be recognized
- tokenEe, // end of entity
- tokenS, // RS RE SPACE SEPCHAR
- tokenRe, // RE
- tokenRs, // RS
- tokenSpace, // SPACE
- tokenSepchar, // SEPCHAR
- tokenNameStart, // X
- tokenDigit, // 1
- tokenLcUcNmchar, // LCNMCHAR or UCNMCHAR
- tokenChar, // a legal data character
- tokenCharDelim, // a data character which starts a delimiter
- tokenIgnoredChar, // character in ignored marked section
- // delimiters and delimiters in context
- tokenAnd,
- tokenCom,
- tokenCroDigit,
- tokenCroNameStart,
- tokenDsc,
- tokenDso,
- tokenDtgc,
- tokenDtgo,
- tokenEroNameStart,
- tokenEroGrpo,
- tokenEtago,
- tokenEtagoNameStart,
- tokenEtagoTagc,
- tokenEtagoGrpo,
- tokenGrpc,
- tokenGrpo,
- tokenHcroHexDigit,
- tokenLit,
- tokenLita,
- tokenMdc,
- tokenMdoNameStart,
- tokenMdoMdc,
- tokenMdoCom,
- tokenMdoDso,
- tokenMinus,
- tokenMinusGrpo,
- tokenMscMdc,
- tokenNet,
- tokenNestc,
- tokenOpt,
- tokenOr,
- tokenPero,
- tokenPeroNameStart,
- tokenPeroGrpo,
- tokenPic,
- tokenPio,
- tokenPlus,
- tokenPlusGrpo,
- tokenRefc,
- tokenRep,
- tokenRni,
- tokenSeq,
- tokenStago,
- tokenStagoNameStart,
- tokenStagoTagc,
- tokenStagoGrpo,
- tokenTagc,
- tokenVi,
- // short references start here
- tokenFirstShortref
-};
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not token_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/version.h b/usr/src/cmd/man/src/util/nsgmls.src/lib/version.h
deleted file mode 100644
index d37f358af0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/version.h
+++ /dev/null
@@ -1 +0,0 @@
-#define SP_VERSION SP_T("1.3.1")
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/lib/xentmgr_inst.m4 b/usr/src/cmd/man/src/util/nsgmls.src/lib/xentmgr_inst.m4
deleted file mode 100644
index af96a17fe7..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/lib/xentmgr_inst.m4
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 1994, 1995 James Clark
-// See the file COPYING for copying permission.
-
-#include "splib.h"
-
-#ifdef SP_MANUAL_INST
-
-#define SP_DEFINE_TEMPLATES
-#include "StringOf.h"
-#include "Vector.h"
-#include "NCVector.h"
-#include "ListIter.h"
-#include "IList.h"
-#include "List.h"
-#include "Owner.h"
-#include "OwnerTable.h"
-#include "PointerTable.h"
-#include "HashTableItemBase.h"
-#include "HashTable.h"
-#include "Ptr.h"
-#include "CharMap.h"
-#undef SP_DEFINE_TEMPLATES
-
-#include "StorageManager.h"
-#include "ExtendEntityManager.h"
-#include "OffsetOrderedList.h"
-#include "CodingSystem.h"
-#include "CodingSystemKit.h"
-#include "types.h"
-#include "StringOf.h"
-#include "DescriptorManager.h"
-#include "StorageManager.h"
-#include "Boolean.h"
-#include "StorageObjectPosition.h"
-#include "CatalogEntry.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-__instantiate(String<char>)
-__instantiate(NCVector<Owner<StorageObject> >)
-__instantiate(Vector<StorageObjectSpec>)
-__instantiate(NCVector<Owner<OffsetOrderedListBlock> >)
-__instantiate(NCVector<StorageObjectPosition>)
-__instantiate(IList<ListItem<DescriptorUser*> >)
-__instantiate(List<DescriptorUser*>)
-__instantiate(ListIter<DescriptorUser *>)
-__instantiate(ListItem<DescriptorUser *>)
-__instantiate(IListIter<ListItem<DescriptorUser*> >)
-__instantiate(Owner<StorageObject>)
-__instantiate(Owner<Decoder>)
-__instantiate(Owner<OffsetOrderedListBlock>)
-__instantiate(Owner<ExtendEntityManager::CatalogManager>)
-__instantiate(Owner<StorageManager>)
-__instantiate(NCVector<Owner<StorageManager> >)
-__instantiate(`HashTable<String<Char>,CatalogEntry>')
-__instantiate(`HashTableIter<String<Char>,CatalogEntry>')
-__instantiate(`HashTableItem<String<Char>,CatalogEntry>')
-__instantiate(HashTableItemBase<String<Char> >)
-__instantiate(`OwnerTable<HashTableItemBase<String<Char> >,String<Char>,Hash,HashTableKeyFunction<String<Char> > >')
-__instantiate(`CopyOwnerTable<HashTableItemBase<String<Char> >,String<Char>,Hash,HashTableKeyFunction<String<Char> > >')
-__instantiate(`OwnerTableIter<HashTableItemBase<String<Char> >, String<Char>, Hash, HashTableKeyFunction<String<Char> > >')
-__instantiate(`PointerTable<HashTableItemBase<String<Char> >*,String<Char>,Hash,HashTableKeyFunction<String<Char> > >')
-__instantiate(`PointerTableIter<HashTableItemBase<String<Char> > *, String<Char>, Hash, HashTableKeyFunction<String<Char> > >')
-__instantiate(Vector<HashTableItemBase<String<Char> >*>)
-__instantiate(Ptr<ExtendEntityManager>)
-__instantiate(ConstPtr<ExtendEntityManager>)
-__instantiate(Vector<ParsedSystemId::Map>)
-__instantiate(ConstPtr<InputCodingSystemKit>)
-__instantiate(Ptr<InputCodingSystemKit>)
-__instantiate(ConstPtr<CodingSystemKit>)
-__instantiate(Ptr<CodingSystemKit>)
-__instantiate(CharMap<Char>)
-#ifdef SP_MULTI_BYTE
-__instantiate(CharMapPage<Char>)
-__instantiate(CharMapColumn<Char>)
-#endif
-__instantiate(CharMapResource<Char>)
-__instantiate(Ptr<CharMapResource<Char> >)
-__instantiate(ConstPtr<CharMapResource<Char> >)
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MANUAL_INST */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/Makefile.sub b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/Makefile.sub
deleted file mode 100644
index 96a6534dfe..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/Makefile.sub
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-PROG=nsgmls
-OBJS=nsgmls.o SgmlsEventHandler.o RastEventHandler.o StringSet.o nsgmls_inst.o
-INCLUDE=
-XLIBS=../lib/libsp.a
-GENSRCS=nsgmls_inst.cxx NsgmlsMessages.h RastEventHandlerMessages.h
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.h
deleted file mode 100644
index a2222aa905..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file was automatically generated from nsgmls\NsgmlsMessages.msg by msggen.pl.
-#pragma ident "%Z%%M% %I% %E% SMI"
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct NsgmlsMessages {
- // 0
- static const MessageType1 unknownOutputOption;
-};
-const MessageType1 NsgmlsMessages::unknownOutputOption(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-0
-#ifndef SP_NO_MESSAGE_TEXT
-,"unknown output option %1"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.rc b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.rc
deleted file mode 100644
index 783f6bca59..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/NsgmlsMessages.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-STRINGTABLE
-BEGIN
- 0, "unknown output option %1"
-END
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.cxx b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.cxx
deleted file mode 100644
index c9ac3f2925..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.cxx
+++ /dev/null
@@ -1,943 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994,1995 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "config.h"
-#include "RastEventHandler.h"
-#include "SgmlParser.h"
-#include "ParserOptions.h"
-#include "Entity.h"
-#include "Notation.h"
-#include "Attribute.h"
-#include "Vector.h"
-#include "Vector.h"
-#include "MessageArg.h"
-
-#include "RastEventHandlerMessages.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-// This is based on ISO/IEC 13673, Intermediate Editor's Draft, 1994/8/29,
-// together with editing instructions in ISO/IEC JTC1/SC18/WG8 N1777.
-#ifdef __GNUC__
-using namespace std;
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const OutputCharStream::Newline nl = OutputCharStream::newline;
-
-class EventHandlerMessenger : public Messenger {
-public:
- EventHandlerMessenger(EventHandler *eh) : eh_(eh) { }
- void dispatchMessage(const Message &message) {
- eh_->message(new MessageEvent(message));
- }
- void dispatchMessage(Message &message) {
- eh_->message(new MessageEvent(message));
- }
-private:
- EventHandler *eh_;
-};
-
-#if 0
-const
-#endif
-RastPrintable RastEventHandler::printable;
-
-RastPrintable::RastPrintable()
-{
- static const char s[] =
- " !\"#$%&'()*+,-./0123456789:;<=>?@\
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]\
-^_`abcdefghijklmnopqrstuvwxyz{|}~";
- size_t i;
- for (i = 0; i < sizeof (v_); i++)
- v_[i] = 0;
- for (i = 0; s[i] != '\0'; i++)
- v_[(unsigned char)s[i]] = 32 + i;
-}
-
-// inline
-void RastEventHandler::flushLine(LineType type)
-{
- if (lineLength_ > 0) {
- os() << char(type) << nl;
- lineLength_ = 0;
- }
-}
-
-RastSubdocState::RastSubdocState()
-{
- init(0, 0);
-}
-
-RastSubdocState::RastSubdocState(SgmlParser *parser, RastEventHandler *rast)
-{
- init(parser, rast);
-}
-
-void RastSubdocState::init(SgmlParser *parser, RastEventHandler *rast)
-{
- parser_ = parser;
- hadActiveLpdOrDtd_ = 0;
- activeLinkTypes_.clear();
- hadDocumentElement_ = 0;
- linkProcess_.clear();
- linkProcess_.setHandler(rast);
- haveLinkProcess_ = 0;
- endPrologEvent_.clear();
- parseSubdocQueue_.clear();
- linkRuleQueue_.clear();
- for (int i = 0; i < nAttributeType; i++)
- attributeSortOrder_[i].clear();
-}
-
-void RastSubdocState::swap(RastSubdocState &to)
-{
- {
- SgmlParser *tem = to.parser_;
- to.parser_ = parser_;
- parser_ = tem;
- }
- {
- Boolean tem = to.hadActiveLpdOrDtd_;
- to.hadActiveLpdOrDtd_ = hadActiveLpdOrDtd_;
- hadActiveLpdOrDtd_ = tem;
- }
- {
- Boolean tem = to.hadDocumentElement_;
- to.hadDocumentElement_ = hadDocumentElement_;
- hadDocumentElement_ = tem;
- }
- activeLpdOrDtdLocation_.swap(to.activeLpdOrDtdLocation_);
- activeLinkTypes_.swap(to.activeLinkTypes_);
- linkProcess_.swap(to.linkProcess_);
- endPrologEvent_.swap(to.endPrologEvent_);
- parseSubdocQueue_.swap(to.parseSubdocQueue_);
- linkRuleQueue_.swap(to.linkRuleQueue_);
- for (int i = 0; i < nAttributeType; i++)
- attributeSortOrder_[i].swap(to.attributeSortOrder_[i]);
-}
-
-RastEventHandler::RastEventHandler(SgmlParser *parser, Messenger *mgr)
-: lineLength_(0),
- os_(0),
- piErrorCount_(0),
- RastSubdocState(parser, this),
- mgr_(mgr)
-{
- RastSubdocState::init(parser, this);
-}
-
-void RastEventHandler::end()
-{
- if (errorCount() != 0) {
- truncateOutput();
- os() << (piErrorCount_ != 0
- ? "#RAST-PI-ERROR"
- : "#ERROR")
- << nl;
- }
-}
-
-void RastEventHandler::truncateOutput()
-{
- // This must be handled by derived classes to get conforming output.
-}
-
-void RastEventHandler::sgmlDecl(SgmlDeclEvent *event)
-{
- rastParseSubdocYesString_ = event->sd().execToInternal(
- "rast-parse-subdoc:yes");
- rastParseSubdocNoString_ = event->sd().execToInternal(
- "rast-parse-subdoc:no");
- rastActiveLpdString_ = event->sd().execToInternal("rast-active-lpd:");
- rastLinkRuleString_ = event->sd().execToInternal("rast-link-rule:");
- delete event;
-}
-
-void RastEventHandler::startElement(StartElementEvent *event)
-{
- flushLine(dataLine);
- if (!hadDocumentElement_) {
- if (activeLinkTypes_.size() > 0) {
- activeLinks();
- simpleLinkInfo();
- }
- hadDocumentElement_ = 1;
- }
- os() << '[' << event->name();
- Boolean hadNewline;
- if (event->attributes().size() > 0) {
- hadNewline = 1;
- os() << nl;
- attributeInfo(event->attributes(), dtdAttribute);
- } else
- hadNewline = 0;
- if (haveLinkProcess_) {
- const AttributeList *linkAttributes;
- const ResultElementSpec *resultElementSpec;
- EventHandlerMessenger messenger(this);
- linkProcess_.startElement(event->elementType(),
- event->attributes(),
- event->location(),
- messenger,
- linkAttributes,
- resultElementSpec);
- if (linkProcess_.nImpliedLinkRules() > 0) {
- if (!hadNewline) {
- os() << nl;
- hadNewline = 1;
- }
- os() << "#LINK-SET-INFO" << nl;
- impliedSourceLinkRules();
- }
- if (linkAttributes) {
- if (!hadNewline) {
- os() << nl;
- hadNewline = 1;
- }
- os() << "#LINK-RULE" << nl;
- attributeInfo(*linkAttributes, linkAttribute);
- if (linkProcess_.isExplicit()) {
- os() << "#RESULT=";
- if (resultElementSpec &&
- resultElementSpec->elementType) {
- os() << resultElementSpec->
- elementType->name()
- << nl;
- attributeInfo(
- resultElementSpec->
- attributeList,
- resultAttribute);
- } else
- os() << "#IMPLIED" << nl;
- }
- }
- else
- hadNewline = 0;
- }
- os() << ']' << nl;
- delete event;
-}
-
-void RastEventHandler::activeLinks()
-{
- for (size_t i = 0; i < activeLinkTypes_.size(); i++) {
- os() << "#ACTIVE-LINK=" << activeLinkTypes_[i] << nl;
- Boolean found = 0;
- if (haveLinkProcess_ && linkProcess_.name() ==
- activeLinkTypes_[i]) {
- found = 1;
- if (linkProcess_.nImpliedLinkRules() > 0) {
- os() << "#INITIAL" << nl;
- impliedSourceLinkRules();
- }
- }
- if (!found) {
- if (endPrologEvent_) {
- for (size_t j = 0; j < endPrologEvent_->simpleLinkNames().size(); j++)
- if (endPrologEvent_->simpleLinkNames()[j] ==
- activeLinkTypes_[i]) {
- found = 1;
- break;
- }
- }
- if (!found) {
- setNextLocation(activeLpdOrDtdLocation_);
- Messenger::message(RastEventHandlerMessages::invalidActiveLinkType,
- StringMessageArg(activeLinkTypes_[i]));
- }
- }
- os() << "#END-ACTIVE-LINK" << nl;
- }
-}
-
-void RastEventHandler::simpleLinkInfo()
-{
- if (!endPrologEvent_)
- return;
- for (size_t i = 0; i < activeLinkTypes_.size(); i++) {
- for (size_t j = 0;
- j < endPrologEvent_->simpleLinkNames().size(); j++) {
- const StringC &name =
- endPrologEvent_->simpleLinkNames()[j];
- if (name == activeLinkTypes_[i]) {
- os() << "#SIMPLE-LINK=" << name << nl;
- if (endPrologEvent_->simpleLinkAttributes()[j].size() > 0)
- attributeInfo(endPrologEvent_->simpleLinkAttributes()[j],
- simpleAttribute);
- os() << "#END-SIMPLE-LINK" << nl;
- break;
- }
- }
- }
-}
-
-void RastEventHandler::impliedSourceLinkRules()
-{
- size_t n = linkProcess_.nImpliedLinkRules();
- Vector < size_t > sortOrder(n);
- size_t i;
- for (i = 0; i < n; i++)
- sortOrder[i] = i;
- for (i = 1; i < n; i++) {
- size_t tem = sortOrder[i];
- const StringC &name
- = linkProcess_.impliedLinkRule(tem).elementType->name();
- size_t j;
- for (j = i; j > 0; j--) {
- if (lexCmp(
- linkProcess_.impliedLinkRule(
- j - 1).elementType->name(),
- name) <= 0)
- break;
- sortOrder[j] = sortOrder[j - 1];
- }
- sortOrder[j] = tem;
- }
- for (i = 0; i < n; i++) {
- const ResultElementSpec &result
- = linkProcess_.impliedLinkRule(sortOrder[i]);
- os() << '[' << result.elementType->name();
- if (result.attributeList.size() > 0) {
- os() << nl;
- attributeInfo(result.attributeList, resultAttribute);
- }
- os() << ']' << nl;
- }
-}
-
-void RastEventHandler::endElement(EndElementEvent *event)
-{
- if (haveLinkProcess_)
- linkProcess_.endElement();
- flushLine(dataLine);
- os() << "[/" << event->name() << ']' << nl;
- if (haveLinkProcess_ && linkProcess_.nImpliedLinkRules() > 0) {
- os() << "#LINK-SET-INFO" << nl;
- impliedSourceLinkRules();
- os() << "#END-LINK-SET-INFO" << nl;
- }
- delete event;
-}
-
-void RastEventHandler::data(DataEvent *event)
-{
- lines(dataLine, event->data(), event->dataLength());
- delete event;
-}
-
-void RastEventHandler::pi(PiEvent *event)
-{
- flushLine(dataLine);
- os() << "[?";
- size_t dataLength = event->dataLength();
- if (dataLength > 0) {
- const Char *data = event->data();
- if (dataLength >= 4 && memcmp(data,
- rastParseSubdocYesString_.data(),
- 4*sizeof (Char)) == 0 &&
- !interpretRastPi(data, dataLength,
- event->location())) {
- setNextLocation(event->location());
- Messenger::message(
- RastEventHandlerMessages::invalidRastPiError);
- }
- os() << nl;
- lines(dataLine, event->data(), dataLength);
- flushLine(dataLine);
- }
- os() << ']' << nl;
- delete event;
-}
-
-inline Boolean
- equal(const Char *s1, size_t n1, const StringC &s2)
-{
- return (n1 == s2.size() &&
- (n1 == 0 || memcmp(s1, s2.data(), n1*sizeof (Char)) == 0));
-}
-
-// Is s2 a prefix of s1 of length n1?
-
-inline Boolean
- prefix(const Char *s1, size_t n1, const StringC &s2)
-{
- return (n1 >= s2.size() && (n1 == 0 ||
- memcmp(s1, s2.data(), s2.size()*sizeof (Char)) == 0));
-}
-
-Boolean RastEventHandler::interpretRastPi(const Char *data,
- size_t dataLength,
- const Location &loc)
-{
- if (equal(data, dataLength, rastParseSubdocNoString_)) {
- queueParseSubdoc(0);
- return (1);
- }
- if (equal(data, dataLength, rastParseSubdocYesString_)) {
- queueParseSubdoc(1);
- return (1);
- }
- if (prefix(data, dataLength, rastActiveLpdString_)) {
- if (hadActiveLpdOrDtd_)
- return (1);
- hadActiveLpdOrDtd_ = 1;
- activeLpdOrDtdLocation_ = loc;
- const Char *p = data + rastActiveLpdString_.size();
- size_t n = dataLength - rastActiveLpdString_.size();
- StringC name;
- for (;;) {
- if (n == 0 || *p == ',') {
- if (name.size() == 0)
- return (0);
- for (size_t i = 0; i < activeLinkTypes_.size(); i++)
- if (name == activeLinkTypes_[i]) {
- setNextLocation(activeLpdOrDtdLocation_);
- Messenger::message(
- RastEventHandlerMessages::
- duplicateActiveLinkType,
- StringMessageArg(name));
- }
- activeLinkTypes_.resize(activeLinkTypes_.size() + 1);
- name.swap(activeLinkTypes_.back());
- if (n == 0)
- break;
- }
- else
- name += *p;
- p++;
- n--;
- }
- for (size_t i = 0; i < activeLinkTypes_.size(); i++)
- parser_->activateLinkType(activeLinkTypes_[i]);
- return (1);
- }
- if (prefix(data, dataLength, rastLinkRuleString_)) {
- LinkRulePi *p = new LinkRulePi;
- p->pi.assign(data + rastLinkRuleString_.size(),
- dataLength - rastLinkRuleString_.size());
- p->loc = loc;
- linkRuleQueue_.append(p);
- return (1);
- }
- return (0);
-}
-
-void RastEventHandler::sdataEntity(SdataEntityEvent *event)
-{
- flushLine(dataLine);
- os() << "#SDATA-TEXT" << nl;
- lines(markupLine, event->data(), event->dataLength());
- flushLine(markupLine);
- os() << "#END-SDATA" << nl;
- delete event;
-}
-
-void RastEventHandler::externalDataEntity(ExternalDataEntityEvent *event)
-{
- const ExternalDataEntity *entity = event->entity();
- if (!entity)
- return;
- flushLine(dataLine);
- os() << "[&" << entity->name() << nl;
- externalEntityInfo(entity, dtdAttribute);
- os() << ']' << nl;
- delete event;
-}
-
-void RastEventHandler::externalEntityInfo(const ExternalDataEntity *entity,
- AttributeType attributeType)
-{
- char c;
- switch (entity->dataType()) {
- case Entity::cdata:
- c = 'C';
- break;
- case Entity::sdata:
- c = 'S';
- break;
- case Entity::ndata:
- c = 'N';
- break;
- default:
- return;
- }
- os() << '#' << c << "DATA-EXTERNAL" << nl;
- externalIdInfo(entity->externalId());
- os() << "#NOTATION=" << entity->notation()->name() << nl;
- externalIdInfo(entity->notation()->externalId());
- attributeInfo(entity->attributes(),
- (attributeType == resultAttribute
- ? resultAttribute
- : dtdAttribute));
-}
-
-void RastEventHandler::subdocEntity(SubdocEntityEvent *event)
-{
- const SubdocEntity *entity = event->entity();
- if (!entity)
- return;
- flushLine(dataLine);
- os() << "[&" << entity->name() << nl;
- Ptr < InputSourceOrigin > origin(event->entityOrigin()->copy());
- subdocEntityInfo(entity, origin, 1);
- os() << ']' << nl;
- delete event;
-}
-
-void RastEventHandler::subdocEntityInfo(const SubdocEntity *entity,
- const Ptr < InputSourceOrigin >
- &entityOrigin, Boolean referenced)
-{
- os() << "#SUBDOC" << nl;
- externalIdInfo(entity->externalId());
- if (parseNextSubdoc()) {
- // FIXME subdocuments in entity attributes shouldn't
- // count against SUBDOC quantity limit.
- os() << "#PARSED-SUBDOCUMENT" << nl;
- SgmlParser::Params params;
- params.entityType = SgmlParser::Params::subdoc;
- params.subdocInheritActiveLinkTypes = 0;
- params.subdocReferenced = referenced;
- params.parent = parser_;
- params.sysid = entity->externalId().effectiveSystemId();
- params.origin = entityOrigin;
- SgmlParser parser(params);
- RastSubdocState oldSubdocState;
- RastSubdocState::swap(oldSubdocState);
- RastSubdocState::init(&parser, this);
- parser.parseAll(*this);
- oldSubdocState.swap(*this);
- }
-}
-
-void RastEventHandler::queueParseSubdoc(Boolean parseSubdoc)
-{
- parseSubdocQueue_.push_back(PackedBoolean(parseSubdoc));
-}
-
-Boolean RastEventHandler::parseNextSubdoc()
-{
- if (parseSubdocQueue_.size() == 0)
- return (0);
- Boolean result = parseSubdocQueue_[0];
- if (parseSubdocQueue_.size() > 1) {
- for (size_t i = 1; i < parseSubdocQueue_.size(); i++)
- parseSubdocQueue_[i - 1] = parseSubdocQueue_[i];
- }
- parseSubdocQueue_.resize(parseSubdocQueue_.size() - 1);
- return (result);
-}
-
-
-void RastEventHandler::externalIdInfo(const ExternalId &id)
-{
- const StringC *systemId = id.systemIdString();
- const StringC *publicId = id.publicIdString();
- if (publicId) {
- os() << "#PUBLIC" << nl;
- if (publicId->size() == 0)
- os() << "#EMPTY" << nl;
- else {
- lines(markupLine, publicId->data(), publicId->size());
- flushLine(markupLine);
- }
- }
- if (systemId || !publicId) {
- os() << "#SYSTEM" << nl;
- if (!systemId)
- os() << "#NONE" << nl;
- else if (systemId->size() == 0)
- os() << "#EMPTY" << nl;
- else {
- lines(markupLine, systemId->data(), systemId->size());
- flushLine(markupLine);
- }
- }
-}
-
-void RastEventHandler::nonSgmlChar(NonSgmlCharEvent *event)
-{
- flushLine(dataLine);
- os() <<'#' << (unsigned long)event->character() << nl;
- delete event;
-}
-
-void RastEventHandler::lines(LineType type, const Char *p, size_t length)
-{
- // This needs to be fast.
- while (length != 0) {
- if (printable(*p)) {
- size_t lim;
- switch (lineLength_) {
- case maxLineLength:
- os() << char(type) << nl;
- lineLength_ = 0;
- // fall through
- case 0:
- os() << char(type);
- lim = maxLineLength;
- break;
- default:
- lim = maxLineLength - lineLength_;
- break;
- }
- if (lim > length)
- lim = length;
- size_t n = lim;
- for (;;) {
- os().put(*p);
- p++;
- if (--n == 0)
- break;
- if (!printable(*p)) {
- lim -= n;
- break;
- }
- }
- length -= lim;
- lineLength_ += lim;
- } else {
- // *p is an unprintable character print it
- flushLine(type);
- switch (*p) {
- case RS:
- os() << "#RS" << nl;
- break;
- case RE:
- os() << "#RE" << nl;
- break;
- case TAB:
- os() << "#TAB" << nl;
- break;
- default:
- os() << '#' << (unsigned long)*p << nl;
- break;
- }
- p++;
- length--;
- }
- }
-}
-
-int RastEventHandler::lexCmp(const StringC &s1, const StringC &s2)
-{
- const Char *p1 = s1.data();
- size_t n1 = s1.size();
- const Char *p2 = s2.data();
- size_t n2 = s2.size();
- for (;;) {
- if (n1 == 0)
- return (n2 == 0 ? 0 : -1);
- if (n2 == 0)
- return (1);
- if (*p1 != *p2) {
- // printable characters precede non-printable;
- // characters printable characters are in ASCII order
- // non-printable characters are in document character
- // set order
- int a1 = printable(*p1);
- int a2 = printable(*p2);
- if (a1 == 0) {
- if (a2 == 0)
- return (*p1 < *p2 ? -1 : 1);
- else
- return (1);
- } else if (a2 == 0)
- return (-1);
- else
- return (a1 - a2);
- }
- p1++;
- p2++;
- n1--;
- n2--;
- }
-}
-
-void RastEventHandler::attributeInfo(const AttributeList &attributes,
- AttributeType attributeType)
-{
- size_t length = attributes.size();
- if (length == 0)
- return;
- size_t defIndex = attributes.defIndex();
- if (defIndex >= attributeSortOrder_[attributeType].size())
- attributeSortOrder_[attributeType].resize(defIndex + 1);
- Vector < size_t > &sortOrder =
- attributeSortOrder_[attributeType][defIndex];
- if (sortOrder.size() != length ||
- attributeType == simpleAttribute) {
- sortOrder.resize(length);
- size_t i;
- for (i = 0; i < length; i++)
- sortOrder[i] = i;
- // insertion sort
- for (i = 1; i < length; i++) {
- size_t tem = sortOrder[i];
- size_t j;
- for (j = i; j > 0; j--) {
- if (lexCmp(attributes.name(sortOrder[j - 1]),
- attributes.name(tem)) <= 0)
- break;
- sortOrder[j] = sortOrder[j - 1];
- }
- sortOrder[j] = tem;
- }
- }
- for (size_t j = 0; j < length; j++) {
- // Don't use sortOrder because attributeSortOrder_ may be grown
- // because of data attributes.
- size_t i = attributeSortOrder_[attributeType][defIndex][j];
- os() << attributes.name(i) << '=' << nl;
- const Text *text;
- const StringC *string;
- const AttributeValue *value = attributes.value(i);
- if (value) {
- switch (value->info(text, string)) {
- case AttributeValue::implied:
- os() << "#IMPLIED" << nl;
- break;
- case AttributeValue::tokenized:
- lines(markupLine, string->data(), string->size());
- flushLine(markupLine);
- break;
- case AttributeValue::cdata:
- {
- TextIter iter(*text);
- TextItem::Type type;
- const Char *p;
- size_t length;
- const Location *loc;
- while (iter.next(type, p, length, loc))
- switch (type) {
- case TextItem::data:
- case TextItem::cdata:
- lines(markupLine, p, length);
- break;
- case TextItem::sdata:
- flushLine(markupLine);
- os() << "#SDATA-TEXT" << nl;
- lines(markupLine, p, length);
- flushLine(markupLine);
- os() << "#END-SDATA" << nl;
- break;
- case TextItem::nonSgml:
- flushLine(markupLine);
- os() << '#' << (unsigned long)*p << nl;
- break;
- default:
- break;
- }
- flushLine(markupLine);
- }
- break;
- }
- }
- const AttributeSemantics *semantics = attributes.semantics(i);
- if (semantics) {
- ConstPtr < Notation > notation
- = semantics->notation();
- if (!notation.isNull())
- externalIdInfo(notation->externalId());
- size_t nEntities = semantics->nEntities();
- for (size_t i = 0; i < nEntities; i++) {
- ConstPtr < Entity > entity
- = semantics->entity(i);
- if (!entity.isNull()) {
- const ExternalDataEntity *externalDataEntity
- = entity->asExternalDataEntity();
- if (externalDataEntity)
- externalEntityInfo(externalDataEntity,
- (attributeType == resultAttribute
- ? resultAttribute
- : dtdAttribute));
- else {
- const SubdocEntity *subdocEntity =
- entity->asSubdocEntity();
- if (subdocEntity) {
- Ptr < InputSourceOrigin > entityOrigin
- = EntityOrigin::make(entity,
- ((TokenizedAttributeValue *)
- value)
- ->tokenLocation(i));
- subdocEntityInfo(subdocEntity, entityOrigin, 0);
- } else {
- const InternalEntity *internalEntity =
- entity->asInternalEntity();
- if (internalEntity)
- internalEntityInfo(internalEntity);
- }
- }
- }
- os() << "#END-ENTITY" << nl;
- }
- }
- }
-}
-
-void RastEventHandler::internalEntityInfo(const InternalEntity *entity)
-{
- if (!entity)
- return;
- os() << '#'
- << char(entity->dataType() == Entity::cdata ? 'C' : 'S')
- << "DATA-INTERNAL" << nl;
- const StringC &str = entity->string();
- lines(markupLine, str.data(), str.size());
- flushLine(markupLine);
-}
-
-void RastEventHandler::endProlog(EndPrologEvent *event)
-{
- if (!event->lpdPointer().isNull()) {
- linkProcess_.init(event->lpdPointer());
- haveLinkProcess_ = 1;
- }
- if (event->simpleLinkNames().size() > 0)
- endPrologEvent_ = event;
- else
- delete event;
-}
-
-void RastEventHandler::uselink(UselinkEvent *event)
-{
- linkProcess_.uselink(event->linkSet(),
- event->restore(),
- event->lpd().pointer());
- if (haveLinkProcess_ && linkProcess_.nImpliedLinkRules() > 0) {
- flushLine(dataLine);
- os() << "#LINK-SET-INFO" << nl;
- impliedSourceLinkRules();
- os() << "#END-LINK-SET-INFO" << nl;
- }
- delete event;
-}
-
-void RastEventHandler::initMessage(Message &msg)
-{
- mgr_->initMessage(msg);
-}
-
-void RastEventHandler::dispatchMessage(const Message &msg)
-{
- if (msg.isError())
- piErrorCount_++;
- if (!cancelled()) {
- noteMessage(msg);
- mgr_->dispatchMessage(msg);
- }
-}
-
-RastLinkProcess::RastLinkProcess()
-: rast_(0)
-{
-}
-
-void RastLinkProcess::setHandler(RastEventHandler *rast)
-{
- rast_ = rast;
-}
-
-// Always return 1. 0 means not ready.
-
-Boolean RastLinkProcess::selectLinkRule(
- const Vector < const AttributeList * > &linkAttributes,
- const Location &location,
- size_t &selected)
-{
- if (!rast_->linkRuleQueue_.empty()) {
- LinkRulePi *p = rast_->linkRuleQueue_.get();
- if (!selectLinkRulePi(p->pi, p->loc, linkAttributes, selected))
- selected = 0;
- } else {
- if (linkAttributes.size() > 0) {
- rast_->setNextLocation(location);
- rast_->Messenger::message(
- RastEventHandlerMessages::multipleLinkRules);
- }
- selected = 0;
- }
- return (1);
-}
-
-// Return zero for failure (RAST-PI-ERROR).
-
-Boolean RastLinkProcess::selectLinkRulePi(const StringC &value,
- const Location &loc,
- const Vector < const AttributeList * > &linkAttributes,
- size_t &selected)
-{
- Boolean haveSelection = 0;
- size_t i;
- for (i = 0; i < linkAttributes.size(); i++) {
- const AttributeList &a = *linkAttributes[i];
- Boolean matchValue = 0;
- for (size_t j = 0; j < a.size(); j++) {
- const Text *textp;
- const StringC *strp;
- switch (a.value(j)->info(textp, strp)) {
- case AttributeValue::cdata:
- // What if it contains SDATA entities?
- if (textp->string() == value)
- matchValue = 1;
- break;
- case AttributeValue::tokenized:
- if (*strp == value)
- matchValue = 1;
- break;
- default:
- break;
- }
- if (matchValue)
- break;
- }
- if (matchValue) {
- if (haveSelection) {
- rast_->setNextLocation(loc);
- rast_->Messenger::message(
- RastEventHandlerMessages::multipleLinkRuleMatch);
- return (0);
- }
- haveSelection = 1;
- selected = i;
- }
- }
- if (!haveSelection) {
- rast_->setNextLocation(loc);
- rast_->Messenger::message(
- RastEventHandlerMessages::noLinkRuleMatch);
- return (0);
- }
- return (1);
-}
-
-void RastLinkProcess::swap(RastLinkProcess &to)
-{
- LinkProcess::swap(to);
- RastEventHandler *tem = to.rast_;
- to.rast_ = rast_;
- rast_ = tem;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.h b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.h
deleted file mode 100644
index c1ec845479..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandler.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef _RASTEVENTHANDLER_H
-#define _RASTEVENTHANDLER_H
-
-#ifndef RastEventHandler_INCLUDED
-#define RastEventHandler_INCLUDED 1
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "Event.h"
-#include "Vector.h"
-#include "Vector.h"
-#include "Boolean.h"
-#include "Vector.h"
-#include "StringC.h"
-#include "types.h"
-#include "OutputCharStream.h"
-#include "LinkProcess.h"
-#include "Message.h"
-#include "Link.h"
-#include "IQueue.h"
-#include "ErrorCountEventHandler.h"
-
-#include <limits.h>
-#include <stddef.h>
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class AttributeList;
-class ExternalDataEntity;
-class SubdocEntity;
-class ExternalId;
-class InternalEntity;
-class SgmlParser;
-
-class RastPrintable {
-public:
- RastPrintable();
- int operator()(Char c) const;
-private:
- char v_[UCHAR_MAX + 1];
-};
-
-class RastEventHandler;
-
-class RastLinkProcess : public LinkProcess {
-public:
- RastLinkProcess();
- void setHandler(RastEventHandler *);
- Boolean selectLinkRule(
- const Vector < const AttributeList * > &linkAttributes,
- const Location &location,
- size_t &selected);
- void swap(RastLinkProcess &);
-private:
- Boolean selectLinkRulePi(const StringC &str,
- const Location &loc,
- const Vector < const AttributeList * > &linkAttributes,
- size_t &selected);
-
- RastLinkProcess(const RastLinkProcess &); // undefined
- void operator=(RastLinkProcess &); // undefined
- RastEventHandler *rast_;
-};
-
-struct LinkRulePi : public Link {
- StringC pi;
- Location loc;
-};
-
-class RastSubdocState {
-public:
- RastSubdocState();
- RastSubdocState(SgmlParser *, RastEventHandler *);
- void init(SgmlParser *, RastEventHandler *);
- void swap(RastSubdocState &);
-protected:
- SgmlParser *parser_;
- Boolean hadActiveLpdOrDtd_;
- Location activeLpdOrDtdLocation_;
- Vector < StringC > activeLinkTypes_;
- Boolean hadDocumentElement_;
- RastLinkProcess linkProcess_;
- Boolean haveLinkProcess_;
- Owner < EndPrologEvent > endPrologEvent_;
- Vector < PackedBoolean > parseSubdocQueue_;
- IQueue < LinkRulePi > linkRuleQueue_;
- enum AttributeType {
- dtdAttribute,
- linkAttribute,
- resultAttribute,
- simpleAttribute
- };
- enum { nAttributeType = simpleAttribute + 1 };
- Vector < Vector < size_t > > attributeSortOrder_[nAttributeType];
-private:
- RastSubdocState(const RastSubdocState &); // undefined
- void operator=(const RastSubdocState &); // undefined
- friend class RastLinkProcess;
-};
-
-class RastEventHandler : public ErrorCountEventHandler,
- private RastSubdocState,
- protected Messenger {
-public:
- RastEventHandler(SgmlParser *, Messenger *);
- void data(DataEvent *);
- void startElement(StartElementEvent *);
- void endElement(EndElementEvent *);
- void pi(PiEvent *);
- void sdataEntity(SdataEntityEvent *);
- void externalDataEntity(ExternalDataEntityEvent *);
- void subdocEntity(SubdocEntityEvent *);
- void nonSgmlChar(NonSgmlCharEvent *);
- void sgmlDecl(SgmlDeclEvent *);
- void endProlog(EndPrologEvent *);
- void uselink(UselinkEvent *);
- virtual void truncateOutput();
- void end();
- void setOutputStream(OutputCharStream *os);
- static const char *messageText(int);
- static const char messageSource[];
-protected:
- void initMessage(Message &);
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &tmp_message) {
- dispatchMessage((const Message &)tmp_message);
- };
-private:
- RastEventHandler(const RastEventHandler &); // undefined
- void operator=(const RastEventHandler &); // undefined
-
- enum LineType { dataLine = '|', markupLine = '!' };
- void lines(LineType, const Char *p, size_t length);
- enum { maxLineLength = 60 };
- enum { RS = '\n', RE = '\r', TAB = '\t' };
-#if 0
- static const RastPrintable printable;
-#else
- static RastPrintable printable;
-#endif
- int lineLength_;
- OutputCharStream *os_;
- StringC rastParseSubdocYesString_;
- StringC rastParseSubdocNoString_;
- StringC rastActiveLpdString_;
- StringC rastLinkRuleString_;
- unsigned piErrorCount_;
- Messenger *mgr_;
-
- int lexCmp(const StringC &s1, const StringC &s2);
- void flushLine(LineType);
- void attributeInfo(const AttributeList &, AttributeType);
- void externalEntityInfo(const ExternalDataEntity *, AttributeType);
- void subdocEntityInfo(const SubdocEntity *,
- const Ptr < InputSourceOrigin > &entityOrigin,
- Boolean referenced);
- void externalIdInfo(const ExternalId &);
- void internalEntityInfo(const InternalEntity *);
- void queueParseSubdoc(Boolean);
- Boolean parseNextSubdoc();
- Boolean interpretRastPi(const Char *data, size_t dataLength,
- const Location &);
- void activeLinks();
- void simpleLinkInfo();
- void impliedSourceLinkRules();
-
- OutputCharStream &os();
- friend class RastLinkProcess;
-};
-
-inline
-int RastPrintable::operator()(Char c) const
-{
- return (c <= UCHAR_MAX ? v_[c] : 0);
-}
-
-inline
-void RastEventHandler::setOutputStream(OutputCharStream *os)
-{
- os_ = os;
-}
-
-inline
-OutputCharStream &RastEventHandler::os()
-{
- return (*os_);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not RastEventHandler_INCLUDED */
-
-#endif /* _RASTEVENTHANDLER_H */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.h b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.h
deleted file mode 100644
index ee8eb882c0..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// This file was automatically generated from nsgmls\RastEventHandlerMessages.msg by msggen.pl.
-#pragma ident "%Z%%M% %I% %E% SMI"
-#include "Message.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-struct RastEventHandlerMessages {
- // 100
- static const MessageType0 invalidRastPiError;
- // 101
- static const MessageType1 invalidActiveLinkType;
- // 102
- static const MessageType1 duplicateActiveLinkType;
- // 103
- static const MessageType0 multipleLinkRuleMatch;
- // 104
- static const MessageType0 noLinkRuleMatch;
- // 105
- static const MessageType0 multipleLinkRules;
-};
-const MessageType0 RastEventHandlerMessages::invalidRastPiError(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-100
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid RAST processing instruction"
-#endif
-);
-const MessageType1 RastEventHandlerMessages::invalidActiveLinkType(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-101
-#ifndef SP_NO_MESSAGE_TEXT
-,"invalid link type %1 in rast-active-lpd processing instruction"
-#endif
-);
-const MessageType1 RastEventHandlerMessages::duplicateActiveLinkType(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-102
-#ifndef SP_NO_MESSAGE_TEXT
-,"duplicate link type %1 in rast-active-lpd processing instruction"
-#endif
-);
-const MessageType0 RastEventHandlerMessages::multipleLinkRuleMatch(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-103
-#ifndef SP_NO_MESSAGE_TEXT
-,"rast-link-rule: processing instruction matches more than one link rule"
-#endif
-);
-const MessageType0 RastEventHandlerMessages::noLinkRuleMatch(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-104
-#ifndef SP_NO_MESSAGE_TEXT
-,"rast-link-rule: processing instruction matches does not match any link rules"
-#endif
-);
-const MessageType0 RastEventHandlerMessages::multipleLinkRules(
-MessageType::error,
-#ifdef BUILD_LIBSP
-MessageFragment::libModule,
-#else
-MessageFragment::appModule,
-#endif
-105
-#ifndef SP_NO_MESSAGE_TEXT
-,"multiple applicable link rules without disambiguating rast-link-rule: processing instruction"
-#endif
-);
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.rc b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.rc
deleted file mode 100644
index 75eccb9355..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/RastEventHandlerMessages.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-STRINGTABLE
-BEGIN
- 100, "invalid RAST processing instruction"
- 101, "invalid link type %1 in rast-active-lpd processing instruction"
- 102, "duplicate link type %1 in rast-active-lpd processing instruction"
- 103, "rast-link-rule: processing instruction matches more than one link rule"
- 104, "rast-link-rule: processing instruction matches does not match any link rules"
- 105, "multiple applicable link rules without disambiguating rast-link-rule: processing instruction"
-END
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.cxx b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.cxx
deleted file mode 100644
index 09e74acc9e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.cxx
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright (c) 1994 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "config.h"
-#include "SgmlsEventHandler.h"
-#include "SgmlParser.h"
-#include "ParserOptions.h"
-#include "Entity.h"
-#include "Notation.h"
-#include "Attribute.h"
-#include "ExtendEntityManager.h"
-#include "StorageManager.h"
-#include "macros.h"
-
-#ifdef __GNUC__
-using namespace std;
-#endif
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-const char dataCode = '-';
-const char piCode = '?';
-const char conformingCode = 'C';
-const char appinfoCode = '#';
-const char startElementCode = '(';
-const char endElementCode = ')';
-const char referenceEntityCode = '&';
-const char attributeCode = 'A';
-const char dataAttributeCode = 'D';
-const char linkAttributeCode = 'a';
-const char defineNotationCode = 'N';
-const char defineExternalEntityCode = 'E';
-const char defineInternalEntityCode = 'I';
-const char defineSubdocEntityCode = 'S';
-const char defineExternalTextEntityCode = 'T';
-const char pubidCode = 'p';
-const char sysidCode = 's';
-const char startSubdocCode = '{';
-const char endSubdocCode = '}';
-const char fileCode = 'f';
-const char locationCode = 'L';
-const char includedElementCode = 'i';
-const char emptyElementCode = 'e';
-
-const OutputCharStream::Newline nl = OutputCharStream::newline;
-
-const char space = ' ';
-const Char re = '\r';
-
-inline
-void SgmlsEventHandler::startData()
-{
- if (!haveData_) {
- os() << dataCode;
- haveData_ = 1;
- }
-}
-
-inline
-void SgmlsEventHandler::flushData()
-{
- if (haveData_) {
- os() << nl;
- haveData_ = 0;
- }
-}
-
-inline
-void SgmlsEventHandler::outputLocation(const Location &loc)
-{
- if (outputLine_)
- outputLocation1(loc);
-}
-
-SgmlsEventHandler::SgmlsEventHandler(const SgmlParser *parser,
- OutputCharStream *os,
- Messenger *messenger,
- unsigned outputFlags)
-: SgmlsSubdocState(parser), os_(os), messenger_(messenger),
- outputLine_((outputFlags & outputLine) != 0),
- outputEntity_((outputFlags & outputEntity) != 0),
- outputId_((outputFlags & outputId) != 0),
- outputNotationSysid_((outputFlags & outputNotationSysid) != 0),
- outputIncluded_((outputFlags & outputIncluded) != 0),
- outputNonSgml_((outputFlags & outputNonSgml) != 0),
- outputEmpty_((outputFlags & outputEmpty) != 0),
- haveData_(0), lastSos_(0)
-{
- os_->setEscaper(escape);
-}
-
-SgmlsEventHandler::~SgmlsEventHandler()
-{
- flushData();
- if (errorCount() == 0)
- os() << conformingCode << nl;
- delete os_;
-}
-
-void SgmlsEventHandler::message(MessageEvent *event)
-{
- messenger_->dispatchMessage(event->message());
- ErrorCountEventHandler::message(event);
-}
-
-void SgmlsEventHandler::appinfo(AppinfoEvent *event)
-{
- const StringC *str;
- if (event->literal(str)) {
- outputLocation(event->location());
- flushData();
- os() << appinfoCode;
- outputString(*str);
- os() << nl;
- }
- delete event;
-}
-
-void SgmlsEventHandler::endProlog(EndPrologEvent *event)
-{
- if (outputEntity_) {
- flushData();
- const Dtd &dtd = event->dtd();
- Dtd::ConstEntityIter iter(dtd.generalEntityIter());
- for (;;) {
- const Entity *entity = iter.next().pointer();
- if (!entity)
- break;
- defineEntity(entity);
- }
- }
- if (!event->lpdPointer().isNull()) {
- linkProcess_.init(event->lpdPointer());
- haveLinkProcess_ = 1;
- flushData();
- }
- for (size_t i = 0; i < event->simpleLinkNames().size(); i++) {
- flushData();
- attributes(event->simpleLinkAttributes()[i],
- linkAttributeCode,
- &event->simpleLinkNames()[i]);
- }
- delete event;
-}
-
-void SgmlsEventHandler::entityDefaulted(EntityDefaultedEvent *event)
-{
- if (outputEntity_) {
- flushData();
- defineEntity(event->entityPointer().pointer());
- }
- delete event;
-}
-
-void SgmlsEventHandler::uselink(UselinkEvent *event)
-{
- linkProcess_.uselink(event->linkSet(),
- event->restore(),
- event->lpd().pointer());
- delete event;
-}
-
-void SgmlsEventHandler::sgmlDecl(SgmlDeclEvent *event)
-{
- sd_ = event->sdPointer();
- syntax_ = event->instanceSyntaxPointer(); // FIXME which syntax?
- delete event;
-}
-
-void SgmlsEventHandler::data(DataEvent *event)
-{
- outputLocation(event->location());
- startData();
- outputString(event->data(), event->dataLength());
- delete event;
-}
-
-void SgmlsEventHandler::sdataEntity(SdataEntityEvent *event)
-{
- outputLocation(event->location());
- startData();
- os() << "\\|";
- outputString(event->data(), event->dataLength());
- os() << "\\|";
- delete event;
-}
-
-void SgmlsEventHandler::pi(PiEvent *event)
-{
- outputLocation(event->location());
- flushData();
- os() << piCode;
- outputString(event->data(), event->dataLength());
- os() << nl;
- delete event;
-}
-
-void SgmlsEventHandler::nonSgmlChar(NonSgmlCharEvent *event)
-{
- if (outputNonSgml_) {
- outputLocation(event->location());
- startData();
- os() << "\\%" << (unsigned long)event->character() << ';';
- }
- delete event;
-}
-
-void SgmlsEventHandler::startElement(StartElementEvent *event)
-{
- flushData();
- currentLocation_ = event->location();
- if (haveLinkProcess_) {
- const AttributeList *linkAttributes;
- const ResultElementSpec *resultElementSpec;
- linkProcess_.startElement(event->elementType(),
- event->attributes(),
- event->location(),
- *this, // Messenger &
- linkAttributes,
- resultElementSpec);
- if (linkAttributes)
- attributes(*linkAttributes,
- linkAttributeCode, &linkProcess_.name());
- }
- attributes(event->attributes(), attributeCode, 0);
- currentLocation_.clear();
- if (outputIncluded_ && event->included())
- os() << includedElementCode << nl;
- if (outputEmpty_ && event->mustOmitEnd())
- os() << emptyElementCode << nl;
- outputLocation(event->location());
- os() << startElementCode << event->name() << nl;
- delete event;
-}
-
-void SgmlsEventHandler::attributes(const AttributeList &attributes,
- char code,
- const StringC *ownerName)
-{
- size_t nAttributes = attributes.size();
- for (size_t i = 0; i < nAttributes; i++) {
- const Text *text;
- const StringC *string;
- const AttributeValue *value = attributes.value(i);
- if (value) {
- switch (value->info(text, string)) {
- case AttributeValue::implied:
- startAttribute(attributes.name(i), code, ownerName);
- os() << "IMPLIED" << nl;
- break;
- case AttributeValue::tokenized:
- {
- const char *typeString = "TOKEN";
- const AttributeSemantics *semantics = attributes.semantics(i);
- if (semantics) {
- ConstPtr < Notation > notation
- = semantics->notation();
- if (!notation.isNull()) {
- defineNotation(notation.pointer());
- typeString = "NOTATION";
- } else {
- size_t nEntities = semantics->nEntities();
- if (nEntities) {
- typeString = "ENTITY";
- if (!outputEntity_)
- for (size_t i = 0; i < nEntities; i++) {
- const Entity *entity =
- semantics->entity(i).pointer();
- if (!markEntity(entity))
- defineEntity(entity);
- }
- }
- }
- }
- if (outputId_ && attributes.id(i))
- typeString = "ID";
- startAttribute(attributes.name(i), code, ownerName);
- os() << typeString << space << *string << nl;
- }
- break;
- case AttributeValue::cdata:
- {
- startAttribute(attributes.name(i), code, ownerName);
- os() << "CDATA ";
- TextIter iter(*text);
- TextItem::Type type;
- const Char *p;
- size_t length;
- const Location *loc;
- while (iter.next(type, p, length, loc))
- switch (type) {
- case TextItem::data:
- case TextItem::cdata:
- outputString(p, length);
- break;
- case TextItem::sdata:
- os() << "\\|";
- outputString(p, length);
- os() << "\\|";
- break;
- case TextItem::nonSgml:
- if (outputNonSgml_)
- os() << "\\%" << (unsigned long)*p << ';';
- break;
- default:
- break;
- }
- os() << nl;
- }
- break;
- }
- }
- }
-}
-
-void SgmlsEventHandler::startAttribute(const StringC &name,
- char code,
- const StringC *ownerName)
-{
- os() << code;
- if (ownerName)
- os() << *ownerName << space;
- os() << name << space;
-}
-
-void SgmlsEventHandler::endElement(EndElementEvent *event)
-{
- flushData();
- if (haveLinkProcess_)
- linkProcess_.endElement();
- outputLocation(event->location());
- os() << endElementCode << event->name() << nl;
- delete event;
-}
-
-void SgmlsEventHandler::externalDataEntity(ExternalDataEntityEvent *event)
-{
- currentLocation_ = event->location();
- outputLocation(event->location());
- flushData();
- if (!outputEntity_ && !markEntity(event->entity()))
- defineExternalDataEntity(event->entity());
- currentLocation_.clear();
- os() << referenceEntityCode << event->entity()->name() << nl;
- delete event;
-}
-
-void SgmlsEventHandler::subdocEntity(SubdocEntityEvent *event)
-{
- currentLocation_ = event->location();
- outputLocation(event->location());
- flushData();
- const SubdocEntity *entity = event->entity();
- if (!outputEntity_ && !markEntity(entity))
- defineSubdocEntity(entity);
- currentLocation_.clear();
- os() << startSubdocCode << entity->name() << nl;
- SgmlParser::Params params;
- params.subdocInheritActiveLinkTypes = 1;
- params.subdocReferenced = 1;
- params.origin = event->entityOrigin()->copy();
- params.parent = parser_;
- params.sysid = entity->externalId().effectiveSystemId();
- params.entityType = SgmlParser::Params::subdoc;
- SgmlParser parser(params);
- SgmlsSubdocState oldState;
- SgmlsSubdocState::swap(oldState);
- SgmlsSubdocState::init(&parser);
- parser.parseAll(*this);
- oldState.swap(*this);
- os() << endSubdocCode << entity->name() << nl;
- delete event;
-}
-
-void SgmlsEventHandler::defineEntity(const Entity *entity)
-{
- const InternalEntity *internalEntity = entity->asInternalEntity();
- if (internalEntity)
- defineInternalEntity(internalEntity);
- else {
- switch (entity->dataType()) {
- case Entity::cdata:
- case Entity::sdata:
- case Entity::ndata:
- defineExternalDataEntity(
- entity->asExternalDataEntity());
- break;
- case Entity::subdoc:
- defineSubdocEntity(entity->asSubdocEntity());
- break;
- case Entity::sgmlText:
- defineExternalTextEntity(entity->asExternalEntity());
- break;
- default:
- CANNOT_HAPPEN();
- }
- }
-}
-
-void SgmlsEventHandler::defineExternalDataEntity(
- const ExternalDataEntity *entity)
-{
- const Notation *notation = entity->notation();
- defineNotation(notation);
- externalId(entity->externalId());
- const char *typeString;
- switch (entity->dataType()) {
- case Entity::cdata:
- typeString = "CDATA";
- break;
- case Entity::sdata:
- typeString = "SDATA";
- break;
- case Entity::ndata:
- typeString = "NDATA";
- break;
- default:
- CANNOT_HAPPEN();
- }
- os() << defineExternalEntityCode << entity->name()
- << space << typeString
- << space << notation->name()
- << nl;
- attributes(entity->attributes(), dataAttributeCode, &entity->name());
-}
-
-void SgmlsEventHandler::defineSubdocEntity(const SubdocEntity *entity)
-{
- externalId(entity->externalId());
- os() << defineSubdocEntityCode << entity->name() << nl;
-}
-
-void SgmlsEventHandler::defineExternalTextEntity(const ExternalEntity *entity)
-{
- externalId(entity->externalId());
- os() << defineExternalTextEntityCode << entity->name() << nl;
-}
-
-void SgmlsEventHandler::defineInternalEntity(const InternalEntity *entity)
-{
- os() << defineInternalEntityCode << entity->name() << space;
- const char *s;
- switch (entity->dataType()) {
- case Entity::sdata:
- s = "SDATA";
- break;
- case Entity::cdata:
- s = "CDATA";
- break;
- case Entity::sgmlText:
- s = "TEXT";
- break;
- case Entity::pi:
- s = "PI";
- break;
- default:
- CANNOT_HAPPEN();
- }
- os() << s << space;
- outputString(entity->string());
- os() << nl;
-}
-
-void SgmlsEventHandler::defineNotation(const Notation *notation)
-{
- if (markNotation(notation))
- return;
- externalId(notation->externalId(), outputNotationSysid_);
- os() << defineNotationCode << notation->name() << nl;
-}
-
-void SgmlsEventHandler::externalId(const ExternalId &id, Boolean outputFile)
-{
- const StringC *str = id.publicIdString();
- if (str) {
- os() << pubidCode;
- outputString(*str);
- os() << nl;
- }
- str = id.systemIdString();
- if (str) {
- os() << sysidCode;
- outputString(*str);
- os() << nl;
- }
- if (outputFile && id.effectiveSystemId().size()) {
- os() << fileCode;
- outputString(id.effectiveSystemId());
- os() << nl;
- }
-}
-
-Boolean SgmlsEventHandler::markEntity(const Entity *entity)
-{
- return (definedEntities_.add(entity->name()));
-}
-
-Boolean SgmlsEventHandler::markNotation(const Notation *notation)
-{
- return (definedNotations_.add(notation->name()));
-}
-
-void SgmlsEventHandler::outputString(const Char *p, size_t n)
-{
- for (; n > 0; p++, n--) {
- switch (*p) {
- case '\\':
- // FIXME we're punning Chars and chars
- os() << "\\\\";
- break;
- case re:
- os() << "\\n";
- if (outputLine_ && haveData_)
- lastLineno_++;
- break;
- default:
- // FIXME not clear what to do here
- // given possibility of wide characters
- if (*p < 040) {
- static const char digits[] = "0123456789";
- os() << "\\0" << digits[*p / 8] << digits[*p % 8];
- }
- else
- os().put(*p);
- break;
- }
- }
-}
-
-void SgmlsEventHandler::escape(OutputCharStream &s, Char c)
-{
- s << "\\#" << (unsigned long)c << ";";
-}
-
-void SgmlsEventHandler::outputLocation1(const Location &loc)
-{
- const Origin *origin = loc.origin().pointer();
- const InputSourceOrigin *inputSourceOrigin;
- const ExternalInfo *info;
- Index index = loc.index();
- for (;;) {
- if (!origin)
- return;
- inputSourceOrigin = origin->asInputSourceOrigin();
- if (inputSourceOrigin) {
- info = inputSourceOrigin->externalInfo();
- if (info)
- break;
- }
- const Location &loc = origin->parent();
- index = loc.index();
- origin = loc.origin().pointer();
- }
- Offset off = inputSourceOrigin->startOffset(index);
- StorageObjectLocation soLoc;
- if (!ExtendEntityManager::externalize(info, off, soLoc))
- return;
- if (soLoc.lineNumber == (unsigned long)-1)
- return;
- if (soLoc.storageObjectSpec == lastSos_) {
- if (soLoc.lineNumber == lastLineno_)
- return;
- flushData();
- os() << locationCode << soLoc.lineNumber << nl;
- lastLineno_ = soLoc.lineNumber;
- } else {
- flushData();
- os() << locationCode << soLoc.lineNumber << space;
- outputString(soLoc.actualStorageId);
- os() << nl;
- lastLineno_ = soLoc.lineNumber;
- lastSos_ = soLoc.storageObjectSpec;
- lastLoc_ = loc; // make sure lastSos_ doesn't get freed
- }
-}
-
-void SgmlsEventHandler::dispatchMessage(const Message &msg)
-{
- if (!cancelled()) {
- noteMessage(msg);
- messenger_->dispatchMessage(msg);
- }
-}
-
-void SgmlsEventHandler::initMessage(Message &msg)
-{
- msg.loc = currentLocation_;
-}
-
-SgmlsSubdocState::SgmlsSubdocState()
-: haveLinkProcess_(0), parser_(0)
-{
-}
-
-SgmlsSubdocState::SgmlsSubdocState(const SgmlParser *parser)
-: haveLinkProcess_(0), parser_(parser)
-{
-}
-
-void SgmlsSubdocState::init(const SgmlParser *parser)
-{
- parser_ = parser;
- definedNotations_.clear();
- definedEntities_.clear();
- haveLinkProcess_ = 0;
- linkProcess_.clear();
-}
-
-void SgmlsSubdocState::swap(SgmlsSubdocState &to)
-{
- {
- const SgmlParser *tem = to.parser_;
- to.parser_ = parser_;
- parser_ = tem;
- }
- {
- Boolean tem = to.haveLinkProcess_;
- to.haveLinkProcess_ = haveLinkProcess_;
- haveLinkProcess_ = tem;
- }
- linkProcess_.swap(to.linkProcess_);
- definedNotations_.swap(to.definedNotations_);
- definedEntities_.swap(to.definedEntities_);
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.h b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.h
deleted file mode 100644
index ff45762bff..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/SgmlsEventHandler.h
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef SgmlsEventHandler_INCLUDED
-#define SgmlsEventHandler_INCLUDED 1
-
-#include <stddef.h>
-#include "Event.h"
-#include "Boolean.h"
-#include "StringC.h"
-#include "OutputCharStream.h"
-#include "StringSet.h"
-#include "Location.h"
-#include "Syntax.h"
-#include "Sd.h"
-#include "Ptr.h"
-#include "LinkProcess.h"
-#include "Message.h"
-#include "ErrorCountEventHandler.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class SgmlParser;
-struct StorageObjectSpec;
-
-class SgmlsSubdocState {
-public:
- SgmlsSubdocState();
- SgmlsSubdocState(const SgmlParser *);
- void init(const SgmlParser *);
- void swap(SgmlsSubdocState &);
-protected:
- const SgmlParser *parser_;
- StringSet definedEntities_;
- StringSet definedNotations_;
- Boolean haveLinkProcess_;
- LinkProcess linkProcess_;
-private:
- SgmlsSubdocState(const SgmlsSubdocState &); // undefined
- void operator=(const SgmlsSubdocState &); // undefined
-};
-
-class SgmlsEventHandler : public ErrorCountEventHandler,
- private SgmlsSubdocState, private Messenger {
-public:
- enum {
- outputLine = 01,
- outputEntity = 02,
- outputId = 04,
- outputIncluded = 010,
- outputNotationSysid = 020,
- outputNonSgml = 040,
- outputEmpty = 0100
- };
-
- SgmlsEventHandler(const SgmlParser *,
- OutputCharStream *,
- Messenger *,
- unsigned outputFlags);
- ~SgmlsEventHandler();
- void data(DataEvent *);
- void startElement(StartElementEvent *);
- void endElement(EndElementEvent *);
- void pi(PiEvent *);
- void sdataEntity(SdataEntityEvent *);
- void externalDataEntity(ExternalDataEntityEvent *);
- void subdocEntity(SubdocEntityEvent *);
- void nonSgmlChar(NonSgmlCharEvent *);
- void appinfo(AppinfoEvent *);
- void uselink(UselinkEvent *);
- void sgmlDecl(SgmlDeclEvent *);
- void endProlog(EndPrologEvent *);
- void message(MessageEvent *);
- void entityDefaulted(EntityDefaultedEvent *event);
-protected:
- void dispatchMessage(const Message &);
- void dispatchMessage(Message &tmp_message) {
- dispatchMessage((const Message &)tmp_message);
- };
- void initMessage(Message &);
-private:
- SgmlsEventHandler(const SgmlsEventHandler &); // undefined
- void operator=(const SgmlsEventHandler &); // undefined
-
- void attributes(const AttributeList &attributes, char code,
- const StringC *ownerName);
- void startAttribute(const StringC &name, char code,
- const StringC *ownerName);
- void defineEntity(const Entity *entity);
- void defineExternalDataEntity(const ExternalDataEntity *entity);
- void defineSubdocEntity(const SubdocEntity *entity);
- void defineExternalTextEntity(const ExternalEntity *entity);
- void defineInternalEntity(const InternalEntity *entity);
- void defineNotation(const Notation *notation);
- void externalId(const ExternalId &id, Boolean outputFile = 1);
- Boolean markEntity(const Entity *);
- Boolean markNotation(const Notation *);
- void startData();
- void flushData();
-
- void outputLocation(const Location &loc);
- void outputLocation1(const Location &loc);
- void outputString(const StringC &str);
- void outputString(const Char *, size_t);
- static void escape(OutputCharStream &, Char);
-
- OutputCharStream &os();
-
- Messenger *messenger_;
- Location currentLocation_;
- OutputCharStream *os_;
- Boolean haveData_;
- ConstPtr<Sd> sd_;
- ConstPtr<Syntax> syntax_;
- const StorageObjectSpec *lastSos_;
- unsigned long lastLineno_;
- Location lastLoc_;
- PackedBoolean outputLine_;
- PackedBoolean outputIncluded_;
- PackedBoolean outputEntity_;
- PackedBoolean outputId_;
- PackedBoolean outputNotationSysid_;
- PackedBoolean outputNonSgml_;
- PackedBoolean outputEmpty_;
-};
-
-inline
-void SgmlsEventHandler::outputString(const StringC &str)
-{
- outputString(str.data(), str.size());
-}
-
-inline
-OutputCharStream &SgmlsEventHandler::os()
-{
- return *os_;
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not SgmlsEventHandler_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.cxx b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.cxx
deleted file mode 100644
index d5be551586..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "config.h"
-#include "StringSet.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-StringSet::StringSet()
-{
-}
-
-Boolean StringSet::add(const StringC &str)
-{
- StringC *p = table_.lookup(str);
- if (p)
- return 1;
- p = new StringC(str);
- table_.insert(p);
- return 0;
-}
-
-void StringSet::swap(StringSet &to)
-{
- table_.swap(to.table_);
-}
-
-
-#ifdef SP_NAMESPACE
-}
-#endif
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.h b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.h
deleted file mode 100644
index 972745ee73..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/StringSet.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifndef StringSet_INCLUDED
-#define StringSet_INCLUDED 1
-
-#include "StringC.h"
-#include "Hash.h"
-#include "Boolean.h"
-#include "OwnerTable.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-class StringSetKey {
-public:
- static inline const StringC &key(const StringC &str) { return str; }
-};
-
-class StringSet {
-public:
- StringSet();
- Boolean add(const StringC &); // return 1 if already there
- void swap(StringSet &);
- void clear();
-private:
- StringSet(const StringSet &); // undefined
- void operator=(const StringSet &); // undefined
- OwnerTable<StringC, StringC, Hash, StringSetKey> table_;
-};
-
-inline
-void StringSet::clear()
-{
- table_.clear();
-}
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* not StringSet_INCLUDED */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.cxx b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.cxx
deleted file mode 100644
index 06843e8dc1..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.cxx
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 1994, 1995 James Clark
- * See the file COPYING for copying permission.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "config.h"
-#include "Event.h"
-#include "MessageEventHandler.h"
-#include "SgmlsEventHandler.h"
-#include "RastEventHandler.h"
-#include "OutputCharStream.h"
-#include "Boolean.h"
-#include "NsgmlsMessages.h"
-#include "MessageArg.h"
-#include "ErrnoMessageArg.h"
-#include "ParserApp.h"
-#include "sptchar.h"
-#include "macros.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-
-#ifdef __GNUC__
-using namespace std;
-#endif
-
-class NsgmlsApp : public ParserApp {
-public:
- NsgmlsApp();
- int processArguments(int argc, AppChar **argv);
- ErrorCountEventHandler *makeEventHandler();
- void processOption(AppChar opt, const AppChar *arg);
- void allLinkTypesActivated();
-private:
- Boolean suppressOutput_;
- Boolean prologOnly_;
- unsigned outputFlags_;
- String < AppChar > rastFile_;
- const AppChar *rastOption_;
- Boolean batchMode_;
-};
-
-SP_DEFINE_APP(NsgmlsApp)
-
-class PrologMessageEventHandler : public MessageEventHandler {
-public:
- PrologMessageEventHandler(Messenger *messenger);
- void endProlog(EndPrologEvent *);
-};
-
-class XRastEventHandler : public RastEventHandler {
-public:
- XRastEventHandler(SgmlParser *,
- const NsgmlsApp::AppChar *filename,
- const StringC &filenameStr,
- const OutputCodingSystem *,
- CmdLineApp *,
- Messenger *messenger);
- ~XRastEventHandler();
- void message(MessageEvent *);
- void truncateOutput();
- void allLinkTypesActivated();
-private:
- Messenger *messenger_;
- // file_ must come before os_ so it gets inited first
- FileOutputByteStream file_;
- EncodeOutputCharStream os_;
- const NsgmlsApp::AppChar *filename_;
- const StringC filenameStr_;
- CmdLineApp *app_;
-};
-
-NsgmlsApp::NsgmlsApp()
-: suppressOutput_(0),
- batchMode_(0),
- prologOnly_(0),
- outputFlags_(0),
- rastOption_(0)
-{
- registerOption('B');
- registerOption('d');
- registerOption('l');
- registerOption('m', SP_T("catalog_sysid"));
- registerOption('o', SP_T("output_option"));
- registerOption('p');
- registerOption('r');
- registerOption('s');
- registerOption('t', SP_T("rast_file"));
- registerOption('u');
-}
-
-void NsgmlsApp::processOption(AppChar opt, const AppChar *arg)
-{
- switch (opt) {
- case 'B':
- batchMode_ = 1;
- break;
- case 'd':
- // warn about duplicate entity declarations
- options_.warnDuplicateEntity = 1;
- break;
- case 'l':
- // output L commands
- outputFlags_ |= SgmlsEventHandler::outputLine;
- break;
- case 'm':
- processOption(SP_T('c'), arg);
- break;
- case 'o':
- {
- static struct {
- // Qualifier works around CodeWarrior bug
- const CmdLineApp::AppChar *name;
- unsigned flag;
- } outputOptions[] = {
- { SP_T("line"), SgmlsEventHandler::outputLine },
- { SP_T("entity"), SgmlsEventHandler::outputEntity },
- { SP_T("id"), SgmlsEventHandler::outputId },
- { SP_T("included"), SgmlsEventHandler::outputIncluded },
- { SP_T("notation-sysid"), SgmlsEventHandler::outputNotationSysid },
- { SP_T("nonsgml"), SgmlsEventHandler::outputNonSgml },
- { SP_T("empty"), SgmlsEventHandler::outputEmpty },
- };
- Boolean found = 0;
- for (size_t i = 0; i < SIZEOF(outputOptions); i++)
- if (tcscmp(arg, outputOptions[i].name) == 0) {
- outputFlags_ |= outputOptions[i].flag;
- found = 1;
- break;
- }
- if (!found)
- message(NsgmlsMessages::unknownOutputOption,
- StringMessageArg(convertInput(arg)));
- }
- break;
- case 'p':
- prologOnly_ = 1;
- break;
- case 'r':
- // warn about defaulted entity reference
- options_.warnDefaultEntityReference = 1;
- break;
- case 's':
- suppressOutput_ = 1;
- break;
- case 't':
- rastOption_ = arg;
- break;
- case 'u':
- // warn about undefined elements
- options_.warnUndefinedElement = 1;
- break;
- default:
- ParserApp::processOption(opt, arg);
- break;
- }
-}
-
-int NsgmlsApp::processArguments(int argc, AppChar **argv)
-{
- if (batchMode_) {
- int ret = 0;
- for (int i = 0; i < argc; i++) {
- if (rastOption_) {
- rastFile_.assign(rastOption_, tcslen(rastOption_));
- rastFile_.append(argv[i], tcslen(argv[i]));
- rastFile_ += SP_T('\0');
- }
- int tem = ParserApp::processArguments(1, argv + i);
- if (tem > ret)
- ret = tem;
- }
- return (ret);
- }
- else
- return (ParserApp::processArguments(argc, argv));
-}
-
-void NsgmlsApp::allLinkTypesActivated()
-{
- if (!rastOption_)
- ParserApp::allLinkTypesActivated();
-}
-
-ErrorCountEventHandler *NsgmlsApp::makeEventHandler()
-{
- if (prologOnly_)
- return (new PrologMessageEventHandler(this));
- else if (rastOption_) {
- const AppChar *s = batchMode_ ? rastFile_.data() : rastOption_;
- return (new XRastEventHandler(&parser_, s, convertInput(s),
- outputCodingSystem_, this, this));
- } else if (suppressOutput_)
- return (new MessageEventHandler(this, &parser_));
- else
- return (new SgmlsEventHandler(&parser_,
- makeStdOut(),
- this,
- outputFlags_));
-}
-
-PrologMessageEventHandler::PrologMessageEventHandler(Messenger *messenger)
-: MessageEventHandler(messenger)
-{
-}
-
-void PrologMessageEventHandler::endProlog(EndPrologEvent *event)
-{
- cancel();
- delete event;
-}
-
-XRastEventHandler::XRastEventHandler(SgmlParser *parser,
- const NsgmlsApp::AppChar *filename,
- const StringC &filenameStr,
- const OutputCodingSystem *codingSystem,
- CmdLineApp *app,
- Messenger *messenger)
-: RastEventHandler(parser, messenger),
- messenger_(messenger),
- filename_(filename),
- filenameStr_(filenameStr),
- app_(app)
-{
- errno = 0;
- if (!file_.open(filename)) {
- messenger->message(CmdLineApp::openFileErrorMessage(),
- StringMessageArg(filenameStr),
- ErrnoMessageArg(errno));
- exit(1);
- }
- os_.open(&file_, codingSystem);
- setOutputStream(&os_);
-}
-
-XRastEventHandler::~XRastEventHandler()
-{
- end();
-}
-
-void XRastEventHandler::truncateOutput()
-{
- os_.flush();
- errno = 0;
- if (!file_.close())
- messenger_->message(CmdLineApp::closeFileErrorMessage(),
- StringMessageArg(filenameStr_),
- ErrnoMessageArg(errno));
- errno = 0;
- if (!file_.open(filename_)) {
- messenger_->message(CmdLineApp::openFileErrorMessage(),
- StringMessageArg(filenameStr_),
- ErrnoMessageArg(errno));
- exit(1);
- }
-}
-
-void XRastEventHandler::message(MessageEvent *event)
-{
- messenger_->dispatchMessage(event->message());
- ErrorCountEventHandler::message(event);
-}
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.rc b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.rc
deleted file mode 100644
index 316da5508e..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) 1996 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "NsgmlsMessages.rc"
-#include "RastEventHandlerMessages.rc"
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls_inst.m4 b/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls_inst.m4
deleted file mode 100644
index 859ddc73a4..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/nsgmls/nsgmls_inst.m4
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 1994 James Clark
-// See the file COPYING for copying permission.
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "config.h"
-
-#ifdef SP_MANUAL_INST
-
-#define SP_DEFINE_TEMPLATES
-#include "Vector.h"
-#include "PointerTable.h"
-#include "OwnerTable.h"
-#include "Vector.h"
-#include "IQueue.h"
-#include "Owner.h"
-#undef SP_DEFINE_TEMPLATES
-
-#include "StringSet.h"
-#include "RastEventHandler.h"
-
-#ifdef SP_NAMESPACE
-namespace SP_NAMESPACE {
-#endif
-
-__instantiate(`PointerTable<StringC *, StringC, Hash, StringSetKey>')
-__instantiate(`OwnerTable<StringC, StringC, Hash, StringSetKey>')
-__instantiate(Vector<StringC *>)
-__instantiate(Owner<EndPrologEvent>)
-__instantiate(IQueue<LinkRulePi>)
-__instantiate(Vector<Vector<size_t> >)
-
-#ifdef SP_NAMESPACE
-}
-#endif
-
-#endif /* SP_MANUAL_INST */
diff --git a/usr/src/cmd/man/src/util/nsgmls.src/sunfix.sh b/usr/src/cmd/man/src/util/nsgmls.src/sunfix.sh
deleted file mode 100644
index f0aa73c614..0000000000
--- a/usr/src/cmd/man/src/util/nsgmls.src/sunfix.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-
-# Sun C++ 4.0.1 gets confused by the macros in include/NCVector.h.
-
-cd include
-mv NCVector.h NCVector.h.dist
-sed -f NCVector.sed Vector.h >NCVector.h
-chmod -w NCVector.h
-sed -f NCVector.sed Vector.cxx >NCVector.cxx
-chmod -w NCVector.cxx
diff --git a/usr/src/cmd/man/src/util/roff.cmap b/usr/src/cmd/man/src/util/roff.cmap
deleted file mode 100644
index 837799e53d..0000000000
--- a/usr/src/cmd/man/src/util/roff.cmap
+++ /dev/null
@@ -1,50 +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.
-#
-#
-# Character strings to map for troff/nroff.
-#
-# From To
-#\\ \\e
-^ \^
-. \\&.
-' \\&'
diff --git a/usr/src/cmd/man/src/util/roff.sdata b/usr/src/cmd/man/src/util/roff.sdata
deleted file mode 100644
index b0d637ad54..0000000000
--- a/usr/src/cmd/man/src/util/roff.sdata
+++ /dev/null
@@ -1,590 +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.
-#
-#
-# SDATA entity mappings to TeX instructions.
-# sgmls outputs sdata references in the form: \\|[mdash ]\\|
-#
-# J.Bowe, 1993
-#
-# Numeric and Special Graphic ________________________________
-#
-[half ] \\(12
-[frac12] \\(12
-[frac14] \\(14
-[frac34] \\(34
-[frac18] 1/8
-[frac38] 3/8
-[frac58] 5/8
-[frac78] 7/8
-[sup1 ] \\u1\\l
-[sup2 ] \\u2\\l
-[sup3 ] \\u3\\l
-[plus ] \\(pl
-[plusmn] \\(+-
-[lt ] <
-[equals] =
-[gt ] >
-[divide] \\(di
-[times ] \\(ti
-# [curren] =general currency sign
-[pound ] #
-[dollar] $
-[cent ] \\(ct
-[yen ] yen
-[num ] #
-[percnt] %
-[amp ] &
-[ast ] *
-[commat] @
-[lsqb ] [
-[bsol ] \\e
-[rsqb ] ]
-[lcub ] { /lbrace O: =left curly bracket
-# [horbar] horizontal bar
-[horbar] _
-[verbar] \\(or
-[rcub ] }
-[micro ] \\(*m
-[ohm ] \\(*W
-[deg ] \\(de
-# [ordm ] =ordinal indicator, masculine
-# [ordf ] =ordinal indicator, feminine
-[sect ] \\(sc
-# [para ] =pilcrow (paragraph sign)
-# [middot] /centerdot B: =middle dot
-[larr ] \\(<-
-[rarr ] \\(->
-[uarr ] \\(ua
-[darr ] \\(da
-[copy ] \\(co
-[reg ] \\(rg
-#[trade ] trademark
-[trade ] \\(tm
-# [brvbar] =broken (vertical) bar
-[brvbar] |
-[not ] \\(no
-# [sung ] =music note (sung text sign)
-[excl ] !
-# [iexcl ] =inverted exclamation mark
-[quot ] "
-[apos ] \\&'
-[lpar ] (
-[rpar ] )
-[comma ] ,
-[lowbar] _
-[hyphen] \\-
-[period] .
-[sol ] /
-[colon ] :
-[semi ] ;
-[quest ] ?
-# [iquest] =inverted question mark
-# [laquo ] =angle quotation mark, left
-[laquo ] <<
-# [raquo ] =angle quotation mark, right
-[raquo ] >>
-[lsquo ] `
-[rsquo ] \\&'
-[ldquo ] "
-[rdquo ] "
-[nbsp ] \\
-[shy ] \\%
-#
-# Publishing ________________________________
-#
-# trailing space here
-[emsp ] \\ \\
-[ensp ] \\
-[emsp3 ] \\
-[emsp4 ] \\
-[numsp ] \\0
-[puncsp] \\|
-[thinsp] \\|
-[hairsp] \\\^
-[mdash ] \\(em
-[ndash ] -
-[dash ] -
-[blank ] \\
-[hellip] \\&...
-[nldr ] \\&..
-[frac13] 1/3
-[frac23] 2/3
-[frac15] 1/5
-[frac25] 2/5
-[frac35] 3/5
-[frac45] 4/5
-[frac16] 1/6
-[frac56] 5/6
-# [incare] =in-care-of symbol
-# [block ] =full block
-# [uhblk ] =upper half block
-# [lhblk ] =lower half block
-# [blk14 ] =25% shaded block
-# [blk12 ] =50% shaded block
-# [blk34 ] =75% shaded block
-# [marker] =histogram marker
-[cir ] \\(ci
-[squ ] \\(sq
-# [rect ] =rectangle, open
-# [utri ] /triangle =up triangle, open
-# [dtri ] /triangledown =down triangle, open
-[star ] \\(** =star, open
-[bull ] \\(bu
-# [squf ] /blacksquare =sq bullet, filled
-# [utrif ] /blacktriangle =up tri, filled
-# [dtrif ] /blacktriangledown =dn tri, filled
-# [ltrif ] /blacktriangleleft R: =l tri, filled
-# [rtrif ] /blacktriangleright R: =r tri, filled
-# [clubs ] /clubsuit =club suit symbol
-# [diams ] /diamondsuit =diamond suit symbol
-# [hearts] /heartsuit =heart suit symbol
-# [spades] /spadesuit =spades suit symbol
-# [malt ] /maltese =maltese cross
-[dagger] \\(dg
-[Dagger] \\(dd
-# [check ] /checkmark =tick, check mark
-# [ballot] =ballot cross
-# [sharp ] /sharp =musical sharp
-# [flat ] /flat =musical flat
-# [male ] =male symbol
-# [female] =female symbol
-# [phone ] =telephone symbol
-# [telrec] =telephone recorder symbol
-# [copysr] =sound recording copyright sign
-[caret ] \^
-[lsquor] `
-[ldquor] ``
-[fflig ] \\(ff
-[filig ] \\(fi
-# [fjlig ] small fj ligature
-[ffilig] \\(Fi
-[ffllig] \\(Fl
-[fllig ] \\(fl
-# [mldr ] em leader
-[rdquor] \\&''
-[rsquor] \\&'
-# [vellip] vertical ellipsis
-# [hybull] rectangle, filled (hyphen bullet)
-# [loz ] /lozenge - lozenge or total mark
-# [lozf ] /blacklozenge - lozenge, filled
-# [ltri ] /triangleleft B: l triangle, open
-# [rtri ] /triangleright B: r triangle, open
-# [starf ] /bigstar - star, filled
-# [natur ] /natural - music natural
-# [rx ] pharmaceutical prescription (Rx)
-# [sext ] sextile (6-pointed star)
-# [target] register mark or target
-# [dlcrop] downward left crop mark
-# [drcrop] downward right crop mark
-# [ulcrop] upward left crop mark
-# [urcrop] upward right crop mark
-#
-# Added Latin 1 ________________________________
-#
-[aacute] \\(a'
-[Aacute] \\(A'
-[acirc ] \\(a^
-[Acirc ] \\(A^
-[agrave] \\(a`
-[Agrave] \\(A`
-# [aring ] =small a, ring
-# [Aring ] =capital A, ring
-# [atilde] =small a, tilde
-# [Atilde] =capital A, tilde
-[auml ] \\(a:
-# [Auml ] =capital A, dieresis or umlaut mark
-[aelig ] \\(ae
-[AElig ] \\(AE
-# [ccedil] =small c, cedilla
-# [Ccedil] =capital C, cedilla
-# [eth ] =small eth, Icelandic
-# [ETH ] =capital Eth, Icelandic
-[eacute] \\(e'
-[Eacute] \\(E'
-# [ecirc ] =small e, circumflex accent
-# [Ecirc ] =capital E, circumflex accent
-[egrave] \\(e`
-[Egrave] \\(E`
-# [euml ] =small e, dieresis or umlaut mark
-# [Euml ] =capital E, dieresis or umlaut mark
-[iacute] \\(i'
-[Iacute] \\(I'
-# [icirc ] =small i, circumflex accent
-# [Icirc ] =capital I, circumflex accent
-[igrave] \\(i`
-[Igrave] \\(I`
-# [iuml ] =small i, dieresis or umlaut mark
-# [Iuml ] =capital I, dieresis or umlaut mark
-[ntilde] \\(n~
-[Ntilde] \\(N~
-[oacute] \\(o'
-[Oacute] \\(O'
-# [ocirc ] =small o, circumflex accent
-# [Ocirc ] =capital O, circumflex accent
-[ograve] \\(o`
-[Ograve] \\(O`
-[oslash] \\(o/
-[Oslash] \\(O/
-# [otilde] =small o, tilde
-# [Otilde] =capital O, tilde
-# [ouml ] =small o, dieresis or umlaut mark
-# [Ouml ] =capital O, dieresis or umlaut mark
-[szlig ] \\(ss
-[thorn ] \\(th
-# [THORN ] =capital THORN, Icelandic
-[uacute] \\(u'
-[Uacute] \\(U'
-# [ucirc ] =small u, circumflex accent
-# [Ucirc ] =capital U, circumflex accent
-[ugrave] \\(u`
-[Ugrave] \\(U`
-# [uuml ] =small u, dieresis or umlaut mark
-# [Uuml ] =capital U, dieresis or umlaut mark
-# [yacute] =small y, acute accent
-# [Yacute] =capital Y, acute accent
-# [yuml ] =small y, dieresis or umlaut mark
-#
-# Added Latin 2 ________________________________
-#
-# [abreve] =small a, breve
-# [Abreve] =capital A, breve
-# [amacr ] =small a, macron
-# [Amacr ] =capital A, macron
-[aogon ] \\(ao
-# [Aogon ] =capital A, ogonek
-# [cacute] =small c, acute accent
-# [Cacute] =capital C, acute accent
-# [ccaron] =small c, caron
-# [Ccaron] =capital C, caron
-# [ccirc ] =small c, circumflex accent
-# [Ccirc ] =capital C, circumflex accent
-# [cdot ] =small c, dot above
-# [Cdot ] =capital C, dot above
-# [dcaron] =small d, caron
-# [Dcaron] =capital D, caron
-# [dstrok] =small d, stroke
-# [Dstrok] =capital D, stroke
-# [ecaron] =small e, caron
-# [Ecaron] =capital E, caron
-# [edot ] =small e, dot above
-# [Edot ] =capital E, dot above
-# [emacr ] =small e, macron
-# [Emacr ] =capital E, macron
-# [eogon ] =small e, ogonek
-# [Eogon ] =capital E, ogonek
-# [gacute] =small g, acute accent
-# [gbreve] =small g, breve
-# [Gbreve] =capital G, breve
-# [Gcedil] =capital G, cedilla
-# [gcirc ] =small g, circumflex accent
-# [Gcirc ] =capital G, circumflex accent
-# [gdot ] =small g, dot above
-# [Gdot ] =capital G, dot above
-# [hcirc ] =small h, circumflex accent
-# [Hcirc ] =capital H, circumflex accent
-# [hstrok] =small h, stroke
-# [Hstrok] =capital H, stroke
-# [Idot ] =capital I, dot above
-# [Imacr ] =capital I, macron
-# [imacr ] =small i, macron
-# [ijlig ] =small ij ligature
-# [IJlig ] =capital IJ ligature
-# [inodot] =small i without dot
-# [iogon ] =small i, ogonek
-# [Iogon ] =capital I, ogonek
-# [itilde] =small i, tilde
-# [Itilde] =capital I, tilde
-# [jcirc ] =small j, circumflex accent
-# [Jcirc ] =capital J, circumflex accent
-# [kcedil] =small k, cedilla
-# [Kcedil] =capital K, cedilla
-# [kgreen] =small k, Greenlandic
-# [lacute] =small l, acute accent
-# [Lacute] =capital L, acute accent
-# [lcaron] =small l, caron
-# [Lcaron] =capital L, caron
-# [lcedil] =small l, cedilla
-# [Lcedil] =capital L, cedilla
-# [lmidot] =small l, middle dot
-# [Lmidot] =capital L, middle dot
-# [lstrok] =small l, stroke
-# [Lstrok] =capital L, stroke
-# [nacute] =small n, acute accent
-# [Nacute] =capital N, acute accent
-# [eng ] =small eng, Lapp
-# [ENG ] =capital ENG, Lapp
-# [napos ] =small n, apostrophe
-# [ncaron] =small n, caron
-# [Ncaron] =capital N, caron
-# [ncedil] =small n, cedilla
-# [Ncedil] =capital N, cedilla
-# [odblac] =small o, double acute accent
-# [Odblac] =capital O, double acute accent
-# [Omacr ] =capital O, macron
-# [omacr ] =small o, macron
-# [oelig ] =small oe ligature
-# [OElig ] =capital OE ligature
-# [racute] =small r, acute accent
-# [Racute] =capital R, acute accent
-# [rcaron] =small r, caron
-# [Rcaron] =capital R, caron
-# [rcedil] =small r, cedilla
-# [Rcedil] =capital R, cedilla
-# [sacute] =small s, acute accent
-# [Sacute] =capital S, acute accent
-# [scaron] =small s, caron
-# [Scaron] =capital S, caron
-# [scedil] =small s, cedilla
-# [Scedil] =capital S, cedilla
-# [scirc ] =small s, circumflex accent
-# [Scirc ] =capital S, circumflex accent
-# [tcaron] =small t, caron
-# [Tcaron] =capital T, caron
-# [tcedil] =small t, cedilla
-# [Tcedil] =capital T, cedilla
-# [tstrok] =small t, stroke
-# [Tstrok] =capital T, stroke
-# [ubreve] =small u, breve
-# [Ubreve] =capital U, breve
-# [udblac] =small u, double acute accent
-# [Udblac] =capital U, double acute accent
-# [umacr ] =small u, macron
-# [Umacr ] =capital U, macron
-# [uogon ] =small u, ogonek
-# [Uogon ] =capital U, ogonek
-# [uring ] =small u, ring
-# [Uring ] =capital U, ring
-# [utilde] =small u, tilde
-# [Utilde] =capital U, tilde
-# [wcirc ] =small w, circumflex accent
-# [Wcirc ] =capital W, circumflex accent
-# [ycirc ] =small y, circumflex accent
-# [Ycirc ] =capital Y, circumflex accent
-# [Yuml ] =capital Y, dieresis or umlaut mark
-# [zacute] =small z, acute accent
-# [Zacute] =capital Z, acute accent
-# [zcaron] =small z, caron
-# [Zcaron] =capital Z, caron
-# [zdot ] =small z, dot above
-# [Zdot ] =capital Z, dot above
-#
-# Greek Letters ________________________________
-#
-[agr ] \\(*a
-[Agr ] \\(*A
-[bgr ] \\(*b
-[Bgr ] \\(*B
-[ggr ] \\(*g
-[Ggr ] \\(*G
-[dgr ] \\(*d
-[Dgr ] \\(*D
-[egr ] \\(*e
-[Egr ] \\(*E
-[zgr ] \\(*z
-[Zgr ] \\(*Z
-[eegr ] \\(*y
-[EEgr ] \\(*Y
-[thgr ] \\(*h
-[THgr ] \\(*H
-[igr ] \\(*i
-[Igr ] \\(*I
-[kgr ] \\(*k
-[Kgr ] \\(*K
-[lgr ] \\(*l
-[Lgr ] \\(*L
-[mgr ] \\(*m
-[Mgr ] \\(*M
-[ngr ] \\(*n
-[Ngr ] \\(*N
-[xgr ] \\(*c
-[Xgr ] \\(*C
-[ogr ] \\(*o
-[Ogr ] \\(*O
-[pgr ] \\(*p
-[Pgr ] \\(*P
-[rgr ] \\(*r
-[Rgr ] \\(*R
-[sgr ] \\(*s
-[Sgr ] \\(*S
-[sfgr ] \\(ts
-[tgr ] \\(*t
-[Tgr ] \\(*T
-[ugr ] \\(*u
-[Ugr ] \\(*U
-[phgr ] \\(*f
-[PHgr ] \\(*F
-[khgr ] \\(*x
-[KHgr ] \\(*X
-[psgr ] \\(*q
-[PSgr ] \\(*Q
-[ohgr ] \\(*w
-[OHgr ] \\(*W
-#
-# Greek Symbols ________________________________
-#
-[alpha ] \\(*a
-[beta ] \\(*b
-[gamma ] \\(*g
-[Gamma ] \\(*G
-# [gammad] /digamma
-[delta ] \\(*d
-[Delta ] \\(*D
-[epsi ] \\(*e
-# [epsiv ] /varepsilon
-[epsis ] \\(*e
-[zeta ] \\(*z
-[eta ] \\(*y
-[thetas] \\(*h
-[Theta ] \\(*H
-# [thetav] /vartheta - curly or open theta
-[iota ] \\(*i
-[kappa ] \\(*k
-# [kappav] /varkappa
-[lambda] \\(*l
-[Lambda] \\(*L
-[mu ] \\(*m
-[nu ] \\(*n
-[xi ] \\(*c
-[Xi ] \\(*C
-[pi ] \\(*p
-# [piv ] /varpi
-[Pi ] \\(*P
-[rho ] \\(*r
-# [rhov ] /varrho
-[sigma ] \\(*s
-[Sigma ] \\(*S
-# [sigmav] /varsigma
-[tau ] \\(*t
-[upsi ] \\(*u
-[Upsi ] \\(*U
-[phis ] \\(*f
-[Phi ] \\(*F
-# [phiv ] /varphi - curly or open phi
-[chi ] \\(*x
-[psi ] \\(*q
-[Psi ] \\(*X
-[omega ] \\(*w
-[Omega ] \\(*W
-#
-# General Technical ________________________________
-#
-# [aleph ] /aleph =aleph, Hebrew
-# [and ] /wedge /land B: =logical and
-# [ang90 ] =right (90 degree) angle
-# [angsph] /sphericalangle =angle-spherical
-[ap ] \\(ap
-# [becaus] /because R: =because
-# [bottom] /bot B: =perpendicular
-# [cap ] /cap B: =intersection
-# [cong ] /cong R: =congruent with
-# [conint] /oint L: =contour integral operator
-# [cup ] /cup B: =union or logical sum
-[equiv ] \\(==
-# [exist ] /exists =at least one exists
-# [forall] /forall =for all
-# [fnof ] =function of (italic small f)
-[ge ] \\(>=
-# [iff ] /iff =if and only if
-[infin ] \\(if
-# [int ] /int L: =integral operator
-[isin ] \\(sb
-# [lang ] /langle O: =left angle bracket
-# [lArr ] /Leftarrow A: =is implied by
-[le ] \\(<=
-[minus ] \\(mi
-# [mnplus] /mp B: =minus-or-plus sign
-# [nabla ] /nabla =del, Hamilton operator
-[ne ] \\(!=
-# [ni ] /ni /owns R: =contains
-# [or ] /vee /lor B: =logical or
-# [par ] /parallel R: =parallel
-# [part ] /partial =partial differential
-# [permil] =per thousand
-# [perp ] /perp R: =perpendicular
-# [prime ] /prime =prime or minute
-# [Prime ] =double prime or second
-[prop ] \\(pt
-# [radic ] /surd =radical
-# [rang ] /rangle C: =right angle bracket
-# [rArr ] /Rightarrow A: =implies
-[rArr ] \\(rh
-# [sim ] /sim R: =similar
-# [sime ] /simeq R: =similar, equals
-[square] \\(sq
-[sub ] \\(sb
-[sube ] \\(ib
-[sup ] \\(sp
-[supe ] \\(ip
-# [there4] /therefore R: =therefore
-# [Verbar] /Vert =dbl vertical bar
-# [angst ] Angstrom =capital A, ring
-# [bernou] Bernoulli function (script capital B)
-# [compfn] B: composite function (small circle)
-# [Dot ] =dieresis or umlaut mark
-# [DotDot] four dots above
-# [hamilt] Hamiltonian (script capital H)
-# [lagran] Lagrangian (script capital L)
-# [lowast] low asterisk
-# [notin ] N: negated set membership
-# [order ] order of (script small o)
-# [phmmat] physics M-matrix (script capital M)
-# [tdot ] three dots above
-# [tprime] triple prime
-# [wedgeq] R: corresponds to (wedge, equals)
-#
-# Diacritical Marks ________________________________
-#
-[acute ] \\&'
-[breve ] \\(be
-[caron ] \\(hc
-[cedil ] \\(cd
-[circ ] \^
-# [dblac ] =double acute accent
-# [die ] =dieresis
-[dot ] \\(dt
-[grave ] `
-[macr ] \\(ma
-[ogon ] \\(og
-[ring ] \\(ri
-[tilde ] ~
-[uml ] \\(..
-#
diff --git a/usr/src/cmd/man/src/util/sgml2roff.sh b/usr/src/cmd/man/src/util/sgml2roff.sh
deleted file mode 100644
index f7d802716d..0000000000
--- a/usr/src/cmd/man/src/util/sgml2roff.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-#############################################################################
-#
-# sgml2roff
-# adapted from docbook-to-man.sh
-#
-#############################################################################
-#
-# 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.
-#
-#############################################################################
-#
-# Written 5/29/96 by Fred Dalrymple
-#
-#############################################################################
-
-# ***** change the following paths if your installation of nsgmls and / or
-# ***** DocBook isn't into the default places.
-
-ROOT=/usr
-SGMLS=$ROOT/lib/sgml
-SUPPORT=$ROOT/share/lib/sgml/locale
-LOCALE_DIR=${LC_ALL:-${LC_MESSAGES:-${LANG:-C}}}
-
-if [ $LOCALE_DIR = "en_US" ]
-then
- LOCALE_DIR=C
-fi
-
-if [ ! -d $SUPPORT/$LOCALE_DIR ]
-then
- LOCALE_DIR=C
-fi
-
-DTDS=$SUPPORT/$LOCALE_DIR/dtds
-TPTFILES=$SUPPORT/$LOCALE_DIR/transpec
-
-# Everything below this line should be pretty standard and not require
-# modification.
-
-PARSER=$SGMLS/nsgmls
-INSTANT=$SGMLS/instant
-INSTANT_OPT=-d
-
-CATALOG=$DTDS/catalog
-DECL=$DTDS/solbook.dcl
-
-if [ $# -ne 1 ]; then
- echo "usage: sgml2roff <manpage>"
- exit 1
-fi
-
-# Is it an SGML man page? If not is it a shadow?
-#
-if grep -i '<refentry[ >]' < $1 >/dev/null 2>&1;
-then
- echo "'"'\" te'; \
- $PARSER -gl -m$CATALOG -E0 $1 2>/dev/null | \
- $INSTANT $INSTANT_OPT \
- -c$TPTFILES/roff.cmap -s$TPTFILES/roff.sdata -t$TPTFILES/docbook-to-man.ts
-else
- if head -10 $1 | fgrep SHADOW_PAGE >/dev/null 2>&1
- then
- # This is a shadow man page.
- # Figure out the real page, and kick out stub pointing to it
-
- MASTER=`nawk '/SYSTEM/ {gsub("\"","",$4);gsub(">","",$4);print $4}' \
- < $1`
- echo ".so `dirname $1`/$MASTER"
- fi
-fi
diff --git a/usr/src/cmd/man/src/util/solbookv2/Makefile b/usr/src/cmd/man/src/util/solbookv2/Makefile
deleted file mode 100644
index 471f919a69..0000000000
--- a/usr/src/cmd/man/src/util/solbookv2/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../../../Makefile.cmd
-
-SOLBOOKV2 = solbook.dtd \
- solbook.dcl
-
-SGMLSHLIB = $(ROOTSHLIB)/sgml
-SGMLSHLIBLOCALE = $(ROOTSHLIB)/sgml/locale
-SGMLSHLIBLOCALEC = $(ROOTSHLIB)/sgml/locale/C
-SGMLDTDDIR = $(ROOTSHLIB)/sgml/locale/C/dtds
-SOLBOOKV2DIR = $(SGMLDTDDIR)/solbookv2
-
-ROOTSOLBOOKV2 = $(SOLBOOKV2:%=$(SOLBOOKV2DIR)/%)
-
-FILEMODE = 0644
-
-.KEEP_STATE :
-
-all : THIRDPARTYLICENSE
-
-install : all $(SOLBOOKV2DIR) $(ROOTSOLBOOKV2)
-
-clobber:
- $(RM) THIRDPARTYLICENSE
-
-$(SOLBOOKV2DIR) :
- $(INS.dir)
-
-$(ROOTSOLBOOKV2):
- $(INS.file) $(@F)
-
-# the license text appears multiple times; just grab the first instance.
-THIRDPARTYLICENSE: solbook.dtd
- $(SED) -n -e '/HaL Computer/,/warranty/H' -e '/warranty/{x;p;q;}' \
- solbook.dtd > $@
-
diff --git a/usr/src/cmd/man/src/util/solbookv2/THIRDPARTYLICENSE.descrip b/usr/src/cmd/man/src/util/solbookv2/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index 78861e2531..0000000000
--- a/usr/src/cmd/man/src/util/solbookv2/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-DOCUMENT TYPE DEFINITION SOFTWARE
diff --git a/usr/src/cmd/man/src/util/solbookv2/solbook.dcl b/usr/src/cmd/man/src/util/solbookv2/solbook.dcl
deleted file mode 100644
index fcb73a4fff..0000000000
--- a/usr/src/cmd/man/src/util/solbookv2/solbook.dcl
+++ /dev/null
@@ -1,137 +0,0 @@
-<!SGML "ISO 8879:1986"
--- Copyright 2005 Sun Microsystems, Inc. All rights reserved. --
--- Use is subject to license terms. --
--- --
--- CDDL HEADER START --
--- --
--- The contents of this file are subject to the terms of the --
--- Common Development and Distribution License, Version 1.0 only --
--- (the "License"). You may not use this file except in compliance --
--- with the License. --
--- --
--- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --
--- or http://www.opensolaris.org/os/licensing. --
--- See the License for the specific language governing permissions --
--- and limitations under the License. --
--- --
--- When distributing Covered Code, include this CDDL HEADER in each --
--- file and include the License file at usr/src/OPENSOLARIS.LICENSE. --
--- If applicable, add the following below this CDDL HEADER, with the --
--- fields enclosed by brackets "[]" replaced with your own identifying --
--- information: Portions Copyright [yyyy] [name of copyright owner] --
--- --
--- CDDL HEADER END --
--- --
--- ident "%Z%%M% %I% %E% SMI" --
-
- -- SGML Declaration for SolBook 2.0 --
-
-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 45000000
- IDREFCAP 45000000
-
- --
- TOTALCAP 4000000
- ATTCAP 256000
- AVGRPCAP 256000
- ENTCAP 300000
- ENTCHCAP 350000
- GRPCAP 300000
- IDCAP 2000000
- --
-
-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 NO
-
- APPINFO NONE
->
-<!-- version: $Id: solbook.dcl 1.9 - 98/04/06 16:53:26 altheim $ -->
diff --git a/usr/src/cmd/man/src/util/solbookv2/solbook.dtd b/usr/src/cmd/man/src/util/solbookv2/solbook.dtd
deleted file mode 100644
index b68812a6bf..0000000000
--- a/usr/src/cmd/man/src/util/solbookv2/solbook.dtd
+++ /dev/null
@@ -1,4296 +0,0 @@
-<!-- ...................................................................... -->
-<!-- DocBook DTD V3.0-Based SolBook Subset V2.0 ........................... -->
-<!-- File solbook.dtd ..................................................... -->
-
-<!-- This is SolBook 2.0, a subset of DocBook V3.0.
- Copyright 1999 Sun Microsystems, Inc., All rights reserved.
- $Id: solbook.dtd 1.34 99/06/25 SMI $
- ident "%Z%%M% %I% %E% SMI"
-
- DocBook V3.0
- Copyright 1992, 1993, 1994, 1995, 1996 HaL Computer Systems, Inc.,
- O'Reilly & Associates, Inc., ArborText, Inc., and Fujitsu Software Corp.
-
- 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.
--->
-
-<!-- ...................................................................... -->
-<!--
- This is the driver file for Version 2.0 of the SolBook DTD.
- Please use the following formal public identifier to identify it:
-
- "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN"
-
- For example, if your document's top-level element is Book, and
- you are using SolBook directly, use the FPI in the DOCTYPE
- declaration:
-
- <!DOCTYPE Book PUBLIC
- "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN">
-
- The SolBook DTD is accompanied by an SGML declaration.
-
-# SolBook 3.0 Revision History:
-# file: solbook.dtd
-
- For detailed revision information, try: % grep '^#' solbook.dtd
--->
-
-<!-- ...................................................................... -->
-<!-- Notation declarations ................................................ -->
-
-<!ENTITY % local.notation.class "">
-<!ENTITY % notation.class
- "AU | BMP | CGM-CHAR | CGM-BINARY | CGM-CLEAR | DITROFF | DVI
- | EPS | EQN | FAX | GIF | GIF87a | GIF89a | IGES | JPEG
- | PCX | PIC | PS | SGML | SMCL | TBL | TEX | TIFF | WMF | WPG
- | linespecific
- %local.notation.class;">
-
-<!NOTATION AU PUBLIC
- "-//Sun Microsystems//NOTATION Sun Audio File format//EN">
-<!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 JPEG PUBLIC
- "ISO/IEC 10918:1993//NOTATION Digital Compression and Coding of Continuous-tone Still Images (JPEG)//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">
-<!NOTATION SMCL PUBLIC
- "-//Sun Microsystems//NOTATION Sun Media Center Lite video format//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">
-
-<!-- ...................................................................... -->
-<!-- DTD modules .......................................................... -->
-
-<!-- Character Mnemonic Entities ... -->
-
-<!ENTITY % charents PUBLIC
- "-//Sun Microsystems//ENTITIES SolBook V2.0 Character Mnemonics//EN">
-<!-- ...................................................................... -->
-<!-- SolBook V2.0 Character Mnemonics Module .............................. -->
-<!-- File charents.mod .................................................... -->
-
-<!-- This is SolBook 2.0, a subset of DocBook V3.0.
- Copyright 1999 Sun Microsystems, Inc., All rights reserved.
- $Id: @(#)charents.mod 1.9 99/06/18 SMI $
-
- DocBook V3.0
- Copyright 1992, 1993, 1994, 1995, 1996 HaL Computer Systems, Inc.,
- O'Reilly & Associates, Inc., ArborText, Inc., and Fujitsu Software Corp.
-
- 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.
--->
-
-<!-- This module contains the definitions for the character mnemonic entities
- used by SolBook documents. This module references the commonly used set
- of ISO character entities as declared and used in DocBook V3.0.
-
- In DTD driver files referring to this module, please use an entity
- declaration that uses the public identifier shown below:
-
- <!ENTITY % charents PUBLIC
- "-//Sun Microsystems//ENTITIES SolBook V2.0 Character Mnemonics//EN">
- %charents;
--->
-
-<!-- <<<<<<<<<<<<<<< SolBook variation(s) from DocBook >>>>>>>>>>>>>>>>
-# 1998-02-02 IGNORE all ISO entity sets; declare single 'SunISO' module
--->
-
-<!-- ...................................................................... -->
-<!-- Sun character entity sets ............................................ -->
-
-<!ENTITY % SunIso.module "INCLUDE">
-<![ %SunIso.module; [
-<!ENTITY % SunIso PUBLIC
- "-//Sun Microsystems//ENTITIES SolBook ISO 8879:1986 Subset//EN">
-%SunIso;
-<!--end of SunIso.module-->]]>
-
-
-<!-- ...................................................................... -->
-<!-- ISO character entity sets ............................................ -->
-
-<!ENTITY % ISOamsa.module "IGNORE">
-<![ %ISOamsa.module; [
-<!ENTITY % ISOamsa PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN">
-%ISOamsa;
-<!--end of ISOamsa.module-->]]>
-
-<!ENTITY % ISOamsb.module "IGNORE">
-<![ %ISOamsb.module; [
-<!ENTITY % ISOamsb PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN">
-%ISOamsb;
-<!--end of ISOamsb.module-->]]>
-
-<!ENTITY % ISOamsc.module "IGNORE">
-<![ %ISOamsc.module; [
-<!ENTITY % ISOamsc PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN">
-%ISOamsc;
-<!--end of ISOamsc.module-->]]>
-
-<!ENTITY % ISOamsn.module "IGNORE">
-<![ %ISOamsn.module; [
-<!ENTITY % ISOamsn PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN">
-%ISOamsn;
-<!--end of ISOamsn.module-->]]>
-
-<!ENTITY % ISOamso.module "IGNORE">
-<![ %ISOamso.module; [
-<!ENTITY % ISOamso PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN">
-%ISOamso;
-<!--end of ISOamso.module-->]]>
-
-<!ENTITY % ISOamsr.module "IGNORE">
-<![ %ISOamsr.module; [
-<!ENTITY % ISOamsr PUBLIC
- "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN">
-%ISOamsr;
-<!--end of ISOamsr.module-->]]>
-
-<!ENTITY % ISObox.module "IGNORE">
-<![ %ISObox.module; [
-<!ENTITY % ISObox PUBLIC
- "ISO 8879:1986//ENTITIES Box and Line Drawing//EN">
-%ISObox;
-<!--end of ISObox.module-->]]>
-
-<!ENTITY % ISOcyr1.module "IGNORE">
-<![ %ISOcyr1.module; [
-<!ENTITY % ISOcyr1 PUBLIC
- "ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
-%ISOcyr1;
-<!--end of ISOcyr1.module-->]]>
-
-<!ENTITY % ISOcyr2.module "IGNORE">
-<![ %ISOcyr2.module; [
-<!ENTITY % ISOcyr2 PUBLIC
- "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN">
-%ISOcyr2;
-<!--end of ISOcyr2.module-->]]>
-
-<!ENTITY % ISOdia.module "IGNORE">
-<![ %ISOdia.module; [
-<!ENTITY % ISOdia PUBLIC
- "ISO 8879:1986//ENTITIES Diacritical Marks//EN">
-%ISOdia;
-<!--end of ISOdia.module-->]]>
-
-<!ENTITY % ISOgrk1.module "IGNORE">
-<![ %ISOgrk1.module; [
-<!ENTITY % ISOgrk1 PUBLIC
- "ISO 8879:1986//ENTITIES Greek Letters//EN">
-%ISOgrk1;
-<!--end of ISOgrk1.module-->]]>
-
-<!ENTITY % ISOgrk2.module "IGNORE">
-<![ %ISOgrk2.module; [
-<!ENTITY % ISOgrk2 PUBLIC
- "ISO 8879:1986//ENTITIES Monotoniko Greek//EN">
-%ISOgrk2;
-<!--end of ISOgrk2.module-->]]>
-
-<!ENTITY % ISOgrk3.module "IGNORE">
-<![ %ISOgrk3.module; [
-<!ENTITY % ISOgrk3 PUBLIC
- "ISO 8879:1986//ENTITIES Greek Symbols//EN">
-%ISOgrk3;
-<!--end of ISOgrk3.module-->]]>
-
-<!ENTITY % ISOgrk4.module "IGNORE">
-<![ %ISOgrk4.module; [
-<!ENTITY % ISOgrk4 PUBLIC
- "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN">
-%ISOgrk4;
-<!--end of ISOgrk4.module-->]]>
-
-<!ENTITY % ISOlat1.module "IGNORE">
-<![ %ISOlat1.module; [
-<!ENTITY % ISOlat1 PUBLIC
- "ISO 8879:1986//ENTITIES Added Latin 1//EN">
-%ISOlat1;
-<!--end of ISOlat1.module-->]]>
-
-<!ENTITY % ISOlat2.module "IGNORE">
-<![ %ISOlat2.module; [
-<!ENTITY % ISOlat2 PUBLIC
- "ISO 8879:1986//ENTITIES Added Latin 2//EN">
-%ISOlat2;
-<!--end of ISOlat2.module-->]]>
-
-<!ENTITY % ISOnum.module "IGNORE">
-<![ %ISOnum.module; [
-<!ENTITY % ISOnum PUBLIC
- "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
-%ISOnum;
-<!--end of ISOnum.module-->]]>
-
-<!ENTITY % ISOpub.module "IGNORE">
-<![ %ISOpub.module; [
-<!ENTITY % ISOpub PUBLIC
- "ISO 8879:1986//ENTITIES Publishing//EN">
-%ISOpub;
-<!--end of ISOpub.module-->]]>
-
-<!ENTITY % ISOtech.module "IGNORE">
-<![ %ISOtech.module; [
-<!ENTITY % ISOtech PUBLIC
- "ISO 8879:1986//ENTITIES General Technical//EN">
-%ISOtech;
-<!--end of ISOtech.module-->]]>
-
-<!-- End of SolBook V2.0 Character Mnemonics Module ....................... -->
-<!-- ...................................................................... -->
-
-<!-- Information pool .............. -->
-
-<!-- Entities for module inclusions ....................................... -->
-
-<!ENTITY % include.extensions "INCLUDE">
-<![ %include.extensions; [
-<!ENTITY % SUNEXTENSIONS PUBLIC
- "-//Sun Microsystems//ENTITIES SolBook V2.0 Extensions to DocBook V3.0//EN" >
-<!-- ...................................................................... -->
-<!-- SolBook V2.0 extensions to dbpool.mod entities ....................... -->
-<!-- File sunents.mod ..................................................... -->
-
-<!-- This is SolBook 2.0, a subset of DocBook V3.0.
- Copyright 1999 Sun Microsystems, Inc., All rights reserved.
- $Id: @(#)sunents.mod 1.17 99/06/18 SMI $
-
- 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.
--->
-
-<!-- ...................................................................... -->
-<!-- General-purpose semantics entities ................................... -->
-
-<!ENTITY % yesorno.attvals "NUMBER">
-<!ENTITY % yes.attval "1">
-<!ENTITY % no.attval "0">
-
-<!-- ...................................................................... -->
-<!-- Entities for element classes and mixtures ............................ -->
-
-<!-- Object-level classes ................................................. -->
-
-<!ENTITY % local.list.class "">
-<!ENTITY % list.class
- "GlossList|ItemizedList|OrderedList|SegmentedList
- |SimpleList|VariableList %local.list.class;">
-
-<!ENTITY % local.admon.class "">
-<!ENTITY % admon.class
- "Warning %local.admon.class;">
-
-<!ENTITY % local.linespecific.class "">
-<!ENTITY % linespecific.class
- "LiteralLayout|ProgramListing|Screen
- |ScreenShot %local.linespecific.class;">
-
-<!ENTITY % local.synop.class "">
-<!ENTITY % synop.class
- "Synopsis|CmdSynopsis|FuncSynopsis %local.synop.class;">
-
-<!ENTITY % local.para.class "">
-<!ENTITY % para.class
- "Para %local.para.class;">
-
-<!ENTITY % local.informal.class "">
-<!ENTITY % informal.class
- "BlockQuote|Graphic|InformalEquation
- |InformalExample|InformalTable %local.informal.class;">
-
-<!ENTITY % local.formal.class "">
-<!ENTITY % formal.class
- "Equation|Example|Figure|Table %local.formal.class;">
-
-<!ENTITY % local.compound.class "">
-<!ENTITY % compound.class
- "MsgSet|Procedure %local.compound.class;">
-
-<!ENTITY % local.genobj.class "">
-<!ENTITY % genobj.class
- "BridgeHead|Comment|Highlights
- %local.genobj.class;">
-
-<!-- Character-level classes .............................................. -->
-
-<!ENTITY % local.ndxterm.class "">
-<!ENTITY % ndxterm.class
- "IndexTerm %local.ndxterm.class;">
-
-<!ENTITY % local.xref.char.class "">
-<!ENTITY % xref.char.class
- "FootnoteRef|XRef %local.xref.char.class;">
-
-<!ENTITY % local.word.char.class "">
-<!ENTITY % word.char.class
- "Acronym|CiteRefEntry|CiteTitle|Emphasis
- |FirstTerm|GlossTerm|Footnote|Phrase
- |Quote|Trademark %local.word.char.class;">
-
-<!ENTITY % local.link.char.class "">
-<!ENTITY % link.char.class
- "Link|OLink|ULink %local.link.char.class;">
-
-<!ENTITY % local.cptr.char.class "">
-<!ENTITY % cptr.char.class
- "Application|ClassName|Command|ComputerOutput
- |EnVar|ErrorCode|ErrorName|ErrorType|Filename|Function
- |KeySym|Literal|MediaLabel
- |MsgText|Option|Optional|Parameter|Property|Prompt
- |Replaceable|ReturnValue|StructField|StructName
- |Symbol|SystemItem|Type|UserInput
- %local.cptr.char.class;">
-
-<!--
-<!ENTITY % local.base.char.class "">
-<!ENTITY % base.char.class
- "Anchor %local.base.char.class;">
--->
-
-<!ENTITY % local.docinfo.char.class "">
-<!ENTITY % docinfo.char.class
- "Author|AuthorInitials|CorpAuthor|ModeSpec|OtherCredit
- |ProductName|ProductNumber|RevHistory
- %local.docinfo.char.class;">
-
-<!ENTITY % local.other.char.class "">
-<!ENTITY % other.char.class
- "Comment|Subscript|Superscript %local.other.char.class;">
-
-<!ENTITY % local.inlineobj.char.class "">
-<!ENTITY % inlineobj.char.class
- "InlineGraphic|InlineEquation %local.inlineobj.char.class;">
-
-<!-- Redeclaration placeholder ............................................ -->
-
-<!-- For redeclaring entities that are declared after this point while
- retaining their references to the entities that are declared before
- this point -->
-
-
-<!-- Object-level mixtures ................................................ -->
-
-<!--
- list admn line synp para infm form cmpd gen desc
-Component mixture X X X X X X X X X X
-Sidebar mixture X X X X X X X a X
-Footnote mixture X X X X X
-Example mixture X X X X X
-Highlights mixture X X X
-Paragraph mixture X X X X
-Admonition mixture X X X X X X b c
-Figure mixture X X X
-Table entry mixture X X X X d
-Glossary def mixture X X X X X e
-Legal notice mixture X X X X f
-
-a. Just Procedure; not Sidebar itself or MsgSet.
-b. No MsgSet.
-c. No Highlights.
-d. Just Graphic; no other informal objects.
-e. No Anchor, BridgeHead, or Highlights.
-f. Just BlockQuote; no other informal objects.
--->
-
-<!ENTITY % local.component.mix "">
-<!ENTITY % component.mix
- "%list.class; |%admon.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |%formal.class; |%compound.class;
- |%genobj.class; |Caution
- |Note |Tip %local.component.mix;">
-
-<!--
-<!ENTITY % local.sidebar.mix "">
-<!ENTITY % sidebar.mix
- "%list.class; |%admon.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |%formal.class; |Procedure
- |%genobj.class; |Caution
- |Note |Tip %local.sidebar.mix;">
--->
-
-<!ENTITY % local.footnote.mix "">
-<!ENTITY % footnote.mix
- "%list.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- %local.footnote.mix;">
-
-<!ENTITY % local.example.mix "">
-<!ENTITY % example.mix
- "%list.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- %local.example.mix;">
-
-<!ENTITY % local.highlights.mix "">
-<!ENTITY % highlights.mix
- "%list.class;
- |%para.class;
- %local.highlights.mix;">
-
-<!-- %synop.class; is already included in para.char.mix because synopses
- used inside paragraph-like contexts are "inline" synopses -->
-<!-- %formal.class; is explicitly excluded from many contexts in which
- paragraphs are used -->
-<!--BETA Removed admon.class and formal.class -->
-<!ENTITY % local.para.mix "">
-<!ENTITY % para.mix
- "%list.class;
- |%linespecific.class;
- |%informal.class;
- %local.para.mix;">
-
-<!ENTITY % local.admon.mix "">
-<!ENTITY % admon.mix
- "%list.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |Procedure
- |Comment
- %local.admon.mix;">
-
-<!ENTITY % local.figure.mix "">
-<!ENTITY % figure.mix
- "%linespecific.class; |%synop.class;
- |%informal.class;
- %local.figure.mix;">
-
-<!ENTITY % local.tabentry.mix "">
-<!ENTITY % tabentry.mix
- "%list.class; |%admon.class;
- |%linespecific.class;
- |%para.class; |Graphic |Caution
- |Note |Tip %local.tabentry.mix;">
-
-<!--Removed formal.class from glossdef.mix-->
-<!ENTITY % local.glossdef.mix "">
-<!ENTITY % glossdef.mix
- "%list.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |Comment
- %local.glossdef.mix;">
-<!--Removed BlockQuote from legalnotice.mix-to conform to solbook1-->
-<!ENTITY % local.legalnotice.mix "">
-<!ENTITY % legalnotice.mix
- "%list.class; |%admon.class;
- |%linespecific.class;
- |%para.class; |Caution
- |Note |Tip %local.legalnotice.mix;">
-
-<!-- Character-level mixtures ............................................. -->
-
-<!ENTITY % local.ubiq.mix "">
-<!ENTITY % ubiq.mix
- "%ndxterm.class;|BeginPage">
-
-<!--
- #PCD xref word link cptr base dnfo othr inob (synop)
-para.char.mix X X X X X X X X X X
-title.char.mix X X X X X X X X X
-ndxterm.char.mix X X X X X X X X a
-cptr.char.mix X X X X X a
-smallcptr.char.mix X b a
-word.char.mix X c X X X a
-docinfo.char.mix X d b X a
-
-a. Just InlineGraphic; no InlineEquation.
-b. Just Replaceable; no other computer terms.
-c. Just Emphasis and Trademark; no other word elements.
-d. Just Acronym, Emphasis, and Trademark; no other word elements.
--->
-
-<!-- Note that synop.class is not usually used for *.char.mixes,
- but is used here because synopses used inside paragraph
- contexts are "inline" synopses -->
-
-<!ENTITY % local.para.char.mix "">
-<!ENTITY % para.char.mix
- "#PCDATA
- |%xref.char.class; |%word.char.class;
- |%link.char.class; |%cptr.char.class;
- |%docinfo.char.class; |%synop.class;
- |%other.char.class; |%inlineobj.char.class;
- %local.para.char.mix;">
-
-<!--the small.para.char.mix is a solbook2.0 construct to limit the
- programlisting and screen content models. they originally
- contained para.char.mix
--->
-<!ENTITY % small.para.char.mix
- "#PCDATA
- |%xref.char.class; |%word.char.class;
- |%link.char.class; |%cptr.char.class;
- |%docinfo.char.class;
- |%other.char.class;
- %local.para.char.mix;">
-
-
-<!--BETA Removed inlineobj.char.class from title.char.mix-->
-<!ENTITY % local.title.char.mix "">
-<!ENTITY % title.char.mix
- "#PCDATA
- |%xref.char.class; |%word.char.class;
- |%link.char.class; |%cptr.char.class;
- |%docinfo.char.class;
- |%other.char.class;
- %local.title.char.mix;">
-
-<!--Removed InlineGraphic from ndxterm.char.mix for solbook2 -->
-<!ENTITY % local.ndxterm.char.mix "">
-<!ENTITY % ndxterm.char.mix
- "#PCDATA
- |%xref.char.class; |%word.char.class;
- |%link.char.class; |%cptr.char.class;
- |%docinfo.char.class;
- |%other.char.class;
- %local.ndxterm.char.mix;">
-
-<!ENTITY % local.cptr.char.mix "">
-<!ENTITY % cptr.char.mix
- "#PCDATA
- |%link.char.class; |%cptr.char.class;
- |%other.char.class;
- %local.cptr.char.mix;">
-
-<!ENTITY % local.smallcptr.char.mix "">
-<!ENTITY % smallcptr.char.mix
- "#PCDATA
- |Replaceable
- |InlineGraphic
- %local.smallcptr.char.mix;">
-
-<!ENTITY % local.word.char.mix "">
-<!ENTITY % word.char.mix
- "#PCDATA
- |Acronym|Emphasis|Trademark
- |%link.char.class;
- |%other.char.class; |InlineGraphic
- %local.word.char.mix;">
-
-<!ENTITY % local.docinfo.char.mix "">
-<!ENTITY % docinfo.char.mix
- "#PCDATA
- |Emphasis|Trademark
- |Replaceable
- |%other.char.class; |InlineGraphic
- %local.docinfo.char.mix;">
-<!--ENTITY % bibliocomponent.mix (see Bibliographic section, below)-->
-<!--ENTITY % person.ident.mix (see Bibliographic section, below)-->
-
-<!-- ...................................................................... -->
-<!-- Entities for content models .......................................... -->
-
-<!ENTITY % formalobject.title.content "Title, TitleAbbrev?">
-
-<!ENTITY % equation.content "(Graphic+)">
-
-<!ENTITY % inlineequation.content "(Graphic+)">
-
-<!ENTITY % programlisting.content "LineAnnotation | %small.para.char.mix;">
-
-<!ENTITY % screen.content "LineAnnotation | %small.para.char.mix;">
-
-<!-- ...................................................................... -->
-<!-- Entities for attributes and attribute components ..................... -->
-
-<!-- Effectivity attributes ............................................... -->
-
-<!ENTITY % arch.attrib
- --Arch: computer or chip architecture to which element applies; no default--
- "Arch (SPARC | X86 | POWERPC | IA) #IMPLIED">
-
-<!ENTITY % conformance.attrib
- --Conformance: standards conformance characteristics--
- "Conformance NMTOKENS #IMPLIED">
-
-<!ENTITY % os.attrib
- --OS: operating system to which element applies; no default--
- "OS (SOLARIS | SOLARIS32 | SOLARIS64 | HP-UX) #IMPLIED">
-
-<!ENTITY % revision.attrib
- --Revision: editorial revision to which element belongs; no default--
- "Revision CDATA #IMPLIED">
-
-<!ENTITY % userlevel.attrib
- -- UserLevel: level of user experience to which element applies;
- no default --
- "UserLevel (ADMIN | USER | DEVELOPER | USER-ADMIN | USER-DEVELOPER
- | ADMIN-DEVELOPER | ALL-AUDIENCES) #IMPLIED" >
-
-<!ENTITY % vendor.attrib
- --Vendor: computer vendor to which element applies; no default--
- "Vendor CDATA #IMPLIED">
-
-<!ENTITY % local.effectivity.attrib "">
-<!ENTITY % effectivity.attrib
- "%arch.attrib;
- %conformance.attrib;
- %os.attrib;
- %revision.attrib;
- %userlevel.attrib;
- %vendor.attrib;
- %local.effectivity.attrib;"
->
-
-<!-- Common attributes .................................................... -->
-
-<!ENTITY % id.attrib
- --Id: unique identifier of element; no default--
- "Id ID #IMPLIED">
-
-<!ENTITY % idreq.attrib
- --Id: unique identifier of element; a value must be supplied; no
- default--
- "Id ID #REQUIRED">
-
-<!ENTITY % lang.attrib
- --Lang: indicator of language in which element is written, for
- translation, character set management, etc.; no default--
- "Lang (ca | de | en | es | fr | it | ja | ko | pl | ru | sv | zh | zh_TW ) en">
-
-<!ENTITY % remap.attrib
- --Remap: previous role of element before conversion; no default--
- "Remap CDATA #IMPLIED">
-
-<!ENTITY % role.attrib
- --Role: new role of element in local environment; no default--
- "Role CDATA #IMPLIED">
-
-<!ENTITY % xreflabel.attrib
- --XRefLabel: alternate labeling string for XRef text generation;
- default is usually title or other appropriate label text already
- contained in element--
- "XRefLabel CDATA #IMPLIED">
-
-<!ENTITY % revisionflag.attrib
- --RevisionFlag: revision status of element; default is that element
- wasn't revised--
- "RevisionFlag (Changed
- |Added
- |Deleted
- |Off) #IMPLIED">
-
-<!ENTITY % local.common.attrib "">
-<!ENTITY % common.attrib
- "%id.attrib;
- %lang.attrib;
- %remap.attrib;
- --Role is included explicitly on each element--
- %xreflabel.attrib;
- %revisionflag.attrib;
- %effectivity.attrib;"
->
-
-<!ENTITY % idreq.common.attrib
- "%idreq.attrib;
- %lang.attrib;
- %remap.attrib;
- --Role is included explicitly on each element--
- %xreflabel.attrib;
- %revisionflag.attrib;
- %effectivity.attrib;
- %local.common.attrib;"
->
-
-<!-- Semi-common attributes and other attribute entities .................. -->
-
-<!ENTITY % local.graphics.attrib "">
-<!ENTITY % graphics.attrib
- "Entityref ENTITY #IMPLIED
- Fileref CDATA #IMPLIED
- Format NOTATION
- (%notation.class;)
- #IMPLIED
- SrcCredit CDATA #IMPLIED
- --Width = CALS reprowid (desired width)--
- Width NUTOKEN #IMPLIED
- --Depth = CALS reprodep (desired depth)--
- Depth NUTOKEN #IMPLIED
- --Align = CALS hplace with 'none' removed;
- #IMPLIED means application-specific--
- Align (Left
- |Right
- |Center) #IMPLIED
- --Scale = conflation of CALS hscale and vscale--
- Scale NUMBER #IMPLIED
- --Scalefit = CALS scalefit--
- Scalefit %yesorno.attvals;
- #IMPLIED
- %local.graphics.attrib;"
->
-
-<!ENTITY % local.keyaction.attrib "">
-<!ENTITY % keyaction.attrib
- --Action: Key combination type; default is unspecified if one
- child element, Simul if there is more than one; if value is
- Other, the OtherAction attribute must have a nonempty value--
- --OtherAction: User-defined key combination type--
- "Action (Click
- |Double-Click
- |Press
- |Seq
- |Simul
- |Other) #IMPLIED
- OtherAction CDATA #IMPLIED"
->
-
-<!ENTITY % label.attrib
- --Label: number or identifying string; default is usually the
- appropriate number or string autogenerated by a formatter--
- "Label CDATA #IMPLIED">
-
-<!ENTITY % linespecific.attrib
- --Format: whether element is assumed to contain significant white
- space--
- "Format NOTATION
- (linespecific) linespecific">
-
-<!ENTITY % linkend.attrib
- --Linkend: link to related information; no default--
- "Linkend IDREF #IMPLIED">
-
-<!ENTITY % linkendreq.attrib
- --Linkend: required link to related information--
- "Linkend IDREF #REQUIRED">
-
-<!ENTITY % linkends.attrib
- --Linkends: link to one or more sets of related information; no
- default--
- "Linkends IDREFS #IMPLIED">
-
-<!ENTITY % linkendsreq.attrib
- --Linkends: required link to one or more sets of related information--
- "Linkends IDREFS #REQUIRED">
-
-<!ENTITY % local.mark.attrib "">
-<!ENTITY % mark.attrib
- "Mark CDATA #IMPLIED
- %local.mark.attrib;"
->
-
-<!ENTITY % moreinfo.attrib
- --MoreInfo: whether element's content has an associated RefEntry--
- "MoreInfo (RefEntry|None) None">
-
-<!ENTITY % pagenum.attrib
- --Pagenum: number of page on which element appears; no default--
- "Pagenum CDATA #IMPLIED">
-
-<!ENTITY % local.status.attrib "">
-<!ENTITY % status.attrib
- --Status: Editorial or publication status of the element
- it applies to, such as "in review" or "approved for distribution"--
- "Status CDATA #IMPLIED
- %local.status.attrib;"
->
-
-<!ENTITY % width.attrib
- --Width: width in characters (if intended display is to be in a
- monospaced font) or in ens (if intended display is to be in a
- variable-width font)--
- "Width NUMBER #IMPLIED">
-
-<!-- End of SolBook V2.0 extensions to dbpool.mod ......................... -->
-<!-- ...................................................................... -->
-
-]]>
-
-<!ENTITY % dbpool PUBLIC
- "-//Sun Microsystems//ELEMENTS DocBook Information Pool V3.0-Based SolBook Subset V2.0//EN">
-<!-- ...................................................................... -->
-<!-- SolBook V2.0 information pool module ................................. -->
-<!-- File dbpool.mod ...................................................... -->
-
-<!-- This is SolBook 2.0, a subset of DocBook V3.0.
- Copyright 1999 Sun Microsystems, Inc., All rights reserved.
- $Id: @(#)dbpool.mod 1.25 99/06/18 SMI $
-
- DocBook V3.0
- Copyright 1992, 1993, 1994, 1995, 1996 HaL Computer Systems, Inc.,
- O'Reilly & Associates, Inc., ArborText, Inc., and Fujitsu Software Corp.
-
- 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.
--->
-
-<!-- ...................................................................... -->
-
-<!-- This module contains the definitions for the objects, inline
- elements, and so on that are available to be used as the main
- content of SolBook documents. Some elements are useful for general
- publishing, and others are useful specifically for computer
- documentation.
-
- This module has the following dependencies on other modules:
-
- o It assumes that a %notation.class; entity is defined by the
- driver file or other high-level module. This entity is
- referenced in the NOTATION attributes for the graphic-related and
- ModeSpec elements.
-
- o It assumes that an appropriately parameterized table module is
- available for use with the table-related elements.
-
- In DTD driver files referring to this module, please use an entity
- declaration that uses the public identifier shown below:
-
- <!ENTITY % dbpool PUBLIC
- "-//Sun Microsystems//ELEMENTS DocBook Information Pool V3.0-Based SolBook Subset V2.0//EN">
- %dbpool;
-
- 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.
-
-#file: dbpool.mod
--->
-
-<!-- ...................................................................... -->
-<!-- Title elements ....................................................... -->
-
-<!ENTITY % title.module "INCLUDE">
-<![ %title.module; [
-<!ENTITY % local.title.attrib "">
-<!ENTITY % title.role.attrib "%role.attrib;">
-<!ELEMENT Title - O ((%title.char.mix;)+)>
-<!ATTLIST Title
- %pagenum.attrib;
- %common.attrib;
->
-<!--end of title.module-->]]>
-
-<!ENTITY % titleabbrev.module "INCLUDE">
-<![ %titleabbrev.module; [
-<!ENTITY % local.titleabbrev.attrib "">
-<!ENTITY % titleabbrev.role.attrib "%role.attrib;">
-<!ELEMENT TitleAbbrev - O ((%title.char.mix;)+)>
-<!ATTLIST TitleAbbrev
- %common.attrib;
->
-<!--end of titleabbrev.module-->]]>
-
-<!ENTITY % subtitle.module "INCLUDE">
-<![ %subtitle.module; [
-<!ENTITY % local.subtitle.attrib "">
-<!ENTITY % subtitle.role.attrib "%role.attrib;">
-<!ELEMENT Subtitle - O ((%title.char.mix;)+)>
-<!ATTLIST Subtitle
- %common.attrib;
->
-<!--end of subtitle.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Bibliographic entities and elements .................................. -->
-
-<!-- The bibliographic elements are typically used in the document
- hierarchy. They do not appear in content models of information
- pool elements. See also the document information elements,
- below. -->
-
-<!ENTITY % local.person.ident.mix "">
-<!ENTITY % person.ident.mix
- "FirstName|Surname|OtherName?
- |Contrib? %local.person.ident.mix;">
-
-
-<!ENTITY % biblioentry.module "INCLUDE">
-<![ %biblioentry.module; [
-<!ENTITY % local.biblioentry.attrib "">
-
-<!ENTITY % biblioentry.role.attrib "%role.attrib;">
-<!ELEMENT BiblioEntry - O (BookBiblio)>
-<!ATTLIST BiblioEntry
- %common.attrib;
->
-<!--end of biblioentry.module-->]]>
-
-<!ENTITY % bookbiblio.module "INCLUDE">
-<![ %bookbiblio.module; [
-<!ENTITY % local.bookbiblio.attrib "">
-<!ENTITY % bookbiblio.role.attrib "%role.attrib;">
-<!ELEMENT BookBiblio - - (Title, TitleAbbrev?, Subtitle?, Edition?,
- AuthorGroup, (ISBN, VolumeNum?), ProductNumber?,
- ProductName?, PubsNumber, ReleaseInfo?, PubDate,
- Publisher*, (Copyright)+, Abstract?,
- RevHistory?) -(%ubiq.mix;)
->
-<!--end of bookbiblio.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Subject, Keyword, and ITermSet elements .............................. -->
-
-<!ENTITY % subjectset.content.module "INCLUDE">
-<![ %subjectset.content.module; [
-<!ENTITY % subjectset.module "INCLUDE">
-<![ %subjectset.module; [
-<!ENTITY % local.subjectset.attrib "">
-<!ENTITY % subjectset.role.attrib "%role.attrib;">
-<!ELEMENT SubjectSet - - (Subject+)>
-<!ATTLIST SubjectSet
- --Scheme: External set of subject terms employed in
- SubjectTerms--
- Scheme NAME #IMPLIED
- %common.attrib;
- %subjectset.role.attrib;
- %local.subjectset.attrib;
->
-<!--end of subjectset.module-->]]>
-
-<!ENTITY % subject.module "INCLUDE">
-<![ %subject.module; [
-<!ENTITY % local.subject.attrib "">
-<!ENTITY % subject.role.attrib "%role.attrib;">
-<!ELEMENT Subject - - (SubjectTerm+)>
-<!ATTLIST Subject
- --Weight: Ranking of this group of SubjectTerms relative
- to others, 0 is low, no highest value specified--
- Weight NUMBER #IMPLIED
- %common.attrib;
- %subject.role.attrib;
- %local.subject.attrib;
->
-<!--end of subject.module-->]]>
-
-<!ENTITY % subjectterm.module "INCLUDE">
-<![ %subjectterm.module; [
-<!ENTITY % local.subjectterm.attrib "">
-<!ENTITY % subjectterm.role.attrib "%role.attrib;">
-<!ELEMENT SubjectTerm - - (#PCDATA)>
-<!ATTLIST SubjectTerm
- %common.attrib;
- %subjectterm.role.attrib;
- %local.subjectterm.attrib;
->
-<!--end of subjectterm.module-->]]>
-<!--end of subjectset.content.module-->]]>
-
-<!ENTITY % keywordset.content.module "INCLUDE">
-<![ %keywordset.content.module; [
-<!ENTITY % local.keywordset.attrib "">
-<!ENTITY % keywordset.module "INCLUDE">
-<![ %keywordset.module; [
-<!ENTITY % local.keywordset.attrib "">
-<!ENTITY % keywordset.role.attrib "%role.attrib;">
-<!ELEMENT KeywordSet - - (Keyword+)>
-<!ATTLIST KeywordSet
- %common.attrib;
- %keywordset.role.attrib;
- %local.keywordset.attrib;
->
-<!--end of keywordset.module-->]]>
-
-<!ENTITY % keyword.module "INCLUDE">
-<![ %keyword.module; [
-<!ENTITY % local.keyword.attrib "">
-<!ENTITY % keyword.role.attrib "%role.attrib;">
-<!ELEMENT Keyword - - (#PCDATA)>
-<!ATTLIST Keyword
- %common.attrib;
- %keyword.role.attrib;
- %local.keyword.attrib;
->
-<!--end of keyword.module-->]]>
-<!--end of keywordset.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Compound (section-ish) elements ...................................... -->
-
-<!-- Message set ...................... -->
-
-<!ENTITY % msgset.content.module "INCLUDE">
-<![ %msgset.content.module; [
-<!ENTITY % msgset.module "INCLUDE">
-<![ %msgset.module; [
-<!ENTITY % local.msgset.attrib "">
-<!ENTITY % msgset.role.attrib "%role.attrib;">
-<!ELEMENT MsgSet - - (MsgEntry+)>
-<!ATTLIST MsgSet
- %common.attrib;
->
-<!--end of msgset.module-->]]>
-
-<!ENTITY % msgentry.module "INCLUDE">
-<![ %msgentry.module; [
-<!ENTITY % local.msgentry.attrib "">
-<!ENTITY % msgentry.role.attrib "%role.attrib;">
-<!ELEMENT MsgEntry - O (Msg+, MsgExplan*)>
-<!ATTLIST MsgEntry
- %common.attrib;
->
-<!--end of msgentry.module-->]]>
-
-<!ENTITY % msg.module "INCLUDE">
-<![ %msg.module; [
-<!ENTITY % local.msg.attrib "">
-<!ENTITY % msg.role.attrib "%role.attrib;">
-<!ELEMENT Msg - O (Title?, MsgMain, (MsgSub)*)>
-<!ATTLIST Msg
- %common.attrib;
->
-<!--end of msg.module-->]]>
-
-<!ENTITY % msgmain.module "INCLUDE">
-<![ %msgmain.module; [
-<!ENTITY % local.msgmain.attrib "">
-<!ENTITY % msgmain.role.attrib "%role.attrib;">
-<!ELEMENT MsgMain - - (Title?, MsgText)>
-<!ATTLIST MsgMain
- %common.attrib;
->
-<!--end of msgmain.module-->]]>
-
-<!ENTITY % msgsub.module "INCLUDE">
-<![ %msgsub.module; [
-<!ENTITY % local.msgsub.attrib "">
-<!ENTITY % msgsub.role.attrib "%role.attrib;">
-<!ELEMENT MsgSub - - (MsgText)>
-<!ATTLIST MsgSub
- %common.attrib;
->
-<!--end of msgsub.module-->]]>
-
-<!ENTITY % msgexplan.module "INCLUDE">
-<![ %msgexplan.module; [
-<!ENTITY % local.msgexplan.attrib "">
-<!ENTITY % msgexplan.role.attrib "%role.attrib;">
-<!ELEMENT MsgExplan - - (Title?, (%component.mix;)+)>
-<!ATTLIST MsgExplan
- %common.attrib;
- Role (Description | Cause | Solution | Example) #IMPLIED
->
-<!--end of msgexplan.module-->]]>
-<!--end of msgset.content.module-->]]>
-
-<!-- Procedure ........................ -->
-
-<!ENTITY % procedure.content.module "INCLUDE">
-<![ %procedure.content.module; [
-<!ENTITY % procedure.module "INCLUDE">
-<![ %procedure.module; [
-<!ENTITY % local.procedure.attrib "">
-<!ENTITY % procedure.role.attrib "%role.attrib;">
-<!ELEMENT Procedure - - ((%formalobject.title.content;)?,
- (%component.mix;)*, Step+)>
-<!ATTLIST Procedure
- %common.attrib;
- Role (SINGLE-STEP) #IMPLIED
->
-<!--end of procedure.module-->]]>
-
-<!ENTITY % step.module "INCLUDE">
-<![ %step.module; [
-<!ENTITY % local.step.attrib "">
-<!ENTITY % step.role.attrib "%role.attrib;">
-<!ELEMENT Step - O (Title?, (((%component.mix;)+, (SubSteps,
- (%component.mix;)*)?) | (SubSteps, (%component.mix;)*)))>
-<!ATTLIST Step
- --Performance: whether step must be performed--
- Performance (Optional
- |Required) Required -- not #REQUIRED! --
- %common.attrib;
->
-<!--end of step.module-->]]>
-
-<!ENTITY % substeps.module "INCLUDE">
-<![ %substeps.module; [
-<!ENTITY % local.substeps.attrib "">
-<!ENTITY % substeps.role.attrib "%role.attrib;">
-<!ELEMENT SubSteps - - (Step+)>
-<!ATTLIST SubSteps
- --Performance: whether whole set of substeps must be
- performed--
- Performance (Optional
- |Required) Required -- not #REQUIRED! --
- %common.attrib;
->
-<!--end of substeps.module-->]]>
-<!--end of procedure.content.module-->]]>
-
-<!-- Sidebar .......................... -->
-
-<!-- ...................................................................... -->
-<!-- Paragraph-related elements ........................................... -->
-
-<!ENTITY % abstract.module "INCLUDE">
-<![ %abstract.module; [
-<!ENTITY % local.abstract.attrib "">
-<!ENTITY % abstract.role.attrib "%role.attrib;">
-<!ELEMENT Abstract - - (Title?, (%para.class;)+)>
-<!ATTLIST Abstract
- %common.attrib;
->
-<!--end of abstract.module-->]]>
-
-
-<!ENTITY % blockquote.module "INCLUDE">
-<![ %blockquote.module; [
-<!ENTITY % local.blockquote.attrib "">
-<!ENTITY % blockquote.role.attrib "%role.attrib;">
-<!ELEMENT BlockQuote - - ((%component.mix;)+)>
-<!ATTLIST BlockQuote
- %common.attrib;
- Role (Alt) #IMPLIED
->
-<!--end of blockquote.module-->]]>
-
-<!ENTITY % bridgehead.module "INCLUDE">
-<![ %bridgehead.module; [
-<!ENTITY % local.bridgehead.attrib "">
-<!ENTITY % bridgehead.role.attrib "%role.attrib;">
-<!ELEMENT BridgeHead - - ((%title.char.mix;)+)>
-<!ATTLIST BridgeHead
- %common.attrib;
->
-<!--end of bridgehead.module-->]]>
-
-<!ENTITY % comment.module "INCLUDE">
-<![ %comment.module; [
-<!ENTITY % local.comment.attrib "">
-<!ENTITY % comment.role.attrib "%role.attrib;">
-<!ELEMENT Comment - - ((%para.char.mix;)+) -(%ubiq.mix;)>
-<!ATTLIST Comment
- %common.attrib;
->
-<!--end of comment.module-->]]>
-
-<!ENTITY % footnote.module "INCLUDE">
-<![ %footnote.module; [
-<!ENTITY % local.footnote.attrib "">
-<!ENTITY % footnote.role.attrib "%role.attrib;">
-<!ELEMENT Footnote - - ((%footnote.mix;)+) -(Footnote|%formal.class;)>
-<!ATTLIST Footnote
- %common.attrib;
- %footnote.role.attrib;
->
-<!--end of footnote.module-->]]>
-
-<!ENTITY % highlights.module "INCLUDE">
-<![ %highlights.module; [
-<!ENTITY % local.highlights.attrib "">
-<!ENTITY % highlights.role.attrib "%role.attrib;">
-<!ELEMENT Highlights - - ((%highlights.mix; | (Caution | Note | Tip | Warning))+)
- -(%ubiq.mix;|%formal.class;)>
-<!ATTLIST Highlights
- %common.attrib;
->
-<!--end of highlights.module-->]]>
-
-<!ENTITY % para.module "INCLUDE">
-<![ %para.module; [
-<!ENTITY % local.para.attrib "">
-<!ENTITY % para.role.attrib "%role.attrib;">
-<!ELEMENT Para - O ((%para.char.mix; | %para.mix;)+)>
-<!ATTLIST Para
- %common.attrib;
->
-<!--end of para.module-->]]>
-
-<!ENTITY % admon.module "INCLUDE">
-<![ %admon.module; [
-<!ENTITY % local.admon.attrib "">
-<!ENTITY % admon.role.attrib "%role.attrib;">
-<!ELEMENT (%admon.class;) - - (%admon.mix;)+ -(Caution|Note|Tip|%admon.class;)>
-<!ATTLIST (%admon.class;)
- %common.attrib;
->
-<!--end of admon.module-->]]>
-
-<!ENTITY % note.module "INCLUDE">
-<![ %note.module; [
-<!ELEMENT Note - - (%admon.mix;)+ -(Note|Tip|Caution|%admon.class;)>
-<!ATTLIST Note
- %common.attrib;
- Role (Note | MarginNote) Note
->
-<!--end of note.module-->]]>
-
-<!ENTITY % tip.module "INCLUDE">
-<![ %tip.module; [
-<!ELEMENT Tip - - (BridgeHead | %admon.mix;)+
- -(Note|Tip|Caution|%admon.class;)>
-<!ATTLIST Tip
- %common.attrib;
->
-<!--end of tip.module-->]]>
-
-<!ENTITY % caution.module "INCLUDE">
-<![ %caution.module; [
-<!ELEMENT Caution - - (BridgeHead | %admon.mix;)+
- -(Note|Tip|Caution|%admon.class;)>
-<!ATTLIST Caution
- %common.attrib;
- Role (Hot | Electrical | Caution) Caution
->
-<!--end of caution.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Lists ................................................................ -->
-
-<!-- GlossList ........................ -->
-
-<!ENTITY % glosslist.module "INCLUDE">
-<![ %glosslist.module; [
-<!ENTITY % local.glosslist.attrib "">
-<!ENTITY % glosslist.role.attrib "%role.attrib;">
-<!ELEMENT GlossList - - (GlossEntry+)>
-<!ATTLIST GlossList
- %common.attrib;
->
-<!--end of glosslist.module-->]]>
-
-<!ENTITY % glossentry.content.module "INCLUDE">
-<![ %glossentry.content.module; [
-<!ENTITY % glossentry.module "INCLUDE">
-<![ %glossentry.module; [
-<!ENTITY % local.glossentry.attrib "">
-<!ENTITY % glossentry.role.attrib "%role.attrib;">
-<!ELEMENT GlossEntry - O (GlossTerm, Acronym?, (GlossSee|GlossDef+))>
-<!ATTLIST GlossEntry
- --SortAs: alternate sort string for automatically
- alphabetized set of glossary entries--
- SortAs CDATA #IMPLIED
- %common.attrib;
->
-<!--end of glossentry.module-->]]>
-
-<!--ELEMENT GlossTerm (defined in the Inlines section, below)-->
-<!ENTITY % glossdef.module "INCLUDE">
-<![ %glossdef.module; [
-<!ENTITY % local.glossdef.attrib "">
-<!ELEMENT GlossDef - O ((%glossdef.mix;)+, GlossSeeAlso*)>
-<!ATTLIST GlossDef
- %common.attrib;
- %local.glossdef.attrib;
->
-<!--end of glossdef.module-->]]>
-
-<!ENTITY % glosssee.module "INCLUDE">
-<![ %glosssee.module; [
-<!ENTITY % local.glosssee.attrib "">
-<!ENTITY % glosssee.role.attrib "%role.attrib;">
-<!ELEMENT GlossSee - O ((%para.char.mix;)+)>
-<!ATTLIST GlossSee
- --OtherTerm: link to GlossEntry of real term to look up--
- OtherTerm IDREF #CONREF
- %common.attrib;
->
-<!--end of glosssee.module-->]]>
-
-<!ENTITY % glossseealso.module "INCLUDE">
-<![ %glossseealso.module; [
-<!ENTITY % local.glossseealso.attrib "">
-<!ENTITY % glossseealso.role.attrib "%role.attrib;">
-<!ELEMENT GlossSeeAlso - O ((%para.char.mix;)+)>
-<!ATTLIST GlossSeeAlso
- --OtherTerm: link to GlossEntry of related term--
- OtherTerm IDREF #CONREF
- %common.attrib;
->
-<!--end of glossseealso.module-->]]>
-<!--end of glossentry.content.module-->]]>
-
-<!-- ItemizedList and OrderedList ..... -->
-
-<!ENTITY % itemizedlist.module "INCLUDE">
-<![ %itemizedlist.module; [
-<!ENTITY % local.itemizedlist.attrib "">
-<!ENTITY % itemizedlist.role.attrib "%role.attrib;">
-<!ELEMENT ItemizedList - - (ListItem+)>
-<!ATTLIST ItemizedList
- %common.attrib;
- Mark (Bullet | Dash | Checkbox | Checkmark | None) Bullet
- --Spacing: relative desired compactness of list, in author's
- judgment--
- Spacing (Normal | Compact) #IMPLIED
->
-<!--end of itemizedlist.module-->]]>
-
-<!ENTITY % orderedlist.module "INCLUDE">
-<![ %orderedlist.module; [
-<!ENTITY % local.orderedlist.attrib "">
-<!ENTITY % orderedlist.role.attrib "%role.attrib;">
-<!ELEMENT OrderedList - - (ListItem+)>
-<!ATTLIST OrderedList
- --Continuation: whether numbers are reset from previous list--
- Continuation (Continues | Restarts) Restarts
- --Spacing: relative desired compactness of list, in author's
- judgment--
- Spacing (Normal | Compact) #IMPLIED
- %common.attrib;
->
-<!--end of orderedlist.module-->]]>
-
-<!ENTITY % listitem.module "INCLUDE">
-<![ %listitem.module; [
-<!ENTITY % local.listitem.attrib "">
-<!ENTITY % listitem.role.attrib "%role.attrib;">
-<!ELEMENT ListItem - O ((%component.mix;)+) -(Procedure,Bridgehead,Highlights)>
-<!ATTLIST ListItem
- Override (Bullet | Dash | Checkbox | Checkmark | None) #IMPLIED
- %common.attrib;
->
-<!--end of listitem.module-->]]>
-
-<!-- SegmentedList .................... -->
-<!ENTITY % segmentedlist.content.module "INCLUDE">
-<![ %segmentedlist.content.module; [
-<!ENTITY % segmentedlist.module "INCLUDE">
-<![ %segmentedlist.module; [
-<!ENTITY % local.segmentedlist.attrib "">
-<!ENTITY % segmentedlist.role.attrib "%role.attrib;">
-<!ELEMENT SegmentedList - - ((%formalobject.title.content;)?, SegTitle*,
- SegListItem+)>
-<!ATTLIST SegmentedList
- %common.attrib;
->
-<!--end of segmentedlist.module-->]]>
-
-<!ENTITY % segtitle.module "INCLUDE">
-<![ %segtitle.module; [
-<!ENTITY % local.segtitle.attrib "">
-<!ENTITY % segtitle.role.attrib "%role.attrib;">
-<!ELEMENT SegTitle - O ((%title.char.mix;)+)>
-<!ATTLIST SegTitle
- %common.attrib;
->
-<!--end of segtitle.module-->]]>
-
-<!ENTITY % seglistitem.module "INCLUDE">
-<![ %seglistitem.module; [
-<!ENTITY % local.seglistitem.attrib "">
-<!ENTITY % seglistitem.role.attrib "%role.attrib;">
-<!ELEMENT SegListItem - O (Seg, Seg+)>
-<!ATTLIST SegListItem
- %common.attrib;
->
-<!--end of seglistitem.module-->]]>
-
-<!ENTITY % seg.module "INCLUDE">
-<![ %seg.module; [
-<!ENTITY % local.seg.attrib "">
-<!ENTITY % seg.role.attrib "%role.attrib;">
-<!ELEMENT Seg - O ((%small.para.char.mix;)+)>
-<!ATTLIST Seg
- %common.attrib;
->
-<!--end of seg.module-->]]>
-<!--end of segmentedlist.content.module-->]]>
-
-<!-- SimpleList ....................... -->
-
-<!ENTITY % simplelist.content.module "INCLUDE">
-<![ %simplelist.content.module; [
-<!ENTITY % simplelist.module "INCLUDE">
-<![ %simplelist.module; [
-<!ENTITY % local.simplelist.attrib "">
-<!ENTITY % simplelist.role.attrib "%role.attrib;">
-<!ELEMENT SimpleList - - (Member+)>
-<!ATTLIST SimpleList
- --Columns: number of columns--
- Columns NUMBER #IMPLIED
-
- --Type: Inline: members separated with commas etc. inline
- Vert: members top to bottom in n Columns
- Horiz: members left to right in n Columns
- If Column=1 or implied, Vert and Horiz are the same--
- Type (Inline
- |Vert
- |Horiz) Vert
- %common.attrib;
->
-<!--end of simplelist.module-->]]>
-
-<!--Changed para.char.mix to small.para.char.mix for Member-->
-<!ENTITY % member.module "INCLUDE">
-<![ %member.module; [
-<!ENTITY % local.member.attrib "">
-<!ENTITY % member.role.attrib "%role.attrib;">
-<!ELEMENT Member - O ((%small.para.char.mix;)+)>
-<!ATTLIST Member
- %common.attrib;
->
-<!--end of member.module-->]]>
-<!--end of simplelist.content.module-->]]>
-
-<!-- VariableList ..................... -->
-
-<!ENTITY % variablelist.content.module "INCLUDE">
-<![ %variablelist.content.module; [
-<!ENTITY % variablelist.module "INCLUDE">
-<![ %variablelist.module; [
-<!ENTITY % local.variablelist.attrib "">
-<!ENTITY % variablelist.role.attrib "%role.attrib;">
-<!ELEMENT VariableList - - ((%formalobject.title.content;)?, VarListEntry+)>
-<!ATTLIST VariableList
- --TermLength: approximate length of term content that should
- fit onto one line, in same units that table ColWidth accepts--
- TermLength (xtranarrow | narrow | medium | wide | xtrawide | wholeline) medium
- %common.attrib;
->
-<!--end of variablelist.module-->]]>
-
-<!ENTITY % varlistentry.module "INCLUDE">
-<![ %varlistentry.module; [
-<!ENTITY % local.varlistentry.attrib "">
-<!ENTITY % varlistentry.role.attrib "%role.attrib;">
-<!ELEMENT VarListEntry - O (Term+, ListItem)>
-<!ATTLIST VarListEntry
- %common.attrib;
->
-<!--end of varlistentry.module-->]]>
-
-<!--Changed para.char.mix to small.para.char.list for Term-->
-<!ENTITY % term.module "INCLUDE">
-<![ %term.module; [
-<!ENTITY % local.term.attrib "">
-<!ENTITY % term.role.attrib "%role.attrib;">
-<!ELEMENT Term - O ((%small.para.char.mix;)+)>
-<!ATTLIST Term
- %common.attrib;
->
-<!--end of term.module-->]]>
-
-<!--ELEMENT ListItem (defined above)-->
-<!--end of variablelist.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Objects .............................................................. -->
-
-<!-- Examples etc. .................... -->
-
-<!ENTITY % example.module "INCLUDE">
-<![ %example.module; [
-<!ENTITY % local.example.attrib "">
-<!ENTITY % example.role.attrib "%role.attrib;">
-<!ELEMENT Example - - ((%formalobject.title.content;), (%example.mix;)+)
- -(%formal.class;)>
-<!ATTLIST Example
- %label.attrib;
- --Width: The numbers equal inches--
- Width (50|70|100) #IMPLIED
- Role (Example | Code) Code
- %common.attrib;
->
-<!--end of example.module-->]]>
-
-<!ENTITY % informalexample.module "INCLUDE">
-<![ %informalexample.module; [
-<!ENTITY % local.informalexample.attrib "">
-<!ENTITY % informalexample.role.attrib "%role.attrib;">
-<!ELEMENT InformalExample - - ((%example.mix;)+)>
-<!ATTLIST InformalExample
- --Width: The numbers equal inches--
- Width (50|70|100) #IMPLIED
- %common.attrib;
->
-<!--end of informalexample.module-->]]>
-
-<!ENTITY % programlisting.module "INCLUDE">
-<![ %programlisting.module; [
-<!ENTITY % local.programlisting.attrib "">
-<!ENTITY % programlisting.role.attrib "%role.attrib;">
-<!ELEMENT ProgramListing - - ((%programlisting.content;)+)>
-<!ATTLIST ProgramListing
- --Width: The numbers equal percentage values --
- Width (50|70|100|8050|8070|80100) #IMPLIED
- %linespecific.attrib;
- %common.attrib;
- Role (Complete | Fragment) Fragment
->
-<!--end of programlisting.module-->]]>
-<!ENTITY % literallayout.module "INCLUDE">
-<![ %literallayout.module; [
-<!ENTITY % local.literallayout.attrib "">
-<!ENTITY % literallayout.role.attrib "%role.attrib;">
-<!ELEMENT LiteralLayout - - ((LineAnnotation | %small.para.char.mix;)+)>
-<!ATTLIST LiteralLayout
- --Width: The numbers equal inches--
- Width (50|70|100) #IMPLIED
- %linespecific.attrib;
- %common.attrib;
->
-<!--ELEMENT LineAnnotation (defined in the Inlines section, below)-->
-<!--end of literallayout.module-->]]>
-
-<!ENTITY % screen.module "INCLUDE">
-<![ %screen.module; [
-<!ENTITY % local.screen.attrib "">
-<!ENTITY % screen.role.attrib "%role.attrib;">
-<!ELEMENT Screen - - ((%screen.content;)+)>
-<!ATTLIST Screen
- --Width: The numbers equal percentage values --
- Width (50|70|100|8050|8070|80100) #IMPLIED
- %linespecific.attrib;
- %common.attrib;
->
-<!--end of screen.module-->]]>
-
-<!ENTITY % screenshot.content.module "INCLUDE">
-<![ %screenshot.content.module; [
-<!ENTITY % screenshot.module "INCLUDE">
-<![ %screenshot.module; [
-<!ENTITY % local.screenshot.attrib "">
-<!ENTITY % screenshot.role.attrib "%role.attrib;">
-<!ELEMENT ScreenShot - - (ScreenInfo?, Graphic)>
-<!ATTLIST ScreenShot
- %common.attrib;
->
-<!--end of screenshot.module-->]]>
-
-<!ENTITY % screeninfo.module "INCLUDE">
-<![ %screeninfo.module; [
-<!ENTITY % local.screeninfo.attrib "">
-<!ENTITY % screeninfo.role.attrib "%role.attrib;">
-<!ELEMENT ScreenInfo - O ((%docinfo.char.mix;)+) -(%ubiq.mix;)>
-<!ATTLIST ScreenInfo
- %common.attrib;
->
-<!--end of screeninfo.module-->]]>
-<!--end of screenshot.content.module-->]]>
-
-<!-- Figures etc. ..................... -->
-
-<!ENTITY % figure.module "INCLUDE">
-<![ %figure.module; [
-<!ENTITY % local.figure.attrib "">
-<!ENTITY % figure.role.attrib "%role.attrib;">
-<!ELEMENT Figure - - (%formalobject.title.content;, (%figure.mix; |
- %link.char.class;)+)>
-<!ATTLIST Figure
- --Float: whether figure can float in output--
- Float %yesorno.attvals; %no.attval;
- %label.attrib;
- %common.attrib;
->
-<!--end of figure.module-->]]>
-
-<!-- Graphical data can be the content of Graphic, or you can reference
- an external file either as an entity (Entitref) or a filename
- (Fileref). -->
-
-<!ENTITY % graphic.module "INCLUDE">
-<![ %graphic.module; [
-<!ENTITY % local.graphic.attrib "">
-<!ENTITY % graphic.role.attrib "%role.attrib;">
-<!ELEMENT Graphic - - CDATA>
-<!ATTLIST Graphic
- %graphics.attrib;
- %common.attrib;
->
-<!--end of graphic.module-->]]>
-
-<!ENTITY % inlinegraphic.module "INCLUDE">
-<![ %inlinegraphic.module; [
-<!ENTITY % local.inlinegraphic.attrib "">
-<!ENTITY % inlinegraphic.role.attrib "%role.attrib;">
-<!ELEMENT InlineGraphic - - CDATA>
-<!ATTLIST InlineGraphic
- %graphics.attrib;
- %common.attrib;
->
-<!--end of inlinegraphic.module-->]]>
-
-<!-- Equations ........................ -->
-
-<!ENTITY % equation.content "(Graphic+)">
-
-<!ENTITY % equation.module "INCLUDE">
-<![ %equation.module; [
-<!ENTITY % local.equation.attrib "">
-<!ENTITY % equation.role.attrib "%role.attrib;">
-<!ELEMENT Equation - - ((%formalobject.title.content;)?, (InformalEquation |
- (Alt?, %equation.content;)))>
-<!ATTLIST Equation
- %label.attrib;
- %common.attrib;
->
-<!--end of equation.module-->]]>
-
-<!ENTITY % informalequation.module "INCLUDE">
-<![ %informalequation.module; [
-<!ENTITY % local.informalequation.attrib "">
-<!ENTITY % informalequation.role.attrib "%role.attrib;">
-<!ELEMENT InformalEquation - - ((Graphic)+)>
-<!ATTLIST InformalEquation
- %common.attrib;
->
-<!--end of informalequation.module-->]]>
-
-<!ENTITY % alt.module "INCLUDE">
-<![ %alt.module; [
-<!ENTITY % local.alt.attrib "">
-<!ENTITY % alt.role.attrib "%role.attrib;">
-<!ELEMENT Alt - - (#PCDATA)>
-<!ATTLIST Alt
- %common.attrib;
- %alt.role.attrib;
- %local.alt.attrib;
->
-<!--end of alt.module-->]]>
-
-<!ENTITY % inlineequation.module "INCLUDE">
-<![ %inlineequation.module; [
-<!ENTITY % local.inlineequation.attrib "">
-<!ENTITY % inlineequation.role.attrib "%role.attrib;">
-<!ELEMENT InlineEquation - - ((Graphic)+)>
-<!ATTLIST InlineEquation
- %common.attrib;
->
-<!--end of inlineequation.module-->]]>
-
-<!-- Tables ........................... -->
-
-<!ENTITY % table.module "INCLUDE">
-<![ %table.module; [
-
-<!ENTITY % tables.role.attrib "%role.attrib;">
-
-<!-- Add Label attribute to Table element (and InformalTable element). -->
-<!ENTITY % bodyatt "%label.attrib;">
-
-<!-- Add common attributes to Table, TGroup, TBody, THead, TFoot, Row,
- EntryTbl, and Entry (and InformalTable element). -->
-<!ENTITY % secur
- "%common.attrib; ">
-
-<!-- Remove Chart. -->
-<!ENTITY % tbl.table.name "Table">
-
-<!-- Content model for Table. -->
-<!ENTITY % tbl.table.mdl
- "((%formalobject.title.content;), (Graphic+|TGroup+))">
-
-<!-- Exclude all DocBook tables and formal objects. -->
-<!ENTITY % tbl.table.excep "-(InformalTable|%formal.class;)">
-
-<!-- Remove pgbrk exception on Row. -->
-<!ENTITY % tbl.row.excep "">
-
-<!-- Allow either objects or inlines; beware of REs between elements. -->
-<!ENTITY % tbl.entry.mdl "((%tabentry.mix;)+ | (%para.char.mix;)+)">
-
-<!-- Remove pgbrk exception on Entry. -->
-<!ENTITY % tbl.entry.excep "">
-
-<!-- Remove pgbrk exception on EntryTbl. -->
-<!ENTITY % tbl.entrytbl.excep "">
-
-<!-- Reference CALS table module. -->
-<!ENTITY % calstbls PUBLIC "-//USA-DOD//DTD Table Model 951010//EN">
-<!-- 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;
->
-
-
-<!--end of table.module-->]]>
-
-<!ENTITY % informaltable.module "INCLUDE">
-<![ %informaltable.module; [
-
-<!-- Note that InformalTable is dependent on some of the entity
- declarations that customize Table. -->
-
-<!ENTITY % local.informaltable.attrib "">
-<!ELEMENT InformalTable - - (Graphic+|TGroup+) %tbl.table.excep;>
-<!ATTLIST InformalTable
- -- Frame, Colsep, and Rowsep must be repeated because
- they are not in entities in the table module. --
- Frame (Top
- |Bottom
- |Topbot
- |All
- |Sides
- |None) #IMPLIED
- Colsep %yesorno.attvals; #IMPLIED
- Rowsep %yesorno.attvals; #IMPLIED
- -- tbl.table.att includes TabStyle, ToCentry, ShortEntry,
- Orient, and PgWide. --
- %tbl.table.att;
- -- bodyatt includes Label. --
- %bodyatt;
- -- secur includes common attributes. --
- %secur;
- %local.informaltable.attrib;
->
-<!--end of informaltable.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Synopses ............................................................. -->
-
-<!-- Synopsis ......................... -->
-
-<!ENTITY % synopsis.module "INCLUDE">
-<![ %synopsis.module; [
-<!ENTITY % local.synopsis.attrib "">
-<!ENTITY % synopsis.role.attrib "%role.attrib;">
-<!ELEMENT Synopsis - - ((LineAnnotation | %small.para.char.mix; | Graphic)+)>
-<!ATTLIST Synopsis
- %linespecific.attrib;
- %common.attrib;
--- Role (Solaris | XPG4 | POSIX) #IMPLIED --
--- temporarily removed from Synopsis till OS/Role conflict resolved 1/25/96 --
- %local.synopsis.attrib;
->
-
-<!--ELEMENT LineAnnotation (defined in the Inlines section, below)-->
-<!--end of synopsis.module-->]]>
-
-<!-- CmdSynopsis ...................... -->
-
-<!ENTITY % cmdsynopsis.content.module "INCLUDE">
-<![ %cmdsynopsis.content.module; [
-<!ENTITY % cmdsynopsis.module "INCLUDE">
-<![ %cmdsynopsis.module; [
-<!ENTITY % local.cmdsynopsis.attrib "">
-<!ENTITY % cmdsynopsis.role.attrib "%role.attrib;">
-<!ELEMENT CmdSynopsis - - ((Command | Arg | Group)+, SynopFragment*)>
-<!ATTLIST CmdSynopsis
- %common.attrib;
--- Role (Solaris | XPG4 | POSIX) #IMPLIED --
- -- THE ABOVE LIST OF PRODUCT NAMES WILL GROW --
->
-<!--end of cmdsynopsis.module-->]]>
-
-<!ENTITY % arg.module "INCLUDE">
-<![ %arg.module; [
-<!ENTITY % local.arg.attrib "">
-<!ENTITY % arg.role.attrib "%role.attrib;">
-<!ELEMENT Arg - - ((#PCDATA
- | Arg
- | Group
- | Option
- | SynopFragmentRef
- | Replaceable)+)>
- <!ATTLIST Arg
- --Choice: whether Arg must be supplied:
- Opt: optional to supply (e.g. [arg])
- Req: required to supply (e.g. {arg})
- Plain: required to supply (e.g. arg)--
- Choice (Opt
- |Req
- |Plain) Opt
-
- --Rep: whether Arg is repeatable:
- Norepeat: no (e.g. arg without ellipsis)
- Repeat: yes (e.g. arg...)--
- Rep (Norepeat
- |Repeat) Norepeat
- %common.attrib;
- Role (Startline) #IMPLIED
->
-<!--end of arg.module-->]]>
-
-<!ENTITY % group.module "INCLUDE">
-<![ %group.module; [
-<!ENTITY % local.group.attrib "">
-<!ENTITY % group.role.attrib "%role.attrib;">
-<!ELEMENT Group - - ((Arg | Group | Option | SynopFragmentRef
- | Replaceable)+)>
-<!ATTLIST Group
- -- Choice: whether Group must be supplied:
- Opt: optional to supply (e.g. [g1|g2|g3])
- Req: required to supply (e.g. {g1|g2|g3})
- Plain: required to supply (e.g. g1|g2|g3) --
- Choice (Opt
- |Req
- |Plain) Opt
-
- -- Rep: whether Group is repeatable:
- Norepeat: no (e.g. group without ellipsis)
- Repeat: yes (e.g. group...) --
- Rep (Norepeat
- |Repeat) Norepeat
- %common.attrib;
->
-<!--end of group.module-->]]>
-
-<!ENTITY % synopfragmentref.module "INCLUDE">
-<![ %synopfragmentref.module; [
-<!ENTITY % local.synopfragmentref.attrib "">
-<!ENTITY % synopfragmentref.role.attrib "%role.attrib;">
-<!ELEMENT SynopFragmentRef - - RCDATA >
-<!ATTLIST SynopFragmentRef
- %linkendreq.attrib; --to SynopFragment of complex synopsis
- material for separate referencing--
- %common.attrib;
->
-<!--end of synopfragmentref.module-->]]>
-
-<!ENTITY % synopfragment.module "INCLUDE">
-<![ %synopfragment.module; [
-<!ENTITY % local.synopfragment.attrib "">
-<!ENTITY % synopfragment.role.attrib "%role.attrib;">
-<!ELEMENT SynopFragment - - ((Arg | Group)+)>
-<!ATTLIST SynopFragment
- %idreq.common.attrib;
- %synopfragment.role.attrib;
->
-<!--end of synopfragment.module-->]]>
-
-<!--ELEMENT Command (defined in the Inlines section, below)-->
-<!--ELEMENT Option (defined in the Inlines section, below)-->
-<!--ELEMENT Replaceable (defined in the Inlines section, below)-->
-<!--end of cmdsynopsis.content.module-->]]>
-
-<!-- FuncSynopsis ..................... -->
-
-<!ENTITY % funcsynopsis.content.module "INCLUDE">
-<![ %funcsynopsis.content.module; [
-<!ENTITY % funcsynopsis.module "INCLUDE">
-<![ %funcsynopsis.module; [
-
-<!ENTITY % local.funcsynopsis.attrib "">
-<!ENTITY % funcsynopsis.role.attrib "%role.attrib;">
-<!ELEMENT FuncSynopsis - - (FuncSynopsisInfo?, (FuncPrototype+ |
- (FuncDef, (Void | VarArgs | ParamDef+))+), FuncSynopsisInfo?)>
-<!ATTLIST FuncSynopsis
- %common.attrib;
--- Role (Solaris | XPG4 | POSIX) #IMPLIED --
->
-<!--end of funcsynopsis.module-->]]>
-
-<!ENTITY % funcsynopsisinfo.module "INCLUDE">
-<![ %funcsynopsisinfo.module; [
-<!ENTITY % local.funcsynopsisinfo.attrib "">
-<!ENTITY % funcsynopsisinfo.role.attrib "%role.attrib;">
-<!ELEMENT FuncSynopsisInfo - O ((LineAnnotation | %cptr.char.mix;)* )>
-<!ATTLIST FuncSynopsisInfo
- %linespecific.attrib;
- %common.attrib;
->
-<!--end of funcsynopsisinfo.module-->]]>
-
-<!ENTITY % funcprototype.module "INCLUDE">
-<![ %funcprototype.module; [
-<!ENTITY % local.funcprototype.attrib "">
-<!ENTITY % funcprototype.role.attrib "%role.attrib;">
-<!ELEMENT FuncPrototype - O (FuncDef, (Void | VarArgs | ParamDef+))>
-<!ATTLIST FuncPrototype
- %common.attrib;
->
-<!--end of funcprototype.module-->]]>
-
-<!ENTITY % funcdef.module "INCLUDE">
-<![ %funcdef.module; [
-<!ENTITY % local.funcdef.attrib "">
-<!ENTITY % funcdef.role.attrib "%role.attrib;">
-<!ELEMENT FuncDef - - ((#PCDATA
- | Replaceable
- | Function)*)>
-<!ATTLIST FuncDef
- %common.attrib;
->
-<!--end of funcdef.module-->]]>
-
-<!ENTITY % void.module "INCLUDE">
-<![ %void.module; [
-<!ENTITY % local.void.attrib "">
-<!ENTITY % void.role.attrib "%role.attrib;">
-<!ELEMENT Void - O EMPTY>
-<!ATTLIST Void
- %common.attrib;
->
-<!--end of void.module-->]]>
-
-<!ENTITY % varargs.module "INCLUDE">
-<![ %varargs.module; [
-<!ENTITY % local.varargs.attrib "">
-<!ENTITY % varargs.role.attrib "%role.attrib;">
-<!ELEMENT VarArgs - O EMPTY>
-<!ATTLIST VarArgs
- %common.attrib;
->
-<!--end of varargs.module-->]]>
-
-<!-- Processing assumes that only one Parameter will appear in a
- ParamDef, and that FuncParams will be used at most once, for
- providing information on the "inner parameters" for parameters that
- are pointers to functions. -->
-
-<!ENTITY % paramdef.module "INCLUDE">
-<![ %paramdef.module; [
-<!ENTITY % local.paramdef.attrib "">
-<!ENTITY % paramdef.role.attrib "%role.attrib;">
-<!ELEMENT ParamDef - - ((#PCDATA
- | Replaceable
- | Parameter
- | FuncParams)*)>
-<!ATTLIST ParamDef
- %common.attrib;
->
-<!--end of paramdef.module-->]]>
-
-<!ENTITY % funcparams.module "INCLUDE">
-<![ %funcparams.module; [
-<!ENTITY % local.funcparams.attrib "">
-<!ENTITY % funcparams.role.attrib "%role.attrib;">
-<!ELEMENT FuncParams - - ((%cptr.char.mix;)*)>
-<!ATTLIST FuncParams
- %common.attrib;
->
-<!--end of funcparams.module-->]]>
-
-<!--ELEMENT LineAnnotation (defined in the Inlines section, below)-->
-<!--ELEMENT Replaceable (defined in the Inlines section, below)-->
-<!--ELEMENT Function (defined in the Inlines section, below)-->
-<!--ELEMENT Parameter (defined in the Inlines section, below)-->
-<!--end of funcsynopsis.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Document information entities and elements ........................... -->
-
-<!-- The document information elements include some elements that are
- currently used only in the document hierarchy module. They are
- defined here so that they will be available for use in customized
- document hierarchies. -->
-
-<!-- .................................. -->
-
-<!ENTITY % docinfo.content.module "INCLUDE">
-<![ %docinfo.content.module; [
-
-<!-- Address .......................... -->
-
-<!ENTITY % address.content.module "INCLUDE">
-<![ %address.content.module; [
-<!ENTITY % address.module "INCLUDE">
-<![ %address.module; [
-<!ENTITY % local.address.attrib "">
-<!ENTITY % address.role.attrib "%role.attrib;">
-<!ELEMENT Address - - (Street|POB|Postcode|City|State|Country|Phone
- |Fax|Email|OtherAddr)*>
-<!ATTLIST Address
- %common.attrib;
->
-<!--end of address.module-->]]>
-
- <!ENTITY % street.module "INCLUDE">
- <![ %street.module; [
- <!ENTITY % local.street.attrib "">
- <!ENTITY % street.role.attrib "%role.attrib;">
- <!ELEMENT Street - - ((%docinfo.char.mix;)+)>
- <!ATTLIST Street
- %common.attrib;
->
- <!--end of street.module-->]]>
-
- <!ENTITY % pob.module "INCLUDE">
- <![ %pob.module; [
- <!ENTITY % local.pob.attrib "">
- <!ENTITY % pob.role.attrib "%role.attrib;">
- <!ELEMENT POB - - ((%docinfo.char.mix;)+)>
- <!ATTLIST POB
- %common.attrib;
->
- <!--end of pob.module-->]]>
-
- <!ENTITY % postcode.module "INCLUDE">
- <![ %postcode.module; [
- <!ENTITY % local.postcode.attrib "">
- <!ENTITY % postcode.role.attrib "%role.attrib;">
- <!ELEMENT Postcode - - ((%docinfo.char.mix;)+)>
- <!ATTLIST Postcode
- %common.attrib;
->
- <!--end of postcode.module-->]]>
-
- <!ENTITY % city.module "INCLUDE">
- <![ %city.module; [
- <!ENTITY % local.city.attrib "">
- <!ENTITY % city.role.attrib "%role.attrib;">
- <!ELEMENT City - - ((%docinfo.char.mix;)+)>
- <!ATTLIST City
- %common.attrib;
->
- <!--end of city.module-->]]>
-
- <!ENTITY % state.module "INCLUDE">
- <![ %state.module; [
- <!ENTITY % local.state.attrib "">
- <!ENTITY % state.role.attrib "%role.attrib;">
- <!ELEMENT State - - ((%docinfo.char.mix;)+)>
- <!ATTLIST State
- %common.attrib;
->
- <!--end of state.module-->]]>
-
- <!ENTITY % country.module "INCLUDE">
- <![ %country.module; [
- <!ENTITY % local.country.attrib "">
- <!ENTITY % country.role.attrib "%role.attrib;">
- <!ELEMENT Country - - ((%docinfo.char.mix;)+)>
- <!ATTLIST Country
- %common.attrib;
->
- <!--end of country.module-->]]>
-
- <!ENTITY % phone.module "INCLUDE">
- <![ %phone.module; [
- <!ENTITY % local.phone.attrib "">
- <!ENTITY % phone.role.attrib "%role.attrib;">
- <!ELEMENT Phone - - ((%docinfo.char.mix;)+)>
- <!ATTLIST Phone
- %common.attrib;
->
- <!--end of phone.module-->]]>
-
- <!ENTITY % fax.module "INCLUDE">
- <![ %fax.module; [
- <!ENTITY % local.fax.attrib "">
- <!ENTITY % fax.role.attrib "%role.attrib;">
- <!ELEMENT Fax - - ((%docinfo.char.mix;)+)>
- <!ATTLIST Fax
- %common.attrib;
->
- <!--end of fax.module-->]]>
-
- <!--ELEMENT Email (defined in the Inlines section, below)-->
-
- <!ENTITY % otheraddr.module "INCLUDE">
- <![ %otheraddr.module; [
- <!ENTITY % local.otheraddr.attrib "">
- <!ENTITY % otheraddr.role.attrib "%role.attrib;">
- <!ELEMENT OtherAddr - - ((%docinfo.char.mix;)+)>
- <!ATTLIST OtherAddr
- %common.attrib;
->
- <!--end of otheraddr.module-->]]>
-<!--end of address.content.module-->]]>
-
-<!-- Affiliation ...................... -->
-
-<!ENTITY % affiliation.content.module "INCLUDE">
-<![ %affiliation.content.module; [
-<!ENTITY % affiliation.module "INCLUDE">
-<![ %affiliation.module; [
-<!ENTITY % local.affiliation.attrib "">
-<!ENTITY % affilication.role.attrib "%role.attrib;">
-<!ELEMENT Affiliation - - (ShortAffil?, JobTitle*, OrgName?, OrgDiv*,
- Address*)>
-<!ATTLIST Affiliation
- %common.attrib;
->
-<!--end of affiliation.module-->]]>
-
-<!ENTITY % shortaffil.module "INCLUDE">
-<![ %shortaffil.module; [
-<!ENTITY % local.shortaffil.attrib "">
-<!ENTITY % shortaffil.role.attrib "%role.attrib;">
-<!ELEMENT ShortAffil - - ((%docinfo.char.mix;)+)>
-<!ATTLIST ShortAffil
- %common.attrib;
->
-<!--end of shortaffil.module-->]]>
-
-<!ENTITY % jobtitle.module "INCLUDE">
-<![ %jobtitle.module; [
-<!ENTITY % local.jobtitle.attrib "">
-<!ENTITY % jobtitle.role.attrib "%role.attrib;">
-<!ELEMENT JobTitle - - ((%docinfo.char.mix;)+)>
-<!--end of jobtitle.module-->]]>
-
-<!--ELEMENT OrgName (defined elsewhere in this section)-->
-
-<!ENTITY % orgdiv.module "INCLUDE">
-<![ %orgdiv.module; [
-<!ENTITY % local.orgdiv.attrib "">
-<!ELEMENT OrgDiv - - ((%docinfo.char.mix;)+)>
-<!ATTLIST OrgDiv
- %common.attrib;
- %local.orgdiv.attrib;
->
- <!--end of orgdiv.module-->]]>
-
- <!--ELEMENT Address (defined elsewhere in this section)-->
-<!--end of affiliation.content.module-->]]>
-
-<!-- ArtPageNums ...................... -->
-
-<!-- Author ........................... -->
-
-<!ENTITY % author.module "INCLUDE">
-<![ %author.module; [
-<!ENTITY % local.author.attrib "">
-<!ENTITY % author.role.attrib "%role.attrib;">
-<!ELEMENT Author - - ((%person.ident.mix;)+)>
-<!--(see "Personal identity elements" for %person.ident.mix;)-->
-<!ATTLIST Author
- %common.attrib;
->
-<!--end of author.module-->]]>
-<!-- AuthorGroup ...................... -->
-
-<!ENTITY % authorgroup.content.module "INCLUDE">
-<![ %authorgroup.content.module; [
-<!ENTITY % authorgroup.module "INCLUDE">
-<![ %authorgroup.module; [
-<!ENTITY % local.authorgroup.attrib "">
-<!ENTITY % authorgroup.role.attrib "%role.attrib;">
-<!ELEMENT AuthorGroup - - ((Author|Editor|Collab)+)>
-<!ATTLIST AuthorGroup
- %common.attrib;
->
-<!--end of authorgroup.module-->]]>
-
- <!--ELEMENT Author (defined elsewhere in this section)-->
- <!--ELEMENT Editor (defined elsewhere in this section)-->
-
- <!ENTITY % collab.content.module "INCLUDE">
- <![ %collab.content.module; [
- <!ENTITY % collab.module "INCLUDE">
- <![ %collab.module; [
- <!ENTITY % local.collab.attrib "">
- <!ENTITY % collab.role.attrib "%role.attrib;">
- <!ELEMENT Collab - - (CollabName, Affiliation*)>
- <!ATTLIST Collab
- %common.attrib;
->
- <!--end of collab.module-->]]>
-
- <!ENTITY % collabname.module "INCLUDE">
- <![ %collabname.module; [
- <!ENTITY % local.collabname.attrib "">
- <!ENTITY % collabname.role.attrib "%role.attrib;">
- <!ELEMENT CollabName - - ((%docinfo.char.mix;)+)>
- <!ATTLIST CollabName
- %common.attrib;
->
- <!--end of collabname.module-->]]>
-
- <!--ELEMENT Affiliation (defined elsewhere in this section)-->
- <!--end of collab.content.module-->]]>
-
- <!--ELEMENT CorpAuthor (defined elsewhere in this section)-->
- <!--ELEMENT OtherCredit (defined elsewhere in this section)-->
-
-<!--end of authorgroup.content.module-->]]>
-
-<!-- AuthorInitials ................... -->
-
-<!ENTITY % authorinitials.module "INCLUDE">
-<![ %authorinitials.module; [
-<!ENTITY % local.authorinitials.attrib "">
-<!ENTITY % authorinitials.role.attrib "%role.attrib;">
-<!ELEMENT AuthorInitials - - ((%docinfo.char.mix;)+)>
-<!ATTLIST AuthorInitials
- %common.attrib;
->
-<!--end of authorinitials.module-->]]>
-
-<!-- Copyright ........................ -->
-
-<!ENTITY % copyright.content.module "INCLUDE">
-<![ %copyright.content.module; [
-<!ENTITY % copyright.module "INCLUDE">
-<![ %copyright.module; [
-<!ENTITY % local.copyright.attrib "">
-<!ENTITY % copyright.role.attrib "%role.attrib;">
-<!ELEMENT Copyright - - (Year+, Holder*)>
-<!ATTLIST Copyright
- %common.attrib;
->
-<!--end of copyright.module-->]]>
-
-<!ENTITY % year.module "INCLUDE">
-<![ %year.module; [
-<!ENTITY % local.year.attrib "">
-<!ENTITY % year.role.attrib "%role.attrib;">
-<!ELEMENT Year - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Year
- %common.attrib;
->
-<!--end of year.module-->]]>
-
-<!ENTITY % holder.module "INCLUDE">
-<![ %holder.module; [
-<!ENTITY % local.holder.attrib "">
-<!ENTITY % holder.role.attrib "%role.attrib;">
-<!ELEMENT Holder - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Holder
- %common.attrib;
->
-<!--end of holder.module-->]]>
-<!--end of copyright.content.module-->]]>
-
-<!-- CorpAuthor ....................... -->
-
-<!ENTITY % corpauthor.module "INCLUDE">
-<![ %corpauthor.module; [
-<!ENTITY % local.corpauthor.attrib "">
-<!ENTITY % corpauthor.role.attrib "%role.attrib;">
-<!ELEMENT CorpAuthor - - ((%docinfo.char.mix;)+)>
-<!ATTLIST CorpAuthor
- %common.attrib;
->
-<!--end of corpauthor.module-->]]>
-
-<!-- CorpName ......................... -->
-
-<!ENTITY % corpname.module "INCLUDE">
-<![ %corpname.module; [
-<!ENTITY % local.corpname.attrib "">
-<!ELEMENT CorpName - - ((%docinfo.char.mix;)+)>
-<!ENTITY % corpname.role.attrib "%role.attrib;">
-<!ATTLIST CorpName
- %common.attrib;
->
-<!--end of corpname.module-->]]>
-
-<!-- Date ............................. -->
-
-<!ENTITY % date.module "INCLUDE">
-<![ %date.module; [
-<!ENTITY % local.date.attrib "">
-<!ENTITY % date.role.attrib "%role.attrib;">
-<!ELEMENT Date - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Date
- %common.attrib;
->
-<!--end of date.module-->]]>
-
-<!-- Edition .......................... -->
-
-<!ENTITY % edition.module "INCLUDE">
-<![ %edition.module; [
-<!ENTITY % local.edition.attrib "">
-<!ENTITY % edition.role.attrib "%role.attrib;">
-<!ELEMENT Edition - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Edition
- %common.attrib;
->
-<!--end of edition.module-->]]>
-
-<!-- Editor ........................... -->
-
-<!ENTITY % editor.module "INCLUDE">
-<![ %editor.module; [
-<!ENTITY % local.editor.attrib "">
-<!ENTITY % editor.role.attrib "%role.attrib;">
-<!ELEMENT Editor - - ((%person.ident.mix;)+)>
- <!--(see "Personal identity elements" for %person.ident.mix;)-->
-<!ATTLIST Editor
- %common.attrib;
->
-<!--end of editor.module-->]]>
-
-<!-- ISBN ............................. -->
-
-<!ENTITY % isbn.module "INCLUDE">
-<![ %isbn.module; [
-<!ENTITY % local.isbn.attrib "">
-<!ENTITY % isbn.role.attrib "%role.attrib;">
-<!ELEMENT ISBN - - ((%docinfo.char.mix;)+)>
-<!ATTLIST ISBN
- %common.attrib;
->
-<!--end of isbn.module-->]]>
-
-<!-- IssueNum ......................... -->
-
-<!ENTITY % issuenum.module "INCLUDE">
-<![ %issuenum.module; [
-<!ENTITY % local.issuenum.attrib "">
-<!ELEMENT IssueNum - - ((%docinfo.char.mix;)+)>
-<!ATTLIST IssueNum
- %common.attrib;
- %local.issuenum.attrib;
->
-<!--end of issuenum.module-->]]>
-
-<!-- LegalNotice ...................... -->
-
-<!ENTITY % legalnotice.module "INCLUDE">
-<![ %legalnotice.module; [
-<!ENTITY % local.legalnotice.attrib "">
-<!ENTITY % legalnotice.role.attrib "%role.attrib;">
-<!ELEMENT LegalNotice - - ((%legalnotice.mix;)+) -(%formal.class;)>
-<!ATTLIST LegalNotice
- %common.attrib;
- Role (EVEN | ODD) #IMPLIED
- %local.legalnotice.attrib;
->
-
-<!--end of legalnotice.module-->]]>
-
-<!-- ModeSpec ......................... -->
-
-<!ENTITY % modespec.module "INCLUDE">
-<![ %modespec.module; [
-<!ENTITY % local.modespec.attrib "">
-<!ENTITY % modespec.role.attrib "%role.attrib;">
-<!ELEMENT ModeSpec - - ((%docinfo.char.mix;)+) -(%ubiq.mix;)>
-<!ATTLIST ModeSpec
- --Application: type of retrieval query--
- Application NOTATION
- (%notation.class;) #IMPLIED
- %common.attrib;
->
-<!--end of modespec.module-->]]>
-
-<!-- OrgName .......................... -->
-
-<!ENTITY % orgname.module "INCLUDE">
-<![ %orgname.module; [
-<!ENTITY % local.orgname.attrib "">
-<!ELEMENT OrgName - - ((%docinfo.char.mix;)+)>
-<!ATTLIST OrgName
- %common.attrib;
- %local.orgname.attrib;
->
-<!--end of orgname.module-->]]>
-
-<!-- OtherCredit ...................... -->
-
-<!ENTITY % othercredit.module "INCLUDE">
-<![ %othercredit.module; [
-<!ENTITY % local.othercredit.attrib "">
-<!ENTITY % othercredit.role.attrib "%role.attrib;">
-<!ELEMENT OtherCredit - - ((%person.ident.mix;)+)>
- <!--(see "Personal identity elements" for %person.ident.mix;)-->
-<!--end of othercredit.module-->]]>
-
-<!-- PageNums ......................... -->
-
-<!-- Personal identity elements ....... -->
-
-<!-- These elements are used only within Author, Editor, and
-OtherCredit. -->
-
-<!ENTITY % person.ident.module "INCLUDE">
-<![ %person.ident.module; [
-<!ENTITY % contrib.module "INCLUDE">
-<![ %contrib.module; [
-<!ENTITY % local.contrib.attrib "">
-<!ENTITY % contrib.role.attrib "%role.attrib;">
-<!ELEMENT Contrib - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Contrib
- %common.attrib;
->
-<!--end of contrib.module-->]]>
-
-<!ENTITY % firstname.module "INCLUDE">
-<![ %firstname.module; [
-<!ENTITY % local.firstname.attrib "">
-<!ENTITY % firstname.role.attrib "%role.attrib;">
-<!ELEMENT FirstName - - ((%docinfo.char.mix;)+)>
-<!ATTLIST FirstName
- %common.attrib;
->
-<!--end of firstname.module-->]]>
-
-<!ENTITY % othername.module "INCLUDE">
-<![ %othername.module; [
-<!ENTITY % local.othername.attrib "">
-<!ENTITY % othername.role.attrib "%role.attrib;">
-<!ELEMENT OtherName - - ((%docinfo.char.mix;)+)>
-<!ATTLIST OtherName
- %common.attrib;
->
-<!--end of othername.module-->]]>
-
-<!ENTITY % surname.module "INCLUDE">
-<![ %surname.module; [
-<!ENTITY % local.surname.attrib "">
-<!ENTITY % surname.role.attrib "%role.attrib;">
-<!ELEMENT Surname - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Surname
- %common.attrib;
->
-<!--end of surname.module-->]]>
-<!--end of person.ident.module-->]]>
-
-<!-- ProductName ...................... -->
-
-<!ENTITY % productname.module "INCLUDE">
-<![ %productname.module; [
-<!ENTITY % local.productname.attrib "">
-<!ENTITY % productname.role.attrib "%role.attrib;">
-<!ELEMENT ProductName - - ((%small.para.char.mix;)+)>
-<!ATTLIST ProductName
- Class (Service
- |Trade
- |Registered
- |Copyright) Trade
- %common.attrib;
->
-<!--end of productname.module-->]]>
-
-<!-- ProductNumber .................... -->
-
-<!ENTITY % productnumber.module "INCLUDE">
-<![ %productnumber.module; [
-<!ENTITY % local.productnumber.attrib "">
-<!ENTITY % productnumber.role.attrib "%role.attrib;">
-<!ELEMENT ProductNumber - - ((%docinfo.char.mix;)+)>
-<!ATTLIST ProductNumber
- %common.attrib;
->
-<!--end of productnumber.module-->]]>
-
-<!-- PubDate .......................... -->
-
-<!ENTITY % pubdate.module "INCLUDE">
-<![ %pubdate.module; [
-<!ENTITY % local.pubdate.attrib "">
-<!ENTITY % pubdate.role.attrib "%role.attrib;">
-<!ELEMENT PubDate - - ((%docinfo.char.mix;)+)>
-<!ATTLIST PubDate
- %common.attrib;
->
-<!--end of pubdate.module-->]]>
-
-<!-- Publisher ........................ -->
-
-<!ENTITY % publisher.content.module "INCLUDE">
-<![ %publisher.content.module; [
-<!ENTITY % publisher.module "INCLUDE">
-<![ %publisher.module; [
-<!ENTITY % local.publisher.attrib "">
-<!ENTITY % publisher.role.attrib "%role.attrib;">
-<!ELEMENT Publisher - - (PublisherName, Address*)>
-<!ATTLIST Publisher
- %common.attrib;
->
-<!--end of publisher.module-->]]>
-
- <!ENTITY % publishername.module "INCLUDE">
- <![ %publishername.module; [
- <!ENTITY % local.publishername.attrib "">
- <!ENTITY % publishername.role.attrib "%role.attrib;">
- <!ELEMENT PublisherName - - ((%docinfo.char.mix;)+)>
- <!ATTLIST PublisherName
- %common.attrib;
->
- <!--end of publishername.module-->]]>
-
- <!--ELEMENT Address (defined elsewhere in this section)-->
-<!--end of publisher.content.module-->]]>
-
-<!-- PubsNumber ....................... -->
-
-<!ENTITY % pubsnumber.module "INCLUDE">
-<![ %pubsnumber.module; [
-<!ENTITY % local.pubsnumber.attrib "">
-<!ENTITY % pubsnumber.role.attrib "%role.attrib;">
-<!ELEMENT PubsNumber - - ((%docinfo.char.mix;)+)>
-<!ATTLIST PubsNumber
- %common.attrib;
->
-<!--end of pubsnumber.module-->]]>
-
-<!-- ReleaseInfo ...................... -->
-
-<!ENTITY % releaseinfo.module "INCLUDE">
-<![ %releaseinfo.module; [
-<!ENTITY % local.releaseinfo.attrib "">
-<!ENTITY % releaseinfo.role.attrib "%role.attrib;">
-<!ELEMENT ReleaseInfo - - ((%docinfo.char.mix;)+)>
-<!ATTLIST ReleaseInfo
- %common.attrib;
- Role (CONFIDENTIAL | NEED-TO-KNOW | REGISTERED) #IMPLIED
->
-<!--end of releaseinfo.module-->]]>
-
-<!-- RevHistory ....................... -->
-
-<!ENTITY % revhistory.content.module "INCLUDE">
-<![ %revhistory.content.module; [
-<!ENTITY % revhistory.module "INCLUDE">
-<![ %revhistory.module; [
-<!ENTITY % local.revhistory.attrib "">
-<!ENTITY % revhistory.role.attrib "%role.attrib;">
-<!ELEMENT RevHistory - - (Revision+)>
-<!ATTLIST RevHistory
- %common.attrib;
->
-
-<!--end of revhistory.module-->]]>
-
-<!ENTITY % revision.module "INCLUDE">
-<![ %revision.module; [
-<!ENTITY % local.revision.attrib "">
-<!ENTITY % revision.role.attrib "%role.attrib;">
-<!ELEMENT Revision - - (RevNumber, Date, AuthorInitials+, RevRemark?)>
-<!ATTLIST Revision
- %common.attrib;
->
-<!--end of revision.module-->]]>
-
-<!ENTITY % revnumber.module "INCLUDE">
-<![ %revnumber.module; [
-<!ENTITY % local.revnumber.attrib "">
-<!ENTITY % revnumber.role.attrib "%role.attrib;">
-<!ELEMENT RevNumber - - ((%docinfo.char.mix;)+)>
-<!ATTLIST RevNumber
- %common.attrib;
->
-<!--end of revnumber.module-->]]>
-
-<!--ELEMENT Date (defined elsewhere in this section)-->
-<!--ELEMENT AuthorInitials (defined elsewhere in this section)-->
-
-<!ENTITY % revremark.module "INCLUDE">
-<![ %revremark.module; [
-<!ENTITY % local.revremark.attrib "">
-<!ENTITY % revremark.role.attrib "%role.attrib;">
-<!ELEMENT RevRemark - - ((%docinfo.char.mix;)+)>
-<!ATTLIST RevRemark
- %common.attrib;
->
-<!--end of revremark.module-->]]>
-<!--end of revhistory.content.module-->]]>
-
-<!-- VolumeNum ........................ -->
-
-<!ENTITY % volumenum.module "INCLUDE">
-<![ %volumenum.module; [
-<!ENTITY % local.volumenum.attrib "">
-<!ENTITY % volumenum.role.attrib "%role.attrib;">
-<!ELEMENT VolumeNum - - ((%docinfo.char.mix;)+)>
-<!ATTLIST VolumeNum
- %common.attrib;
->
-<!--end of volumenum.module-->]]>
-
-<!--end of docinfo.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Inline, link, and ubiquitous elements ................................ -->
-
-<!-- Computer terms ....................................................... -->
-
-<!ENTITY % application.module "INCLUDE">
-<![ %application.module; [
-<!ENTITY % local.application.attrib "">
-<!ENTITY % application.role.attrib "%role.attrib;">
-<!ELEMENT Application - - ((%small.para.char.mix;)+)>
-<!ATTLIST Application
- Class (Hardware | Software) #IMPLIED
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of application.module-->]]>
-
-<!ENTITY % classname.module "INCLUDE">
-<![ %classname.module; [
-<!ENTITY % local.classname.attrib "">
-<!ENTITY % classname.role.attrib "%role.attrib;">
-<!ELEMENT ClassName - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST ClassName
- %common.attrib;
- %local.classname.attrib;
->
-<!--end of classname.module-->]]>
-
-<!ENTITY % command.module "INCLUDE">
-<![ %command.module; [
-<!ENTITY % local.command.attrib "">
-<!ENTITY % command.role.attrib "%role.attrib;">
-<!ELEMENT Command - - ((%cptr.char.mix;)+)>
-<!ATTLIST Command
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of command.module-->]]>
-
-<!ENTITY % computeroutput.module "INCLUDE">
-<![ %computeroutput.module; [
-<!ENTITY % local.computeroutput.attrib "">
-<!ENTITY % computeroutput.role.attrib "%role.attrib;">
-<!ELEMENT ComputerOutput - - ((%cptr.char.mix;)+)>
-<!ATTLIST ComputerOutput
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of computeroutput.module-->]]>
-
-<!ENTITY % email.module "INCLUDE">
-<![ %email.module; [
-<!ENTITY % local.email.attrib "">
-<!ELEMENT Email - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Email
- %common.attrib;
- %local.email.attrib;
->
-<!--end of email.module-->]]>
-
-<!ENTITY % envar.module "INCLUDE">
-<![ %envar.module; [
-<!ENTITY % local.envar.attrib "">
-<!ENTITY % envar.role.attrib "%role.attrib;">
-<!ELEMENT EnVar - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST EnVar
- %common.attrib;
- %envar.role.attrib;
- %local.envar.attrib;
->
-<!--end of envar.module-->]]>
-
-<!ENTITY % errorcode.module "INCLUDE">
-<![ %errorcode.module; [
-<!ENTITY % local.errorcode.attrib "">
-<!ENTITY % errorcode.role.attrib "%role.attrib;">
-<!ELEMENT ErrorCode - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST ErrorCode
- %moreinfo.attrib;
- %common.attrib;
- %errorcode.role.attrib;
- %local.errorcode.attrib;
->
-<!--end of errorcode.module-->]]>
-
-<!ENTITY % errorname.module "INCLUDE">
-<![ %errorname.module; [
-<!ENTITY % local.errorname.attrib "">
-<!ENTITY % errorname.role.attrib "%role.attrib;">
-<!ELEMENT ErrorName - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST ErrorName
- %common.attrib;
->
-<!--end of errorname.module-->]]>
-
-<!ENTITY % errortype.module "INCLUDE">
-<![ %errortype.module; [
-<!ENTITY % local.errortype.attrib "">
-<!ENTITY % errortype.role.attrib "%role.attrib;">
-<!ELEMENT ErrorType - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST ErrorType
- %common.attrib;
->
-<!--end of errortype.module-->]]>
-
-<!ENTITY % filename.module "INCLUDE">
-<![ %filename.module; [
-<!ENTITY % local.filename.attrib "">
-<!ENTITY % filename.role.attrib "%role.attrib;">
-<!ELEMENT Filename - - ((%cptr.char.mix;)+)>
-<!ATTLIST Filename
- Class (HeaderFile | SymLink | Directory) #IMPLIED
-
- --Path: search path (possibly system-specific) in which
- file can be found--
- Path CDATA #IMPLIED
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of filename.module-->]]>
-
-<!ENTITY % function.module "INCLUDE">
-<![ %function.module; [
-<!ENTITY % local.function.attrib "">
-<!ENTITY % function.role.attrib "%role.attrib;">
-<!ELEMENT Function - - ((%cptr.char.mix;)+)>
-<!ATTLIST Function
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of function.module-->]]>
-
-<!ENTITY % keysym.module "INCLUDE">
-<![ %keysym.module; [
-<!ENTITY % local.keysym.attrib "">
-<!ENTITY % keysysm.role.attrib "%role.attrib;">
-<!ELEMENT KeySym - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST KeySym
- %common.attrib;
->
-<!--end of keysym.module-->]]>
-
-<!ENTITY % lineannotation.module "INCLUDE">
-<![ %lineannotation.module; [
-<!ENTITY % local.lineannotation.attrib "">
-<!ENTITY % lineannotation.role.attrib "%role.attrib;">
-<!ELEMENT LineAnnotation - - ((%docinfo.char.mix;)+)>
-<!ATTLIST LineAnnotation
- %common.attrib;
->
-<!--end of lineannotation.module-->]]>
-
-<!ENTITY % literal.module "INCLUDE">
-<![ %literal.module; [
-<!ENTITY % local.literal.attrib "">
-<!ENTITY % literal.role.attrib "%role.attrib;">
-<!ELEMENT Literal - - ((%cptr.char.mix;)+)>
-<!ATTLIST Literal
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of literal.module-->]]>
-
-<!ENTITY % medialabel.module "INCLUDE">
-<![ %medialabel.module; [
-<!ENTITY % local.medialabel.attrib "">
-<!ENTITY % medialabel.role.attrib "%role.attrib;">
-<!ELEMENT MediaLabel - - (#PCDATA) >
-<!ATTLIST MediaLabel
- Class (Cartridge
- |CDRom
- |Disk
- |Tape) #IMPLIED
- %common.attrib;
->
-<!--end of medialabel.module-->]]>
-
-<!ENTITY % msgtext.module "INCLUDE">
-<![ %msgtext.module; [
-<!ENTITY % local.msgtext.attrib "">
-<!ENTITY % msgtext.role.attrib "%role.attrib;">
-<!ELEMENT MsgText - - ((%component.mix;)+)>
-<!ATTLIST MsgText
- %common.attrib;
->
-<!--end of msgtext.module-->]]>
-
-<!ENTITY % option.module "INCLUDE">
-<![ %option.module; [
-<!ENTITY % local.option.attrib "">
-<!ENTITY % option.role.attrib "%role.attrib;">
-<!ELEMENT Option - - ((%cptr.char.mix;)+)>
-<!ATTLIST Option
- Role (nodash | plus) #IMPLIED
- %common.attrib;
->
-<!--end of option.module-->]]>
-
-<!ENTITY % optional.module "INCLUDE">
-<![ %optional.module; [
-<!ENTITY % local.optional.attrib "">
-<!ENTITY % optional.role.attrib "%role.attrib;">
-<!ELEMENT Optional - - ((%cptr.char.mix;)+)>
-<!ATTLIST Optional
- %common.attrib;
->
-<!--end of optional.module-->]]>
-
-<!ENTITY % parameter.module "INCLUDE">
-<![ %parameter.module; [
-<!ENTITY % local.parameter.attrib "">
-<!ENTITY % parameter.role.attrib "%role.attrib;">
-<!ELEMENT Parameter - - ((%cptr.char.mix;)+)>
-<!ATTLIST Parameter
- Class (Command | Function | Option) #IMPLIED
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of parameter.module-->]]>
-
-<!ENTITY % prompt.module "INCLUDE">
-<![ %prompt.module; [
-<!ENTITY % local.prompt.attrib "">
-<!ENTITY % prompt.role.attrib "%role.attrib;">
-<!ELEMENT Prompt - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST Prompt
- %moreinfo.attrib;
- %common.attrib;
- %prompt.role.attrib;
- %local.prompt.attrib;
->
-<!--end of prompt.module-->]]>
-
-<!ENTITY % property.module "INCLUDE">
-<![ %property.module; [
-<!ENTITY % local.property.attrib "">
-<!ENTITY % property.role.attrib "%role.attrib;">
-<!ELEMENT Property - - ((%cptr.char.mix;)+)>
-<!ATTLIST Property
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of property.module-->]]>
-
-<!ENTITY % replaceable.module "INCLUDE">
-<![ %replaceable.module; [
-<!ENTITY % local.replaceable.attrib "">
-<!ENTITY % replaceable.role.attrib "%role.attrib;">
-<!ELEMENT Replaceable - - ((#PCDATA
- | %link.char.class;
- | %other.char.class; )+)>
-<!ATTLIST Replaceable
- Class (Command
- |Function
- |Option
- |Parameter) #IMPLIED
- %common.attrib;
->
-<!--end of replaceable.module-->]]>
-
-<!ENTITY % returnvalue.module "INCLUDE">
-<![ %returnvalue.module; [
-<!ENTITY % local.returnvalue.attrib "">
-<!ENTITY % returnvalue.role.attrib "%role.attrib;">
-<!ELEMENT ReturnValue - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST ReturnValue
- %common.attrib;
->
-<!--end of returnvalue.module-->]]>
-
-<!ENTITY % structfield.module "INCLUDE">
-<![ %structfield.module; [
-<!ENTITY % local.structfield.attrib "">
-<!ENTITY % structfield.role.attrib "%role.attrib;">
-<!ELEMENT StructField - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST StructField
- %common.attrib;
->
-<!--end of structfield.module-->]]>
-
-<!ENTITY % structname.module "INCLUDE">
-<![ %structname.module; [
-<!ENTITY % local.structname.attrib "">
-<!ENTITY % structname.role.attrib "%role.attrib;">
-<!ELEMENT StructName - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST StructName
- %common.attrib;
->
-<!--end of structname.module-->]]>
-
-<!ENTITY % symbol.module "INCLUDE">
-<![ %symbol.module; [
-<!ENTITY % local.symbol.attrib "">
-<!ENTITY % symbol.role.attrib "%role.attrib;">
-<!ELEMENT Symbol - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST Symbol
- Class (Limit) #IMPLIED
- %common.attrib;
->
-<!--end of symbol.module-->]]>
-
-<!ENTITY % systemitem.module "INCLUDE">
-<![ %systemitem.module; [
-<!ENTITY % local.systemitem.attrib "">
-<!ENTITY % systemitem.role.attrib "%role.attrib;">
-<!ELEMENT SystemItem - - ((%cptr.char.mix; | Acronym)+)>
-<!ATTLIST SystemItem
- Class (Constant | EnvironVar | Macro | OSname
- |Prompt | Resource | SystemName) #IMPLIED
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of systemitem.module-->]]>
-
-<!ENTITY % type.module "INCLUDE">
-<![ %type.module; [
-<!ENTITY % local.type.attrib "">
-<!ENTITY % type.role.attrib "%role.attrib;">
-<!ELEMENT Type - - ((%smallcptr.char.mix;)+)>
-<!ATTLIST Type
- %common.attrib;
->
-<!--end of type.module-->]]>
-
-<!ENTITY % userinput.module "INCLUDE">
-<![ %userinput.module; [
-<!ENTITY % local.userinput.attrib "">
-<!ENTITY % userinput.role.attrib "%role.attrib;">
-<!ELEMENT UserInput - - ((%cptr.char.mix;)+)>
-<!ATTLIST UserInput
- MoreInfo (RefEntry | None) None
- %common.attrib;
->
-<!--end of userinput.module-->]]>
-
-<!-- Words ................................................................ -->
-
-<!ENTITY % acronym.module "INCLUDE">
-<![ %acronym.module; [
-<!ENTITY % local.acronym.attrib "">
-<!ENTITY % acronym.role.attrib "%role.attrib;">
-<!ELEMENT Acronym - - ((%word.char.mix;)+) -(Acronym)>
-<!ATTLIST Acronym
- %common.attrib;
->
-<!--end of acronym.module-->]]>
-
-<!ENTITY % citerefentry.module "INCLUDE">
-<![ %citerefentry.module; [
-<!ENTITY % local.citerefentry.attrib "">
-<!ENTITY % citerefentry.role.attrib "%role.attrib;">
-<!ELEMENT CiteRefEntry - - (RefEntryTitle, ManVolNum?)>
-<!ATTLIST CiteRefEntry
- %common.attrib;
->
-<!--end of citerefentry.module-->]]>
-
-<!ENTITY % refentrytitle.module "INCLUDE">
-<![ %refentrytitle.module; [
-<!ENTITY % local.refentrytitle.attrib "">
-<!ENTITY % refentrytitle.role.attrib "%role.attrib;">
-<!ELEMENT RefEntryTitle - O ((%small.para.char.mix;)+)>
-<!ATTLIST RefEntryTitle
- %common.attrib;
->
-<!--end of refentrytitle.module-->]]>
-
-<!ENTITY % manvolnum.module "INCLUDE">
-<![ %manvolnum.module; [
-<!ENTITY % local.manvolnum.attrib "">
-<!ENTITY % namvolnum.role.attrib "%role.attrib;">
-<!ELEMENT ManVolNum - O ((%word.char.mix;)+)>
-<!ATTLIST ManVolNum
- %common.attrib;
->
-<!--end of manvolnum.module-->]]>
-
-<!ENTITY % citetitle.module "INCLUDE">
-<![ %citetitle.module; [
-<!ENTITY % local.citetitle.attrib "">
-<!ENTITY % citetitle.role.attrib "%role.attrib;">
-<!ELEMENT CiteTitle - - ((%small.para.char.mix;)+)>
-<!ATTLIST CiteTitle
- --Pubwork: type of published work being cited--
- Pubwork (Article | Book) #IMPLIED
- %common.attrib;
->
-<!--end of citetitle.module-->]]>
-
-<!ENTITY % emphasis.module "INCLUDE">
-<![ %emphasis.module; [
-<!ENTITY % local.emphasis.attrib "">
-<!ENTITY % emphasis.role.attrib "%role.attrib;">
-<!ELEMENT Emphasis - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Emphasis
- %common.attrib;
- Role (Strong) #IMPLIED
- %local.emphasis.attrib;
->
-<!--end of emphasis.module-->]]>
-
-<!ENTITY % firstterm.module "INCLUDE">
-<![ %firstterm.module; [
-<!ENTITY % local.firstterm.attrib "">
-<!ENTITY % firstterm.role.attrib "%role.attrib;">
-<!ELEMENT FirstTerm - - ((%word.char.mix;)+)>
-<!ATTLIST FirstTerm
- %linkend.attrib; --to GlossEntry or other explanation--
- %common.attrib;
->
-<!--end of firstterm.module-->]]>
-
-<!ENTITY % glossterm.module "INCLUDE">
-<![ %glossterm.module; [
-<!ENTITY % local.glossterm.attrib "">
-<!ENTITY % glossterm.role.attrib "%role.attrib;">
-<!ELEMENT GlossTerm - O ((%para.char.mix;)+)>
-<!ATTLIST GlossTerm
- %linkend.attrib; --to GlossEntry if Glossterm used in text--
-
- --BaseForm: the form of the term in GlossEntry when this
- GlossTerm is used in text in alternate form (e.g. plural),
- for doing automatic linking--
- BaseForm CDATA #IMPLIED
- %common.attrib;
->
-<!--end of glossterm.module-->]]>
-
-<!ENTITY % phrase.module "INCLUDE">
-<![ %phrase.module; [
-<!ENTITY % local.phrase.attrib "">
-<!ENTITY % phrase.role.attrib "%role.attrib;">
-<!ELEMENT Phrase - - ((%docinfo.char.mix;)+)>
-<!ATTLIST Phrase
- %common.attrib;
->
-<!--end of phrase.module-->]]>
-
-<!ENTITY % quote.module "INCLUDE">
-<![ %quote.module; [
-<!ENTITY % local.quote.attrib "">
-<!ENTITY % quote.role.attrib "%role.attrib;">
-<!ELEMENT Quote - - ((%small.para.char.mix;)+)>
-<!ATTLIST Quote
- %common.attrib;
->
-<!--end of quote.module-->]]>
-
-<!ENTITY % ssscript.module "INCLUDE">
-<![ %ssscript.module; [
-<!ENTITY % local.ssscript.attrib "">
-<!ENTITY % ssscript.role.attrib "%role.attrib;">
-<!ELEMENT (Subscript | Superscript) - - ((#PCDATA
- | %link.char.class;
- | Replaceable
- | Symbol
- | %other.char.class;)+)
- -(%ubiq.mix;)>
-<!ATTLIST (Subscript | Superscript)
- %common.attrib;
->
-<!--end of ssscript.module-->]]>
-
-<!ENTITY % trademark.module "INCLUDE">
-<![ %trademark.module; [
-<!ENTITY % local.trademark.attrib "">
-<!ENTITY % trademark.role.attrib "%role.attrib;">
-<!ELEMENT Trademark - - ((#PCDATA
- | %link.char.class;
- | %cptr.char.class;
- | %other.char.class;)+)>
-<!ATTLIST Trademark
- Class (Service
- |Trade
- |Registered
- |Copyright) Trade
- %common.attrib;
->
-<!--end of trademark.module-->]]>
-
-<!-- Links and cross-references ........................................... -->
-
-<!ENTITY % link.module "INCLUDE">
-<![ %link.module; [
-<!ENTITY % local.link.attrib "">
-<!ELEMENT Link - - ((%small.para.char.mix;)+)>
-<!ATTLIST Link
- --Endterm: pointer to description of linked-to object--
- Endterm IDREF #IMPLIED
-
- %linkendreq.attrib; --to linked-to object--
-
- --Type: user-defined role of link--
- Type CDATA #IMPLIED
- %common.attrib;
- %local.link.attrib;
->
-<!--end of link.module-->]]>
-
-<!ENTITY % olink.module "INCLUDE">
-<![ %olink.module; [
-<!ENTITY % local.olink.attrib "">
-<!ENTITY % olink.role.attrib "%role.attrib;">
-<!ELEMENT OLink - - ((%para.char.mix;)+)>
-<!ATTLIST OLink
- --TargetDocEnt: HyTimeish Docorsub pointer--
- TargetDocEnt ENTITY #REQUIRED
-
- --LinkMode: points to a ModeSpec containing app-specific info--
- LinkMode IDREF #IMPLIED
- LocalInfo CDATA #IMPLIED
-
- --Type: user-defined role of link--
- --CHANGED OLink attribute Type from CDATA to
- (V-ONLY | V-ANY). This allows writers in the future
- to determine whether a given link should go to the
- current target only (that is, only that version of the
- target) or whether the user should be given a list of
- possible other versions if the target specified by the
- olink cannot be found.--
- --ADDED V-LAST: (V-ONLY | V-ANY | V-LAST), this will permit
- to determine whether a given links should go to the last
- available version of the target --
- Type (V-ONLY | V-ANY | V-LAST) #IMPLIED
->
-<!--end of olink.module-->]]>
-
-<!ENTITY % ulink.module "INCLUDE">
-<![ %ulink.module; [
-<!ENTITY % local.ulink.attrib "">
-<!ENTITY % ulink.role.attrib "%role.attrib;">
-<!ELEMENT ULink - - ((%small.para.char.mix;)+)>
-<!ATTLIST ULink
- --URL: uniform resource locator--
- URL CDATA #REQUIRED
-
- --Type: user-defined role of link--
- Type CDATA #IMPLIED
->
-<!--end of ulink.module-->]]>
-
-<!ENTITY % footnoteref.module "INCLUDE">
-<![ %footnoteref.module; [
-<!ENTITY % local.footnoteref.attrib "">
-<!ENTITY % footnoteref.role.attrib "%role.attrib;">
-<!ELEMENT FootnoteRef - O EMPTY>
-<!ATTLIST FootnoteRef
- %linkendreq.attrib; --to footnote content already supplied--
- --Label: symbol (e.g. dagger) for use in pointing to
- footnote in text; default is whatever was used
- in original footnote being referenced--
- Label CDATA #IMPLIED
- id ID #IMPLIED
->
-<!--end of footnoteref.module-->]]>
-
-<!ENTITY % xref.module "INCLUDE">
-<![ %xref.module; [
-<!ENTITY % local.xref.attrib "">
-<!ENTITY % xref.role.attrib "%role.attrib;">
-<!ELEMENT XRef - O EMPTY>
-<!ATTLIST XRef
- --Endterm: pointer to description of linked-to object--
- Endterm IDREF #IMPLIED
-
- %linkendreq.attrib; --to linked-to object--
->
-<!--end of xref.module-->]]>
-
-<!-- Ubiquitous elements .................................................. -->
-
-<!ENTITY % beginpage.module "INCLUDE">
-<![ %beginpage.module; [
-<!ENTITY % local.beginpage.attrib "">
-<!ENTITY % beginpage.role.attrib "%role.attrib;">
-<!ELEMENT BeginPage - O EMPTY>
-<!ATTLIST BeginPage
- --PageNum: number of page that begins at this point--
- %pagenum.attrib;
- %common.attrib;
- %beginpage.role.attrib;
- %local.beginpage.attrib;
->
-<!--end of beginpage.module-->]]>
-
-<!-- IndexTerms appear in the text flow for generating or linking an
- index. -->
-
-<!ENTITY % indexterm.content.module "INCLUDE">
-<![ %indexterm.content.module; [
-<!ENTITY % indexterm.module "INCLUDE">
-<![ %indexterm.module; [
-<!ENTITY % local.indexterm.attrib "">
-<!ELEMENT IndexTerm - O (Primary, ((Secondary, ((Tertiary, (See|SeeAlso+)?)
- | See | SeeAlso+)?) | See | SeeAlso+)?) -(%ubiq.mix;)>
-<!ATTLIST IndexTerm
- %pagenum.attrib;
-
- --Scope: indexing applies to this doc (Local), whole doc
- set (Global), or both (All)--
- Scope (All
- |Global
- |Local) #IMPLIED
-
- --Significance: whether term is best source of info for
- this topic (Preferred) or not (Normal)--
- Significance (Preferred
- |Normal) Normal
-
- --Class: indicates type of IndexTerm; default is Singular,
- or EndOfRange if StartRef is supplied; StartOfRange value
- must be supplied explicitly on starts of ranges--
-
- Class (Singular
- |StartOfRange
- |EndOfRange) #IMPLIED
-
- --StartRef: points to the IndexTerm that starts
- the indexing range ended by this IndexTerm--
-
- StartRef IDREF #CONREF
-
- --Zone: points to elements where IndexTerms originated;
- for use if IndexTerms are assembled together in source
- instance--
-
- Zone IDREFS #IMPLIED
- %common.attrib;
- %local.indexterm.attrib;
->
-<!--end of indexterm.module-->]]>
-
-<!ENTITY % primsecter.module "INCLUDE">
-<![ %primsecter.module; [
-<!ENTITY % local.primsecter.attrib "">
-<!ENTITY % primsecter.role.attrib "%role.attrib;">
-<!ELEMENT (Primary | Secondary | Tertiary) - O ((%ndxterm.char.mix;)+)>
-<!ATTLIST (Primary | Secondary | Tertiary)
- --SortAs: alternate sort string for index sorting--
- SortAs CDATA #IMPLIED
- %common.attrib;
->
-<!--end of primsecter.module-->]]>
-
-<!ENTITY % seeseealso.module "INCLUDE">
-<![ %seeseealso.module; [
-<!ENTITY % local.seeseealso.attrib "">
-<!ENTITY % seeseealso.role.attrib "%role.attrib;">
-<!ELEMENT (See | SeeAlso) - O ((%ndxterm.char.mix;)+)>
-<!ATTLIST (See | SeeAlso)
- %common.attrib;
->
-<!--end of seeseealso.module-->]]>
-<!--end of indexterm.content.module-->]]>
-
-<!-- End of SolBook V2.0 information pool module .......................... -->
-<!-- ...................................................................... -->
-
-
-<!-- Redeclaration placeholder ..... -->
-
-<!ENTITY % intermod.redecl.module "IGNORE">
-<![ %intermod.redecl.module; [
-%rdbmods;
-<!--end of intermod.redecl.module-->]]>
-
-<!-- Document hierarchy ............ -->
-
-<!ENTITY % dbhier PUBLIC
- "-//Sun Microsystems//ELEMENTS DocBook Document Hierarchy V3.0-Based SolBook Subset V2.0//EN" >
-<!-- ...................................................................... -->
-<!-- SolBook V2.0 document hierarchy module ............................... -->
-<!-- File dbhier.mod ...................................................... -->
-
-<!-- This is SolBook 2.0, a subset of DocBook V3.0.
- Copyright 1999 Sun Microsystems, Inc., All rights reserved.
- $Id: @(#)dbhier.mod 1.12 99/06/18 SMI $
-
- DocBook V3.0
- Copyright 1992,1993,1994,1995,1996 HaL Computer Systems, Inc.,
- O'Reilly & Associates, Inc., ArborText, Inc., and Fujitsu Software Corp.
-
- 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.
--->
-
-<!-- ...................................................................... -->
-
-<!-- This module contains the definitions for the overall document
- hierarchies of SolBook documents. It covers computer documentation
- manuals and manual fragments, as well as reference entries (such as
- man pages) and technical journals or anthologies containing articles.
-
- This module depends on the SolBook information pool module. All
- elements and entities referenced but not defined here are assumed
- to be defined in the information pool module.
-
- In DTD driver files referring to this module, please use an entity
- declaration that uses the public identifier shown below:
-
- <!ENTITY % dbhier PUBLIC
- "-//Sun Microsystems//ELEMENTS DocBook Document Hierarchy V3.0-Based SolBook Subset V2.0//EN">
- %dbhier;
-
- 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.
-
-#file: dbhier.mod
--->
-
-<!-- ...................................................................... -->
-<!-- Entities for module inclusions ....................................... -->
-
-<!ENTITY % dbhier.redecl.module "IGNORE">
-<!ENTITY % dbhier.redecl2.module "IGNORE">
-
-<!-- ...................................................................... -->
-<!-- Entities for element classes ......................................... -->
-
-<!ENTITY % local.appendix.class "">
-<!ENTITY % appendix.class "Appendix %local.appendix.class;">
-
-<!--
-<!ENTITY % local.article.class "">
-<!ENTITY % article.class "Article %local.article.class">
- -->
-
-<!ENTITY % local.book.class "">
-<!ENTITY % book.class "Book %local.book.class;">
-
-<!ENTITY % local.chapter.class "">
-<!ENTITY % chapter.class "Chapter %local.chapter.class;">
-
-<!ENTITY % local.index.class "">
-<!ENTITY % index.class "Index %local.index.class;">
-
-<!--
-<!ENTITY % local.info.class "">
-<!ENTITY % info.class "DocInfo|Sect1Info|Sect2Info|Sect3Info
- |Sect4Info|Sect5Info %local.index.class;">
- -->
-
-<!ENTITY % local.refentry.class "">
-<!ENTITY % refentry.class "RefEntry %local.refentry.class;">
-
-<!ENTITY % local.nav.class "">
-<!ENTITY % nav.class "ToC|Index|Glossary|Bibliography
- %local.nav.class;">
-
-<!-- Redeclaration placeholder ............................................ -->
-
-<!-- For redeclaring entities that are declared after this point while
- retaining their references to the entities that are declared before
- this point -->
-
-<![ %dbhier.redecl.module; [
-%rdbhier;
-<!--end of dbhier.redecl.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Entities for element mixtures ........................................ -->
-<!--BETA Removed descobj.class from divcomponent.mix-->
-
-<!ENTITY % local.divcomponent.mix "">
-<!ENTITY % divcomponent.mix
- "%list.class; |%admon.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |%formal.class; |%compound.class;
- |%genobj.class |Caution
- |Note |Tip %local.divcomponent.mix;">
-
-<!--BETA Removed descobj.class from refcomponent.mix-->
-<!ENTITY % local.refcomponent.mix "">
-<!ENTITY % refcomponent.mix
- "%list.class; |%admon.class;
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |%formal.class; |%compound.class;
- |%genobj.class; |Caution
- |Note |Tip %local.refcomponent.mix;">
-
-<!ENTITY % local.indexdivcomponent.mix "">
-<!ENTITY % indexdivcomponent.mix
- "ItemizedList|OrderedList|VariableList
- |%linespecific.class; |%synop.class;
- |%para.class; |%informal.class;
- |Comment
- |%link.char.class;
- %local.indexdivcomponent.mix;">
-
-<!ENTITY % local.refname.char.mix "">
-<!ENTITY % refname.char.mix
- "#PCDATA
- |%cptr.char.class;
- %local.refname.char.mix;">
-
-<!ENTITY % local.partcontent.mix "">
-<!ENTITY % partcontent.mix
- "%appendix.class;|%chapter.class;|%nav.class;
- |Preface|%refentry.class;|Reference %local.partcontent.mix;">
-
-<!ENTITY % local.refinline.char.mix "">
-<!ENTITY % refinline.char.mix
- "#PCDATA
- |%xref.char.class; |%word.char.class;
- |%link.char.class; |%cptr.char.class;
- |%docinfo.char.class;
- |%other.char.class;
- %local.refinline.char.mix;">
-
-<!ENTITY % local.refclass.char.mix "">
-<!ENTITY % refclass.char.mix
- "#PCDATA
- |Application
- %local.refclass.char.mix;">
-
-<!ENTITY % local.setinfo.char.mix "">
-<!ENTITY % setinfo.char.mix
- "#PCDATA
- |%docinfo.char.class;|Title|Copyright|CorpName|Date|Editor
- |Edition|ISBN|LegalNotice|OrgName|PrintHistory|Publisher
- |PubsNumber|ReleaseInfo|Subtitle|VolumeNum
- %local.setinfo.char.mix;">
-
-<!-- Redeclaration placeholder 2 .......................................... -->
-
-<!-- For redeclaring entities that are declared after this point while
- retaining their references to the entities that are declared before
- this point -->
-
-<![ %dbhier.redecl2.module; [
-%rdbhier2;
-<!--end of dbhier.redecl2.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Entities for content models .......................................... -->
-
-<!ENTITY % div.title.content
- "Title, TitleAbbrev?">
-
-<!ENTITY % bookcomponent.title.content
- "Title, TitleAbbrev?">
-
-<!ENTITY % sect.title.content
- "Title, TitleAbbrev?">
-
-<!ENTITY % refsect.title.content
- "Title, TitleAbbrev?">
-
-<!ENTITY % bookcomponent.content
- "((%divcomponent.mix;)+,
- (Sect1*|(%refentry.class;)*))
- | (Sect1+|(%refentry.class;)+)">
-
-<!-- ...................................................................... -->
-
-<!-- ...................................................................... -->
-<!-- Book and BookInfo .................................................... -->
-
-<!ENTITY % book.content.module "INCLUDE">
-<![ %book.content.module; [
-<!ENTITY % book.module "INCLUDE">
-<![ %book.module; [
-<!ENTITY % local.book.attrib "">
-<!ENTITY % book.role.attrib "%role.attrib;">
-<!ELEMENT Book - O ((%div.title.content;), BookInfo, ToC?, Preface*,
- (((%chapter.class;)+, Reference*) | (Part,Part+) | Reference+),
- (%appendix.class;)*, Glossary?, Bibliography?,
- (%index.class;)*)
- +(%ubiq.mix;)>
-<!ATTLIST Book
- --FPI: Preferred formal public ID of book--
- FPI CDATA #IMPLIED
- Role (SINGLE | NUMBERED | NUMBERED-NonConsecutivePg |
- UNNUMBERED | UNNUMBERED-NonConsecutivePg ) #IMPLIED
- Label (ALPHA | BETA | PRE-FCS | FCS) #IMPLIED
- %common.attrib;
->
-<!--end of book.module-->]]>
-
-<!ENTITY % bookinfo.module "INCLUDE">
-<![ %bookinfo.module; [
-<!ENTITY % local.bookinfo.attrib "">
-<!ENTITY % bookinfo.role.attrib "%role.attrib;">
-<!ELEMENT BookInfo - - (BookBiblio, (LegalNotice)+,
- SubjectSet* , KeywordSet*, ModeSpec*)
- -(IssueNum, %ubiq.mix;)>
-<!ATTLIST BookInfo
- -- Contents: points to the IDs of the book pieces
- in the order of their appearance--
- Contents IDREFS #IMPLIED
- Role ( None | All | LOT | LOF | LOC
- | LOT-LOF | LOT-LOC | LOC-LOF) #IMPLIED
->
-<!--end of bookinfo.module-->]]>
-<!--end of book.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Dedication, ToC, and LoT ............................................. -->
-
-<!ENTITY % toc.content.module "INCLUDE">
-<![ %toc.content.module; [
-<!ENTITY % toc.module "INCLUDE">
-<![ %toc.module; [
-<!ENTITY % local.toc.attrib "">
-<!ENTITY % toc.role.attrib "%role.attrib;">
-<!ELEMENT ToC - O (ToCfront*)>
-<!--end of toc.module-->]]>
-
-<!--Changed para.char.mix to small.para.char.mix-->
-<!ENTITY % tocfront.module "INCLUDE">
-<![ %tocfront.module; [
-<!ENTITY % local.tocfront.attrib "">
-<!ENTITY % tocfront.role.attrib "%role.attrib;">
-<!ELEMENT ToCfront - O ((%small.para.char.mix;)+)>
-<!ATTLIST ToCfront
- %label.attrib;
- %pagenum.attrib;
- %common.attrib;
->
-<!--end of tocfront.module-->]]>
-
-<!--end of toc.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Appendix, Chapter, Part, Preface, Reference, PartIntro ............... -->
-
-<!ENTITY % appendix.module "INCLUDE">
-<![ %appendix.module; [
-<!ENTITY % local.appendix.attrib "">
-<!ENTITY % appendix.role.attrib "%role.attrib;">
-<!ELEMENT Appendix - O ((%bookcomponent.title.content;),
- (%bookcomponent.content;)) +(%ubiq.mix;)>
-<!ATTLIST Appendix
- %common.attrib;
- Label CDATA #IMPLIED
- Role (MANPAGES) #IMPLIED
-
->
-<!--end of appendix.module-->]]>
-
-<!ENTITY % chapter.module "INCLUDE">
-<![ %chapter.module; [
-<!ENTITY % local.chapter.attrib "">
-<!ENTITY % chapter.role.attrib "%role.attrib;">
-<!ELEMENT Chapter - O ((%bookcomponent.title.content;),
- (%bookcomponent.content;), (Glossary | Bibliography)*)
- +(%ubiq.mix;)>
-<!ATTLIST Chapter
- %common.attrib;
- Label CDATA #IMPLIED
- Role (MANPAGES) #IMPLIED
-
->
-<!--end of chapter.module-->]]>
-
-<!ENTITY % part.module "INCLUDE">
-<![ %part.module; [
-<!ENTITY % local.part.attrib "">
-<!ENTITY % part.role.attrib "%role.attrib;">
-<!ELEMENT Part - - ((%bookcomponent.title.content;), PartIntro?,
- (((Bibliography | %chapter.class; | Glossary | Reference)+ ) |
- (%appendix.class;)+ )) +(%ubiq.mix;)>
-<!ATTLIST Part
- %common.attrib;
->
-<!--ELEMENT PartIntro (defined below)-->
-<!--end of part.module-->]]>
-
-<!ENTITY % preface.module "INCLUDE">
-<![ %preface.module; [
-<!ENTITY % local.preface.attrib "">
-<!ENTITY % preface.role.attrib "%role.attrib;">
-<!ELEMENT Preface - O ((%bookcomponent.title.content;),
- (%bookcomponent.content;)) +(%ubiq.mix;)>
-<!ATTLIST Preface
- %common.attrib;
- Role (PREFACE | INTRODUCTION) PREFACE
->
-<!--end of preface.module-->]]>
-
-<!ENTITY % reference.module "INCLUDE">
-<![ %reference.module; [
-<!ENTITY % local.reference.attrib "">
-<!ENTITY % reference.role.attrib "%role.attrib;">
-<!ELEMENT Reference - O ((%bookcomponent.title.content;), PartIntro?,
- (%refentry.class;)+) +(%ubiq.mix;)>
-<!ATTLIST Reference
- %common.attrib;
- Label CDATA #IMPLIED
->
-<!--ELEMENT PartIntro (defined below)-->
-<!--end of reference.module-->]]>
-
-<!ENTITY % partintro.module "INCLUDE">
-<![ %partintro.module; [
-<!ENTITY % local.partintro.attrib "">
-<!ENTITY % partintro.role.attrib "%role.attrib;">
-<!ELEMENT PartIntro - O (%bookcomponent.content;) +(%ubiq.mix;)>
-<!ATTLIST PartIntro
- %common.attrib;
- Role (MANPAGES | NO-MANPAGES) NO-MANPAGES
->
-<!--end of partintro.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Info elements ........................................................ -->
-
-
-<!-- ...................................................................... -->
-<!-- Sect1, Sect2, Sect3, Sect4, Sect5 .................................... -->
-
-<!ENTITY % sect1.module "INCLUDE">
-<![ %sect1.module; [
-<!ENTITY % local.sect1.attrib "">
-<!ENTITY % sect1.role.attrib "%role.attrib;">
-<!ELEMENT Sect1 - O ((%sect.title.content;), (((%divcomponent.mix;)+,
- ((%refentry.class;)* | Sect2*))
- | (%refentry.class;)+ | Sect2+)) +(%ubiq.mix;)>
-<!ATTLIST Sect1
- %label.attrib;
- %common.attrib;
->
-<!--end of sect1.module-->]]>
-
-<!ENTITY % sect2.module "INCLUDE">
-<![ %sect2.module; [
-<!ENTITY % local.sect2.attrib "">
-<!ENTITY % sect2.role.attrib "%role.attrib;">
-<!ELEMENT Sect2 - O ((%sect.title.content;), (((%divcomponent.mix;)+,
- ((%refentry.class;)* | Sect3*)) | (%refentry.class;)+
- | Sect3+))>
-<!ATTLIST Sect2
- %label.attrib;
- %common.attrib;
- Role (PROCEDURE) #IMPLIED
->
-<!--end of sect2.module-->]]>
-
-<!ENTITY % sect3.module "INCLUDE">
-<![ %sect3.module; [
-<!ENTITY % local.sect3.attrib "">
-<!ENTITY % sect3.role.attrib "%role.attrib;">
-<!ELEMENT Sect3 - O ((%sect.title.content;), (((%divcomponent.mix;)+,
- ((%refentry.class;)* | Sect4*)) | (%refentry.class;)+
- | Sect4+))>
-<!ATTLIST Sect3
- %label.attrib;
- %common.attrib;
- Role (PROCEDURE) #IMPLIED
->
-<!--end of sect3.module-->]]>
-
-<!ENTITY % sect4.module "INCLUDE">
-<![ %sect4.module; [
-<!ENTITY % local.sect4.attrib "">
-<!ENTITY % sect4.role.attrib "%role.attrib;">
-<!ELEMENT Sect4 - O ((%sect.title.content;), ((%divcomponent.mix;)+)) >
-<!ATTLIST Sect4
- %label.attrib;
- %common.attrib;
->
-<!--end of sect4.module-->]]>
-
-
-
-<!-- ...................................................................... -->
-<!-- Bibliography ......................................................... -->
-
-<!ENTITY % bibliography.content.module "INCLUDE">
-<![ %bibliography.content.module; [
-<!ENTITY % bibliography.module "INCLUDE">
-<![ %bibliography.module; [
-<!ENTITY % local.bibliography.attrib "">
-<!ENTITY % bibliography.role.attrib "%role.attrib;">
-<!ELEMENT Bibliography - O ((%bookcomponent.title.content;),
- (%component.mix;)*,
- (BiblioDiv+ | (BiblioEntry)+))>
-<!ATTLIST Bibliography
- %status.attrib;
- %common.attrib;
->
-<!--end of bibliography.module-->]]>
-
-<!ENTITY % bibliodiv.module "INCLUDE">
-<![ %bibliodiv.module; [
-<!ENTITY % local.bibliodiv.attrib "">
-<!ENTITY % bibliodiv.role.attrib "%role.attrib;">
-<!ELEMENT BiblioDiv - O ((%sect.title.content;), (%component.mix;)*,
- (BiblioEntry)+)>
-<!ATTLIST BiblioDiv
- %status.attrib;
- %common.attrib;
->
-<!--end of bibliodiv.module-->]]>
-<!--end of bibliography.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Glossary ............................................................. -->
-
-<!ENTITY % glossary.content.module "INCLUDE">
-<![ %glossary.content.module; [
-<!ENTITY % glossary.module "INCLUDE">
-<![ %glossary.module; [
-<!ENTITY % local.glossary.attrib "">
-<!ENTITY % glossary.role.attrib "%role.attrib;">
-<!ELEMENT Glossary - O ((%bookcomponent.title.content;)?, (%component.mix;)*,
- (GlossDiv+ | GlossEntry+), Bibliography?)>
-<!ATTLIST Glossary
- %status.attrib;
- %common.attrib;
->
-<!--end of glossary.module-->]]>
-
-<!ENTITY % glossdiv.module "INCLUDE">
-<![ %glossdiv.module; [
-<!ENTITY % local.glossdiv.attrib "">
-<!ENTITY % glossdiv.role.attrib "%role.attrib;">
-<!ELEMENT GlossDiv - O ((%sect.title.content;), (%component.mix;)*,
- GlossEntry+)>
-<!ATTLIST GlossDiv
- %status.attrib;
- %common.attrib;
->
-<!--end of glossdiv.module-->]]>
-<!--end of glossary.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Index and SetIndex ................................................... -->
-
-<!ENTITY % index.content.module "INCLUDE">
-<![ %index.content.module; [
-<!ENTITY % indexes.module "INCLUDE">
-<![ %indexes.module; [
-<!ENTITY % local.indexes.attrib "">
-<!ENTITY % indexes.role.attrib "%role.attrib;">
-<!ELEMENT (%index.class;) - O ((%bookcomponent.title.content;)?,
- (%component.mix;)*, (IndexDiv+ | IndexEntry+))
- -(%ndxterm.class;)>
-<!ATTLIST (%index.class;)
- %common.attrib;
->
-<!--end of indexes.module-->]]>
-
-<!ENTITY % indexdiv.module "INCLUDE">
-<![ %indexdiv.module; [
-
-<!-- SegmentedList in this content is useful for marking up permuted
- indices. -->
-
-<!ENTITY % local.indexdiv.attrib "">
-<!ENTITY % indexdiv.role.attrib "%role.attrib;">
-<!ELEMENT IndexDiv - O ((%sect.title.content;)?, ((%indexdivcomponent.mix;)*,
- (IndexEntry+ | SegmentedList)))>
-<!ATTLIST IndexDiv
- %common.attrib;
->
-<!--end of indexdiv.module-->]]>
-
-<!ENTITY % indexentry.module "INCLUDE">
-<![ %indexentry.module; [
-<!-- Index entries appear in the index, not the text. -->
-
-<!ENTITY % local.indexentry.attrib "">
-<!ENTITY % indexentry.role.attrib "%role.attrib;">
-<!ELEMENT IndexEntry - O (PrimaryIE, (SeeIE|SeeAlsoIE)*,
- (SecondaryIE, (SeeIE|SeeAlsoIE|TertiaryIE)*)*)>
-<!ATTLIST IndexEntry
- %common.attrib;
->
-<!--end of indexentry.module-->]]>
-
-<!ENTITY % primsecterie.module "INCLUDE">
-<![ %primsecterie.module; [
-<!ENTITY % local.primsecterie.attrib "">
-<!ENTITY % primsecterie.role.attrib "%role.attrib;">
-<!ELEMENT (PrimaryIE | SecondaryIE | TertiaryIE) - O ((%ndxterm.char.mix;)+)>
-<!ATTLIST (PrimaryIE | SecondaryIE | TertiaryIE)
- %linkends.attrib; --to IndexTerms that these entries represent--
- %common.attrib;
->
-<!--end of primsecterie.module-->]]>
-
-<!ENTITY % seeie.module "INCLUDE">
-<![ %seeie.module; [
-<!ENTITY % local.seeie.attrib "">
-<!ENTITY % seeie.role.attrib "%role.attrib;">
-<!ELEMENT SeeIE - O ((%ndxterm.char.mix;)+)>
-<!ATTLIST SeeIE
- %linkend.attrib; --to IndexEntry to look up--
- %common.attrib;
->
-<!--end of seeie.module-->]]>
-
-<!ENTITY % seealsoie.module "INCLUDE">
-<![ %seealsoie.module; [
-<!ENTITY % local.seealsoie.attrib "">
-<!ENTITY % seealsoie.role.attrib "%role.attrib;">
-<!ELEMENT SeeAlsoIE - O ((%ndxterm.char.mix;)+)>
-<!ATTLIST SeeAlsoIE
- %linkends.attrib; --to related IndexEntries--
- %common.attrib;
->
-<!--end of seealsoie.module-->]]>
-<!--end of index.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- RefEntry ............................................................. -->
-
-<!ENTITY % refentry.content.module "INCLUDE">
-<![ %refentry.content.module; [
-<!ENTITY % refentry.module "INCLUDE">
-<![ %refentry.module; [
-<!ENTITY % local.refentry.attrib "">
-<!ENTITY % refentry.role.attrib "%role.attrib;">
-<!ELEMENT RefEntry - O (RefMeta, (Comment|%link.char.class;)*,
- RefNameDiv, RefSynopsisDiv?, RefSect1+) +(%ubiq.mix;)>
-<!ATTLIST RefEntry
- %status.attrib;
- %common.attrib;
->
-<!--end of refentry.module-->]]>
-
-<!ENTITY % refmeta.module "INCLUDE">
-<![ %refmeta.module; [
-<!ENTITY % local.refmeta.attrib "">
-<!ENTITY % refmeta.role.attrib "%role.attrib;">
-<!ELEMENT RefMeta - - (RefEntryTitle, ManVolNum?, (RefMiscInfo,
- RefMiscInfo, RefMiscInfo, RefMiscInfo, RefMiscInfo),
- RefMiscInfo*) -(BeginPage)>
-<!ATTLIST RefMeta
- %common.attrib;
->
-<!--end of refmeta.module-->]]>
-
-<!ENTITY % refmiscinfo.module "INCLUDE">
-<![ %refmiscinfo.module; [
-<!ENTITY % local.refmiscinfo.attrib "">
-<!ENTITY % refmiscinfo.role.attrib "%role.attrib;">
-<!ELEMENT RefMiscInfo - - ((%docinfo.char.mix;)+)>
-<!ATTLIST RefMiscInfo
- Class (Date | SectDesc | Software | Arch | Copyright) #REQUIRED
- %common.attrib;
->
-<!--end of refmiscinfo.module-->]]>
-
-<!ENTITY % refnamediv.module "INCLUDE">
-<![ %refnamediv.module; [
-<!ENTITY % local.refnamediv.attrib "">
-<!ENTITY % refnamediv.role.attrib "%role.attrib;">
-<!ELEMENT RefNameDiv - O (RefDescriptor?, RefName+, RefPurpose,
- (Comment|%link.char.class;)*)>
-<!ATTLIST RefNameDiv
- %common.attrib;
->
-<!--end of refnamediv.module-->]]>
-
-<!ENTITY % refdescriptor.module "INCLUDE">
-<![ %refdescriptor.module; [
-<!ENTITY % local.refdescriptor.attrib "">
-<!ENTITY % refdescriptor.role.attrib "%role.attrib;">
-<!ELEMENT RefDescriptor - O ((%refname.char.mix;)+)>
-<!ATTLIST RefDescriptor
- %common.attrib;
->
-<!--end of refdescriptor.module-->]]>
-
-<!ENTITY % refname.module "INCLUDE">
-<![ %refname.module; [
-<!ENTITY % local.refname.attrib "">
-<!ENTITY % refname.role.attrib "%role.attrib;">
-<!ELEMENT RefName - O ((%refname.char.mix;)+)>
-<!ATTLIST RefName
- %common.attrib;
->
-<!--end of refname.module-->]]>
-
-<!ENTITY % refpurpose.module "INCLUDE">
-<![ %refpurpose.module; [
-<!ENTITY % local.refpurpose.attrib "">
-<!ENTITY % refpurpose.role.attrib "%role.attrib;">
-<!ELEMENT RefPurpose - O ((%refinline.char.mix;)+)>
-<!ATTLIST RefPurpose
- %common.attrib;
->
-<!--end of refpurpose.module-->]]>
-
-<!ENTITY % refsynopsisdiv.module "INCLUDE">
-<![ %refsynopsisdiv.module; [
-<!ENTITY % local.refsynopsisdiv.attrib "">
-<!ENTITY % refsynopsisdiv.role.attrib "%role.attrib;">
-<!ELEMENT RefSynopsisDiv - O ((%refsect.title.content;)?,
- (((Synopsis | CmdSynopsis | FuncSynopsis)+, RefSect2*)
- | (RefSect2+)))>
-<!ATTLIST RefSynopsisDiv
- %common.attrib;
->
-<!--end of refsynopsisdiv.module-->]]>
-
-<!ENTITY % refsect1.module "INCLUDE">
-<![ %refsect1.module; [
-<!ENTITY % local.refsect1.attrib "">
-<!ENTITY % refsect1.role.attrib "%role.attrib;">
-<!ELEMENT RefSect1 - O ((%refsect.title.content;),
- (((%refcomponent.mix;)+, RefSect2*) | RefSect2+))>
-<!ATTLIST RefSect1
- %status.attrib;
- %common.attrib;
->
-<!--end of refsect1.module-->]]>
-
-<!ENTITY % refsect2.module "INCLUDE">
-<![ %refsect2.module; [
-<!ENTITY % local.refsect2.attrib "">
-<!ENTITY % refsect2.role.attrib "%role.attrib;">
-<!ELEMENT RefSect2 - O ((%refsect.title.content;),
- (((%refcomponent.mix;)+, RefSect3*) | RefSect3+))>
-<!ATTLIST RefSect2
- %status.attrib;
- %common.attrib;
->
-<!--end of refsect2.module-->]]>
-
-<!ENTITY % refsect3.module "INCLUDE">
-<![ %refsect3.module; [
-<!ENTITY % local.refsect3.attrib "">
-<!ENTITY % refsect3.role.attrib "%role.attrib;">
-<!ELEMENT RefSect3 - O ((%refsect.title.content;), (%refcomponent.mix;)+)>
-<!ATTLIST RefSect3
- %status.attrib;
- %common.attrib;
->
-<!--end of refsect3.module-->]]>
-<!--end of refentry.content.module-->]]>
-
-<!-- ...................................................................... -->
-<!-- Article .............................................................. -->
-
-<!-- End of SolBook V2.0 document hierarchy module ........................ -->
-<!-- ...................................................................... -->
-
-<!-- End of DocBook DTD V3.0-Based SolBook Subset V2.0 .................... -->
-<!-- ...................................................................... -->
diff --git a/usr/src/cmd/man/src/util/sun_iso.gml b/usr/src/cmd/man/src/util/sun_iso.gml
deleted file mode 100644
index 700624ae35..0000000000
--- a/usr/src/cmd/man/src/util/sun_iso.gml
+++ /dev/null
@@ -1,199 +0,0 @@
-<!-- Character entity set for use with the SolBook v.2 DTD.
- ident "%Z%%M% %I% %E% SMI"
- This is a subset of the ISO entities
- (C) 1997, Sun Microsystems Inc.
--->
-<!-- (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.
--->
-
-<!ENTITY AElig SDATA "[AElig ]"--=capital AE diphthong (ligature)-->
-<!ENTITY Aacute SDATA "[Aacute]"--=capital A, acute accent-->
-<!ENTITY Acirc SDATA "[Acirc ]"--=capital A, circumflex accent-->
-<!ENTITY Agrave SDATA "[Agrave]"--=capital A, grave accent-->
-<!ENTITY Aring SDATA "[Aring ]"--=capital A, ring-->
-<!ENTITY Atilde SDATA "[Atilde]"--=capital A, tilde-->
-<!ENTITY Auml SDATA "[Auml ]"--=capital A, dieresis or umlaut mark-->
-<!ENTITY Ccedil SDATA "[Ccedil]"--=capital C, cedilla-->
-<!ENTITY ETH SDATA "[ETH ]"--=capital Eth, Icelandic-->
-<!ENTITY Eacute SDATA "[Eacute]"--=capital E, acute accent-->
-<!ENTITY Ecirc SDATA "[Ecirc ]"--=capital E, circumflex accent-->
-<!ENTITY Egrave SDATA "[Egrave]"--=capital E, grave accent-->
-<!ENTITY Iacute SDATA "[Iacute]"--=capital I, acute accent-->
-<!ENTITY Icirc SDATA "[Icirc ]"--=capital I, circumflex accent-->
-<!ENTITY Igrave SDATA "[Igrave]"--=capital I, grave accent-->
-<!ENTITY Iuml SDATA "[Iuml ]"--=capital I, dieresis or umlaut mark-->
-<!ENTITY Ntilde SDATA "[Ntilde]"--=capital N, tilde-->
-<!ENTITY Oacute SDATA "[Oacute]"--=capital O, acute accent-->
-<!ENTITY Ocirc SDATA "[Ocirc ]"--=capital O, circumflex accent-->
-<!ENTITY Ograve SDATA "[Ograve]"--=capital O, grave accent-->
-<!ENTITY Oslash SDATA "[Oslash]"--=capital O, slash-->
-<!ENTITY Otilde SDATA "[Otilde]"--=capital O, tilde-->
-<!ENTITY Ouml SDATA "[Ouml ]"--=capital O, dieresis or umlaut mark-->
-<!ENTITY THORN SDATA "[THORN ]"--=capital THORN, Icelandic-->
-<!ENTITY Uacute SDATA "[Uacute]"--=capital U, acute accent-->
-<!ENTITY Ucirc SDATA "[Ucirc ]"--=capital U, circumflex accent-->
-<!ENTITY Ugrave SDATA "[Ugrave]"--=capital U, grave accent-->
-<!ENTITY Uuml SDATA "[Uuml ]"--=capital U, dieresis or umlaut mark-->
-<!ENTITY Yacute SDATA "[Yacute]"--=capital Y, acute accent-->
-<!ENTITY aacute SDATA "[aacute]"--=small a, acute accent-->
-<!ENTITY acirc SDATA "[acirc ]"--=small a, circumflex accent-->
-<!ENTITY acute SDATA "[acute ]"--=acute accent-->
-<!ENTITY aelig SDATA "[aelig ]"--=small ae diphthong (ligature)-->
-<!ENTITY agrave SDATA "[agrave]"--=small a, grave accent-->
-<!ENTITY amp SDATA "[amp ]"--=ampersand-->
-<!ENTITY and SDATA "[and ]"--/wedge /land B: =logical and-->
-<!ENTITY ap SDATA "[ap ]"--/approx R: =approximate-->
-<!ENTITY aring SDATA "[aring ]"--=small a, ring-->
-<!ENTITY ast SDATA "[ast ]"--/ast B: =asterisk-->
-<!ENTITY atilde SDATA "[atilde]"--=small a, tilde-->
-<!ENTITY auml SDATA "[auml ]"--=small a, dieresis or umlaut mark-->
-<!ENTITY brvbar SDATA "[brvbar]"--=broken (vertical) bar-->
-<!ENTITY bsol SDATA "[bsol ]"--/backslash =reverse solidus-->
-<!ENTITY boxv SDATA "[boxv ]"--vertical line-->
-<!ENTITY bull SDATA "[bull ]"--/bullet B: =round bullet, filled-->
-<!ENTITY caret SDATA "[caret ]"--=caret (insertion mark)-->
-<!ENTITY ccedil SDATA "[ccedil]"--=small c, cedilla-->
-<!ENTITY cedil SDATA "[cedil ]"--=cedilla-->
-<!ENTITY cent SDATA "[cent ]"--=cent sign-->
-<!ENTITY check SDATA "[check ]"--/checkmark =tick, check mark-->
-<!ENTITY auml SDATA "[auml ]"--=small a, dieresis or umlaut mark-->
-<!ENTITY brvbar SDATA "[brvbar]"--=broken (vertical) bar-->
-<!ENTITY bull SDATA "[bull ]"--/bullet B: =round bullet, filled-->
-<!ENTITY ccedil SDATA "[ccedil]"--=small c, cedilla-->
-<!ENTITY cedil SDATA "[cedil ]"--=cedilla-->
-<!ENTITY cent SDATA "[cent ]"--=cent sign-->
-<!ENTITY check SDATA "[check ]"--/checkmark =tick, check mark-->
-<!ENTITY circ SDATA "[circ ]"--=circumflex accent-->
-<!ENTITY colon SDATA "[colon ]"--/colon P:-->
-<!ENTITY comma SDATA "[comma ]"--P: =comma-->
-<!ENTITY commat SDATA "[commat]"--=commercial at-->
-<!ENTITY cong SDATA "[cong ]"--/cong R: =congruent with-->
-<!ENTITY copy SDATA "[copy ]"--=copyright sign-->
-<!ENTITY cross SDATA "[ballot]"--=ballot cross-->
-<!ENTITY curren SDATA "[curren]"--=general currency sign-->
-<!ENTITY dash SDATA "[dash ]"--=hyphen (true graphic)-->
-<!ENTITY deg SDATA "[deg ]"--=degree sign-->
-<!ENTITY diam SDATA "[diam ]"--/diamond B: open diamond-->
-<!ENTITY diams SDATA "[diams ]"--/diamondsuit =diamond suit symbol-->
-<!ENTITY divide SDATA "[divide]"--/div B: =divide sign-->
-<!ENTITY dollar SDATA "[dollar]"--=dollar sign-->
-<!ENTITY eacute SDATA "[eacute]"--=small e, acute accent-->
-<!ENTITY ecirc SDATA "[ecirc ]"--=small e, circumflex accent-->
-<!ENTITY egrave SDATA "[egrave]"--=small e, grave accent-->
-<!ENTITY emsp SDATA "[emsp ]"--=em space-->
-<!ENTITY emsp13 SDATA "[emsp3 ]"--=1/3-em space-->
-<!ENTITY emsp14 SDATA "[emsp4 ]"--=1/4-em space-->
-<!ENTITY ensp SDATA "[ensp ]"--=en space (1/2-em)-->
-<!ENTITY equals SDATA "[equals]"--=equals sign R:-->
-<!ENTITY eth SDATA "[eth ]"--=small eth, Icelandic-->
-<!ENTITY euml SDATA "[euml ]"--=small e, dieresis or umlaut mark-->
-<!ENTITY excl SDATA "[excl ]"--=exclamation mark-->
-<!ENTITY exist SDATA "[exist ]"--/exists =at least one exists-->
-<!ENTITY forall SDATA "[forall]"--/forall =for all-->
-<!ENTITY frac12 SDATA "[frac12]"--=fraction one-half-->
-<!ENTITY frac13 SDATA "[frac13]"--=fraction one-third-->
-<!ENTITY frac14 SDATA "[frac14]"--=fraction one-quarter-->
-<!ENTITY frac15 SDATA "[frac15]"--=fraction one-fifth-->
-<!ENTITY frac34 SDATA "[frac34]"--=fraction three-quarters-->
-<!ENTITY ge SDATA "[ge ]"--/geq /ge R: =greater-than-or-equal-->
-<!ENTITY gl SDATA "[gl ]"--/gtrless R: greater, less-->
-<!ENTITY grave SDATA "[grave ]"--=grave accent-->
-<!ENTITY gt SDATA "[gt ]"--=greater-than sign R:-->
-<!ENTITY hairsp SDATA "[hairsp]"--=hair space-->
-<!ENTITY harr SDATA "[harr ]"--/leftrightarrow A: l&r arrow -->
-<!ENTITY hellip SDATA "[hellip]"--=ellipsis (horizontal)-->
-<!ENTITY hyphen SDATA "[hyphen]"--=hyphen-->
-<!ENTITY iacute SDATA "[iacute]"--=small i, acute accent-->
-<!ENTITY icirc SDATA "[icirc ]"--=small i, circumflex accent-->
-<!ENTITY iexcl SDATA "[iexcl ]"--=inverted exclamation mark-->
-<!ENTITY igrave SDATA "[igrave]"--=small i, grave accent-->
-<!ENTITY infin SDATA "[infin ]"--/infty =infinity-->
-<!ENTITY iquest SDATA "[iquest]"--=inverted question mark-->
-<!ENTITY iuml SDATA "[iuml ]"--=small i, dieresis or umlaut mark-->
-<!ENTITY lAarr SDATA "[lAarr ]"--/Lleftarrow A: left triple arrow -->
-<!ENTITY lArr SDATA "[lArr ]"--/Leftarrow A: =is implied by-->
-<!ENTITY laquo SDATA "[laquo ]"--=angle quotation mark, left-->
-<!ENTITY larr SDATA "[larr ]"--/leftarrow /gets A: =leftward arrow-->
-<!ENTITY lcub SDATA "[lcub ]"--/lbrace O: =left curly bracket-->
-<!ENTITY ldquo SDATA "[ldquo ]"--=double quotation mark, left-->
-<!ENTITY ldquor SDATA "[ldquor]"--=rising dbl quote, left (low)-->
-<!ENTITY le SDATA "[le ]"--/leq /le R: =less-than-or-equal-->
-<!ENTITY lg SDATA "[lg ]"--/lessgtr R: less, greater-->
-<!ENTITY lgr SDATA "[lgr ]"--=small lambda, Greek-->
-<!ENTITY lowbar SDATA "[lowbar]"--=low line-->
-<!ENTITY loz SDATA "[loz ]"--/lozenge - lozenge or total mark-->
-<!ENTITY lpar SDATA "[lpar ]"--O: =left parenthesis-->
-<!ENTITY lsqb SDATA "[lsqb ]"--/lbrack O: =left square bracket-->
-<!ENTITY lsquo SDATA "[lsquo ]"--=single quotation mark, left-->
-<!ENTITY lsquor SDATA "[lsquor]"--=rising single quote, left (low)-->
-<!ENTITY lt SDATA "[lt ]"--=less-than sign R:-->
-<!ENTITY macr SDATA "[macr ]"--=macron-->
-<!ENTITY mdash SDATA "[mdash ]"--=em dash-->
-<!ENTITY micro SDATA "[micro ]"--=micro sign-->
-<!ENTITY middot SDATA "[middot]"--/centerdot B: =middle dot-->
-<!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 nbsp SDATA "[nbsp ]"--=no break (required) space-->
-<!ENTITY ndash SDATA "[ndash ]"--=en dash -->
-<!ENTITY ne SDATA "[ne ]"--/ne /neq R: =not equal-->
-<!ENTITY not SDATA "[not ]"--/neg /lnot =not sign-->
-<!ENTITY ntilde SDATA "[ntilde]"--=small n, tilde-->
-<!ENTITY num SDATA "[num ]"--=number sign-->
-<!ENTITY numsp SDATA "[numsp ]"--=digit space (width of a number)-->
-<!ENTITY oacute SDATA "[oacute]"--=small o, acute accent-->
-<!ENTITY ocirc SDATA "[ocirc ]"--=small o, circumflex accent-->
-<!ENTITY ograve SDATA "[ograve]"--=small o, grave accent-->
-<!ENTITY or SDATA "[or ]"--/vee /lor B: =logical or-->
-<!ENTITY ordf SDATA "[ordf ]"--=ordinal indicator, feminine-->
-<!ENTITY ordm SDATA "[ordm ]"--=ordinal indicator, masculine-->
-<!ENTITY oslash SDATA "[oslash]"--=small o, slash-->
-<!ENTITY otilde SDATA "[otilde]"--=small o, tilde-->
-<!ENTITY ouml SDATA "[ouml ]"--=small o, dieresis or umlaut mark-->
-<!ENTITY para SDATA "[para ]"--=pilcrow (paragraph sign)-->
-<!ENTITY percnt SDATA "[percnt]"--=percent sign-->
-<!ENTITY period SDATA "[period]"--=full stop, period-->
-<!ENTITY plus SDATA "[plus ]"--=plus sign B:-- >
-<!ENTITY plusmn SDATA "[plusmn]"--/pm B: =plus-or-minus sign-->
-<!ENTITY pound SDATA "[pound ]"--=pound sign-->
-<!ENTITY quest SDATA "[quest ]"--=question mark-->
-<!ENTITY quot SDATA "[quot ]"--=quotation mark-->
-<!ENTITY rAarr SDATA "[rAarr ]"--/Rrightarrow A: right triple arrow -->
-<!ENTITY rArr SDATA "[rArr ]"--/Rightarrow A: =implies-->
-<!ENTITY rarr SDATA "[rarr ]"--/rightarrow /to A: =rightward arrow-->
-<!ENTITY raquo SDATA "[raquo ]"--=angle quotation mark, right-->
-<!ENTITY rcub SDATA "[rcub ]"--/rbrace C: =right curly bracket-->
-<!ENTITY rdquo SDATA "[rdquo ]"--=double quotation mark, right-->
-<!ENTITY rdquor SDATA "[rdquor]"--rising dbl quote, right (high)-->
-<!ENTITY reg SDATA "[reg ]"--/circledR =registered sign-->
-<!ENTITY ring SDATA "[ring ]"--=ring-->
-<!ENTITY rpar SDATA "[rpar ]"--C: =right parenthesis-->
-<!ENTITY rsqb SDATA "[rsqb ]"--/rbrack C: =right square bracket-->
-<!ENTITY rsquo SDATA "[rsquo ]"--=single quotation mark, right-->
-<!ENTITY rsquor SDATA "[rsquor]"--rising single quote, right (high)-->
-<!ENTITY sect SDATA "[sect ]"--=section sign-->
-<!ENTITY semi SDATA "[semi ]"--=semicolon P:-->
-<!ENTITY shy SDATA "[shy ]"--=soft hyphen-->
-<!ENTITY sol SDATA "[sol ]"--=solidus-->
-<!ENTITY sup1 SDATA "[sup1 ]"--=superscript one-->
-<!ENTITY sup2 SDATA "[sup2 ]"--=superscript two-->
-<!ENTITY sup3 SDATA "[sup3 ]"--=superscript three-->
-<!ENTITY szlig SDATA "[szlig ]"--=small sharp s, German (sz ligature)-->
-<!ENTITY thorn SDATA "[thorn ]"--=small thorn, Icelandic-->
-<!ENTITY tilde SDATA "[tilde ]"--=tilde-->
-<!ENTITY thinsp SDATA "[thinsp]"--=thin space (1/6-em)-->
-<!ENTITY times SDATA "[times ]"--/times B: =multiply sign-->
-<!ENTITY trade SDATA "[trade ]"--=trade mark sign-->
-<!ENTITY uacute SDATA "[uacute]"--=small u, acute accent-->
-<!ENTITY ucirc SDATA "[ucirc ]"--=small u, circumflex accent-->
-<!ENTITY ugrave SDATA "[ugrave]"--=small u, grave accent-->
-<!ENTITY uml SDATA "[uml ]"--=umlaut mark-->
-<!ENTITY uuml SDATA "[uuml ]"--=small u, dieresis or umlaut mark-->
-<!ENTITY vellip SDATA "[vellip]"--vertical ellipsis-->
-<!ENTITY verbar SDATA "[verbar]"--/vert =vertical bar-->
-<!ENTITY yacute SDATA "[yacute]"--=small y, acute accent-->
-<!ENTITY yen SDATA "[yen ]"--/yen =yen sign-->
-<!ENTITY yuml SDATA "[yuml ]"--=small y, dieresis or umlaut mark-->
diff --git a/usr/src/cmd/man/src/util/synref.gml b/usr/src/cmd/man/src/util/synref.gml
deleted file mode 100644
index eb96ae8167..0000000000
--- a/usr/src/cmd/man/src/util/synref.gml
+++ /dev/null
@@ -1,61 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License, Version 1.0 only
- (the "License"). You may not use this file except in compliance
- with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
--->
-<!-- SCCS keyword
-#pragma ident "%Z%%M% %I% %E% SMI"
--->
-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 255
-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 40
- ATTSPLEN 960
- BSEQLEN 960
- DTAGLEN 16
- DTEMPLEN 16
- ENTLVL 16
- GRPCNT 32
- GRPGTCNT 96
- GRPLVL 16
- LITLEN 240
- NAMELEN 8
- NORMSEP 2
- PILEN 240
- TAGLEN 960
- TAGLVL 24
diff --git a/usr/src/cmd/man/src/util/warn.eps b/usr/src/cmd/man/src/util/warn.eps
deleted file mode 100644
index a9587f1279..0000000000
--- a/usr/src/cmd/man/src/util/warn.eps
+++ /dev/null
Binary files differ