; #### RTF2XML version 0.9 ; #### Copyright (C) 1997-2000 Rick Geimer ; #### This program is free software; you can redistribute it and/or ; #### modify it under the terms of the GNU General Public Licence ; #### as published by the Free Software Foundation; either version ; #### 2 of the licence, or (at your option) any later version. ; #### This program is distributed in the hope that it will be useful, ; #### but WITHOUT ANY WARRANTY; without even the implied warranty of ; #### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See ; #### the GNU General Public Licence for more details. ; #### You should have received a copy of the GNU General Public Licence ; #### along with this program; if not, write to the Free Software ; #### Foundation, Inc., 675 Mass Ave, Cambridge, MA, 02139, USA. ; #### The above licence is also available online at "http://www.gnu.org/". ; #### Rick Geimer ; #### rtf2xml@xmeta.com ; #### 2401 Huran Drive ; #### San Jose, CA, 95122 ; #### USA global stream sgml-log ; COMMAND LINE OPTION. SPECIFIES A FILENAME FOR LOGGING THE INTERMEDIATE RTFDOC SGML FILE. ONLY USEFUL FOR DEBUGGING THE RTF READER. global stream font-name global stream resource-path initial {""} global stream dtd-stream ; HOLDS THE RTFDOC DTD FOR LATER USE IF SUBDOCUMENTS ARE ENCOUNTERED global stream file-table variable initial-size 0 global stream file-name-table variable initial-size 0 global stream debug-messages initial {""} global stream entity-table variable initial { "&" WITH KEY "&", "<" WITH KEY "<", ">" WITH KEY ">", "'" WITH KEY "'", """ WITH KEY '"', " " with key "\~", "­" with key "\-", "­" with key "\_", "”" with key "rdblquote", "“" with key "ldblquote", "•" with key "bullet", "’" with key "rquote", "‘" with key "lquote", "—" with key "emdash", "–" with key "endash", "&tab;" with key "tab", "&line;" with key "line" } global counter ref-counter global counter uni-bytes global switch keep-line-breaks global switch link-subdocs ; COMMAND LINE OPTIONS. WHEN ACTIVE, SUBDOCUMENTS WILL NOT BE RESOLVED, ONLY REFERENCED. global stream font-name-stack variable initial-size 0 global stream font-charset-stack variable initial-size 0 global stream font-charset initial {""} global stream style-name-stack variable initial-size 0 ;global stream format-stack variable initial-size 0 global stream format-stack variable initial { "" with key "current-style-name", "" with key "current-alignment", "" with key "current-char-style-name", "" with key "current-font-name", "" with key "is-bold", "" with key "is-italic", "" with key "is-underlined", "" with key "is-subscript", "" with key "is-superscript", "" with key "is-hidden", "" with key "current-charset", "" with key "current-font-size", "" with key "current-color", "" with key "is-caps", "" with key "is-scaps", "" with key "is-strike", "" with key "expand-twips", "" with key "rev-status", "" with key "rev-author", "" with key "rev-time" } global stream format-stack-defaults variable initial { "" with key "current-style-name", "" with key "current-alignment", "" with key "current-char-style-name", "" with key "current-font-name", "" with key "is-bold", "" with key "is-italic", "" with key "is-underlined", "" with key "is-subscript", "" with key "is-superscript", "" with key "is-hidden", "" with key "current-charset", "" with key "current-font-size", "" with key "current-color", "" with key "is-caps", "" with key "is-scaps", "" with key "is-strike", "" with key "expand-twips", "" with key "rev-status", "" with key "rev-author", "" with key "rev-time" } global stream cell-endings variable initial-size 0 global stream row-type initial {"TBODY"} global stream debug-stream initial {""} global stream h-merge variable initial-size 0 global stream v-merge variable initial-size 0 global stream default-para-style initial {""} global stream doclink-stack variable initial-size 0 global stream file-id initial {"0"} global stream file-charset initial {""} global stream fig-path initial {""} global stream fig-ext initial {"fig"} global stream header initial {""} global stream marked-section-controls initial {""} global stream string-close variable initial-size 0 global stream table-border-styles variable initial { "" with key "trbrdrt", "" with key "trbrdrb", "" with key "trbrdrl", "" with key "trbrdrr", "" with key "trbrdrv", "" with key "trbrdrh", "" with key "clbrdrt", "" with key "clbrdrb", "" with key "clbrdrr", "" with key "clbrdrl" } global stream table-border-widths variable initial { "" with key "trbrdrt", "" with key "trbrdrb", "" with key "trbrdrl", "" with key "trbrdrr", "" with key "trbrdrv", "" with key "trbrdrh", "" with key "clbrdrt", "" with key "clbrdrb", "" with key "clbrdrr", "" with key "clbrdrl" } global stream border-names variable initial { "border.top" with key "trbrdrt", "border.bottom" with key "trbrdrb", "border.left" with key "trbrdrl", "border.right" with key "trbrdrr", "border.vert" with key "trbrdrv", "border.horiz" with key "trbrdrh", "border.top" with key "clbrdrt", "border.bottom" with key "clbrdrb", "border.right" with key "clbrdrr", "border.left" with key "clbrdrl" } global stream current-border-type initial {""} global stream fig-prev-type initial {""} global stream fig-width initial {""} global stream fig-height initial {""} global stream fig-width-goal initial {""} global stream fig-height-goal initial {""} global stream fig-scale-x initial {""} global stream fig-scale-y initial {""} global stream fig-pos-x initial {""} global stream fig-pos-y initial {""} global stream do-type initial {""} global stream do-size-x initial {""} global stream do-size-y initial {""} global stream do-pos-x initial {""} global stream do-pos-y initial {""} global stream atn-author initial {""} global stream revision-authors variable initial-size 0 global switch in-table global switch in-table-element global switch in-row global switch in-cell global switch in-para global switch field-has-paras global switch in-textbox ; command-line switches global switch output-sgml global switch extract-figures global switch extract-unlinked-figures global switch resolve-ansichars global switch resolve-unicode global switch resolve-entities global switch allow-nested-paras global switch embed-subdocs global switch escape-entities global switch escape-ansichars global switch escape-unicode global switch ansi-stylenames global switch no-unicode global switch sdata-entities global switch debug-tester global switch output-drawing-objects global counter subdoc-count global counter font-num global counter style-num initial {"0"} global counter charset-num initial {"0"} global counter char-style-num initial {"0"} global counter cell-counter initial {"0"} global counter cell-start global counter para-cnt global counter fig-count initial {"0"} global stream group-tags variable initial { "" with key "{", "" with key "}" } global switch table-switches variable initial { false with key "in-table", false with key "in-table-element", false with key "in-row", false with key "in-cell" } global switch table-switch-defaults variable initial { false with key "in-table", false with key "in-table-element", false with key "in-row", false with key "in-cell" } global switch table-element-switch-defaults variable initial { false with key "in-table", true with key "in-table-element", false with key "in-row", false with key "in-cell" } global stream annotation-refs initial {""}